How to install OpenLDAP on CentOS

OpenLdap-LogoGenerally OpnenLDAP is a central authenication database, like Active Directory. Both are basically LDAP database, but OpenLDAP consumes less resources so it can run in a small VM. In this example I am using CentOS as my operation system.

System Information:

For OpenLDAP we have to install below software:

To install above software issue the below command

Create OpenLDAP root user password

Update openldap configuration file with new values , use rootpw value get from slappasswd command

Create LDAP database file as below location. Use given example file from openldap

Start openldap service and setup auto start on system boot

Create ldif (LDAP Data Interchange Format) file for your domain, You can use any filename with extension ldif

Create ldif (LDAP Data Interchange Format) file of users

Modify all LDIF files as per below given example

Importing base.ldif

Importing root.ldif:

Importing ldapuser1.ldif:

Restart LDAP Service

Test your ldap server using ldapsearch

The following two tabs change content below.

Tapas Mishra

Sr. Engineer (DevOps)
Loves to work on Opensource products. Having experience on Linux environment. Knowledge on Public cloud services like AWS, Rackspace, DigitalOcean, Linode. Please don't hesitate to give a comment on the posts. Your comments are my strength.

One thought on “How to install OpenLDAP on CentOS

Leave a Reply