Perl LDAP 
Author Message
 Perl LDAP

How do I search for a specific DN inside of LDAP and return a
Net::LDAP::Entry object?
Apparently ($entry) =

It can search for any other attribute inside LDAP just not DNs.  Why?

--
Joseph Kezar



Sun, 16 May 2004 18:56:20 GMT  
 Perl LDAP

Quote:

>How do I search for a specific DN inside of LDAP and return a
>Net::LDAP::Entry object?
>Apparently ($entry) =

>It can search for any other attribute inside LDAP just not DNs.  Why?

DN isn't an attribute, so it can't be in the search filter.

Start the search at the desired DN, filter on anything, limit scope
to the base dn only:

$results = $ldap->search(base=>'uid=jkezer,blah..',
                         filter=>'(objectclass=*)',
                         scope=>'base');
die $results->error if $results->code;
$entry = $results->pop_entry;

--kag



Sun, 16 May 2004 21:16:25 GMT  
 Perl LDAP
Maybe you could do this Joe:
  $basedn="cn=uid=jkezar,o=your company,c=US";

Quote:

> How do I search for a specific DN inside of LDAP and return a
> Net::LDAP::Entry object?
> Apparently ($entry) =

> It can search for any other attribute inside LDAP just not DNs.  Why?

> --
> Joseph Kezar

--
Joseph Kezar


Sun, 16 May 2004 22:11:46 GMT  
 
 [ 3 post ] 

 Relevant Pages 

1. Perl LDAP help, how to authenticate simple username and password in LDAP

2. Is anybody using perl-ldap?

3. Perl LDAP Module

4. PERL LDAP & UCS-2 Problems

5. ANNOUNCE: perl ldap module using .XS

6. Maximum Number of search results (Perl LDAP, Exchange 5.5)

7. Perl LDAP interface?

8. perl-ldap problem

9. perl ldap and MS-Active Directory or Netmeeting

10. PERL LDAP & UCS-2 Problems

11. Perl, LDAP and Exchange

12. Perl + LDAP + Filter

 

 
Powered by phpBB® Forum Software