Total Pageviews

Tuesday, 23 December 2008

How to Rebuild a corrupt Ldap Database

Rebuilding the Ldap Database is very simple, and yes you will have to rebuild the database sooner or later.

Here is how.

#Stop the services:
/etc/init.d/ldap stop

#rename folder
mv /var/lib/ldap /var/lib/

#create folder
mkdir /var/lib/ldap

#add database info
slapadd –l /backups/ldap_backup.ldif

#Set Owner
chown –R ldap:ldap /var/lib/ldap

#Set Perms
chmod –R 755 /var/lib/ldap

#Start Services
/etc/init.d/ldap start

Ldap should OK now.

No comments: