<?xml version="1.0" encoding="UTF-8"?><rss version="2.0"
	xmlns:content="http://purl.org/rss/1.0/modules/content/"
	xmlns:wfw="http://wellformedweb.org/CommentAPI/"
	xmlns:dc="http://purl.org/dc/elements/1.1/"
	xmlns:atom="http://www.w3.org/2005/Atom"
	xmlns:sy="http://purl.org/rss/1.0/modules/syndication/"
	xmlns:slash="http://purl.org/rss/1.0/modules/slash/"
	>

<channel>
	<title>LDAP Archives - Linux Windows and android Tutorials</title>
	<atom:link href="https://www.osradar.com/tag/ldap/feed/" rel="self" type="application/rss+xml" />
	<link>https://www.osradar.com</link>
	<description>tutorials and news and Seurity</description>
	<lastBuildDate>Fri, 08 Feb 2019 08:12:02 +0000</lastBuildDate>
	<language>en-US</language>
	<sy:updatePeriod>
	hourly	</sy:updatePeriod>
	<sy:updateFrequency>
	1	</sy:updateFrequency>
	<generator>https://wordpress.org/?v=5.8.12</generator>
	<item>
		<title>Setting up OpenLdap and phpldapadmin</title>
		<link>https://www.osradar.com/setting-up-openldap-and-phpldapadmin/</link>
					<comments>https://www.osradar.com/setting-up-openldap-and-phpldapadmin/#respond</comments>
		
		<dc:creator><![CDATA[osradar_editor]]></dc:creator>
		<pubDate>Fri, 08 Feb 2019 08:12:02 +0000</pubDate>
				<category><![CDATA[Linux]]></category>
		<category><![CDATA[Technology]]></category>
		<category><![CDATA[LDAP]]></category>
		<guid isPermaLink="false">https://www.osradar.com/?p=10503</guid>

					<description><![CDATA[<p>What? Let me start the post saying that OpenLdap is a yet another Linux service which build on top of the LDAP protocol ( Lightweight Directory Access Protocol). But it is a free, unlike Windows Active Directory which is another product that build on top of LDAP. Why? There could be different use cases that [&#8230;]</p>
<p>The post <a rel="nofollow" href="https://www.osradar.com/setting-up-openldap-and-phpldapadmin/">Setting up OpenLdap and phpldapadmin</a> appeared first on <a rel="nofollow" href="https://www.osradar.com">Linux  Windows and android  Tutorials</a>.</p>
]]></description>
										<content:encoded><![CDATA[<p>What?<br />
Let me start the post saying that OpenLdap is a yet another Linux service which build on top of the LDAP protocol ( Lightweight Directory Access Protocol). But it is a free, unlike Windows Active Directory which is another product that build on top of LDAP.</p>
<p>Why?<br />
There could be different use cases that people use LDAP, but most often one of the best outcome we generally see is the benefit of maintaining a user account administrations for user account authentication. However, It just not store user password credential, but also other account specific information such as UID, GID, home-directory, Telephone numbers, other associate groups and etc.</p>
<p>phpLdapAdmin:<br />
On the other hand, phpldapadmin is just a web based application that provide graphical user interface to interact with LDAP. It builds on top of PHP and by default Apache will host the application, so that users can access the interface via their favorite browsers.</p>
<p>&nbsp;</p>
<h3><strong>Getting Started</strong>.</h3>
<p>01. Install the required packages.</p>
<pre class=""># yum install -y openldap openldap-clients openldap-servers</pre>
<p>&nbsp;</p>
<p>02. Generate root LDAP password</p>
<pre class="lang:sh decode:true "># slappasswd -s osradar -n

{SSHA}FJbfOwcgwKPpRwmZH23h3QvyK4bs3Nbj[root@localhost ~]#</pre>
<p class="">You will have a similar above output, and then the root password for the Ldap will be;<br />
<strong>{SSHA}FJbfOwcgwKPpRwmZH23h3QvyK4bs3Nbj</strong></p>
<p>&nbsp;</p>
<p>03. Next, create a TLS certificate to be used by LDAP server</p>
<pre class="lang:sh decode:true "># openssl req -new -x509 -nodes -out /etc/openldap/certs/cert.pem \
-keyout /etc/openldap/certs/priv.pem -days 365

Generating a 2048 bit RSA private key
...........................................................................................................................................................+++
.........................+++
writing new private key to '/etc/openldap/certs/priv.pem'
-----
You are about to be asked to enter information that will be incorporated
into your certificate request.
What you are about to enter is what is called a Distinguished Name or a DN.
There are quite a few fields but you can leave some blank
For some fields there will be a default value,
If you enter '.', the field will be left blank.
-----
Country Name (2 letter code) [XX]:LK
State or Province Name (full name) []:CMB
Locality Name (eg, city) [Default City]:colombo
Organization Name (eg, company) [Default Company Ltd]:osradar
Organizational Unit Name (eg, section) []:it
Common Name (eg, your name or your server's hostname) []:ldap-server.osradar.com
Email Address []:</pre>
<p>&nbsp;</p>
<p>04. Now, its time to initialize the LDAP database. First, you need to copy given example schema to a another working directory</p>
<pre class="lang:sh decode:true"># cp /usr/share/openldap-servers/DB_CONFIG.example /var/lib/ldap/DB_CONFIG</pre>
<p>&nbsp;</p>
<p>05. Generating DB files</p>
<pre class="lang:sh decode:true "># slaptest

5c5c5740 hdb_db_open: database "dc=my-domain,dc=com": db_open(/var/lib/ldap/id2entry.bdb) failed: No such file or directory (2).
5c5c5740 backend_startup_one (type=hdb, suffix="dc=my-domain,dc=com"): bi_db_open failed! (2)
slap_startup failed (test would succeed using the -u switch)</pre>
<p>Dont worry about the errors.</p>
<p>&nbsp;</p>
<p>06. Next, go into the directory where we generate the Certificate in above step. Then apply basic security.</p>
<pre class="lang:sh decode:true "># cd /etc/openldap/certs
# chown ldap:ldap *
# chmod 600 priv.pem
# chown ldap:ldap /var/lib/ldap/*</pre>
<p>&nbsp;</p>
<p>07. Starting up the server</p>
<pre class=""># systemctl start slapd.service</pre>
<p>&nbsp;</p>
<p>08. Check the network socket is up &amp; running</p>
<pre class="lang:sh decode:true"># ss -lnt
State       Recv-Q Send-Q                      Local Address:Port                                     Peer Address:Port                             
LISTEN      0      128                                    :::389                                                :::*</pre>
<p>NOTE the 389/tcp which is the default for LDAP server.</p>
<p>&nbsp;</p>
<p>09.  Generate <strong>cosine</strong> &amp; <strong>nis</strong> LDAP schemas:</p>
<pre class="lang:sh decode:true "># cd /etc/openldap/schema

# ldapadd -Y EXTERNAL -H ldapi:/// -D "cn=config" -f cosine.ldif
SASL/EXTERNAL authentication started
SASL username: gidNumber=0+uidNumber=0,cn=peercred,cn=external,cn=auth
SASL SSF: 0
adding new entry "cn=cosine,cn=schema,cn=config"

# ldapadd -Y EXTERNAL -H ldapi:/// -D "cn=config" -f nis.ldif
SASL/EXTERNAL authentication started
SASL username: gidNumber=0+uidNumber=0,cn=peercred,cn=external,cn=auth
SASL SSF: 0
adding new entry "cn=nis,cn=schema,cn=config"</pre>
<p>&nbsp;</p>
<p>10. Its time to add the details that govern our LDAP service. You should take a note on the domain because LDAP always binds to a domain once built.</p>
<pre class="lang:sh decode:true "># vim /etc/openldap/changes.ldif

dn: olcDatabase={2}hdb,cn=config
changetype: modify
replace: olcSuffix
olcSuffix: dc=osradar,dc=com

dn: olcDatabase={2}hdb,cn=config
changetype: modify
replace: olcRootDN
olcRootDN: cn=Manager,dc=osradar,dc=com

dn: olcDatabase={2}hdb,cn=config
changetype: modify
replace: olcRootPW
olcRootPW: {SSHA}FJbfOwcgwKPpRwmZH23h3QvyK4bs3Nbj

dn: cn=config
changetype: modify
replace: olcTLSCertificateFile
olcTLSCertificateFile: /etc/openldap/certs/cert.pem
-
replace: olcTLSCertificateKeyFile
olcTLSCertificateKeyFile: /etc/openldap/certs/priv.pem

dn: cn=config
changetype: modify
replace: olcLogLevel
olcLogLevel: -1

dn: olcDatabase={1}monitor,cn=config
changetype: modify
replace: olcAccess
olcAccess: {0}to * by dn.base="gidNumber=0+uidNumber=0,cn=peercred,cn=external,cn=auth" read by dn.base="cn=Manager,dc=osradar,dc=com" read by * none</pre>
<p><strong>olcRootPW</strong> =&gt; should be replace with the password that we generated at step 02<br />
<strong>dc=osradar,dc=com</strong> =&gt; should be replace with the domain you want the LDAP to be in</p>
<p>&nbsp;</p>
<p>11. Apply the changes to LDAP server</p>
<pre class="lang:sh decode:true "># ldapmodify -Y EXTERNAL -H ldapi:/// -f /etc/openldap/changes.ldif

SASL/EXTERNAL authentication started
SASL username: gidNumber=0+uidNumber=0,cn=peercred,cn=external,cn=auth
SASL SSF: 0
modifying entry "olcDatabase={2}hdb,cn=config"
modifying entry "olcDatabase={2}hdb,cn=config"
modifying entry "olcDatabase={2}hdb,cn=config"
modifying entry "cn=config"
modifying entry "cn=config"
modifying entry "olcDatabase={1}monitor,cn=config"</pre>
<p>&nbsp;</p>
<p>12. Finally, we will need to setup a base to work with LDAP service. So, first create a file with enough details.</p>
<pre class="lang:sh decode:true"># vim  /etc/openldap/base.ldif 

dn: dc=osradar,dc=com
dc: osradar
objectClass: top
objectClass: domain

dn: ou=adminGroup,dc=osradar,dc=com
ou: adminGroup
objectClass: top
objectClass: organizationalUnit</pre>
<p>&nbsp;</p>
<p>13. Apply the changes now via &#8216;ldapadd&#8217; command</p>
<pre class="lang:sh decode:true"># ldapadd -x -w osradar -D cn=Manager,dc=osradar,dc=com -f /etc/openldap/base.ldif
</pre>
<p>&nbsp;</p>
<p>14. Restart the LDAP service</p>
<pre class=""># systemctl restart slapd.service</pre>
<p>&nbsp;</p>
<h3><strong>Setup phpLdapAdmin:</strong></h3>
<p>15. Install apache and php</p>
<pre class="lang:sh decode:true">yum -y install httpdphp php-mbstring php-pear</pre>
<p>&nbsp;</p>
<p>16. Change the main apache configuration</p>
<pre class="lang:sh decode:true"># vim etc/httpd/conf/httpd.conf

ServerAdmin root@srv.world
ServerName www.srv.world:80
AllowOverride All
DirectoryIndex index.html index.cgi index.php
</pre>
<p><strong>Note</strong>: the required changes line are at line numbers 86, 95, 151 and 164 respectively.</p>
<p>&nbsp;</p>
<p>17. Install &#8220;phpldapadmin&#8221;. (For this we will have to add new repository call &#8220;epel&#8221;)</p>
<pre class="lang:sh decode:true"># yum install -y epel-release
# yum install -y phpldapadmin</pre>
<p>&nbsp;</p>
<p>18. Changing the default settings</p>
<pre class="lang:sh decode:true"># vim /etc/phpldapadmin/config.php

$servers-&gt;setValue('login','attr','dn');
// $servers-&gt;setValue('login','attr','uid');
</pre>
<p>The above changes are in line numbers 397 to 398</p>
<p>&nbsp;</p>
<p>19. Lets change the default VirtualHost  that is coming under phpldapadmin</p>
<pre class="lang:sh decode:true"># vim /etc/httpd/conf.d/phpldapadmin.conf

Require all granted</pre>
<p>The change suppose to happen at line number 11</p>
<p>&nbsp;</p>
<p>That&#8217;s it for setting up &#8220;phpldapadmin&#8221;. Make sure you enable the required firewall configuration. That&#8217;s being done, let go ahead and visit our newly setup phpLDAPAdmin interface.<br />
http://{ip address of the server}/ldapadmin</p>
<p><img loading="lazy" class="alignnone size-full wp-image-10591" src="https://www.osradar.com/wp-content/uploads/2019/02/Screenshot_2019-02-07_22-47-56.png" alt="" width="664" height="276" srcset="https://www.osradar.com/wp-content/uploads/2019/02/Screenshot_2019-02-07_22-47-56.png 664w, https://www.osradar.com/wp-content/uploads/2019/02/Screenshot_2019-02-07_22-47-56-300x125.png 300w" sizes="(max-width: 664px) 100vw, 664px" /></p>
<p>To login, you will have to provide the<br />
&#8211; <strong>Login DN</strong>: cn=Manager,dc=osradar,dc=com<br />
&#8211; <strong>Password</strong>: in our case, it is &#8220;osradar&#8221; which we given at step 02 of the</p>
<p><em>&#8220;If you come up to this far, congratulations.. you have now your working LDAP service.&#8221;</em></p>
<p>&nbsp;</p>
<p>The post <a rel="nofollow" href="https://www.osradar.com/setting-up-openldap-and-phpldapadmin/">Setting up OpenLdap and phpldapadmin</a> appeared first on <a rel="nofollow" href="https://www.osradar.com">Linux  Windows and android  Tutorials</a>.</p>
]]></content:encoded>
					
					<wfw:commentRss>https://www.osradar.com/setting-up-openldap-and-phpldapadmin/feed/</wfw:commentRss>
			<slash:comments>0</slash:comments>
		
		
			</item>
		<item>
		<title>How to install  OpenLDAP on Ubuntu 18.04?</title>
		<link>https://www.osradar.com/install-openldap-ubuntu-18-04/</link>
					<comments>https://www.osradar.com/install-openldap-ubuntu-18-04/#comments</comments>
		
		<dc:creator><![CDATA[angeloma]]></dc:creator>
		<pubDate>Fri, 30 Nov 2018 00:53:00 +0000</pubDate>
				<category><![CDATA[Linux]]></category>
		<category><![CDATA[Security]]></category>
		<category><![CDATA[Technology]]></category>
		<category><![CDATA[Tutorials]]></category>
		<category><![CDATA[How to]]></category>
		<category><![CDATA[LDAP]]></category>
		<category><![CDATA[openLDAP]]></category>
		<category><![CDATA[server]]></category>
		<category><![CDATA[Tutorial HowTo]]></category>
		<category><![CDATA[ubuntu]]></category>
		<guid isPermaLink="false">https://www.osradar.com/?p=7829</guid>

					<description><![CDATA[<p>OpenLDAP is a free, open-source implementation of the Lightweight Directory Access Protocol (LDAP). With it, you can get a centralized authentication between the members of a network. So, I will show you how to install OpenLDAP on Ubuntu 18.04. Let&#8217;s do it. 0. What you need Installing OpenLDAP on Ubuntu 18.04 is not a really [&#8230;]</p>
<p>The post <a rel="nofollow" href="https://www.osradar.com/install-openldap-ubuntu-18-04/">How to install  OpenLDAP on Ubuntu 18.04?</a> appeared first on <a rel="nofollow" href="https://www.osradar.com">Linux  Windows and android  Tutorials</a>.</p>
]]></description>
										<content:encoded><![CDATA[<p>OpenLDAP is a free, open-source implementation of the Lightweight Directory Access Protocol (LDAP). With it, you can get a centralized authentication between the members of a network. So, I will show you how to install OpenLDAP on Ubuntu 18.04.</p>
<p>Let&#8217;s do it.</p>
<h1>0. What you need</h1>
<p>Installing <a href="https://www.openldap.org/">OpenLDAP</a> on <a href="https://www.osradar.com/how-to-install-ubuntu-18-04-lts/">Ubuntu</a> 18.04 is not a really complicated matter, however, it is necessary to have a basic knowledge about the use of the terminal.</p>
<p>Also, your user needs to be able to execute commands with sudo because some commands require root.</p>
<p>With this in mind, you can start the installation without problems.</p>
<h1>1. Upgrade the system</h1>
<p>In the first place, you need to upgrade the system. It is recommended to get the latest security patches on your system.</p>
<pre class="">:~$ sudo apt update &amp;&amp; sudo apt upgrade</pre>
<figure id="attachment_7830" aria-describedby="caption-attachment-7830" style="width: 1366px" class="wp-caption alignnone"><img loading="lazy" class="size-full wp-image-7830" src="https://www.osradar.com/wp-content/uploads/2018/11/1-24.png" alt="1.- Upgrading the system" width="1366" height="768" srcset="https://www.osradar.com/wp-content/uploads/2018/11/1-24.png 1366w, https://www.osradar.com/wp-content/uploads/2018/11/1-24-300x169.png 300w, https://www.osradar.com/wp-content/uploads/2018/11/1-24-768x432.png 768w, https://www.osradar.com/wp-content/uploads/2018/11/1-24-1024x576.png 1024w, https://www.osradar.com/wp-content/uploads/2018/11/1-24-1068x600.png 1068w, https://www.osradar.com/wp-content/uploads/2018/11/1-24-747x420.png 747w" sizes="(max-width: 1366px) 100vw, 1366px" /><figcaption id="caption-attachment-7830" class="wp-caption-text">1.- Upgrading the system</figcaption></figure>
<p>Now, you can continue.</p>
<h1>2. Set the hostname</h1>
<p>The first step is to define the hostname. Run this command:</p>
<pre class="">:~$ sudo hostnamectl set-hostname ldap.osradar.local</pre>
<p>And add it to your <code>/etc/hosts</code> file</p>
<pre class="">:~$ echo "192.168.250.6 ldap.osradar.com" | sudo tee -a /etc/hosts</pre>
<figure id="attachment_7835" aria-describedby="caption-attachment-7835" style="width: 1366px" class="wp-caption alignnone"><img loading="lazy" class="size-full wp-image-7835" src="https://www.osradar.com/wp-content/uploads/2018/11/1-2-1.png" alt="2.- Setting the hostname" width="1366" height="768" srcset="https://www.osradar.com/wp-content/uploads/2018/11/1-2-1.png 1366w, https://www.osradar.com/wp-content/uploads/2018/11/1-2-1-300x169.png 300w, https://www.osradar.com/wp-content/uploads/2018/11/1-2-1-768x432.png 768w, https://www.osradar.com/wp-content/uploads/2018/11/1-2-1-1024x576.png 1024w, https://www.osradar.com/wp-content/uploads/2018/11/1-2-1-1068x600.png 1068w, https://www.osradar.com/wp-content/uploads/2018/11/1-2-1-747x420.png 747w" sizes="(max-width: 1366px) 100vw, 1366px" /><figcaption id="caption-attachment-7835" class="wp-caption-text">2.- Setting the hostname</figcaption></figure>
<h1>3. Install OpenLDAP</h1>
<p>A great advantage of OpenLDAP is that its packages are in the official Ubuntu repositories, which makes installation easy. Just write the following.</p>
<pre class="">:~$ sudo apt install slapd ldap-utils</pre>
<figure id="attachment_7831" aria-describedby="caption-attachment-7831" style="width: 1366px" class="wp-caption alignnone"><img loading="lazy" class="size-full wp-image-7831" src="https://www.osradar.com/wp-content/uploads/2018/11/2-23.png" alt="2.- Install OpenLDAP from the Ubuntu main repository" width="1366" height="768" srcset="https://www.osradar.com/wp-content/uploads/2018/11/2-23.png 1366w, https://www.osradar.com/wp-content/uploads/2018/11/2-23-300x169.png 300w, https://www.osradar.com/wp-content/uploads/2018/11/2-23-768x432.png 768w, https://www.osradar.com/wp-content/uploads/2018/11/2-23-1024x576.png 1024w, https://www.osradar.com/wp-content/uploads/2018/11/2-23-1068x600.png 1068w, https://www.osradar.com/wp-content/uploads/2018/11/2-23-747x420.png 747w" sizes="(max-width: 1366px) 100vw, 1366px" /><figcaption id="caption-attachment-7831" class="wp-caption-text">3.- Install OpenLDAP from the Ubuntu main repository</figcaption></figure>
<p>After downloading the package and during installation you will have to define and confirm the root password.</p>
<figure id="attachment_7832" aria-describedby="caption-attachment-7832" style="width: 1366px" class="wp-caption alignnone"><img loading="lazy" class="size-full wp-image-7832" src="https://www.osradar.com/wp-content/uploads/2018/11/3-22.png" alt="3.- Setting the root password" width="1366" height="768" srcset="https://www.osradar.com/wp-content/uploads/2018/11/3-22.png 1366w, https://www.osradar.com/wp-content/uploads/2018/11/3-22-300x169.png 300w, https://www.osradar.com/wp-content/uploads/2018/11/3-22-768x432.png 768w, https://www.osradar.com/wp-content/uploads/2018/11/3-22-1024x576.png 1024w, https://www.osradar.com/wp-content/uploads/2018/11/3-22-1068x600.png 1068w, https://www.osradar.com/wp-content/uploads/2018/11/3-22-747x420.png 747w" sizes="(max-width: 1366px) 100vw, 1366px" /><figcaption id="caption-attachment-7832" class="wp-caption-text">4.- Setting the root password</figcaption></figure>
<p>If you wish to verify that the installation has been carried out effectively. You can use the following command:</p>
<pre class="">:~$ sudo slapcat</pre>
<figure id="attachment_7833" aria-describedby="caption-attachment-7833" style="width: 1366px" class="wp-caption alignnone"><img loading="lazy" class="size-full wp-image-7833" src="https://www.osradar.com/wp-content/uploads/2018/11/4-24.png" alt="4.- Checking the installation" width="1366" height="768" srcset="https://www.osradar.com/wp-content/uploads/2018/11/4-24.png 1366w, https://www.osradar.com/wp-content/uploads/2018/11/4-24-300x169.png 300w, https://www.osradar.com/wp-content/uploads/2018/11/4-24-768x432.png 768w, https://www.osradar.com/wp-content/uploads/2018/11/4-24-1024x576.png 1024w, https://www.osradar.com/wp-content/uploads/2018/11/4-24-1068x600.png 1068w, https://www.osradar.com/wp-content/uploads/2018/11/4-24-747x420.png 747w" sizes="(max-width: 1366px) 100vw, 1366px" /><figcaption id="caption-attachment-7833" class="wp-caption-text">5.- Checking the installation</figcaption></figure>
<p>As you can see in the image above, OpenLDAP is installed correctly.</p>
<h1>4. Add base dn for Users and Groups</h1>
<p>it is now necessary to configure OpenLDAP. To do this, the first step is to add to base DN for users and groups.</p>
<p>Create a file called <code>basedn.ldif</code> in your home folder or wherever you want.</p>
<pre class="">:~$ nano basedn.ldif</pre>
<figure id="attachment_7834" aria-describedby="caption-attachment-7834" style="width: 1366px" class="wp-caption alignnone"><img loading="lazy" class="size-full wp-image-7834" src="https://www.osradar.com/wp-content/uploads/2018/11/5-22.png" alt="5.- Creating dn file for OpenLDAP user and group" width="1366" height="768" srcset="https://www.osradar.com/wp-content/uploads/2018/11/5-22.png 1366w, https://www.osradar.com/wp-content/uploads/2018/11/5-22-300x169.png 300w, https://www.osradar.com/wp-content/uploads/2018/11/5-22-768x432.png 768w, https://www.osradar.com/wp-content/uploads/2018/11/5-22-1024x576.png 1024w, https://www.osradar.com/wp-content/uploads/2018/11/5-22-1068x600.png 1068w, https://www.osradar.com/wp-content/uploads/2018/11/5-22-747x420.png 747w" sizes="(max-width: 1366px) 100vw, 1366px" /><figcaption id="caption-attachment-7834" class="wp-caption-text">5.- Creating dn file for OpenLDAP user and group</figcaption></figure>
<p>And add the following:</p>
<pre>dn: ou=people,dc=example,dc=com
objectClass: organizationalUnit
ou: people

dn: ou=groups,dc=example,dc=com
objectClass: organizationalUnit
ou: groups
</pre>
<p>Of course, replace <code>example</code> and <code>com</code>, for your domain properties.</p>
<p>Next, add the configuration file. Run:</p>
<pre class="">:~$ ldapadd -x -D cn=admin,dc=osradar,dc=local -W -f basedn.ldif</pre>
<figure id="attachment_7837" aria-describedby="caption-attachment-7837" style="width: 1366px" class="wp-caption alignnone"><img loading="lazy" class="size-full wp-image-7837" src="https://www.osradar.com/wp-content/uploads/2018/11/6-19.png" alt="6.- Creating the new configuration file" width="1366" height="768" srcset="https://www.osradar.com/wp-content/uploads/2018/11/6-19.png 1366w, https://www.osradar.com/wp-content/uploads/2018/11/6-19-300x169.png 300w, https://www.osradar.com/wp-content/uploads/2018/11/6-19-768x432.png 768w, https://www.osradar.com/wp-content/uploads/2018/11/6-19-1024x576.png 1024w, https://www.osradar.com/wp-content/uploads/2018/11/6-19-1068x600.png 1068w, https://www.osradar.com/wp-content/uploads/2018/11/6-19-747x420.png 747w" sizes="(max-width: 1366px) 100vw, 1366px" /><figcaption id="caption-attachment-7837" class="wp-caption-text">6.- Creating the new configuration file</figcaption></figure>
<p>Next, install phpLDAPadmin.</p>
<h1>5. Install phpLDAPadmin</h1>
<p>In order to manage OpenLDAP in a quick and easy way is that you have to install phpLDAPadmin. Let&#8217;s do it.</p>
<p>First, install some necessary packages. Among them are Apache web server and PHP.</p>
<pre class="">:~$ sudo apt install apache2 php php-cgi libapache2-mod-php php-mbstring php-common php-pear</pre>
<figure id="attachment_7838" aria-describedby="caption-attachment-7838" style="width: 1366px" class="wp-caption alignnone"><img loading="lazy" class="size-full wp-image-7838" src="https://www.osradar.com/wp-content/uploads/2018/11/7-19.png" alt="7.- Installing some required package for phpldapadmin" width="1366" height="768" srcset="https://www.osradar.com/wp-content/uploads/2018/11/7-19.png 1366w, https://www.osradar.com/wp-content/uploads/2018/11/7-19-300x169.png 300w, https://www.osradar.com/wp-content/uploads/2018/11/7-19-768x432.png 768w, https://www.osradar.com/wp-content/uploads/2018/11/7-19-1024x576.png 1024w, https://www.osradar.com/wp-content/uploads/2018/11/7-19-1068x600.png 1068w, https://www.osradar.com/wp-content/uploads/2018/11/7-19-747x420.png 747w" sizes="(max-width: 1366px) 100vw, 1366px" /><figcaption id="caption-attachment-7838" class="wp-caption-text">7.- Installing some required package for phpLDAPadmin</figcaption></figure>
<p>Next, it is necessary to enable the php7.2-cgi extension. Then, restart Apache service.</p>
<pre class="">:~$ sudo a2enconf php7.2-cgi
:~$ sudo systemctl reload apache2</pre>
<figure id="attachment_7839" aria-describedby="caption-attachment-7839" style="width: 1366px" class="wp-caption alignnone"><img loading="lazy" class="size-full wp-image-7839" src="https://www.osradar.com/wp-content/uploads/2018/11/8-19.png" alt="8.- Enable a necessary php extension" width="1366" height="768" srcset="https://www.osradar.com/wp-content/uploads/2018/11/8-19.png 1366w, https://www.osradar.com/wp-content/uploads/2018/11/8-19-300x169.png 300w, https://www.osradar.com/wp-content/uploads/2018/11/8-19-768x432.png 768w, https://www.osradar.com/wp-content/uploads/2018/11/8-19-1024x576.png 1024w, https://www.osradar.com/wp-content/uploads/2018/11/8-19-1068x600.png 1068w, https://www.osradar.com/wp-content/uploads/2018/11/8-19-747x420.png 747w" sizes="(max-width: 1366px) 100vw, 1366px" /><figcaption id="caption-attachment-7839" class="wp-caption-text">8.- Enable a necessary PHP extension</figcaption></figure>
<p>Then install phpLDAPadmin.</p>
<pre class="">:~$ sudo apt install phpldapadmin</pre>
<figure id="attachment_7840" aria-describedby="caption-attachment-7840" style="width: 1366px" class="wp-caption alignnone"><img loading="lazy" class="size-full wp-image-7840" src="https://www.osradar.com/wp-content/uploads/2018/11/9-17.png" alt="9.- Installing phpLDAPadmin" width="1366" height="768" srcset="https://www.osradar.com/wp-content/uploads/2018/11/9-17.png 1366w, https://www.osradar.com/wp-content/uploads/2018/11/9-17-300x169.png 300w, https://www.osradar.com/wp-content/uploads/2018/11/9-17-768x432.png 768w, https://www.osradar.com/wp-content/uploads/2018/11/9-17-1024x576.png 1024w, https://www.osradar.com/wp-content/uploads/2018/11/9-17-1068x600.png 1068w, https://www.osradar.com/wp-content/uploads/2018/11/9-17-747x420.png 747w" sizes="(max-width: 1366px) 100vw, 1366px" /><figcaption id="caption-attachment-7840" class="wp-caption-text">9.- Installing phpLDAPadmin</figcaption></figure>
<p>The next step is to modify the permissions in the phpLDAPadmin configuration file to receive requests from network members.</p>
<pre class="">:~$ sudo nano /etc/apache2/conf-enabled/phpldapadmin.conf</pre>
<p>And leave it as I show you in the picture.</p>
<figure id="attachment_7841" aria-describedby="caption-attachment-7841" style="width: 1366px" class="wp-caption alignnone"><img loading="lazy" class="size-full wp-image-7841" src="https://www.osradar.com/wp-content/uploads/2018/11/10-14.png" alt="10.- Configuring phpLDAPadmin" width="1366" height="768" srcset="https://www.osradar.com/wp-content/uploads/2018/11/10-14.png 1366w, https://www.osradar.com/wp-content/uploads/2018/11/10-14-300x169.png 300w, https://www.osradar.com/wp-content/uploads/2018/11/10-14-768x432.png 768w, https://www.osradar.com/wp-content/uploads/2018/11/10-14-1024x576.png 1024w, https://www.osradar.com/wp-content/uploads/2018/11/10-14-1068x600.png 1068w, https://www.osradar.com/wp-content/uploads/2018/11/10-14-747x420.png 747w" sizes="(max-width: 1366px) 100vw, 1366px" /><figcaption id="caption-attachment-7841" class="wp-caption-text">10.- Configuring phpLDAPadmin</figcaption></figure>
<p>With this, we are simply telling phpLDAPadmin to accept requests from network members.</p>
<p>Then, restart Apache.</p>
<pre class="">:~$ sudo systemctl restart apache2</pre>
<p>If you use <code>ufw</code>, you must open ports 80 and 443.</p>
<pre class="">:~$ sudo ufw allow 80
:~$ sudo ufw allow 443</pre>
<figure id="attachment_7842" aria-describedby="caption-attachment-7842" style="width: 1366px" class="wp-caption alignnone"><img loading="lazy" class="size-full wp-image-7842" src="https://www.osradar.com/wp-content/uploads/2018/11/11-9.png" alt="11.- Preparing the firewall" width="1366" height="768" srcset="https://www.osradar.com/wp-content/uploads/2018/11/11-9.png 1366w, https://www.osradar.com/wp-content/uploads/2018/11/11-9-300x169.png 300w, https://www.osradar.com/wp-content/uploads/2018/11/11-9-768x432.png 768w, https://www.osradar.com/wp-content/uploads/2018/11/11-9-1024x576.png 1024w, https://www.osradar.com/wp-content/uploads/2018/11/11-9-1068x600.png 1068w, https://www.osradar.com/wp-content/uploads/2018/11/11-9-747x420.png 747w" sizes="(max-width: 1366px) 100vw, 1366px" /><figcaption id="caption-attachment-7842" class="wp-caption-text">11.- Preparing the firewall</figcaption></figure>
<p>Finally, open your favorite web browser and go to <code>http://IP_SERVER_OR_DOMAIN/phpldapadmin</code></p>
<figure id="attachment_7843" aria-describedby="caption-attachment-7843" style="width: 1350px" class="wp-caption alignnone"><img loading="lazy" class="size-full wp-image-7843" src="https://www.osradar.com/wp-content/uploads/2018/11/12-7.png" alt="12.- phpLDAPadmin main page" width="1350" height="462" srcset="https://www.osradar.com/wp-content/uploads/2018/11/12-7.png 1350w, https://www.osradar.com/wp-content/uploads/2018/11/12-7-300x103.png 300w, https://www.osradar.com/wp-content/uploads/2018/11/12-7-768x263.png 768w, https://www.osradar.com/wp-content/uploads/2018/11/12-7-1024x350.png 1024w, https://www.osradar.com/wp-content/uploads/2018/11/12-7-1068x365.png 1068w, https://www.osradar.com/wp-content/uploads/2018/11/12-7-1227x420.png 1227w" sizes="(max-width: 1350px) 100vw, 1350px" /><figcaption id="caption-attachment-7843" class="wp-caption-text">12.- phpLDAPadmin main page</figcaption></figure>
<p>Next, log in.</p>
<figure id="attachment_7844" aria-describedby="caption-attachment-7844" style="width: 1350px" class="wp-caption alignnone"><img loading="lazy" class="size-full wp-image-7844" src="https://www.osradar.com/wp-content/uploads/2018/11/13-6.png" alt="13.- Add the credentials on phpLDAPadmin" width="1350" height="492" srcset="https://www.osradar.com/wp-content/uploads/2018/11/13-6.png 1350w, https://www.osradar.com/wp-content/uploads/2018/11/13-6-300x109.png 300w, https://www.osradar.com/wp-content/uploads/2018/11/13-6-768x280.png 768w, https://www.osradar.com/wp-content/uploads/2018/11/13-6-1024x373.png 1024w, https://www.osradar.com/wp-content/uploads/2018/11/13-6-1068x389.png 1068w, https://www.osradar.com/wp-content/uploads/2018/11/13-6-1152x420.png 1152w" sizes="(max-width: 1350px) 100vw, 1350px" /><figcaption id="caption-attachment-7844" class="wp-caption-text">13.- Add the credentials on phpLDAPadmin</figcaption></figure>
<p>Finally, you will see this.</p>
<figure id="attachment_7845" aria-describedby="caption-attachment-7845" style="width: 1366px" class="wp-caption alignnone"><img loading="lazy" class="size-full wp-image-7845" src="https://www.osradar.com/wp-content/uploads/2018/11/14-6.png" alt="14.- phpLDAPadmin installed" width="1366" height="671" srcset="https://www.osradar.com/wp-content/uploads/2018/11/14-6.png 1366w, https://www.osradar.com/wp-content/uploads/2018/11/14-6-300x147.png 300w, https://www.osradar.com/wp-content/uploads/2018/11/14-6-768x377.png 768w, https://www.osradar.com/wp-content/uploads/2018/11/14-6-1024x503.png 1024w, https://www.osradar.com/wp-content/uploads/2018/11/14-6-324x160.png 324w, https://www.osradar.com/wp-content/uploads/2018/11/14-6-1068x525.png 1068w, https://www.osradar.com/wp-content/uploads/2018/11/14-6-855x420.png 855w" sizes="(max-width: 1366px) 100vw, 1366px" /><figcaption id="caption-attachment-7845" class="wp-caption-text">14.- phpLDAPadmin installed</figcaption></figure>
<p>And that&#8217;s it.</p>
<h1>Conclusion</h1>
<p>As you can see OpenLDAP is easy to install and configure in Ubuntu, it just remains that you can configure it to your needs.</p>
<p>Please share this article with friends.</p>
<p>&nbsp;</p>
<p>The post <a rel="nofollow" href="https://www.osradar.com/install-openldap-ubuntu-18-04/">How to install  OpenLDAP on Ubuntu 18.04?</a> appeared first on <a rel="nofollow" href="https://www.osradar.com">Linux  Windows and android  Tutorials</a>.</p>
]]></content:encoded>
					
					<wfw:commentRss>https://www.osradar.com/install-openldap-ubuntu-18-04/feed/</wfw:commentRss>
			<slash:comments>1</slash:comments>
		
		
			</item>
		<item>
		<title>How to Install OpenLDAP Server on Ubuntu 18.04?</title>
		<link>https://www.osradar.com/how-to-install-openldap-server-on-ubuntu-18-04/</link>
					<comments>https://www.osradar.com/how-to-install-openldap-server-on-ubuntu-18-04/#comments</comments>
		
		<dc:creator><![CDATA[Mel]]></dc:creator>
		<pubDate>Mon, 18 Jun 2018 05:33:44 +0000</pubDate>
				<category><![CDATA[Linux]]></category>
		<category><![CDATA[Tutorials]]></category>
		<category><![CDATA[administration]]></category>
		<category><![CDATA[howto]]></category>
		<category><![CDATA[LDAP]]></category>
		<category><![CDATA[openLDAP]]></category>
		<category><![CDATA[server]]></category>
		<category><![CDATA[Tutorial]]></category>
		<category><![CDATA[ubuntu]]></category>
		<guid isPermaLink="false">https://www.osradar.com/?p=4154</guid>

					<description><![CDATA[<p>OpenLDAP is a free, open source implementation of the Lightweight Directory Access Protocol (LDAP) developed by the OpenLDAP project. Released under its own OpenLDAP Public License. LDAP is a platform-independent communication protocol. To simplify the administration of the system users, it is ideal to use a database accessible via LDAP. Centrally storing user accounts in [&#8230;]</p>
<p>The post <a rel="nofollow" href="https://www.osradar.com/how-to-install-openldap-server-on-ubuntu-18-04/">How to Install OpenLDAP Server on Ubuntu 18.04?</a> appeared first on <a rel="nofollow" href="https://www.osradar.com">Linux  Windows and android  Tutorials</a>.</p>
]]></description>
										<content:encoded><![CDATA[<p><strong>OpenLDAP</strong> is a free, open source implementation of the Lightweight Directory Access Protocol (LDAP) developed by the OpenLDAP project. Released under its own OpenLDAP Public License. LDAP is a <strong>platform-independent communication protocol.</strong></p>
<p>To simplify the administration of the system users, it is ideal to use a database accessible via LDAP. Centrally storing user accounts in a single repository makes it easy to create, modify, and delete user accounts and user groups</p>
<p>Let&#8217;s get to work!!!</p>
<h2>Installing OpenLDAP server</h2>
<p>To install the openLDAP server we only need to execute the following command with root privileges:</p>
<p><strong>             sudo apt install slapd ldap-utils</strong></p>
<figure id="attachment_4155" aria-describedby="caption-attachment-4155" style="width: 1366px" class="wp-caption alignnone"><img loading="lazy" class="size-full wp-image-4155" src="https://www.osradar.com/wp-content/uploads/2018/06/1-13.png" alt="1.-Installing openLDAP" width="1366" height="741" srcset="https://www.osradar.com/wp-content/uploads/2018/06/1-13.png 1366w, https://www.osradar.com/wp-content/uploads/2018/06/1-13-300x163.png 300w, https://www.osradar.com/wp-content/uploads/2018/06/1-13-768x417.png 768w, https://www.osradar.com/wp-content/uploads/2018/06/1-13-1024x555.png 1024w, https://www.osradar.com/wp-content/uploads/2018/06/1-13-696x378.png 696w, https://www.osradar.com/wp-content/uploads/2018/06/1-13-1068x579.png 1068w, https://www.osradar.com/wp-content/uploads/2018/06/1-13-774x420.png 774w" sizes="(max-width: 1366px) 100vw, 1366px" /><figcaption id="caption-attachment-4155" class="wp-caption-text">1.-Installing openLDAP</figcaption></figure>
<p>When the installation is complete, you have to define the administrator password.</p>
<figure id="attachment_4156" aria-describedby="caption-attachment-4156" style="width: 1366px" class="wp-caption alignnone"><img loading="lazy" class="size-full wp-image-4156" src="https://www.osradar.com/wp-content/uploads/2018/06/2-14.png" alt="2.-Admin Password" width="1366" height="741" srcset="https://www.osradar.com/wp-content/uploads/2018/06/2-14.png 1366w, https://www.osradar.com/wp-content/uploads/2018/06/2-14-300x163.png 300w, https://www.osradar.com/wp-content/uploads/2018/06/2-14-768x417.png 768w, https://www.osradar.com/wp-content/uploads/2018/06/2-14-1024x555.png 1024w, https://www.osradar.com/wp-content/uploads/2018/06/2-14-696x378.png 696w, https://www.osradar.com/wp-content/uploads/2018/06/2-14-1068x579.png 1068w, https://www.osradar.com/wp-content/uploads/2018/06/2-14-774x420.png 774w" sizes="(max-width: 1366px) 100vw, 1366px" /><figcaption id="caption-attachment-4156" class="wp-caption-text">2.-Admin Password</figcaption></figure>
<p>We will check the status of the service to see if the installation was successful.</p>
<p><strong>sudo systemctl status slapd.service</strong></p>
<figure id="attachment_4157" aria-describedby="caption-attachment-4157" style="width: 1366px" class="wp-caption alignnone"><img loading="lazy" class="size-full wp-image-4157" src="https://www.osradar.com/wp-content/uploads/2018/06/3-14.png" alt="3.- Checking status openLDAP" width="1366" height="741" srcset="https://www.osradar.com/wp-content/uploads/2018/06/3-14.png 1366w, https://www.osradar.com/wp-content/uploads/2018/06/3-14-300x163.png 300w, https://www.osradar.com/wp-content/uploads/2018/06/3-14-768x417.png 768w, https://www.osradar.com/wp-content/uploads/2018/06/3-14-1024x555.png 1024w, https://www.osradar.com/wp-content/uploads/2018/06/3-14-696x378.png 696w, https://www.osradar.com/wp-content/uploads/2018/06/3-14-1068x579.png 1068w, https://www.osradar.com/wp-content/uploads/2018/06/3-14-774x420.png 774w" sizes="(max-width: 1366px) 100vw, 1366px" /><figcaption id="caption-attachment-4157" class="wp-caption-text">3.- Checking status openLDAP</figcaption></figure>
<p>In the previous image we see that the installation was successful and that the service is running.</p>
<h2>2.-Basic configuration of the service</h2>
<p>When the installation of the packages is finished it does not do so with an appropriate configuration, so we must use dpkg to do it, at least in a basic way.</p>
<p><strong>            sudo dpkg-reconfigure slapd</strong></p>
<figure id="attachment_4158" aria-describedby="caption-attachment-4158" style="width: 1366px" class="wp-caption alignnone"><img loading="lazy" class="size-full wp-image-4158" src="https://www.osradar.com/wp-content/uploads/2018/06/4-12.png" alt="4.- Reconfiguring slapd" width="1366" height="741" srcset="https://www.osradar.com/wp-content/uploads/2018/06/4-12.png 1366w, https://www.osradar.com/wp-content/uploads/2018/06/4-12-300x163.png 300w, https://www.osradar.com/wp-content/uploads/2018/06/4-12-768x417.png 768w, https://www.osradar.com/wp-content/uploads/2018/06/4-12-1024x555.png 1024w, https://www.osradar.com/wp-content/uploads/2018/06/4-12-696x378.png 696w, https://www.osradar.com/wp-content/uploads/2018/06/4-12-1068x579.png 1068w, https://www.osradar.com/wp-content/uploads/2018/06/4-12-774x420.png 774w" sizes="(max-width: 1366px) 100vw, 1366px" /><figcaption id="caption-attachment-4158" class="wp-caption-text">4.- Reconfiguring slapd</figcaption></figure>
<p>When you run the above command, you will be asked certain questions. The first is whether we want to skip the LDAP server configuration. <strong>We say NO</strong>.</p>
<figure id="attachment_4159" aria-describedby="caption-attachment-4159" style="width: 1366px" class="wp-caption alignnone"><img loading="lazy" class="size-full wp-image-4159" src="https://www.osradar.com/wp-content/uploads/2018/06/6-13.png" alt="6.- Configuring LDAP" width="1366" height="741" srcset="https://www.osradar.com/wp-content/uploads/2018/06/6-13.png 1366w, https://www.osradar.com/wp-content/uploads/2018/06/6-13-300x163.png 300w, https://www.osradar.com/wp-content/uploads/2018/06/6-13-768x417.png 768w, https://www.osradar.com/wp-content/uploads/2018/06/6-13-1024x555.png 1024w, https://www.osradar.com/wp-content/uploads/2018/06/6-13-696x378.png 696w, https://www.osradar.com/wp-content/uploads/2018/06/6-13-1068x579.png 1068w, https://www.osradar.com/wp-content/uploads/2018/06/6-13-774x420.png 774w" sizes="(max-width: 1366px) 100vw, 1366px" /><figcaption id="caption-attachment-4159" class="wp-caption-text">5.- Configuring LDAP</figcaption></figure>
<p>The next step is to enter your domain.</p>
<figure id="attachment_4160" aria-describedby="caption-attachment-4160" style="width: 1366px" class="wp-caption alignnone"><img loading="lazy" class="size-full wp-image-4160" src="https://www.osradar.com/wp-content/uploads/2018/06/7-12.png" alt="7.- Entering the domain" width="1366" height="741" srcset="https://www.osradar.com/wp-content/uploads/2018/06/7-12.png 1366w, https://www.osradar.com/wp-content/uploads/2018/06/7-12-300x163.png 300w, https://www.osradar.com/wp-content/uploads/2018/06/7-12-768x417.png 768w, https://www.osradar.com/wp-content/uploads/2018/06/7-12-1024x555.png 1024w, https://www.osradar.com/wp-content/uploads/2018/06/7-12-696x378.png 696w, https://www.osradar.com/wp-content/uploads/2018/06/7-12-1068x579.png 1068w, https://www.osradar.com/wp-content/uploads/2018/06/7-12-774x420.png 774w" sizes="(max-width: 1366px) 100vw, 1366px" /><figcaption id="caption-attachment-4160" class="wp-caption-text">6.- Entering the domain</figcaption></figure>
<p>You will then ask us for the name of our organization</p>
<figure id="attachment_4161" aria-describedby="caption-attachment-4161" style="width: 1366px" class="wp-caption alignnone"><img loading="lazy" class="size-full wp-image-4161" src="https://www.osradar.com/wp-content/uploads/2018/06/8-10.png" alt="8.- Entering organization name" width="1366" height="741" srcset="https://www.osradar.com/wp-content/uploads/2018/06/8-10.png 1366w, https://www.osradar.com/wp-content/uploads/2018/06/8-10-300x163.png 300w, https://www.osradar.com/wp-content/uploads/2018/06/8-10-768x417.png 768w, https://www.osradar.com/wp-content/uploads/2018/06/8-10-1024x555.png 1024w, https://www.osradar.com/wp-content/uploads/2018/06/8-10-696x378.png 696w, https://www.osradar.com/wp-content/uploads/2018/06/8-10-1068x579.png 1068w, https://www.osradar.com/wp-content/uploads/2018/06/8-10-774x420.png 774w" sizes="(max-width: 1366px) 100vw, 1366px" /><figcaption id="caption-attachment-4161" class="wp-caption-text">7.- Entering organization name</figcaption></figure>
<p>After that, you will be asked to set the admin password again.</p>
<figure id="attachment_4162" aria-describedby="caption-attachment-4162" style="width: 1366px" class="wp-caption alignnone"><img loading="lazy" class="size-full wp-image-4162" src="https://www.osradar.com/wp-content/uploads/2018/06/9-8.png" alt="8.- admin password" width="1366" height="741" srcset="https://www.osradar.com/wp-content/uploads/2018/06/9-8.png 1366w, https://www.osradar.com/wp-content/uploads/2018/06/9-8-300x163.png 300w, https://www.osradar.com/wp-content/uploads/2018/06/9-8-768x417.png 768w, https://www.osradar.com/wp-content/uploads/2018/06/9-8-1024x555.png 1024w, https://www.osradar.com/wp-content/uploads/2018/06/9-8-696x378.png 696w, https://www.osradar.com/wp-content/uploads/2018/06/9-8-1068x579.png 1068w, https://www.osradar.com/wp-content/uploads/2018/06/9-8-774x420.png 774w" sizes="(max-width: 1366px) 100vw, 1366px" /><figcaption id="caption-attachment-4162" class="wp-caption-text">8.- admin password</figcaption></figure>
<p>The next step is to define the database backend. <strong>We will choose</strong> <strong>MDB</strong> because it is the most efficient in performance and memory consumption.</p>
<figure id="attachment_4163" aria-describedby="caption-attachment-4163" style="width: 1366px" class="wp-caption alignnone"><img loading="lazy" class="size-full wp-image-4163" src="https://www.osradar.com/wp-content/uploads/2018/06/10-7.png" alt="9.- Database backend " width="1366" height="741" srcset="https://www.osradar.com/wp-content/uploads/2018/06/10-7.png 1366w, https://www.osradar.com/wp-content/uploads/2018/06/10-7-300x163.png 300w, https://www.osradar.com/wp-content/uploads/2018/06/10-7-768x417.png 768w, https://www.osradar.com/wp-content/uploads/2018/06/10-7-1024x555.png 1024w, https://www.osradar.com/wp-content/uploads/2018/06/10-7-696x378.png 696w, https://www.osradar.com/wp-content/uploads/2018/06/10-7-1068x579.png 1068w, https://www.osradar.com/wp-content/uploads/2018/06/10-7-774x420.png 774w" sizes="(max-width: 1366px) 100vw, 1366px" /><figcaption id="caption-attachment-4163" class="wp-caption-text">9.- Database backend</figcaption></figure>
<p>Do you want the database to be removed when slapd is purged? We say <strong>No</strong>.</p>
<figure id="attachment_4164" aria-describedby="caption-attachment-4164" style="width: 1366px" class="wp-caption alignnone"><img loading="lazy" class="size-full wp-image-4164" src="https://www.osradar.com/wp-content/uploads/2018/06/11-8.png" alt="10.- configuring ldpa" width="1366" height="741" srcset="https://www.osradar.com/wp-content/uploads/2018/06/11-8.png 1366w, https://www.osradar.com/wp-content/uploads/2018/06/11-8-300x163.png 300w, https://www.osradar.com/wp-content/uploads/2018/06/11-8-768x417.png 768w, https://www.osradar.com/wp-content/uploads/2018/06/11-8-1024x555.png 1024w, https://www.osradar.com/wp-content/uploads/2018/06/11-8-696x378.png 696w, https://www.osradar.com/wp-content/uploads/2018/06/11-8-1068x579.png 1068w, https://www.osradar.com/wp-content/uploads/2018/06/11-8-774x420.png 774w" sizes="(max-width: 1366px) 100vw, 1366px" /><figcaption id="caption-attachment-4164" class="wp-caption-text">10.- configuring ldpa</figcaption></figure>
<p>Move old database? <strong>we say Yes</strong></p>
<figure id="attachment_4165" aria-describedby="caption-attachment-4165" style="width: 1366px" class="wp-caption alignnone"><img loading="lazy" class="size-full wp-image-4165" src="https://www.osradar.com/wp-content/uploads/2018/06/12-7.png" alt="11.- move old database" width="1366" height="741" srcset="https://www.osradar.com/wp-content/uploads/2018/06/12-7.png 1366w, https://www.osradar.com/wp-content/uploads/2018/06/12-7-300x163.png 300w, https://www.osradar.com/wp-content/uploads/2018/06/12-7-768x417.png 768w, https://www.osradar.com/wp-content/uploads/2018/06/12-7-1024x555.png 1024w, https://www.osradar.com/wp-content/uploads/2018/06/12-7-696x378.png 696w, https://www.osradar.com/wp-content/uploads/2018/06/12-7-1068x579.png 1068w, https://www.osradar.com/wp-content/uploads/2018/06/12-7-774x420.png 774w" sizes="(max-width: 1366px) 100vw, 1366px" /><figcaption id="caption-attachment-4165" class="wp-caption-text">11.- move old database</figcaption></figure>
<p>We finally got out of the configuration script</p>
<figure id="attachment_4166" aria-describedby="caption-attachment-4166" style="width: 1366px" class="wp-caption alignnone"><img loading="lazy" class="size-full wp-image-4166" src="https://www.osradar.com/wp-content/uploads/2018/06/13-3.png" alt="12.- ldap configured" width="1366" height="741" srcset="https://www.osradar.com/wp-content/uploads/2018/06/13-3.png 1366w, https://www.osradar.com/wp-content/uploads/2018/06/13-3-300x163.png 300w, https://www.osradar.com/wp-content/uploads/2018/06/13-3-768x417.png 768w, https://www.osradar.com/wp-content/uploads/2018/06/13-3-1024x555.png 1024w, https://www.osradar.com/wp-content/uploads/2018/06/13-3-696x378.png 696w, https://www.osradar.com/wp-content/uploads/2018/06/13-3-1068x579.png 1068w, https://www.osradar.com/wp-content/uploads/2018/06/13-3-774x420.png 774w" sizes="(max-width: 1366px) 100vw, 1366px" /><figcaption id="caption-attachment-4166" class="wp-caption-text">12.- ldap configured</figcaption></figure>
<h2>3.-Define Configuration in an LDAP Client</h2>
<p>The configuration file for all OpenLDAP clients is ldap.conf located in /etc/ldap. We need to edit it.</p>
<p><strong>            sudo nano /etc/ldap/ldap.conf</strong></p>
<p>When we open the file we&#8217;ll see something like this:</p>
<figure id="attachment_4168" aria-describedby="caption-attachment-4168" style="width: 1366px" class="wp-caption alignnone"><img loading="lazy" class="size-full wp-image-4168" src="https://www.osradar.com/wp-content/uploads/2018/06/14-3.png" alt="13.- editing file ldap.conf" width="1366" height="741" srcset="https://www.osradar.com/wp-content/uploads/2018/06/14-3.png 1366w, https://www.osradar.com/wp-content/uploads/2018/06/14-3-300x163.png 300w, https://www.osradar.com/wp-content/uploads/2018/06/14-3-768x417.png 768w, https://www.osradar.com/wp-content/uploads/2018/06/14-3-1024x555.png 1024w, https://www.osradar.com/wp-content/uploads/2018/06/14-3-696x378.png 696w, https://www.osradar.com/wp-content/uploads/2018/06/14-3-1068x579.png 1068w, https://www.osradar.com/wp-content/uploads/2018/06/14-3-774x420.png 774w" sizes="(max-width: 1366px) 100vw, 1366px" /><figcaption id="caption-attachment-4168" class="wp-caption-text">13.- editing file ldap.conf</figcaption></figure>
<p>In this file we only need to specify two things: BASE and URI. BASE is where our DNS is placed, following this formula:</p>
<p>BASE dc=YOUR_DOMAIN,dc=com</p>
<p>Or if you have, a subdomain:</p>
<p>BASE dc=SUB_DOMAIN,dc=YOUR_DOMAIN,dc=com</p>
<p>While URI is the address where the LDAP server is located:</p>
<p>If the server is hosted on the same machine as the client, then we must set the URI to ldap:localhost/</p>
<figure id="attachment_4169" aria-describedby="caption-attachment-4169" style="width: 1366px" class="wp-caption alignnone"><img loading="lazy" class="size-full wp-image-4169" src="https://www.osradar.com/wp-content/uploads/2018/06/15-4.png" alt="14.-Editing file ldap.conf" width="1366" height="741" srcset="https://www.osradar.com/wp-content/uploads/2018/06/15-4.png 1366w, https://www.osradar.com/wp-content/uploads/2018/06/15-4-300x163.png 300w, https://www.osradar.com/wp-content/uploads/2018/06/15-4-768x417.png 768w, https://www.osradar.com/wp-content/uploads/2018/06/15-4-1024x555.png 1024w, https://www.osradar.com/wp-content/uploads/2018/06/15-4-696x378.png 696w, https://www.osradar.com/wp-content/uploads/2018/06/15-4-1068x579.png 1068w, https://www.osradar.com/wp-content/uploads/2018/06/15-4-774x420.png 774w" sizes="(max-width: 1366px) 100vw, 1366px" /><figcaption id="caption-attachment-4169" class="wp-caption-text">14.-Editing file ldap.conf</figcaption></figure>
<p>Let&#8217;s check that everything is OK, with the execution of the next command:</p>
<p><strong>            ldapsearch -x</strong></p>
<figure id="attachment_4170" aria-describedby="caption-attachment-4170" style="width: 1366px" class="wp-caption alignnone"><img loading="lazy" class="size-full wp-image-4170" src="https://www.osradar.com/wp-content/uploads/2018/06/16-4.png" alt="15.- Testing ldap" width="1366" height="741" srcset="https://www.osradar.com/wp-content/uploads/2018/06/16-4.png 1366w, https://www.osradar.com/wp-content/uploads/2018/06/16-4-300x163.png 300w, https://www.osradar.com/wp-content/uploads/2018/06/16-4-768x417.png 768w, https://www.osradar.com/wp-content/uploads/2018/06/16-4-1024x555.png 1024w, https://www.osradar.com/wp-content/uploads/2018/06/16-4-696x378.png 696w, https://www.osradar.com/wp-content/uploads/2018/06/16-4-1068x579.png 1068w, https://www.osradar.com/wp-content/uploads/2018/06/16-4-774x420.png 774w" sizes="(max-width: 1366px) 100vw, 1366px" /><figcaption id="caption-attachment-4170" class="wp-caption-text">15.- Testing ldap</figcaption></figure>
<p>The previous image shows the output per terminal of the execution of the ldapsearch command. <strong>Seeing 0 success means that everything is in order</strong>.</p>
<h2>Optional: Install phpLDAPAdmin</h2>
<p>It is possible to manage ldap from the command line, but some people prefer a graphical application. PhpLDAPAdmin is a web application used to manage an LDAP server in a simple and intuitive way.</p>
<p><strong>            sudo apt install phpldapadmin</strong></p>
<p><em>note:phpldapadmin requires a web server to run since it is a browser-based application, if your ubuntu does not have a web server, then the above command will install apache as a dependency.</em></p>
<figure id="attachment_4171" aria-describedby="caption-attachment-4171" style="width: 1366px" class="wp-caption alignnone"><img loading="lazy" class="size-full wp-image-4171" src="https://www.osradar.com/wp-content/uploads/2018/06/17-3.png" alt="16.- installing phpldapadmin" width="1366" height="741" srcset="https://www.osradar.com/wp-content/uploads/2018/06/17-3.png 1366w, https://www.osradar.com/wp-content/uploads/2018/06/17-3-300x163.png 300w, https://www.osradar.com/wp-content/uploads/2018/06/17-3-768x417.png 768w, https://www.osradar.com/wp-content/uploads/2018/06/17-3-1024x555.png 1024w, https://www.osradar.com/wp-content/uploads/2018/06/17-3-696x378.png 696w, https://www.osradar.com/wp-content/uploads/2018/06/17-3-1068x579.png 1068w, https://www.osradar.com/wp-content/uploads/2018/06/17-3-774x420.png 774w" sizes="(max-width: 1366px) 100vw, 1366px" /><figcaption id="caption-attachment-4171" class="wp-caption-text">16.- installing phpldapadmin</figcaption></figure>
<p>After installation, we should be able to run phpldapadmin from the browser, but first we&#8217;ll modify some things from the configuration files.</p>
<p><strong>            sudo nano /etc/phpldapadmin/config.php</strong></p>
<p>First we will tell phpldapadmin that we will connect from localhost. We&#8217;ll go to line 293. Press CTR + _ and write the line number.</p>
<figure id="attachment_4172" aria-describedby="caption-attachment-4172" style="width: 1366px" class="wp-caption alignnone"><img loading="lazy" class="size-full wp-image-4172" src="https://www.osradar.com/wp-content/uploads/2018/06/18-3.png" alt="17.-Allowing localhost connection" width="1366" height="741" srcset="https://www.osradar.com/wp-content/uploads/2018/06/18-3.png 1366w, https://www.osradar.com/wp-content/uploads/2018/06/18-3-300x163.png 300w, https://www.osradar.com/wp-content/uploads/2018/06/18-3-768x417.png 768w, https://www.osradar.com/wp-content/uploads/2018/06/18-3-1024x555.png 1024w, https://www.osradar.com/wp-content/uploads/2018/06/18-3-696x378.png 696w, https://www.osradar.com/wp-content/uploads/2018/06/18-3-1068x579.png 1068w, https://www.osradar.com/wp-content/uploads/2018/06/18-3-774x420.png 774w" sizes="(max-width: 1366px) 100vw, 1366px" /><figcaption id="caption-attachment-4172" class="wp-caption-text">17.-Allowing localhost connection</figcaption></figure>
<p>Then we go to line 296 and remove the comment to allow the connection through port 389.</p>
<figure id="attachment_4173" aria-describedby="caption-attachment-4173" style="width: 1366px" class="wp-caption alignnone"><img loading="lazy" class="size-full wp-image-4173" src="https://www.osradar.com/wp-content/uploads/2018/06/19-4.png" alt="18.- Setting the port" width="1366" height="741" srcset="https://www.osradar.com/wp-content/uploads/2018/06/19-4.png 1366w, https://www.osradar.com/wp-content/uploads/2018/06/19-4-300x163.png 300w, https://www.osradar.com/wp-content/uploads/2018/06/19-4-768x417.png 768w, https://www.osradar.com/wp-content/uploads/2018/06/19-4-1024x555.png 1024w, https://www.osradar.com/wp-content/uploads/2018/06/19-4-696x378.png 696w, https://www.osradar.com/wp-content/uploads/2018/06/19-4-1068x579.png 1068w, https://www.osradar.com/wp-content/uploads/2018/06/19-4-774x420.png 774w" sizes="(max-width: 1366px) 100vw, 1366px" /><figcaption id="caption-attachment-4173" class="wp-caption-text">18.- Setting the port</figcaption></figure>
<p>Next we will go to line 300 where we will find :</p>
<p><strong>$servers-&gt;setValue(&#8216;server&#8217;,&#8217;base&#8217;,array(&#8216;dc=example,dc=com&#8217;))</strong></p>
<p>And the substitutes for the following:</p>
<p><strong>$servers-&gt;setValue(&#8216;server&#8217;,&#8217;base&#8217;,array());</strong></p>
<p>This is in order for phpldapadmin to recognize the domain arrangement we use in the openLDAP configuration.</p>
<figure id="attachment_4174" aria-describedby="caption-attachment-4174" style="width: 1366px" class="wp-caption alignnone"><img loading="lazy" class="size-full wp-image-4174" src="https://www.osradar.com/wp-content/uploads/2018/06/20-4.png" alt="19.- Changing the array" width="1366" height="741" srcset="https://www.osradar.com/wp-content/uploads/2018/06/20-4.png 1366w, https://www.osradar.com/wp-content/uploads/2018/06/20-4-300x163.png 300w, https://www.osradar.com/wp-content/uploads/2018/06/20-4-768x417.png 768w, https://www.osradar.com/wp-content/uploads/2018/06/20-4-1024x555.png 1024w, https://www.osradar.com/wp-content/uploads/2018/06/20-4-696x378.png 696w, https://www.osradar.com/wp-content/uploads/2018/06/20-4-1068x579.png 1068w, https://www.osradar.com/wp-content/uploads/2018/06/20-4-774x420.png 774w" sizes="(max-width: 1366px) 100vw, 1366px" /><figcaption id="caption-attachment-4174" class="wp-caption-text">19.- Changing the array</figcaption></figure>
<p>On line 335 we proceed to remove the comment and enable TLS.</p>
<figure id="attachment_4175" aria-describedby="caption-attachment-4175" style="width: 1366px" class="wp-caption alignnone"><img loading="lazy" class="size-full wp-image-4175" src="https://www.osradar.com/wp-content/uploads/2018/06/21-4.png" alt="20.-Enabling TLS" width="1366" height="741" srcset="https://www.osradar.com/wp-content/uploads/2018/06/21-4.png 1366w, https://www.osradar.com/wp-content/uploads/2018/06/21-4-300x163.png 300w, https://www.osradar.com/wp-content/uploads/2018/06/21-4-768x417.png 768w, https://www.osradar.com/wp-content/uploads/2018/06/21-4-1024x555.png 1024w, https://www.osradar.com/wp-content/uploads/2018/06/21-4-696x378.png 696w, https://www.osradar.com/wp-content/uploads/2018/06/21-4-1068x579.png 1068w, https://www.osradar.com/wp-content/uploads/2018/06/21-4-774x420.png 774w" sizes="(max-width: 1366px) 100vw, 1366px" /><figcaption id="caption-attachment-4175" class="wp-caption-text">20.-Enabling TLS</figcaption></figure>
<p>Finally we disable the anonymous logging. Let&#8217;s go to line 453.</p>
<figure id="attachment_4176" aria-describedby="caption-attachment-4176" style="width: 1366px" class="wp-caption alignnone"><img loading="lazy" class="size-full wp-image-4176" src="https://www.osradar.com/wp-content/uploads/2018/06/22-3.png" alt="21.- disabling anonymous logging" width="1366" height="741" srcset="https://www.osradar.com/wp-content/uploads/2018/06/22-3.png 1366w, https://www.osradar.com/wp-content/uploads/2018/06/22-3-300x163.png 300w, https://www.osradar.com/wp-content/uploads/2018/06/22-3-768x417.png 768w, https://www.osradar.com/wp-content/uploads/2018/06/22-3-1024x555.png 1024w, https://www.osradar.com/wp-content/uploads/2018/06/22-3-696x378.png 696w, https://www.osradar.com/wp-content/uploads/2018/06/22-3-1068x579.png 1068w, https://www.osradar.com/wp-content/uploads/2018/06/22-3-774x420.png 774w" sizes="(max-width: 1366px) 100vw, 1366px" /><figcaption id="caption-attachment-4176" class="wp-caption-text">21.- disabling anonymous logging</figcaption></figure>
<p>We finally got out and finished setting up.</p>
<p>And with this we can access from our browser to phpldapadmin</p>
<figure id="attachment_4177" aria-describedby="caption-attachment-4177" style="width: 1360px" class="wp-caption alignnone"><img loading="lazy" class="size-full wp-image-4177" src="https://www.osradar.com/wp-content/uploads/2018/06/23-1.png" alt="22.- phpldapadmin" width="1360" height="513" srcset="https://www.osradar.com/wp-content/uploads/2018/06/23-1.png 1360w, https://www.osradar.com/wp-content/uploads/2018/06/23-1-300x113.png 300w, https://www.osradar.com/wp-content/uploads/2018/06/23-1-768x290.png 768w, https://www.osradar.com/wp-content/uploads/2018/06/23-1-1024x386.png 1024w, https://www.osradar.com/wp-content/uploads/2018/06/23-1-696x263.png 696w, https://www.osradar.com/wp-content/uploads/2018/06/23-1-1068x403.png 1068w, https://www.osradar.com/wp-content/uploads/2018/06/23-1-1113x420.png 1113w" sizes="(max-width: 1360px) 100vw, 1360px" /><figcaption id="caption-attachment-4177" class="wp-caption-text">22.- phpldapadmin</figcaption></figure>
<p>We enter our credentials and log in</p>
<figure id="attachment_4179" aria-describedby="caption-attachment-4179" style="width: 1364px" class="wp-caption alignnone"><img loading="lazy" class="size-full wp-image-4179" src="https://www.osradar.com/wp-content/uploads/2018/06/24-2.png" alt="23.- Entering credentials" width="1364" height="488" srcset="https://www.osradar.com/wp-content/uploads/2018/06/24-2.png 1364w, https://www.osradar.com/wp-content/uploads/2018/06/24-2-300x107.png 300w, https://www.osradar.com/wp-content/uploads/2018/06/24-2-768x275.png 768w, https://www.osradar.com/wp-content/uploads/2018/06/24-2-1024x366.png 1024w, https://www.osradar.com/wp-content/uploads/2018/06/24-2-696x249.png 696w, https://www.osradar.com/wp-content/uploads/2018/06/24-2-1068x382.png 1068w, https://www.osradar.com/wp-content/uploads/2018/06/24-2-1174x420.png 1174w" sizes="(max-width: 1364px) 100vw, 1364px" /><figcaption id="caption-attachment-4179" class="wp-caption-text">23.- Entering credentials</figcaption></figure>
<p>And we will see the following</p>
<figure id="attachment_4181" aria-describedby="caption-attachment-4181" style="width: 1366px" class="wp-caption alignnone"><img loading="lazy" class="size-full wp-image-4181" src="https://www.osradar.com/wp-content/uploads/2018/06/26.png" alt="24.- phpldapadmin" width="1366" height="630" srcset="https://www.osradar.com/wp-content/uploads/2018/06/26.png 1366w, https://www.osradar.com/wp-content/uploads/2018/06/26-300x138.png 300w, https://www.osradar.com/wp-content/uploads/2018/06/26-768x354.png 768w, https://www.osradar.com/wp-content/uploads/2018/06/26-1024x472.png 1024w, https://www.osradar.com/wp-content/uploads/2018/06/26-696x321.png 696w, https://www.osradar.com/wp-content/uploads/2018/06/26-1068x493.png 1068w, https://www.osradar.com/wp-content/uploads/2018/06/26-911x420.png 911w" sizes="(max-width: 1366px) 100vw, 1366px" /><figcaption id="caption-attachment-4181" class="wp-caption-text">24.- phpldapadmin</figcaption></figure>
<p>And this is it. We have installed and configured openLDAP. Now it&#8217;s time to take advantage of this fabulous application.</p>
<p>Feel free to share this article with your friends through social networks.</p>
<p>The post <a rel="nofollow" href="https://www.osradar.com/how-to-install-openldap-server-on-ubuntu-18-04/">How to Install OpenLDAP Server on Ubuntu 18.04?</a> appeared first on <a rel="nofollow" href="https://www.osradar.com">Linux  Windows and android  Tutorials</a>.</p>
]]></content:encoded>
					
					<wfw:commentRss>https://www.osradar.com/how-to-install-openldap-server-on-ubuntu-18-04/feed/</wfw:commentRss>
			<slash:comments>3</slash:comments>
		
		
			</item>
	</channel>
</rss>
