AD sizelimit

geert.van.muylem at utimaco.be geert.van.muylem at utimaco.be
Tue Apr 5 01:53:17 CEST 2005


Hi all,

I have an Active Directory with some 9000 users.
How can I retrieve all users with ldap. I only get back 1000 entries 
(which is the page size of AD)
I've tried to set the pagesize to 10000, but still the same result

        l = ldap.open(gADServer)
        l.simple_bind_s(gADWho, gADCred)
        s = ldap.async.List(l)
        s.startSearch(ADContainer, searchScope, searchFilter, 
sizelimit=10000)

        try:
          partial = s.processResults()
        except ldap.SIZELIMIT_EXCEEDED:
          sys.stderr.write('Warning: Server-side size limit exceeded.\n')
        else:
          if partial:
            sys.stderr.write('Warning: Only partial results received.\n')

        sys.stdout.write('%d results received.\n' % (len(s.allResults)))



result:
Warning: Server-side size limit exceeded.
1000 results received.


Thanks,
Geert
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://mail.python.org/pipermail/python-ldap/attachments/20050405/eab4da8b/attachment.html>


More information about the python-ldap mailing list