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

structural object class modification from X to Y not allowed



hello,
I know that now openldap stricly implement LDAP/X.500 spec (structural objeclass ...)
but I'am surprise that I cannot add or replace to an existing object a new objectclass in the same hierarchie of class !?
Can I do that without deleting the object and recreate it from scratch :-( ?.


Here's my sample object on which I want to add (or replace) the objectclass organizationalPerson

dn: sn=CITI,ou=departements,ou=information,dc=int-evry,dc=fr
objectClass: person
cn: Communication and Image
sn: CITI

$ ldapmodify -f /tmp/add-dept.ldif -h localhost -D cn=admin,dc=int-evry,dc=fr -W -x
modifying entry "sn=CITI,ou=departements,ou=information,dc=int-evry,dc=fr"
ldap_modify: Cannot modify object class (69)
additional info: structural object class modification from 'person' to 'organizationalPerson' not allowed
I do ask for a "add" and not a replac here ! why that message tells me that I am about to midify from person to organizational person, I want both !, and I do have old entries in my directory that have both objectclass (even more: they have also inetOrgPerson ).
my ldif file /tmp/add-dept.ldif:
dn: sn=CITI,ou=departements,ou=information,dc=int-evry,dc=fr
changetype: modify
add: objectClass
objectClass: organizationalPerson


Same error if I change the ldif file to do a replace , just a try ...
add-dept.ldif:
dn: sn=CITI,ou=departements,ou=information,dc=int-evry,dc=fr
changetype: modify
replace: objectClass
objectClass: organizationalPerson

Any idea ? solutions ?
Thanks .