subrat padhi
subrat padhi

Reputation: 171

No such object (32) error while trying to modify olcDatabase={2}hdb.ldif

I have installed LDAP and I am able to start it. While I am trying to modify the olcDatabase={2}hdb.ldif file I am getting "ldap_modify: No such object (32)" error.

Steps followed to modify

1) created a db.ldif file with below contains

dn: olcDatabase={2}hdb,cn=config changetype: modify replace: olcSuffix olcSuffix: dc= ec2,dc=internal

dn: olcDatabase={2}hdb,cn=config changetype: modify replace: olcRootDN olcRootDN: cn=admin,dc= ec2,dc=internal

dn: olcDatabase={2}hdb,cn=config changeType: modify add: olcRootPW olcRootPW: {SSHA}6zHtA20qkTmdLrJSfxo+VV3QLGS7m0CZ

2) ldapmodify -Y EXTERNAL -H ldapi:/// -f db.ldif

SASL/EXTERNAL authentication started SASL username: gidNumber=0+uidNumber=0,cn=peercred,cn=external,cn=auth SASL SSF: 0 modifying entry "olcDatabase={2}hdb,cn=config" ldap_modify: No such object (32)

I am using centos7 and LDAP version openldap-clients-2.4.44-21.el7_6.x86_64 openldap-2.4.44-21.el7_6.x86_64 openldap-servers-sql-2.4.44-21.el7_6.x86_64 openldap-servers-2.4.44-21.el7_6.x86_64 openldap-devel-2.4.44-21.el7_6.x86_64 collectd-openldap-5.8.1-1.el7.x86_64 compat-openldap-2.3.43-5.el7.x86_64

Please help me fix this!!

Upvotes: 2

Views: 8955

Answers (2)

turik
turik

Reputation: 47

I had the same problem and to fix it I restarted slapd.service:

systemctl stop slapd.service
systemctl start slapd.service

Upvotes: 0

rtandy
rtandy

Reputation: 373

There are two reasons for this result.

  1. the entry actually doesn't exist,
  2. it exists but you don't have permission to know that.

I suggest you try to search the cn=config database to see what it actually contains:

ldapsearch -H ldapi:/// -Y EXTERNAL -b 'cn=config'

If the result is No such object (32), then gidNumber=0+uidNumber=0,cn=peercred,cn=external,cn=auth doesn't have access to the config database on your system.

If the search does return output, check whether the entry olcDatabase={2}hdb,cn=config is actually listed.

Upvotes: 1

Related Questions