How to set up ldap authorization on ubuntu
Install OpenLDAP client:
# apt-get install ldap-auth-client nscd
Configuration:
LDAP server Uniform Resource Identifier: ldap://ldap.yellowfruit.lan
Distinguished name of the search base: dc=yellowfruit,dc=lan
LDAP version: 3
Make local root Database admin: <No>
Does the LDAP database require login? <No>
Force start_tls:
Uncomment line in /etc/ldap.conf file:
# OpenLDAP SSL mechanism
# start_tls mechanism uses the normal LDAP port, LDAPS typically 636
ssl start_tls
#ssl on
Setup nss using auth-client-config with ldap:
# auth-client-config -t nss -p lac_ldap
Enable automatic home directory creation on login:
# pam-auth-update
(ubuntu 14 and older) Create config file to create home directory on login:
Create directory:
# nano /usr/share/pam-configs/mkhomedir
Name: Create home directory on login
Default: yes
Priority: 0
Session-Type: Additional
Session-Interactive-Only: yes
Session:
required pam_mkhomedir.so umask=0022 skel=/etc/skel
Enable Create home directory on login...:
# pam-auth-update
Restart nscd:
# service nscd restart
Verify:
# getent passwd
Source: linoxide