summaryrefslogtreecommitdiffstats
path: root/remote
diff options
context:
space:
mode:
authorSimon Rettberg2015-09-13 15:27:23 +0200
committerSimon Rettberg2015-09-13 15:27:23 +0200
commit3a5eeda3ddccf255aabc9244a848358dd0e4cfba (patch)
tree7f84dd655a7d783465f77d28ca7becb8cdd28ac4 /remote
parentFix absolute pathes not working with stage32 only (diff)
downloadtm-scripts-3a5eeda3ddccf255aabc9244a848358dd0e4cfba.tar.gz
tm-scripts-3a5eeda3ddccf255aabc9244a848358dd0e4cfba.tar.xz
tm-scripts-3a5eeda3ddccf255aabc9244a848358dd0e4cfba.zip
brainfart
Diffstat (limited to 'remote')
-rwxr-xr-xremote/modules/pam/data/opt/openslx/scripts/pam_script_auth6
1 files changed, 3 insertions, 3 deletions
diff --git a/remote/modules/pam/data/opt/openslx/scripts/pam_script_auth b/remote/modules/pam/data/opt/openslx/scripts/pam_script_auth
index 4b584957..b8ed4166 100755
--- a/remote/modules/pam/data/opt/openslx/scripts/pam_script_auth
+++ b/remote/modules/pam/data/opt/openslx/scripts/pam_script_auth
@@ -1,11 +1,11 @@
#!/bin/ash
-# check if the script runs as root
-[ "x$(whoami)" != "xroot" ] && exit 0
-
# Needed as pam_script clears PATH
export PATH="/usr/local/sbin:/usr/local/bin:/usr/sbin:/usr/bin:/sbin:/bin:/opt/openslx/sbin:/opt/openslx/bin"
+# check if the script runs as root
+[ "x$(whoami)" != "xroot" ] && exit 0
+
PASSWD=$(getent passwd "$PAM_USER")
USER_NAME=$(echo "$PASSWD" | awk -F ':' '{print $1}')
USER_UID=$(echo "$PASSWD" | awk -F ':' '{print $3}')