Ubuntu LDAP Client Installation

Client Configuration

  • During the installation of the LDAP client, a pop-up interface will appear, requiring manual configuration (not conducive to automation) LDAP server address: ldap://192.168.2.110 (fill in your own address, not random) dc=mephisto,dc=come

apt-get install -y ldap-utils libpam-ldap libnss-ldap nslcd sudo-ldap

  • Add the following line to /etc/nsswitch.conf: ldap

passwd: compat ldap group: compat ldap shadow: compat ldap

  • Add the following line to /etc/pam.d/login:

Session required: pam_mkhomedir.so: skel=/etc/skel umask=0022

  • /etc/pam.d/common-session (I haven't tested this to see if it's necessary; I haven't had time)

Session required: pam_mkhomedir.so: skel=/etc/skel umask=0022

  • update-rc.d nslcd enable

update-rc.d nslcd enable

  • /etc/init.d/nscd restart

/etc/init.d/nscd restart

sudo configuration

echo -e "uri ldap://192.168.2.110\nSudoers_base" ou=Sudoers,dc=mephisto.com,dc=com" > /etc/sudo-ldap.conf echo "Sudoers: files ldap" >> /etc/nsswitch.conf

Reference: https://www.digitalocean.com/community/tutorials/how-to-authenticate-client-computers-using-ldap-on-an-ubuntu-12-04-vps

Lastmod: Saturday, August 9, 2025

See Also:

Translations: