You need to create this file mod_acl.ldif with the following content with the exact format, very tricky. And use the following command:
ldapmodify -Q -Y EXTERNAL -H ldapi:/// -f mod_acl.ldif
The expecting result is:
modifying entry "olcDatabase={1}mdb,cn=config"
Content mod_acl.ldif
dn: olcDatabase={1}mdb,cn=config
replace: olcAccess
olcAccess: to attrs=userPassword,shadowLastChange,krbPrincipalKey
by dn="cn=admin,dc=example,dc=com" write by anonymous auth by self write
by * none
-
add: olcAccess
olcAccess: to dn.base=""
by * read
-
add: olcAccess
olcAccess: to *
by dn="cn=admin,dc=example,dc=com" write
by * read
Be carefull the type of Ldap database can change depending of you implementation
can be mdb
, hdb
or other depends of your installation.