[Date Prev][Date Next] [Chronological] [Thread] [Top]

Re: slapd appears to incorrectly report an object class violation when renaming an entry



Jon C Kidder wrote:
> I am running 2.4.36 in my sandbox environment and have recently found myself needing to rename some entries in my directory.  Slapd is reporting an object class violation when attempting to rename the entries even though all required attributes are present on the entry.  I have a sample ldif that reproduces this problem.
> 
> dn: cn=testuser,ou=users,dc=example,dc=com
> changetype: add
> objectClass: top
> objectClass: person
> objectClass: organizationalPerson
> objectClass: inetOrgPerson
> cn: testuser
> uid: testuser
> sn: surname
> 
> dn: cn=testuser,ou=users,dc=example,dc=com
> changetype: modrdn
> newrdn: uid=testuser
> deleteoldrdn: 1
> newsuperior: ou=users,dc=example,dc=com
> 
> When I run this ldif using ldapmodify this is the result I get back.
> 
> adding new entry "cn=testuser,ou=users,dc=example,dc=com"
> 
> modifying rdn of entry "cn=testuser,ou=users,dc=example,dc=com"
> ldap_rename: Object class violation (65)
>         additional info: object class 'inetOrgPerson' requires attribute 'cn'
> 
> As you can see from the ldif the cn attribute is clearly present.  I am assuming this is a bug and needs reported but wanted to review it with the list members before I submitted the ITS entry.

Not a bug.

Since you set 'deleteoldrdn: 1' the old attribute value 'cn: testuser' would
be also deleted by this request. Use 'deleteoldrdn: 0' in this case if you
want to preserve the attribute value for 'cn'.

Ciao, Michael.

Attachment: smime.p7s
Description: S/MIME Cryptographic Signature