Configure Master & Slave LDAP Server on CentOS / RHEL

LDAP stands for Lightweight Directory Access Protocol. It is used in enterprise network for Authentication Purposes. There are two types of LDAP server mainly configured as a Master and Slave LDAP Server. In this Tutorial we are going to configure the master and slave LDAP Server on RHEL / CentOS / Scientific Linux / Oracle Linux 7 / 6 /5 with step by step instructions.

Master LDAP Server

Full Details for configuring the Master LDAP Server by following the given instructions.

Slave LDAP Server

Step-I (Provide the slave ldap entry in master)

# vi /etc/openldap/slapd.conf
 Replog file /var/lib/ldap/slapd.conf
 Replica host =
 binddn = “cn = manager, dc = techbrown, dc = com”
 suffix = dc = techbrown, dc = com
 credentials = a
 bindmethod = simple
 hs = no

: wq (save & quite)

Step-II (Assign the Hostname)

 # host name
 # host name
 # ipconfig
 # vi /etc/host slave ldap

: wq (save & quite)

# vi /etc/sysconfig/network

:wq (to save & quite)

Step-III (Install the package’s)

 # yum install openldap* *db* -y
 # scp -rv : /etc/openldap/techbrown.comldif /etc/openldap/

Step-IV (Open the M.C.F)

 # vi /etc/openldap/slapd.conf
 # chown ldap : ldap DB_CONFIG

Step-V (Provide the master ldap entery in slave host file)

 # vi /etc/hosts ldap

: wq (to save & quit)

Step-VI (In slave ldap server)

 # service ldap restart
 suffix “dc = techbrown.dc = com”
 rootdn “on=manager, dc=techbrown, dc=com”
 password root ********

:wq (save & quit)

Then come end of file

update ref ldap:// (master ldap name)
update dn “on=manager, dc=techbrown, dc = com”

:wq (save & quit)

Copy Data base file into /var/lib/ldap

 # cd /etc/openldap
 # ls
 # cp DB_CONFIG_example /var/lib/ldap
 # cd /var/lib/ldap (to enter the dir)
 # ls (to check)
 # mv DB_CONFIG.example DB_CONFIG (to rename)
 # ls

Step-VI (In Master LDAP Server)

Then move the master ldap server

# service ldap restart

Then create a ldap user in ldap database and move to slave ldap server

# ldap search -x -b “dc=techbrown, dc=com” ‘(object class=*)’

Step-VII (To Check in Client System)

# authconfig-tui

after opening authconfig-tui follow the given steps —> ldap —>server IP —->Domain Name.

Congratulations now you have configured the Master and Slave LDAP Server on RHEL / CentOS.

Hot Right Now

Related Post