Difference between revisions of "Configuring Ubuntu machine as LDAP client"

From Notes_Wiki
(Created page with "<yambe:breadcrumb>Ubuntu|Ubuntu</yambe:breadcrumb> =Configuring Ubuntu machine as LDAP client= To configure Ubuntu machine as LDAP client use: #Install required package using...")
 
m
Line 1: Line 1:
<yambe:breadcrumb>Ubuntu|Ubuntu</yambe:breadcrumb>
[[Main Page|Home]] > [[Ubuntu]] > [[Configuring Ubuntu machine as LDAP client]]
=Configuring Ubuntu machine as LDAP client=


To configure Ubuntu machine as LDAP client use:
To configure Ubuntu machine as LDAP client use:
Line 40: Line 39:


Steps learned from https://askubuntu.com/questions/127389/how-to-configure-ubuntu-as-an-ldap-client
Steps learned from https://askubuntu.com/questions/127389/how-to-configure-ubuntu-as-an-ldap-client
[[Main Page|Home]] > [[Ubuntu]] > [[Configuring Ubuntu machine as LDAP client]]

Revision as of 07:00, 31 March 2022

Home > Ubuntu > Configuring Ubuntu machine as LDAP client

To configure Ubuntu machine as LDAP client use:

  1. Install required package using:
    sudo apt-get install ldap-utils libpam-ldap libnss-ldap nslcd
  2. Edit '/etc/nsswitch.conf' and append ldap to shadow, passwd and group such as shown below:
    passwd: compat ldap
    group : compat ldap
    shadow: compat ldap
  3. To ensure that users home folder automatically get created at login edit '/etc/pam.d/login' and add below line along with other session required lines:
    session required pam_mkhomedir.so skel=/etc/skel umask=0022
    Also add the same session required line to '/etc/pam.d/lightdm' file.
  4. Enable nslcd service to run automatically on start-up using:
    sudo update-rc.d nslcd enable
  5. Restart nscd service using:
    /etc/init.d/nscd restart
  6. Verify connection to LDAP server is working using:
    ldapsearch -x -h <LDAP-server> -z 5
  7. Verify that user information is being recognized properly using:
    getent passwd
    getent group
    getent shadow
  8. Try to login as LDAP user using 'ssh <username>@localhost' assuming package 'openssh-server' is installed and ssh server is running. Note that system may ask you to reset password during first login.


Steps learned from https://askubuntu.com/questions/127389/how-to-configure-ubuntu-as-an-ldap-client



Home > Ubuntu > Configuring Ubuntu machine as LDAP client