Configure Ldap Server in Centos 5.7

Dear All,

Please find the below configuration file.

1.Yum install openldap

2.create a passwd for ur webldap

slappasswd -click on Enter

Type the passwd ex : fcoos

Retype the passwd :fcoos

3.go to the config file vi /etc/openldap/salpd.conf

and edit the config file like this

search for suffixe and rootdn ,edit the suffixe file ex:dc=fcoos, dc,=linux

ex: cn=blr,dc=fcoos,dc=linux

copy the slappasswd in rootdn xxxxxxxxxxxxxxxxxxxxxxxxxxxxxx

and save the file

4.edit the ldap config file vi /etc/openldap/ldap.conf

Type the enter blow of the file

Host 127.0.0.1 and ipadd of the server.

Base dc=fcoos,dc=linux

and save the file.

5.copy DB file to /var/lib/ldap

cp /etc/openldap/DB_Config.example to /var/lib/ldap/ DB_Config.example

6.service ldap restart.

7.Edit vi /usr/share/openldap/migration/migration_conman.ph

Serch for Defult mail domain option and edit the Defult config file dc=fcoos,dc=linux

Save the file

8.create a touch file in cd /etc/opeldap

ex: touch base.ldif

9. /usr/share/opeldap/migration/migration_base.pl > /etc/openldap/base.ldif

10.add the ldap configuration file to ldapadd -a -W -x -D  “cn=blr,dc=fcoos,dc=linux  -f /etc/openldap/base.ldif — click on enter

it will popup passwd

enter the ldap web passwd

11.service ldap restart

12.chkconfig ldap on

13.yum install httpd

14.yum install phpldapadmin

15.edit the httpd config file

vi /etc/httpd/config.d/phpldapadmin

edit the line Allow  from 127.0.0.1 to all.

save the file

16.service httpd restrat

17.chkcconfig htttpd on

18.open the browser type http://ldapserveripadd/ldapadmin–click on enter

19.it will ask you the ldap username and passwd.

username will be cn=blr,dc=fcoos,dc=linux

20.you will be login to the ldapweb interface

21.there you can add the ldap user account.

 

Regards,

Prashant.N.K

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

Leave a Reply