После настройки Samba+LDAP в логах появляются сообщения наподобие:
Mar 9 09:50:52 server slapd[2586]: <= bdb_equality_candidates: (uid) not indexed
Mar 9 09:50:52 server slapd[2586]: <= bdb_equality_candidates: (memberUid) not indexed
Mar 9 09:52:23 server slapd[2586]: <= bdb_equality_candidates: (sambaGroupType) not indexed
Mar 9 09:52:23 server slapd[2586]: <= bdb_equality_candidates: (sambaGroupType) not indexed
Mar 9 09:52:23 server slapd[2586]: <= bdb_equality_candidates: (sambaSIDList) not indexed
Mar 9 09:53:10 server slapd[2586]: <= bdb_equality_candidates: (uid) not indexed
Чтобы избежать появления этого сообщения необходимо правильно настроить индексирование. Для этого редактируем файл конфигурации /etc/ldap/slapd.conf:
# Indices to maintain for this database
index objectClass eq,pres
index ou,cn,sn,mail,givenname eq,pres,sub
index uidNumber,gidNumber,memberUid eq,pres
index loginShell eq,pres
# I also added this line to stop warning in syslog ..
index uniqueMember eq,pres
## required to support pdb_getsampwnam
index uid pres,sub,eq
## required to support pdb_getsambapwrid()
index displayName pres,sub,eq
# These attributes don't exist in this database ..
#index nisMapName,nisMapEntry eq,pres,sub
index sambaSID eq
index sambaPrimaryGroupSID eq
index sambaDomainName eq
index default sub
Останавливаем сервер и обновляем индекс:
$/etc/init.d/slapd stop
$slapindex
WARNING!
Runnig as root!
There's a fair chance slapd will fail to start.
Check file permissions!
$chown openldap:openldap /var/lib/ldap/*
$/etc/init.d/slapd start
Starting OpenLDAP: slapd