I have the following openldap server configuration:
access to attrs=userPassword
by self write
by anonymous auth
by set="[cn=users,ou=Group,dc=my-company,dc=de]/memberUid & user/uid" write
by * none
# Allow everybody adding and changing Contacts
access to dn.subtree="ou=Contacts,dc=my-company,dc=de"
by set="[cn=users,ou=Group,dc=my-company,dc=de]/memberUid & user/uid" write
by * read
access to *
by self write
by dn.base="cn=admin,dc=my-company,dc=de" write
by set="[cn=sysadm,ou=Group,dc=my-company,dc=de]/memberUid & user/uid" write
by * read
What it should do is this:
- allow everybody to change his own password
- allow all users to add and change contacts
- allow all in group "sysadm" to change everything
The problem is, the sysadms can not change any user password. Any hints?
Quoting the OpenLDAP admin guide:
To cut long story short, try the following:
BTW, do you really want to grant all users access to all attributes of their own object ('access to * ... by self write')? As you're limiting write access to the userPassword attribute only in the first ACL, I'd say that it's not what you wanted.
What happens if you do this?
IIRC slapd uses the first matching rule. Since the first block matches userPassword but doesn't allow sysadmins to modify, they aren't allowed to modify.