You can else try something like this..

- Make un sub program that take a DN in paramter and make search for
objects with "objectClass=organizationalUnit" and a "BASE" scope.
     -> If found, for each objects, recursively call your sub program  with
DN as parameter.
     -> And then, delete all entries under this OU.

I think, this method works, i have done something like this in java. But it
may exist a better way to do this.

Yves-M    arie Lainé



                                                                                       
                           
                                                                                       
                           
                                         Pour :  [EMAIL PROTECTED]                     
                          
                                         cc :                                          
                           
                                         Objet :      technique for recursive delete?  
                           
                                                                                       
                           
          10/08/2004 18:53  Brian                                                      
                           
          Reichert                                                                     
                           
          <[EMAIL PROTECTED]>                                                          
                        
                                                                                       
                           
                                                                                       
                           




I can't believe I'm the first person to try this, but my web research
has yeilded nothing.

With Net::LDAP, what is the best way to delete a subtree?  I tried
to do so directly, and got:

  subtree delete not supported ...

I think, then, that I have to do a search for all DNs in my target
tree to manually delete them, but I don't know how to get a
depth-first set of results.

Am I missing something?  I'd appreciate any feedback...

--
Brian Reichert                <[EMAIL PROTECTED]>
37 Crystal Ave. #303               Daytime number: (603) 434-6842
 Derry NH 03038-1713 USA            BSD admin/developer at large




*****************************************************************************
Tout usage de ce message par une personne autre que son destinataire
est strictement interdit. L'integrite de ce message n'etant pas assuree
sur Internet, Le groupement des Mousquetaires ne peut etre tenu responsable
de son contenu.
Toute utilisation ou diffusion non autorisee est interdite. Si vous
n'etes pas destinataire de ce message, merci de le detruire et d'avertir
l'expediteur
***************************************************************************** 

Reply via email to