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 revision
Previous revision
Next revisionBoth sides next revision
docs:tips_n_tricks:ldap.html [10.07.2018 17:47 CEST] peterdocs:tips_n_tricks:ldap.html [09.05.2023 10:49 CEST] – [Enable "memberOf"] peter
Line 133: Line 133:
 </code> </code>
  
-:!: I assume this depends on where your LDAP tree data is stored - this example assumes it to be in //lcDatabase={1}hdb,cn=config//. You check it with+:!: I assume this depends on where your LDAP tree data is stored - this example assumes it to be in //olcDatabase={1}hdb,cn=config//. You check it with
  
   ldapsearch -Y EXTERNAL -H ldapi:/// -b "cn=config" '(olcSuffix=*)' dn   ldapsearch -Y EXTERNAL -H ldapi:/// -b "cn=config" '(olcSuffix=*)' dn
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