start writing main program, finish ssh module, new authnz module, various cleanup

This commit is contained in:
levasseur
2021-06-14 17:46:59 +02:00
parent e970f24a5c
commit 2f9eb19ebe
7 changed files with 147 additions and 59 deletions

35
modules/authnz.sh Normal file
View File

@@ -0,0 +1,35 @@
# 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()
{
:
}