<= bdb_equality_candidates: (uid) not indexedOkay, lets do something about it.
(Ez a cikk magyarul is olvasható)
The thing is that slapd would like to avoid searching through the whole database, and wants to use an index instead. Setting up indexing is covered in most of HOWTOs and usually without any any clarification. Reading through the links in 'further reading' for me it seems to be clear that many HOWTOs are wrong when indexing the uid attribute by eq,pres,sub.
So I'll create a file called index_ldap.ldif:
dn: olcDatabase={1}hdb,cn=config changetype: modify replace: olcDbIndex olcDbIndex: uid,uidNumber,gidNumber,memberUid,uniqueMember,objectClass,cn eqThen:
sudo ldapmodify -Y EXTERNAL -H ldapi:/// -f index_ldap.ldifThe only thing left is to have the already exisiting stuff indexed. First we stop the server, then we do the indexing using the openldap user and when done we restart the server.
sudo service slapd stop
sudo su - openldap -c slapindex
sudo service slapd start
Cool. We're going to have some more posts on OpenLDAP.Further reading:
http://www.openldap.org/doc/admin24/tuning.html
http://www.zytrax.com/books/ldap/apa/indeces.html
http://ilostmynotes.blogspot.com/2009/08/eliminating-openldap-uid-not-indexed.html
Nincsenek megjegyzések:
Megjegyzés küldése