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,6 +11,9 @@ export PROXYSRVPORT="3128"
export LOCALESET="en_US.UTF-8 fr_FR.UTF-8" export LOCALESET="en_US.UTF-8 fr_FR.UTF-8"
export SYSLOCALE="fr_FR.UTF-8" export SYSLOCALE="fr_FR.UTF-8"
# Shell par défaut, pour les nouveaux utilisateurs
export DEFAULT_SHELL="/bin/bash"
# Configuration du disque de calcul : zfs, ext4 et xfs accepté # Configuration du disque de calcul : zfs, ext4 et xfs accepté
#export CALCTYPE="zfs" #export CALCTYPE="zfs"
#export CALCMOUNTPOINT="/calcul/$HOSTNAME" #export CALCMOUNTPOINT="/calcul/$HOSTNAME"

View File

@@ -14,6 +14,9 @@ export APT_SOURCE_LIST="ubuntu_focal.list"
export LOCALESET="en_US.UTF-8 fr_FR.UTF-8" export LOCALESET="en_US.UTF-8 fr_FR.UTF-8"
export SYSLOCALE="fr_FR.UTF-8" export SYSLOCALE="fr_FR.UTF-8"
# Shell par défaut, pour les nouveaux utilisateurs
export DEFAULT_SHELL="/bin/bash"
# Configuration du disque de calcul : zfs, ext4 et xfs accepté # Configuration du disque de calcul : zfs, ext4 et xfs accepté
export CALCTYPE="zfs" export CALCTYPE="zfs"
export CALCMOUNTPOINT="/calcul/$HOSTNAME" export CALCMOUNTPOINT="/calcul/$HOSTNAME"

View File

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