{"id":12982,"date":"2021-12-20T12:59:07","date_gmt":"2021-12-20T12:59:07","guid":{"rendered":"https:\/\/linuxways.net\/?p=12982"},"modified":"2021-12-20T12:59:52","modified_gmt":"2021-12-20T12:59:52","slug":"how-to-configure-ldap-client-on-ubuntu-20-04","status":"publish","type":"post","link":"https:\/\/linuxways.net\/de\/ubuntu\/how-to-configure-ldap-client-on-ubuntu-20-04\/","title":{"rendered":"How to Configure LDAP Client on Ubuntu 20.04"},"content":{"rendered":"<h2>Introduction<\/h2>\n<p>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&#8217; information to their respective IP addresses. LDAP&#8217;s role is to store emails, accounts, and passwords in a central location, and some applications will use this data for authentication.<\/p>\n<p>Now we&#8217;re gonna guide you about configuring the LDAP client on Ubuntu 20.04. Hope you understand.<\/p>\n<h2>Configuring the LDAP client<\/h2>\n<p><strong>Step 1<\/strong>: Run apt command to install the utilities associated:<\/p>\n<pre>$ sudo apt install libnss-ldap libpam-ldap ldap-utils<\/pre>\n<p>Output: You set up the URL of the LDAP server.<\/p>\n<p><img loading=\"lazy\" decoding=\"async\" width=\"970\" height=\"666\" class=\"wp-image-12983\" src=\"http:\/\/linuxways.net\/wp-content\/uploads\/2021\/12\/word-image-259.png\" srcset=\"https:\/\/linuxways.net\/wp-content\/uploads\/2021\/12\/word-image-259.png 970w, https:\/\/linuxways.net\/wp-content\/uploads\/2021\/12\/word-image-259-300x206.png 300w, https:\/\/linuxways.net\/wp-content\/uploads\/2021\/12\/word-image-259-768x527.png 768w\" sizes=\"auto, (max-width: 970px) 100vw, 970px\" \/><\/p>\n<p>Press Ok to next.<\/p>\n<p><strong>Step 2<\/strong>: Then you must set up the domain name of the LDAP server.<\/p>\n<p>&nbsp;<\/p>\n<p><img loading=\"lazy\" decoding=\"async\" width=\"967\" height=\"666\" class=\"wp-image-12984\" src=\"http:\/\/linuxways.net\/wp-content\/uploads\/2021\/12\/word-image-260.png\" srcset=\"https:\/\/linuxways.net\/wp-content\/uploads\/2021\/12\/word-image-260.png 967w, https:\/\/linuxways.net\/wp-content\/uploads\/2021\/12\/word-image-260-300x207.png 300w, https:\/\/linuxways.net\/wp-content\/uploads\/2021\/12\/word-image-260-768x529.png 768w\" sizes=\"auto, (max-width: 967px) 100vw, 967px\" \/><\/p>\n<p>The first <strong>dc<\/strong> represents the name part, the second <strong>dc<\/strong> represents the tail. Press Ok to next.<\/p>\n<p><strong>Step 3<\/strong>: Then you choose the latest LDAP version <img loading=\"lazy\" decoding=\"async\" width=\"969\" height=\"663\" class=\"wp-image-12985\" src=\"http:\/\/linuxways.net\/wp-content\/uploads\/2021\/12\/word-image-261.png\" srcset=\"https:\/\/linuxways.net\/wp-content\/uploads\/2021\/12\/word-image-261.png 969w, https:\/\/linuxways.net\/wp-content\/uploads\/2021\/12\/word-image-261-300x205.png 300w, https:\/\/linuxways.net\/wp-content\/uploads\/2021\/12\/word-image-261-768x525.png 768w\" sizes=\"auto, (max-width: 969px) 100vw, 969px\" \/><\/p>\n<p>In the image, the latest version is 3. Press Ok.<\/p>\n<p><strong>Step 4<\/strong>: <img loading=\"lazy\" decoding=\"async\" width=\"968\" height=\"665\" class=\"wp-image-12986\" src=\"http:\/\/linuxways.net\/wp-content\/uploads\/2021\/12\/word-image-262.png\" srcset=\"https:\/\/linuxways.net\/wp-content\/uploads\/2021\/12\/word-image-262.png 968w, https:\/\/linuxways.net\/wp-content\/uploads\/2021\/12\/word-image-262-300x206.png 300w, https:\/\/linuxways.net\/wp-content\/uploads\/2021\/12\/word-image-262-768x528.png 768w\" sizes=\"auto, (max-width: 968px) 100vw, 968px\" \/><\/p>\n<p>Press Enter to next.<\/p>\n<p><strong>Step 5<\/strong>: <img loading=\"lazy\" decoding=\"async\" width=\"968\" height=\"665\" class=\"wp-image-12987\" src=\"http:\/\/linuxways.net\/wp-content\/uploads\/2021\/12\/word-image-263.png\" srcset=\"https:\/\/linuxways.net\/wp-content\/uploads\/2021\/12\/word-image-263.png 968w, https:\/\/linuxways.net\/wp-content\/uploads\/2021\/12\/word-image-263-300x206.png 300w, https:\/\/linuxways.net\/wp-content\/uploads\/2021\/12\/word-image-263-768x528.png 768w\" sizes=\"auto, (max-width: 968px) 100vw, 968px\" \/><\/p>\n<p>Choose Yes and press Enter.<\/p>\n<p><strong>Step 6<\/strong>: You type username at the <strong>cn<\/strong> <img loading=\"lazy\" decoding=\"async\" width=\"968\" height=\"659\" class=\"wp-image-12988\" src=\"http:\/\/linuxways.net\/wp-content\/uploads\/2021\/12\/word-image-264.png\" srcset=\"https:\/\/linuxways.net\/wp-content\/uploads\/2021\/12\/word-image-264.png 968w, https:\/\/linuxways.net\/wp-content\/uploads\/2021\/12\/word-image-264-300x204.png 300w, https:\/\/linuxways.net\/wp-content\/uploads\/2021\/12\/word-image-264-768x523.png 768w\" sizes=\"auto, (max-width: 968px) 100vw, 968px\" \/><\/p>\n<p>Press Ok.<\/p>\n<p><strong>Step 7<\/strong>: Choose a password <img loading=\"lazy\" decoding=\"async\" width=\"968\" height=\"662\" class=\"wp-image-12989\" src=\"http:\/\/linuxways.net\/wp-content\/uploads\/2021\/12\/word-image-265.png\" srcset=\"https:\/\/linuxways.net\/wp-content\/uploads\/2021\/12\/word-image-265.png 968w, https:\/\/linuxways.net\/wp-content\/uploads\/2021\/12\/word-image-265-300x205.png 300w, https:\/\/linuxways.net\/wp-content\/uploads\/2021\/12\/word-image-265-768x525.png 768w\" sizes=\"auto, (max-width: 968px) 100vw, 968px\" \/><\/p>\n<p><strong>Step 8<\/strong>: You type in a different username with a privileged account at <strong>cn<\/strong><\/p>\n<p><img loading=\"lazy\" decoding=\"async\" width=\"967\" height=\"667\" class=\"wp-image-12990\" src=\"http:\/\/linuxways.net\/wp-content\/uploads\/2021\/12\/word-image-266.png\" srcset=\"https:\/\/linuxways.net\/wp-content\/uploads\/2021\/12\/word-image-266.png 967w, https:\/\/linuxways.net\/wp-content\/uploads\/2021\/12\/word-image-266-300x207.png 300w, https:\/\/linuxways.net\/wp-content\/uploads\/2021\/12\/word-image-266-768x530.png 768w\" sizes=\"auto, (max-width: 967px) 100vw, 967px\" \/><\/p>\n<p>Press Enter to next.<\/p>\n<p><strong>Step 9<\/strong>: You type the password<\/p>\n<p><img loading=\"lazy\" decoding=\"async\" width=\"969\" height=\"665\" class=\"wp-image-12991\" src=\"http:\/\/linuxways.net\/wp-content\/uploads\/2021\/12\/word-image-267.png\" srcset=\"https:\/\/linuxways.net\/wp-content\/uploads\/2021\/12\/word-image-267.png 969w, https:\/\/linuxways.net\/wp-content\/uploads\/2021\/12\/word-image-267-300x206.png 300w, https:\/\/linuxways.net\/wp-content\/uploads\/2021\/12\/word-image-267-768x527.png 768w\" sizes=\"auto, (max-width: 969px) 100vw, 969px\" \/><\/p>\n<p>After completing the above command will be active.<\/p>\n<p><strong>Step 10<\/strong>: Using LDAP for authentication. Firstly, let\u2019s update the PAM-auth file. Run the command:<\/p>\n<pre>$ sudo pam-auth-update<\/pre>\n<p>Output: <img loading=\"lazy\" decoding=\"async\" width=\"969\" height=\"665\" class=\"wp-image-12992\" src=\"http:\/\/linuxways.net\/wp-content\/uploads\/2021\/12\/word-image-268.png\" srcset=\"https:\/\/linuxways.net\/wp-content\/uploads\/2021\/12\/word-image-268.png 969w, https:\/\/linuxways.net\/wp-content\/uploads\/2021\/12\/word-image-268-300x206.png 300w, https:\/\/linuxways.net\/wp-content\/uploads\/2021\/12\/word-image-268-768x527.png 768w\" sizes=\"auto, (max-width: 969px) 100vw, 969px\" \/><\/p>\n<p>The following table will appear. Press Ok.<\/p>\n<h2>Creating user home directory<\/h2>\n<p>To make some migration changes the PAM directory public session file can be edited. Open nano editor:<\/p>\n<pre>$ sudo nano \/etc\/pam.d\/common-session<\/pre>\n<p>At the end of the file, let&#8217;s add:<\/p>\n<pre>session required pam_mkhomedir.so skel=\/etc\/skel umask=077<\/pre>\n<p><img loading=\"lazy\" decoding=\"async\" width=\"968\" height=\"665\" class=\"wp-image-12993\" src=\"http:\/\/linuxways.net\/wp-content\/uploads\/2021\/12\/word-image.jpeg\" srcset=\"https:\/\/linuxways.net\/wp-content\/uploads\/2021\/12\/word-image.jpeg 968w, https:\/\/linuxways.net\/wp-content\/uploads\/2021\/12\/word-image-300x206.jpeg 300w, https:\/\/linuxways.net\/wp-content\/uploads\/2021\/12\/word-image-768x528.jpeg 768w\" sizes=\"auto, (max-width: 968px) 100vw, 968px\" \/><\/p>\n<p>Save it and exit.<\/p>\n<h2>Removing LDAP client<\/h2>\n<p>If you don\u2019t want to use the LDAP client, run the following command to remove it:<\/p>\n<pre>$ sudo apt-get purge libnss-ldap libpam-ldap ldap-utils<\/pre>\n<p>Output:<\/p>\n<p><img loading=\"lazy\" decoding=\"async\" width=\"970\" height=\"484\" class=\"wp-image-12994\" src=\"http:\/\/linuxways.net\/wp-content\/uploads\/2021\/12\/word-image-269.png\" srcset=\"https:\/\/linuxways.net\/wp-content\/uploads\/2021\/12\/word-image-269.png 970w, https:\/\/linuxways.net\/wp-content\/uploads\/2021\/12\/word-image-269-300x150.png 300w, https:\/\/linuxways.net\/wp-content\/uploads\/2021\/12\/word-image-269-768x383.png 768w\" sizes=\"auto, (max-width: 970px) 100vw, 970px\" \/><\/p>\n<h2>Conclusion<\/h2>\n<p>And we guided you on how to configure the LDAP client on Ubuntu 20.04.<\/p>\n<p>Thank you for checking it out!<\/p>","protected":false},"excerpt":{"rendered":"<p>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&hellip;<\/p>","protected":false},"author":1,"featured_media":13214,"comment_status":"closed","ping_status":"closed","sticky":false,"template":"","format":"standard","meta":{"footnotes":""},"categories":[2],"tags":[768,100],"class_list":["post-12982","post","type-post","status-publish","format-standard","has-post-thumbnail","hentry","category-ubuntu","tag-ldap-client","tag-ubuntu-20-04"],"_links":{"self":[{"href":"https:\/\/linuxways.net\/de\/wp-json\/wp\/v2\/posts\/12982","targetHints":{"allow":["GET"]}}],"collection":[{"href":"https:\/\/linuxways.net\/de\/wp-json\/wp\/v2\/posts"}],"about":[{"href":"https:\/\/linuxways.net\/de\/wp-json\/wp\/v2\/types\/post"}],"author":[{"embeddable":true,"href":"https:\/\/linuxways.net\/de\/wp-json\/wp\/v2\/users\/1"}],"replies":[{"embeddable":true,"href":"https:\/\/linuxways.net\/de\/wp-json\/wp\/v2\/comments?post=12982"}],"version-history":[{"count":0,"href":"https:\/\/linuxways.net\/de\/wp-json\/wp\/v2\/posts\/12982\/revisions"}],"wp:featuredmedia":[{"embeddable":true,"href":"https:\/\/linuxways.net\/de\/wp-json\/wp\/v2\/media\/13214"}],"wp:attachment":[{"href":"https:\/\/linuxways.net\/de\/wp-json\/wp\/v2\/media?parent=12982"}],"wp:term":[{"taxonomy":"category","embeddable":true,"href":"https:\/\/linuxways.net\/de\/wp-json\/wp\/v2\/categories?post=12982"},{"taxonomy":"post_tag","embeddable":true,"href":"https:\/\/linuxways.net\/de\/wp-json\/wp\/v2\/tags?post=12982"}],"curies":[{"name":"wp","href":"https:\/\/api.w.org\/{rel}","templated":true}]}}