FYI, Version 1.1 is out with one important change: paged queries.

14 views
Skip to first unread message

Tim Johnson

unread,
Mar 18, 2011, 8:40:01 PM3/18/11
to py-ad-lda...@googlegroups.com
I've added support for paged queries in py-ad-ldap, so I uploaded a newer version.  The previous version would throw an ldap.SIZELIMIT_EXCEEDED error when downloading more than 1000 records from a default Active Directory install.

It was actually more difficult than I would have predicted.  I tried using the code at http://www.novell.com/coolsolutions/tip/18274.html, but something seems to have changed between when that was written and now.  Most importantly, Windows Server 2008 and 2008R2 both return an empty array for the servercrtls section returned by results3() when there are no more pages, and NOT the server control and an empty cookie.  Once I finally figured out that this is what was wrong, the rest of the code worked swimmingly. 

Note that some older versions of the ldap module seem to have a problem with 2008R2, where for some reason the server will return a message indicating that the control requested is not supported.  If querying a 2008 server works but 2008R2 does not, try updating your version of the ldap module.

--
Tim "They Call Me Tojo" Johnson
Systems Administrator
Gooooooooooooooogle
Reply all
Reply to author
Forward
0 new messages