Installing OpenLDAP Server on Ubuntu

Install the necessary packages:

sudo apt-get install slapd ldap-utils

During the installation, you will be prompted for a password for the admin user.

Reconfigure the slapd package:

sudo dpkg-reconfigure slapd

We will test the LDAP connection (should display “anonymous”):

ldapwhoami -H ldap:// -x

To manage LDAP, set up the web interface phpLDAPadmin:

sudo apt-get install phpldapadmin

To open the web interface phpLDAPadmin, type in the browser http://example.com/phpldapadmin, where instead of example.com, specify your domain.
On the opened page we will enter the password which was specified at installation, and where the login:

cn=admin,dc=example,dc=com

Restart example:

sudo /etc/init.d/slapd start

Leave a comment

Leave a Reply