Repost from
http://muzso.hu/2010/04/26/fixing-bdb_equality_candidates-errors-on-your-openldap-server
OR
http://trac.zentyal.org/wiki/Documentation/Community/HowTo/LDAPoptimization
- Stop the LDAP server:
sudo stop slapd
- Open the right OpenLDAP config file with an editor:
sudo vi /etc/ldap/slapd.d/cn\=config/olcDatabase\=\{1\}hdb.ldif
- Add new lines (after the one with
olcDbIndex: objectClass eq
in it) for the missing indexes.
Eg.:olcDbIndex: cn eq
olcDbIndex: gidNumber eq
olcDbIndex: memberUid eq
olcDbIndex: uid eq
olcDbIndex: uidNumber eq
olcDbIndex: uniqueMember eq - Run the OpenLDAP indexer for your configuration:
sudo -u openldap slapindex -F /etc/ldap/slapd.d/
- Start the LDAP server:
sudo start slapd
/var/lib/ldap
) before you touch it.