User Tools

Site Tools


docs:tips_n_tricks:ldap.html

Differences

This shows you the differences between two versions of the page.

Link to this comparison view

Both sides previous revision Previous revision
docs:tips_n_tricks:ldap.html [10.07.2018 15:47 UTC]
peter
docs:tips_n_tricks:ldap.html [15.02.2019 19:55 UTC] (current)
peter [References & Credits]
Line 219: Line 219:
 </​code>​ </​code>​
  
 +
 +===== Adding indexes =====
 +
 +Find out what is the right suffix for your tree by either of the following lines((The first one works only by the local root account, the second one will require a password)):
 +
 +  ldapsearch -Y EXTERNAL -H ldapi:/// -b "​cn=config"​ '​(olcSuffix=*)'​ olcDbIndex olcSuffix
 +
 +  ldapsearch -D cn=config -W          -b "​cn=config"​ '​(olcSuffix=*)'​ olcDbIndex olcSuffix
 +
 +This will also show you the indices already existing. Now create a file in //LDIF// format, using the database found out in the previous step for the dn:
 +
 +<code ldif add_indices.ldif>​
 +dn: olcDatabase={1}hdb,​cn=config
 +changetype: modify
 +add: olcDbIndex
 +olcDbIndex: uid eq
 +-
 +add: olcDbIndex
 +olcDbIndex: cn eq
 +</​code>​
 +
 +Apply it with either of the following commands((The first one works only by the local root account, the second one will require a password)):
 +
 +  ldapmodify -Y EXTERNAL -H ldapi:/// -f add_indices.ldif
 +
 +  ldapmodify -D cn=config -W          -f add_indices.ldif
  
 ===== References & Credits ===== ===== References & Credits =====
docs/tips_n_tricks/ldap.html.txt · Last modified: 15.02.2019 19:55 UTC by peter