Solved

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

Posted on 2011-03-25
4
393 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

Office 365 Training for Admins - 7 Day Trial

Learn how to provision tenants, synchronize on-premise Active Directory, implement Single Sign-On, customize Office deployment, and protect your organization with eDiscovery and DLP policies.  Only from Platform Scholar.

Question has a verified solution.

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

Active Directory security has been a hot topic of late, and for good reason. With 90% of the world’s organization using this system to manage access to all parts of their IT infrastructure, knowing how to protect against threats and keep vulnerabil…
Group policies can be applied selectively to specific devices with the help of groups. Utilising this, it is possible to phase-in group policies, over a period of time, by randomly adding non-members user or computers at a set interval, to a group f…
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…
Sometimes it takes a new vantage point, apart from our everyday security practices, to truly see our Active Directory (AD) vulnerabilities. We get used to implementing the same techniques and checking the same areas for a breach. This pattern can re…
Suggested Courses

623 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