Solved

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

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

Join & Write a Comment

Disabling the Directory Sync Service Account in Office 365 will stop directory synchronization from working.
Find out how to use Active Directory data for email signature management in Microsoft Exchange and Office 365.
This tutorial will walk an individual through the steps necessary to join and promote the first Windows Server 2012 domain controller into an Active Directory environment running on Windows Server 2008. Determine the location of the FSMO roles by lo…
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 from a Windows Server 2008 domain controller to a Windows Server 2012 domain controlle…

758 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

Need Help in Real-Time?

Connect with top rated Experts

17 Experts available now in Live!

Get 1:1 Help Now