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

Re: ldap_add_s: Object class violation when I add an alias entry into ldap server.



> dn: cn=A2,ou=Customers,o=ChinaTelecom,c=cn
> objectClass: alias
> objectClass: aliasObject
> aliasedObjectName: custID=2,ou=Customers,o=ChinaTelecom,c=cn
> cn: A2
> 
> using command:
> bash-2.03$ ldapadd -D "cn=root,o=ChinaTelecom,c=cn" -w secret -f
> customer2.ldif
> 
> I got the following result:
> adding new entry cn=A2,ou=Customers,o=ChinaTelecom,c=cn
> ldap_add_s: Object class violation

I don't know how aliasObject is defined, but you'll get that error if it
is a structural object class which is not a subclass of "alias".

I suggest you replace it with extensibleObject.  That allows you to
add any attribute, so it allows 'cn'.

-- 
Hallvard