Repair MacOS X server Open Directory Yosemite

I had to do a hard reboot and then the open directory wouldn’t start. So the network users couldn’t connect to the server. Based on this page I used the following instructions to restore de database

First login as root using su or add sudo before each command

1- Verify the problème

/usr/libexec/slapd -Tt

2- Try to stop LDAP on Open Directory Master server

launchctl unload /System/Library/LaunchDaemons/org.openldap.slapd.plist

3- Repair disk permissions to make sure everything is ok

diskutil repairPermissions /

4- Backup the database

cp /var/db/openldap/authdata/id2entry.bdb /var/db/openldap/authdata/id2entry.bdb.backup

5- Repair the database

db_recover -cv -h /var/db/openldap/openldap-data/

6- Repairing again to make sure it’s ok

/usr/libexec/slapd -Tt

7- Restart the Open Directory service

launchctl load /System/Library/LaunchDaemons/org.openldap.slapd.plist


Problem solved:

Capture d’écran 2016-01-09 à 18.08.30






Olivier Écrit par :