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

deleting cross-required attributes in an entry



I've got an entry:

dn: dc=sub,dc=dom,dc=com
objectClass: dcObject
objectClass: organization
objectClass: OrganizationalPerson
objectClass: inetOrgPerson
o: My Org
dc: sub
sn: Goodwin
cn: Ben Goodwin
mail: foo@foo.foo


(yes, woops), where I want to remove the objectclasses organizationalPerson
and inetOrgPerson .. now, those need sn .. but I can't remove the
objectclass without it complaining that sn isn't allowed anymore, and I
can't remove sn without it complaining that inetOrgPerson requires it..
catch-22 ... I can't figure out an LDIF that will allow me to delete it.
Examples:

dn: dc=sub,dc=dom,dc=com
changetype: modify
delete: objectClass
objectClass: inetOrgPerson


--> ldap_modify: Object class violation
        additional info: attribute 'sn' not allowed

dn: dc=sub,dc=dom,dc=com
changetype: modify
delete: sn
sn: goodwin


--> ldap_modify: Object class violation
        additional info: object class 'inetOrgPerson' requires attribute
'sn'

dn: dc=sub,dc=dom,dc=com
changetype: modify
delete: sn
sn: goodwin

delete: objectClass
objectClass: inetOrgPerson

--> ldap_modify: Object class violation
        additional info: object class 'inetOrgPerson' requires attribute
'sn'


Do I have to remove the *whole* entry and start over?  I'd rather learn how
to do it otherwise in case I run into a situation where I "can't" remove the
whole entry ..

openldap from RedHat 7.3 rpms:
openldap-2.0.23-4
openldap-servers-2.0.23-4
openldap-clients-2.0.23-4

Default schema.

Thanks!

    -=| Ben