LDAP: Difference between revisions

Content added Content deleted
No edit summary
Line 6: Line 6:
Source: [https://www.linuxbabe.com/ubuntu/install-configure-openldap-server-ubuntu-16-04 linuxbabe.com]
Source: [https://www.linuxbabe.com/ubuntu/install-configure-openldap-server-ubuntu-16-04 linuxbabe.com]


Install Stand-Alone LDAP Daemon:
*Install Stand-Alone LDAP Daemon:
sudo apt install slapd ldap-utils
sudo apt install slapd ldap-utils


Set a password for the admin entry in the LDAP directory
*Set a password for the admin entry in the LDAP directory


Check out status of slapd
*Check out status of slapd
systemctl status slapd
systemctl status slapd


Basic Post-Installation Configuration:
*Basic Post-Installation Configuration:
sudo dpkg-reconfigure slapd
sudo dpkg-reconfigure slapd


Omit LDAP server configuration: NO
Omit LDAP server configuration: NO
DNS domain name: Enter your domain name: testlab.com
DNS domain name: Enter your domain name: testlab.com
Organization name: TestLab
Organization name: TestLab
Administrator password: Enter the same password set during installation
Administrator password: Enter the same password set during installation
Database backend: MDB.
Database backend: MDB:
BDB (Berkeley Database) is slow and cumbersome. It is deprecated and support will be dropped in future OpenLDAP releases.
BDB (Berkeley Database) is slow and cumbersome. It is deprecated and support will be dropped in future OpenLDAP releases.
HDB (Hierarchical Database) is a variant of the BDB backend and will also be deprecated.
HDB (Hierarchical Database) is a variant of the BDB backend and will also be deprecated.
MDB reads are 5-20x faster than BDB. Writes are 2-5x faster. And it consumes 1/4 as much RAM as BDB.
MDB reads are 5-20x faster than BDB. Writes are 2-5x faster. And it consumes 1/4 as much RAM as BDB.
Do you want the database to be removed when slapd is purged? No.
Do you want the database to be removed when slapd is purged? No
Move old database? Yes.
Move old database? Yes
Allow LDAPv2 protocol? No. The latest version of LDAP is LDAP v.3, developed in 1997. LDAPv2 is obsolete.
Allow LDAPv2 protocol? No
The latest version of LDAP is LDAP v.3, developed in 1997. LDAPv2 is obsolete.


*Configuring the LDAP Clients:

Configuring the LDAP Clients:
sudo nano /etc/ldap/ldap.conf
sudo nano /etc/ldap/ldap.conf


Need to specify two parameters: the base DN and the URI of our OpenLDAP server.
Need to specify two parameters:
Base DN
URI of our OpenLDAP server

Copy and paste the following text at the end of the file:
Copy and paste the following text at the end of the file:
BASE dc=testlab,dc=com
URI ldap://localhost


*If you used a subdomain when configuring OpenLDAP server, then you need to add the subdomain here like so
BASE dc=testlab,dc=com
BASE dc=subdomain,dc=testlab,dc=com
URI ldap://localhost
ldap://localhost


*Testing OpenLDAP Server:
If you used a subdomain when configuring OpenLDAP server, then you need to add the subdomain here like so
BASE dc=subdomain,dc=testlab,dc=com
ldap://localhost


Testing OpenLDAP Server:
ldapsearch -x
ldapsearch -x


Line 52: Line 53:
If you get the following line, then it’s not working:
If you get the following line, then it’s not working:
result: 32 No such object
result: 32 No such object




= phpLDAPadmin =
= phpLDAPadmin =