Pages

Saturday, May 10, 2014

Installing the Open ldap centos 6.5

Installing the Open Ldap in Cent Os as follows


1. Installation Of open Ldap

Login as a root and execute the following commands to install the openldap.

yum install openldap openldap-clients openldap-servers

2. Generating the Open Ldap Root Password

Login as a root and execute the following command to generate the password

slappasswd
New password: <New Password>
Re-enter new password: <Confirm Password>
{SSHA}kkPYFxxxxxxxxxxxxxxxxxxxxxxxxxxx

3. Modifying the  olcDatabase={0}config.ldif file

Go to the /etc/openldap/slapd.d/cn=config directory and edit the  olcDatabase={0}config.ldif file and add the generated password after oldRootDN: cn=config

olcRootPW: {SSHA}kkPYFxxxxxxxxxxxxxxxxxxxxxxxxxxx


4. Modifying the  olcDatabase={2}bdb.ldif file


Go to the /etc/openldap/slapd.d/cn=config and edit the  olcDatabase={2}bdb.ldif file and modify the following properties and also add the generated password after oldRootDN: 

4.1 Modify the Root Suffix

Modify the olcSuffix value. In my example I modified from olcSuffix: dc=My-domain,dc=com to olcSuffix: dc=example,dc=edu

4.2 Modify the Root DN

Modify the olcRootDN value. In my example I modified from olcRootDN: CN=Manager,dc=My-domain,dc=com to olcRootDN: CN=Manager,dc=example,dc=edu

4.3 Add the Root DN Password

olcRootPW: {SSHA}kkPYFxxxxxxxxxxxxxxxxxxxxxxxxxxx


5. Modify the  olcDatabase\=\{1\}monitor.ldif

edit the  olcDatabase\=\{1\}monitor.ldif file and modify the olcAccess value from cn=manager,dc=my-domain,dc=com to cn=manager,dc=example,dc=com

6 Start the Open Ldap Server


service slapd start

7. Add the Root Suffix dc=example,dc=edu


ldapadd -x -h localhost -p 389 -D "CN=Manager,dc=example,dc=edu" -W
Enter LDAP Password:
dn: dc=example,dc=edu
objectClass: dcObject
objectclass: organization
o: Example
dc: example

adding new entry "dc=example,dc=edu"

8. Add the CN=Manager Organizational Role


ldapadd -x -h localhost -p 389 -D "CN=Manager,dc=example,dc=edu" -W
Enter LDAP Password:

dn: CN=Manager,dc=example,dc=edu
objectClass: organizationalRole
cn: Manager

adding new entry "CN=Manager,dc=example,dc=edu"

9. Add the Ou=People and Ou=Groups Organizational Unit to store the Users and Groups

ldapadd -x -h localhost -p 389 -D "CN=Manager,dc=example,dc=edu" -W
Enter LDAP Password:

dn: ou=People,dc=example,dc=edu
objectclass: organizationalUnit
ou: People

adding new entry "ou=People,dc=example,dc=edu"

dn: ou=Groups,dc=example,dc=edu
objectclass: organizationalunit
ou: Groups

adding new entry "ou=Groups,dc=example,dc=edu"



No comments:

Post a Comment