Adding ldap indices: Difference between revisions
(Created page with '{{ZC}} {{Article Infobox|{{admin}}|{{ZCS 7.0}}|{{ZCS 6.0}}||}} =Adding custom LDAP Indices= Sometimes, when using things like the NIS and Samba functionality with ZCS, it is des…') |
No edit summary |
||
(5 intermediate revisions by 2 users not shown) | |||
Line 1: | Line 1: | ||
{{ | {{BC|Certified}} | ||
{{ | __FORCETOC__ | ||
<div class="col-md-12 ibox-content"> | |||
= Adding custom LDAP Indices = | |||
{{KB|{{ZC}}|{{ZCS 7.0}}|{{ZCS 6.0}}|}} | |||
{{Archive}}{{WIP}} | |||
Sometimes, when using things like the NIS and Samba functionality with ZCS, it is desired to add additional indices to the LDAP database. To do this requires manual modification of the configuration using ldapmodify commands. For example, to add the necessary indices for the NIS functionality, one would do the following on each LDAP server as the zimbra user: | Sometimes, when using things like the NIS and Samba functionality with ZCS, it is desired to add additional indices to the LDAP database. To do this requires manual modification of the configuration using ldapmodify commands. For example, to add the necessary indices for the NIS functionality, one would do the following on each LDAP server as the zimbra user: | ||
Line 23: | Line 27: | ||
4) Press Control-D to finish the modification. | 4) Press Control-D to finish the modification. | ||
5) The LDAP server will automatically kick off a task to start indexing the attributes specified. Alternatively, you can stop slapd and run slapdindex manually. Note that you can use slapindex to only add an index for specific attributes with ZCS | 5) The LDAP server will automatically kick off a task to start indexing the attributes specified. Alternatively, you can stop slapd and run slapdindex manually. Note that you can use slapindex to only add an index for specific attributes with ZCS. | ||
/opt/zimbra/openldap/sbin/slapindex -F /opt/zimbra/data/ldap/config -b "" uidNumber gidNumber memberUid | /opt/zimbra/openldap/sbin/slapindex -F /opt/zimbra/data/ldap/config -b "" uidNumber gidNumber memberUid | ||
{{Article Footer|Zimbra Collaboration | {{Article Footer|Zimbra Collaboration Server|6/8/2009}} | ||
[[Category:LDAP]] | [[Category:LDAP]] | ||
[[Category: ZCS 7.0]] | [[Category: ZCS 7.0]] | ||
[[Category: ZCS 6.0]] | [[Category: ZCS 6.0]] |
Latest revision as of 16:19, 10 July 2015
Adding custom LDAP Indices
Sometimes, when using things like the NIS and Samba functionality with ZCS, it is desired to add additional indices to the LDAP database. To do this requires manual modification of the configuration using ldapmodify commands. For example, to add the necessary indices for the NIS functionality, one would do the following on each LDAP server as the zimbra user:
1) Get the ldap_root_password value
zmlocalconfig -s ldap_root_password
2) Start the modification:
ldapmodify -x -H ldapi:/// -D cn=config -W
This will prompt for the password. Enter the value for ldap_root_password
3) Modify the configuration database with the new indices. Which DN to use depends on whether or not this is either (A) a master with replica(s) or (B) a stand-alone master or a replica. For (A), the DN to modify is olcDatabase={3}hdb,cn=config. For (B), the DN to modify is olcDatabase={2}hdb,cn=config. For this example, we'll assume case (B). Enter the following text to add the indices:
dn: olcDatabase={2}hdb,cn=config changetype:modify add: olcDbIndex olcDbIndex: uidNumber eq olcDbIndex: gidNumber eq olcDbIndex: memberUid eq
4) Press Control-D to finish the modification.
5) The LDAP server will automatically kick off a task to start indexing the attributes specified. Alternatively, you can stop slapd and run slapdindex manually. Note that you can use slapindex to only add an index for specific attributes with ZCS.
/opt/zimbra/openldap/sbin/slapindex -F /opt/zimbra/data/ldap/config -b "" uidNumber gidNumber memberUid