authnz: some minor adjustment
This commit is contained in:
@@ -13,7 +13,7 @@
|
|||||||
# * LOCAL_USERS: List of local users to create
|
# * LOCAL_USERS: List of local users to create
|
||||||
# ------------------------------------------------------------------------------
|
# ------------------------------------------------------------------------------
|
||||||
|
|
||||||
export VER_authnz=0.1.0
|
export VER_authnz=0.1.1
|
||||||
|
|
||||||
# Users (from Ldap)
|
# Users (from Ldap)
|
||||||
add_remote_user()
|
add_remote_user()
|
||||||
@@ -33,7 +33,7 @@ create_user()
|
|||||||
# Authentication
|
# Authentication
|
||||||
authnz()
|
authnz()
|
||||||
{
|
{
|
||||||
if [[ $WITH_LDAP_KERB==yes ]]; then
|
if [[ $WITH_LDAP_KERB == yes ]]; then
|
||||||
pkginst krb5-user libpam-krb5 libnss-ldap libpam-ldap nscd
|
pkginst krb5-user libpam-krb5 libnss-ldap libpam-ldap nscd
|
||||||
|
|
||||||
backupdist /etc/krb5.conf /etc/libnss-ldap.conf /etc/pam_ldap.conf \
|
backupdist /etc/krb5.conf /etc/libnss-ldap.conf /etc/pam_ldap.conf \
|
||||||
@@ -50,7 +50,11 @@ authnz()
|
|||||||
add_remote_user $usr
|
add_remote_user $usr
|
||||||
done
|
done
|
||||||
fi
|
fi
|
||||||
|
|
||||||
|
if [[ -z $LOCAL_USERS ]]; then
|
||||||
|
return 0
|
||||||
|
fi
|
||||||
|
|
||||||
for usr in $LOCAL_USERS; do
|
for usr in $LOCAL_USERS; do
|
||||||
prnt I "Création de l'utilisateur $usr..."
|
prnt I "Création de l'utilisateur $usr..."
|
||||||
create_user $usr
|
create_user $usr
|
||||||
@@ -62,7 +66,7 @@ precheck_authnz()
|
|||||||
if [[ $WITH_LDAP_KERB == "yes" ]]; then
|
if [[ $WITH_LDAP_KERB == "yes" ]]; then
|
||||||
if [[ -n $REMOTE_USERS ]]; then
|
if [[ -n $REMOTE_USERS ]]; then
|
||||||
prnt I "Les utilisateurs distants suivants seront accessible :"
|
prnt I "Les utilisateurs distants suivants seront accessible :"
|
||||||
prnt m "\t$REMOTE_USERS"
|
prnt m "\t* $REMOTE_USERS"
|
||||||
else
|
else
|
||||||
prnt W "Pas d'utilisateur distant bien que LDAP/Kerberos soit activé !"
|
prnt W "Pas d'utilisateur distant bien que LDAP/Kerberos soit activé !"
|
||||||
fi
|
fi
|
||||||
|
|||||||
Reference in New Issue
Block a user