-----BEGIN PGP SIGNED MESSAGE-----
Hash: SHA1

> Any DN can be used as a baseDN for a search, so I assume you mean the
> base of all the trees known to the server. 

i thought about it.

> This can be obtained from the
> namingContexts attribute in the RootDSE entry
> 
> Here is a piece of code, minus some error checking, that was posted
> recently that will do a search on all namingContexts
> 
> my $ldap = Net::LDAP->new( 'localhost' );
> my $dse = $ldap->root_dse;
> foreach my $base ($dse->get_value('namingContexts')) {
>   my $search = $ldap->search(
>     base   => $base,
>     filter => '(objectclass=dcObject)',
>   );
>   foreach my $entry ($search->entries) {
>     $entry->dump;
>   }
> }

thx, it is working !

Best Regards,
Daniel
-----BEGIN PGP SIGNATURE-----
Version: GnuPG v1.4.9 (GNU/Linux)
Comment: Using GnuPG with Mozilla - http://enigmail.mozdev.org

iEYEARECAAYFAklwMaIACgkQ2o8fdEaIvhbnUwCfa8DCOQvFk59SxEVZYqyUHV4p
lsoAoLV4+Cjpr4/LfmLx/rvTPhYy4EPt
=bohE
-----END PGP SIGNATURE-----

Reply via email to