Files
init.sh/modules/authnz.sh

36 lines
848 B
Bash

# Ajout de la gestion d'une authentification centralisé
export VER_authnz=0.0.1
# Users (from Ldap)
add_users()
{
backupdist /etc/passwd /etc/shadow /etc/group
sed -i -e '/^fatal/d' /etc/passwd /etc/shadow /etc/group
echo "+kroot::::::" >> /etc/passwd
echo "+kroot::::::::" >> /etc/shadow
}
# Authentication
authnz()
{
pkginst nscd libpam-krb5 libnss-ldap libpam-ldap
backupdist /etc/krb5.conf /etc/libnss-ldap.conf /etc/pam_ldap.conf \
/etc/nsswitch.conf /etc/pam.d/common-session \
/etc/pam.d/common-account /etc/pam.d/common-password \
/etc/pam.d/common-auth
installfile krb5.conf libnss-ldap.conf pam_ldap.conf nsswitch.conf /etc
installfile common-session common-account common-password common-auth \
/etc/pam.d
scv_restart nscd
add_users
}
precheck_authnz()
{
:
}