diff options
Diffstat (limited to 'core/modules/pam-slx-plug/data/opt/openslx/pam/common/homedir-passwd')
-rw-r--r-- | core/modules/pam-slx-plug/data/opt/openslx/pam/common/homedir-passwd | 5 |
1 files changed, 3 insertions, 2 deletions
diff --git a/core/modules/pam-slx-plug/data/opt/openslx/pam/common/homedir-passwd b/core/modules/pam-slx-plug/data/opt/openslx/pam/common/homedir-passwd index 006f1c81..53ed1a5b 100644 --- a/core/modules/pam-slx-plug/data/opt/openslx/pam/common/homedir-passwd +++ b/core/modules/pam-slx-plug/data/opt/openslx/pam/common/homedir-passwd @@ -19,9 +19,10 @@ fi readonly USER_HOME # Add/replace passwd entry if it doesn't exist yet -LINE_PASS="${USER_NAME}:x:${USER_UID}:${USER_GID}:${USER_NAME}:${USER_HOME}:/bin/bash" +LINE_PASS="${USER_NAME}:x:${USER_UID}:${USER_GID}:${USER_NAME}@SLX:${USER_HOME}:/bin/bash" readonly LINE_PASS if ! grep -Fxq -- "${LINE_PASS}" /etc/passwd; then - sed -i "/^${USER_NAME}:/d" /etc/passwd + # Make sure there's no existing line with same uid or uidNumber + sed -i -r "/^${USER_NAME}:/d;/^[^:]*:x:${USER_UID}:/d" /etc/passwd echo "${LINE_PASS}" >> /etc/passwd fi |