Linux – How to modify the value of an attribute with OpenLDAP

ldaplinuxopenldap

We have installed a mail server which comes with an OpenLDAP schema and some additional attributes. One of the attributes controls which users have administration rights on the calendar and public folders feature of the server. How do I set these attributes on our existing users in the LDAP database?

Best Answer

ldapmodify is your friend.

Create a "modify" ldif file.

Ex:

dn: cn=Elmer Fudd,o=company.com
changetype: modify
add: isAdmin
isAdmin: 1

Save file and use it with ldapmodify:

ldapmodify -v -D "cn=manager,o=company.com" -h <host> -W -f changes.ldif