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 = ldapslave.techbrown.com
 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 slaveldap.techbrown.com
 # host name
 # ipconfig
 # vi /etc/host
 192.168.0.200 slaveldap.techbrown.com slave ldap

: wq (save & quite)

# vi /etc/sysconfig/network
 HOSTNAME = slaveldap.techbrown.com

:wq (to save & quite)

Step-III (Install the package’s)

 # yum install openldap* *db* -y
 # scp -rv 192.168.0.100 : /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
 192.168.0.100 ldap.techbrown.com 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://ldap.techbrown.com (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

COMMENTS