This article 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.




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.




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.