Account Options

  1. Sign in
The old Google Groups will be going away soon, but your browser is incompatible with the new version.
Google Groups Home
« Groups Home
question
There are currently too many topics in this group that display first. To make this topic appear first, remove this option from another topic.
There was an error processing your request. Please try again.
flag
  3 messages - Collapse all  -  Translate all to Translated (View all originals)
The group you are posting to is a Usenet group. Messages posted to this group will make your email address visible to anyone on the Internet.
Your reply message has not been sent.
Your post was successful
 
From:
To:
Cc:
Followup To:
Add Cc | Add Followup-to | Edit Subject
Subject:
Validation:
For verification purposes please type the characters you see in the picture below or the numbers you hear by clicking the accessibility icon. Listen and type the numbers you hear
 
Daniel Chojecki  
View profile  
 More options Jan 15 2009, 8:58 am
Newsgroups: perl.ldap
From: daniel.choje...@gmail.com (Daniel Chojecki)
Date: Thu, 15 Jan 2009 14:58:29 +0100
Local: Thurs, Jan 15 2009 8:58 am
Subject: question
Hello,

is it possible to fetch all baseDNs from ldap server ?

Could you show some examples, because i'm quit new to perl language.

Best Regards,
Daniel


 
You must Sign in before you can post messages.
To post a message you must first join this group.
Please update your nickname on the subscription settings page before posting.
You do not have the permission required to post.
Graham Barr  
View profile  
 More options Jan 15 2009, 9:59 am
Newsgroups: perl.ldap
From: gb...@pobox.com (Graham Barr)
Date: Thu, 15 Jan 2009 08:59:21 -0600
Local: Thurs, Jan 15 2009 9:59 am
Subject: Re: question
On Jan 15, 2009, at 7:58 AM, Daniel Chojecki wrote:

> is it possible to fetch all baseDNs from ldap server ?

> Could you show some examples, because i'm quit new to perl language.

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. 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;
   }

}

Graham.

 
You must Sign in before you can post messages.
To post a message you must first join this group.
Please update your nickname on the subscription settings page before posting.
You do not have the permission required to post.
Daniel Chojecki  
View profile  
 More options Jan 16 2009, 2:05 am
Newsgroups: perl.ldap
From: daniel.choje...@gmail.com (Daniel Chojecki)
Date: Fri, 16 Jan 2009 08:05:16 +0100
Local: Fri, Jan 16 2009 2:05 am
Subject: Re: question
-----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.

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-----


 
You must Sign in before you can post messages.
To post a message you must first join this group.
Please update your nickname on the subscription settings page before posting.
You do not have the permission required to post.
End of messages
« Back to Discussions « Newer topic     Older topic »