目錄表

LDAP client

Install

sudo apt-get install libnss-ldap
sudo dpkg-reconfigure ldap-auth-config

/etc/pam.d/common-session session required pam_mkhomedir.so skel=/etc/skel/

optional

sudo auth-client-config -t nss -p lac_ldap sudo pam-auth-update

# pam password vi /etc/pam.d/common-password

delete use_authtok

#password       [success=1 user_unknown=ignore default=die]     pam_ldap.so use_authtok try_first_pass
password        [success=1 user_unknown=ignore default=die]     pam_ldap.so try_first_pass

clear caceh

nscd --invalidate=passwd

docker-openldap-backup

https://github.com/osixia/docker-openldap-backup

Restore

rm -rf /var/lib/ldap
rm -rf /etc/ldap/slapd.d
slapd-restore-config 20170311T040001-config.gz
slapd-restore-data 20170311T040001-data.gz
# try to restore mutiple times
slapd-restore-config 20170311T040001-config.gz
slapd-restore-data 20170311T040001-data.gz