Solved

Using Perl, how to return more than 1000 results from LDAP search?

Posted on 2011-03-25
4
380 Views
Last Modified: 2012-05-11
Hello,

I have a perl script that uses Net::LDAP to query AD. It works correctly, but I can't get more than 1000 results back. I see that there are solutions posted for VBscript but how about perl? I've seen about Net::LDAP::Control::Paged, and I'm able to bring back the amount I specify up to 1000. Does anyone have an example of looping through and getting all records?

Thanks for any help!
0
Comment
Question by:USSteel
[X]
Welcome to Experts Exchange

Add your voice to the tech community where 5M+ people just like you are talking about what matters.

  • Help others & share knowledge
  • Earn cash & points
  • Learn & ask questions
4 Comments
 
LVL 26

Accepted Solution

by:
MidnightOne earned 125 total points
ID: 35226423
According to the Net::LDAP docs, the search parameter sizelimit => N should return all results, but it also says the queried server may limit it anyway.

Try adding this to the search parameters to see if it makes any difference.
0
 

Author Comment

by:USSteel
ID: 35235401
Your comment was correct, thank you. Though, it turns out I had a mistake in not including

use Net::LDAP::Constant qw( LDAP_CONTROL_PAGED );

After I added that line, it pages completely through correctly. I didn't realize that line was necessary.

Thanks for your help.
0
 
LVL 9

Expert Comment

by:Suhas .
ID: 37319332
This question has been classified as abandoned and is closed as part of the Cleanup Program. See the recommendation for more details.
0

Featured Post

MS Dynamics Made Instantly Simpler

Make Your Microsoft Dynamics Investment Count  & Drastically Decrease Training Time by Providing Intuitive Step-By-Step WalkThru Tutorials.

Question has a verified solution.

If you are experiencing a similar issue, please ask a related question

A project that enables an administrator to perform actions within a user session context not just at the time of login but any time later on day(s) or week(s) later.
Recently, Microsoft released a best-practice guide for securing Active Directory. It's a whopping 300+ pages long. Those of us tasked with securing our company’s databases and systems would, ideally, have time to devote to learning the ins and outs…
This tutorial will walk an individual through the process of transferring the five major, necessary Active Directory Roles, commonly referred to as the FSMO roles to another domain controller. Log onto the new domain controller with a user account t…
Microsoft Active Directory, the widely used IT infrastructure, is known for its high risk of credential theft. The best way to test your Active Directory’s vulnerabilities to pass-the-ticket, pass-the-hash, privilege escalation, and malware attacks …

752 members asked questions and received personalized solutions in the past 7 days.

Join the community of 500,000 technology professionals and ask your questions.

Join & Ask a Question