home | tech | misc | code | bookmarks (broken) | contact | README


LDAP notes

LDAP Troubleshooting

I needed to add an attribute to an entry. It is atributo5 and the LDIF looks like that:

dn: uid=test,ou=foo,dc=example,dc=com
changetype: modify
add: atributo5
atributo5: bla

When trying to add it with ldapmodify I got this error:

ldap_modify: Object class violation (65)
        additional info: attribute 'atributo5' not allowed

I'm not a LDAP expert. After some research and talking to the local LDAP administrator, I discovered that LDAP entries had classes attached to them. I discovered that the class that implemented it is otherAttributesClass so I had to add it to the entry first. So I did that with the following LDIF:

dn: uid=test,ou=foo,dc=example,dc=com
changetype: modify
add: objectClass
objectClass: otherAttributesClasS

And, after that, adding the attribute to the entry worked.