Search Posts

OpenLDAP replication

Uncategorized No Comments
OpenLDAP replication
Configuration of OpenLDAP replication is a complex, multistep procedure
1. Create a replicator object on the master server
Create an LDIF:
dn: uid=replicator,dc=TLSB,dc=com
objectClass: inetOrgPerson
uid: replicator
cn: LDAP Replicator
2. Add the replicator object to the Directory:
ldapadd -x -D “cn=Administrator,dc=TLSB,dc=com” -W -f replicator.ldif
3. Give the replicator a password:
ldappasswd -x -D “cn=Administrator,dc=TLSB,dc=com” -W -S
“uid=replicator,dc=TLSB,dc=com”
Enter the password twice when prompted for.
4. Add the following two lines to the slapd.conf on the master server:
replogfile /var/lib/ldap/master-slapd.replog
replica uri=ldap://slaveserver:389 binddn=”uid=replicator,dc=TLSB,dc=com”
bindmethod=simple credentials=novell
5. Enter the followin two lines to the slapd.conf at the slave server
updatedn=”uid=replicator,dc=TLSB,dc=com”
updateref=”ldap://ipaddressofthemasterserver
Next, make sure to change read access to the following:
access to *
by dn=”uid=replicator,dc=TLSB,dc=com” write
by * read
6. Copy the LDAP database from the master to the slave server
scp -r /var/lib/ldap/ slaveserver:/var/lib/ldap/
7. Start the LDAP server and replication on both servers
rcldap start rcslurpd start