Perl Net::LDAP - Fetch DN without Search?

David W.

I have the DN of the LDAP entry. I know I could search for it: Doing something like this:

my $search = $ldap->search( 
    base => $dn, 
    scope => "base",
    filter => "(objectclass=*)",
);

But, I don't need to do a search. I have the DN. I simply want to pull up the DN entry and do my operations directly on that. Something like this:

my $dn_entry = $ldap->get( $dn );

Is there a method to get the DN entry from the DN string itself, or do you have to search for the entry even if you know the DN itself?

Terry Gardner

Using LDAP, clients must always search or use an extended operation to get data. If you're interested in all the attributes associated with an entry, and the DN is known, use the following parameters in a search request:

  • baseObject: the DN that is known
  • search scope: base
  • filter: either (&) or (objectClass=*)
  • the list of attributes to be returned. Some APIs use * for all user attributes and + for all operational attributes.

Collected from the Internet

Please contact [email protected] to delete if infringement.

edited at
0

Comments

0 comments
Login to comment

Related

From Dev

Make LDAP search don't show DN

From Dev

Is LDAP DN case insensitive?

From Dev

Perl LDAP search - over 1500 member in a group

From Dev

Perl LDAP search for user being a CN attribute

From Dev

Perl LDAP search - over 1500 member in a group

From Dev

What to I put for $base_dn if I need to search two subfolders in LDAP and PHP

From Dev

Fetch all user information with Net::LDAP

From Dev

Fetch all user information with Net::LDAP

From Dev

Perl Net::LDAP: Authenticate with current login

From Dev

search core data without fetch all rows

From Dev

Can LDAP entry belong to OU that not in its DN?

From Dev

php ldap retrieve ou value of dn

From Dev

LDAP - Extract CN value from DN

From Dev

Matching substring within LDAP DN using Awk

From Dev

php ldap retrieve ou value of dn

From Dev

Java LDAP get Group DN by using CN

From Dev

search for a DN using substring matching

From Dev

How can I find an LDAP user's DN in JSP?

From Dev

UnboundID LDAP Java SDK - need to list descendants of a given parent DN

From Dev

How do I list root DN's using python ldap?

From Dev

UnboundID LDAP Java SDK - need to list descendants of a given parent DN

From Dev

Google Custom Search .NET API Compile issue with Fetch method

From Dev

Perl search and replace files in-place with or without the diamond op

From Dev

Search file without extension in asp.net

From Dev

LDAP Search Wildcards in memberOf

From Dev

Ldap search with negative parameter

From Dev

CAS LDAP Search Subtree

From Dev

LDAP Search String Exclude

From Dev

Groovy LDAP search request