This page will show you how to setup an LDAP address book using OpenLDAP, an open source implementation of the Lightweight Directory Access Protocol.
Installing OpenLDAP
The command line equivalent of the steps below is yum install openldap-servers openldap-clients.

3. Select the latest version of openldap-servers and openldap-clients then click Apply. Next click on Continue until it proceeds with the installation.
4. After installation, click Ok. You now have successfully installed the OpenLDAP servers and clients.Configuring OpenLDAP
The example below uses acme.local as the base domain.


suffix "dc=acme,dc=local" rootdn "cn=manager,dc=acme,dc=local" rootpw password
To avoid storing the password in plain-text, convert the password to a hash by using the command slappasswd -s password and paste the resulting hash into the file.

3. Start the ldap service. Learn how to start services here.

dn: dc=acme,dc=local dc: acme objectClass: domain
ldapadd -x -D "cn=manager,dc=acme,dc=local" -w password -f ~/base.ldif
Replace password with the root password you specified in slapd.conf.
To populate your directory, create a file similar to the one below and import it using ldapadd or better yet, use a GUI tool like JXplorer, a Java based LDAP browser.
dn: ou=People,dc=acme,dc=local ou: People objectClass: organizationalUnit dn: uid=bugsbunny,ou=People,dc=acme,dc=local uid: bugsbunny cn: Bugs Bunny displayName: Bugs Bunny givenName: Bugs sn: Bunny objectClass: inetOrgPerson userPassword: password mail: bugsbunny@acme.local
The displayName attribute is required for Outlook addressbook users.
Related Pages
***
Posted on 4/19/2008 and last updated on 4/19/2008
Filed under CentOS 5 , LDAP , Red Hat Enterprise Linux 5





November 18th, 2008 at 6:18 am
in the line of step Configuration openLDAP, there is:
2. Copy the file /etc/openldap/DB_CONFIG.example and put it into /var/lib/ldap as DB_CONFIG.
but i can’t find file DB_CONFIG.example, in the /etc/openldap/ there is have just a 2 files, ldap.conf n’ slapd.conf, would u telling me where i can find the file DB_CONFIG.example
well consultant help me ASAP!
November 18th, 2008 at 9:25 am
Hi aKBaR,
I have DB_CONFIG.example in my setup. Are you using RHEL/CentOS 5?
November 18th, 2008 at 9:49 am
nope… i’m using Fedora core 9
so what should i do, if there’s no DB_CONFIG.example on my setup? please guide me, b’coz i’m a newer on linux FC9.
November 18th, 2008 at 10:34 am
See this site for creating DB_CONFIG http://www.openldap.org/faq/data/cache/1072.html
November 26th, 2008 at 7:13 am
If you only have the 2 config files, check to make sure you have openldap-servers installed. You most likely have only the client installed…
December 25th, 2008 at 10:22 pm
@aKBaR
The latest F9 openldap-servers package comes with DB_CONFIG.example in /usr/share/doc/openldap-servers-2.4.10/DB_CONFIG.example. Check your package version for similar path.