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

Re: Q: How to delete objectclass with all its attributes?



> Actually I don't know the syntax to remove oc, tried below but failed.
> 
> dn: uid=40002308, dc=sunday, dc=com
> changetype: modify
> delete: objectclass=portalUser  ### ?? don't know how
> delete: sn

The format (for the ldapmodify program) is:

   dn: uid=40002308,dc=sunday,dc=com
   changetype: modify
   # Delete one objectclass
   delete: objectclass
   objectclass: portalUser
   -
   # Delete all SNs
   delete: sn
   -

However,
(a) I don't think you can remove structural objectclasses,
    you may get object class violation or something.
    Maybe it's OK if the object still has a 'person' objectclass
    or a subclass of it, though.
(b) If the object still is a 'person', you can't delete sn
    because person requires sn.

-- 
Hallvard