Install LDAP Server in Centos Step by Step

OpenLDAP Software is a free, open source implementation of the Lightweight Directory Access Protocol (LDAP) developed by the OpenLDAP Project. It is released under its own BSD-style license called the OpenLDAP Public License. LDAP is a platform-independent protocol. Several common Linux distributions include OpenLDAP Software for LDAP support. The software also runs on BSD-variants, as well as AIX, Android, HP-UX, Mac OS X, Solaris, Microsoft Windows (NT and derivatives, e.g. 2000, XP, Vista, Windows 7, etc.), and z/OS.

1- Installl  LDAP

yum install  openldap*

2- Make  LDAP  admin password  with

 slappasswd -s passd -h {MD5}

{MD5}1/aVR9h11ZhMfA0YX2KoGw==

Remember this  password.

3- Edit  slapd.conf this file  and  edit the  suffux and  admin suffix

vi /etc/openldap/slapd.conf
# line 86 and 87: specify suffix
suffix          “dc=unixmen-test,dc=com”
rootdn          “cn=Manager,dc=unixmen-test,dc=com”
make  a  root password on line 92 with password  geneated  with  the first  command
rootpw         {MD5}1/aVR9h11ZhMfA0YX2KoGw==
# add at the bottom

access to attrs=userPassword
by self write
by dn=”cn=Manager,dc=unixmen-test,dc=info” write
by anonymous auth
by * none

access to *
by dn=”cn=Manager,dc=unixmen-test,dc=info” write
by self write
by * read

4- Configure the  ldap config and  change  my-domine to  yours

vi  /etc/openldap/ldap.conf
BASE    dc=unixmen-test, dc=com
chamhe  the  config  in /etc/ldap.config
# The distinguished name of the search base.
base dc=unixmen-test,dc=com

5- Copy the example  config   to /var/lib/ldap/DB_CONFIG  like

cp  /etc/openldap/DB_CONFIG.example   /var/lib/ldap/DB_CONFIG

6- Start  Ldap  Server

 /etc/init.d/ldap start