authnz: added shell support, added home skelleton, use of long options with adduser

This commit is contained in:
levasseur
2021-10-08 15:41:12 +02:00
parent d73439bbb2
commit bdc04be1f9
3 changed files with 9 additions and 2 deletions

View File

@@ -11,9 +11,10 @@
# * WITH_LDAP_KERB: Shall we install requirements for LDAP/Kerberos auth ?
# * REMOTE_USERS: List of remote users to add
# * LOCAL_USERS: List of local users to create
# * DEFAULT_SHELL: The shell to use when creating new users
# ------------------------------------------------------------------------------
export VER_authnz=0.1.2
export VER_authnz=0.1.3
export DEP_authnz="upgrade_dist"
# Users (from Ldap)
@@ -30,7 +31,7 @@ create_user()
{
if [[ $(noerror --noout id $1) != 0 ]]; then
prnt I "Création de l'utilisateur $1 ..."
useradd -Um $1
useradd --create-home --skel --shell $DEFAULT_SHELL --user-group $1
else
prnt W "L'utilisateur $1 existe déjà. Rien à faire..."
fi