ldap_modify: No such object (32)
7,472
I found the problem. Here is the fix:
Change olcDatabase={2}bdb
to olcDatabase={2}hdb
Make sure run these beforehand:
ldapadd -Y EXTERNAL -H ldapi:/// -f /etc/openldap/schema/cosine.ldif
ldapadd -Y EXTERNAL -H ldapi:/// -f /etc/openldap/schema/nis.ldif
ldapadd -Y EXTERNAL -H ldapi:/// -f /etc/openldap/schema/inetorgperson.ldif
Related videos on Youtube
Author by
HP.
Updated on September 18, 2022Comments
-
HP. over 1 year
I installed OpenLDAP on Centos 7 and tried to create the admin user. But I got some error on
ldap_modify
. Below are my steps:Install OpenLDAP and start it:
sudo yum install openldap openldap-servers openldap-clients -y systemctl start slapd.service
Create
admin.ldif
dn: olcDatabase={0}config,cn=config changetype: modify add: olcRootPW olcRootPW: {SSHA}CRiUMh5UM8/chPHbfc2Se2JA8Quc5F1P dn: olcDatabase={1}monitor,cn=config changetype: modify replace: olcAccess olcAccess: {0}to * by dn.base="gidNumber=0+uidNumber=0,cn=peercred,cn=external,cn=auth" read by dn.base="cn=ldapadmin,dc=demo,dc=local" read by * none dn: olcDatabase={2}bdb,cn=config changetype: modify replace: olcSuffix olcSuffix: dc=demo,dc=local dn: olcDatabase={2}bdb,cn=config changetype: modify replace: olcRootDN olcRootDN: cn=ldapadmin,dc=demo,dc=local dn: olcDatabase={2}bdb,cn=config changetype: modify add: olcRootPW olcRootPW: {SSHA}CRiUMh5UM8/chPHbfc2Se2JA8Quc5F1P dn: olcDatabase={2}bdb,cn=config changetype: modify add: olcAccess olcAccess: {0}to attrs=userPassword,shadowLastChange by dn="cn=ldapadmin,dc=demo,dc=local" write by anonymous auth by self write by * none olcAccess: {1}to dn.base="" by * read olcAccess: {2}to * by dn="cn=ldapadmin,dc=demo,dc=local" write by * read
Run below command line:
ldapmodify -Y EXTERNAL -H ldapi:/// -f /root/demo/users/admin.ldif
Then I got this error:
SASL/EXTERNAL authentication started SASL username: gidNumber=0+uidNumber=0,cn=peercred,cn=external,cn=auth SASL SSF: 0 modifying entry "olcDatabase={2}bdb,cn=config" ldap_modify: No such object (32) matched DN: cn=config
I didn't have this error in a different system using Centos 7 so I am wondering what's happening here.
Please help.