Конфиги slapd.conf, где разруливаются права для этого и других пользователей:
[root@zeus openldap]# cat slapd.conf
include /usr/share/openldap/schema/core.schema
include /usr/share/openldap/schema/cosine.schema
include /usr/share/openldap/schema/inetorgperson.schema
include /usr/share/openldap/schema/nis.schema
include /usr/share/openldap/schema/samba.schemadatabase bdb
directory /home/services/ldap
suffix "dc=public,dc=polymer"
rootdn "cn=ldapadmin,dc=public,dc=polymer"
rootpw zzz
index objectClass,uidNumber,gidNumber eq
index cn,sn,uid,displayName pres,sub,eq
index memberUid,mail,givenname eq,subinitial
index sambaSID,sambaPrimaryGroupSID,sambaDomainName eq
access to attrs=userPassword,sambaLMPassword,sambaNTPassword
by self write
by anonymous auth
by * none
logfile /home/temp/slapd.log
loglevel 256
include /etc/openldap/slapd.access.conf
=======================================================
[root@zeus openldap]# cat slapd.access.conf
# users can authenticate and change their password
access to attrs=userPassword,sambaNTPassword,sambaLMPassword,sambaPwdLastSet,sambaPwdMustChange
by dn="cn=samba,ou=DSA,dc=public,dc=polymer" write
by dn="cn=smbldap-tools,ou=DSA,dc=public,dc=polymer" write
by dn="cn=nssldap,ou=DSA,dc=public,dc=polymer" write
by self write
by anonymous auth
by * none
# some attributes need to be readable anonymously so that 'id user' can answer correctly
access to attrs=objectClass,entry,homeDirectory,uid,uidNumber,gidNumber,memberUid
by dn="cn=samba,ou=DSA,dc=public,dc=polymer" write
by dn="cn=smbldap-tools,ou=DSA,dc=public,dc=polymer" write
by * read
# somme attributes can be writable by users themselves
access to attrs=description,telephoneNumber,roomNumber,homePhone,loginShell,gecos,cn,sn,givenname
by dn="cn=samba,ou=DSA,dc=public,dc=polymer" write
by dn="cn=smbldap-tools,ou=DSA,dc=public,dc=polymer" write
by self write
by * read
# some attributes need to be writable for samba
access to attrs=cn,sambaLMPassword,sambaNTPassword,sambaPwdLastSet,sambaLogonTime,sambaLogoffTime,sambaKickoffTime, \
sambaPwdCanChange,sambaPwdMustChange,sambaAcctFlags,displayName,sambaHomePath,sambaHomeDrive,sambaLogonScript, \
sambaProfilePath,description,sambaUserWorkstations,sambaPrimaryGroupSID,sambaDomainName,sambaMungedDial, \
sambaBadPasswordCount,sambaBadPasswordTime,sambaPasswordHistory,sambaLogonHours,sambaSID,sambaSIDList, \
sambaTrustFlags,sambaGroupType,sambaNextRid,sambaNextGroupRid,sambaNextUserRid,sambaAlgorithmicRidBase, \
sambaShareName,sambaOptionName,sambaBoolOption,sambaIntegerOption,sambaStringOption,sambaStringListoption
by dn="cn=samba,ou=DSA,dc=public,dc=polymer" write
by dn="cn=smbldap-tools,ou=DSA,dc=public,dc=polymer" write
by self read
by * none
# samba need to be able to create the samba domain account
access to dn.base="dc=public,dc=polymer"
by dn="cn=samba,ou=DSA,dc=public,dc=polymer" write
by dn="cn=smbldap-tools,ou=DSA,dc=public,dc=polymer" write
by * none
# samba need to be able to create new users account
access to dn="ou=Users,dc=public,dc=polymer"
by dn="cn=samba,ou=DSA,dc=public,dc=polymer" write
by dn="cn=smbldap-tools,ou=DSA,dc=public,dc=polymer" write
by * none
# samba need to be able to create new groups account
access to dn="ou=Groups,dc=public,dc=polymer"
by dn="cn=samba,ou=DSA,dc=public,dc=polymer" write
by dn="cn=smbldap-tools,ou=DSA,dc=public,dc=polymer" write
by * none
# samba need to be able to create new computers account
access to dn="ou=Computers,dc=public,dc=polymer"
by dn="cn=samba,ou=DSA,dc=public,dc=polymer" write
by dn="cn=smbldap-tools,ou=DSA,dc=public,dc=polymer" write
by * none
# this can be omitted but we leave it: there could be other branch
# in the directory
access to *
by self read
by * none