< Previous | Contents | Next >
2.2.2. Samba indices
Now that slapd knows about the Samba attributes, we can set up some indices based on them. Indexing entries is a way to improve performance when a client performs a filtered search on the DIT.
Create the file samba_indices.ldif with the following contents:
dn: olcDatabase={1}mdb,cn=config changetype: modify
replace: olcDbIndex olcDbIndex: objectClass eq
olcDbIndex: uidNumber,gidNumber eq olcDbIndex: loginShell eq olcDbIndex: uid,cn eq,sub olcDbIndex: memberUid eq,sub olcDbIndex: member,uniqueMember eq olcDbIndex: sambaSID eq
olcDbIndex: sambaPrimaryGroupSID eq olcDbIndex: sambaGroupType eq olcDbIndex: sambaSIDList eq olcDbIndex: sambaDomainName eq olcDbIndex: default sub,eq
Using the ldapmodify utility load the new indices:
sudo ldapmodify -Q -Y EXTERNAL -H ldapi:/// -f samba_indices.ldif
If all went well you should see the new indices using ldapsearch:
sudo ldapsearch -Q -LLL -Y EXTERNAL -H \
ldapi:/// -b cn=config olcDatabase={1}mdb olcDbIndex