authnz: added shell support, added home skelleton, use of long options with adduser
This commit is contained in:
@@ -11,6 +11,9 @@ export PROXYSRVPORT="3128"
|
||||
export LOCALESET="en_US.UTF-8 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é
|
||||
#export CALCTYPE="zfs"
|
||||
#export CALCMOUNTPOINT="/calcul/$HOSTNAME"
|
||||
|
||||
@@ -14,6 +14,9 @@ export APT_SOURCE_LIST="ubuntu_focal.list"
|
||||
export LOCALESET="en_US.UTF-8 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é
|
||||
export CALCTYPE="zfs"
|
||||
export CALCMOUNTPOINT="/calcul/$HOSTNAME"
|
||||
|
||||
@@ -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
|
||||
|
||||
Reference in New Issue
Block a user