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

Re: Deleting entries with children



--Le mercredi 13 juin 2001 17:45 +0530 kavita@worldgatein.net écrivait:

hi everybody,
             i am having a problem of deleting entries with children?how
one can delete a dn which has number of children.
i am using perl ldap api using module:- Net::LDAP.
when i am deleting a particular dn using delete() method it gives an
error:-             LDAP_NOT_ALLOWED_ON_NONLEAF

so,is there any methods/options that delete the dn with children.
ldap tree structure is:

ldaprootDn
 |
 |
 o=organization
  |
  |
 ou=resellers
    |
    |
(dn)cn=r1--  has  no. of properties
     |
     |
(dn)ou=owners -- has no.of properties
      |
      |
(dn)ou=domains     -- has no. of properties

now if i want to delete   dn => cn=r1,ou=resellers,o=organization  which
deletes all the dns under this dn.

thanx
--
Kavita Modi

Though I haven't seen it explicitely mentioned in the RFCs, it seems that there is a rule in LDAP (or maybe only in openldap?) that says that for an entry to be present its parent node must be present too.


For instance, you cannot have the entry:

  ou=owners,cn=r1,ou=resellers,o=organization,o=Forble,c=Squirkland

without also having:

  cn=r1,ou=resellers,o=organization,o=Forble,c=Squirkland

which in turn requires you have:

  ou=resellers,o=organization,o=Forble,c=Squirkland

and so on.

The exception being that the entry declared as rootDn can exist without its parent present; i.e. if you declare as rootDn:

  o=Forble,c=Squirkland

you don't have to create an entry:

  c=Squirkland

Actually I seem to remember that there were ways to create such orphan entries, but then they were problematic and difficult to access. It seems they are not supposed to be created.

I suppose this is just one more rule that is "obvious" for people who come from the X500 world, too obvious to be mentioned in the RFCs!

---
David Olivier
Klebs gardien Alpages CRI courrier brebis Lyon 2 Lumière