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 revisionPrevious revision
Next revisionBoth sides next revision
docs:tips_n_tricks:ldap.html [10.07.2018 17:47 CEST] peterdocs:tips_n_tricks:ldap.html [15.02.2019 20:55 CET] – [References & Credits] peter
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: 27.02.2024 23:32 CET by peter

Donate Powered by PHP Valid HTML5 Valid CSS Driven by DokuWiki