How to authenticate OpenLdap users on Ubuntu 14.04

16 March 2016 · 1 min read

Necessity

Authenticate OpenLdap directory users into machine clients with operating system Ubuntu 14.04.

Environment

Clients machines

  OS: Ubuntu 14.04

OpenLdap system

  OpenLdap: 2.4.31
Users type: posixAccount

Solution

Installing the following packages. During the installation you should set the data referent with the OpenLdap system.

sudo apt-get update
sudo apt-get install libpam-ldap nscd sysv-rc-conf

Modifying the file /etc/nsswitch.conf in order to search the users into OpenLdap directory. You must add ldap at the end of each line.

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

Removing the text use_authtok from the following line located in the file /etc/pam.d/common-password. The line should stay like this:

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

Adding the following line at the end of the file /etc/pam.d/common-session.

session required    pam_mkhomedir.so skel=/etc/skel umask=0077

Activating the module libnss-ldap by typing:

sysv-rc-conf libnss-ldap on

Reboot the operating system

sudo reboot

Done!!! Ubuntu 14.04 client has been configured!!!

comments powered by Disqus