Introduction
LDAP stands for Lightweight Directory Access Protocol which is an industry-standard application protocol for maintaining and accessing directory information services over IP networks. Directory information services match resources’ information to their respective IP addresses. LDAP’s role is to store emails, accounts, and passwords in a central location, and some applications will use this data for authentication.
Now we’re gonna guide you about configuring the LDAP client on Ubuntu 20.04. Hope you understand.
Configuring the LDAP client
Step 1: Run apt command to install the utilities associated:
$ sudo apt install libnss-ldap libpam-ldap ldap-utils
Output: You set up the URL of the LDAP server.
Press Ok to next.
Step 2: Then you must set up the domain name of the LDAP server.
The first dc represents the name part, the second dc represents the tail. Press Ok to next.
Step 3: Then you choose the latest LDAP version
In the image, the latest version is 3. Press Ok.
Step 4:
Press Enter to next.
Step 5:
Choose Yes and press Enter.
Step 6: You type username at the cn
Press Ok.
Step 7: Choose a password
Step 8: You type in a different username with a privileged account at cn
Press Enter to next.
Step 9: You type the password
After completing the above command will be active.
Step 10: Using LDAP for authentication. Firstly, let’s update the PAM-auth file. Run the command:
$ sudo pam-auth-update
Output:
The following table will appear. Press Ok.
Creating user home directory
To make some migration changes the PAM directory public session file can be edited. Open nano editor:
$ sudo nano /etc/pam.d/common-session
At the end of the file, let’s add:
session required pam_mkhomedir.so skel=/etc/skel umask=077
Save it and exit.
Removing LDAP client
If you don’t want to use the LDAP client, run the following command to remove it:
$ sudo apt-get purge libnss-ldap libpam-ldap ldap-utils
Output:
Conclusion
And we guided you on how to configure the LDAP client on Ubuntu 20.04.
Thank you for checking it out!