[python-ldap] LDIFParser seems to only parse 200 out of 9K odd records

Michael Ströder michael at stroeder.com
Thu Sep 7 18:32:34 EDT 2017

Ritesh Nadhani wrote:
> I have a file generated by ldapsearch using -LLL format and
> pagedresult:
> ldasearch .... -E pr=200/noprompt  ...
> When I parse the above file, it seems it only parses 200
> records and stops.
> [..]
> To me it seems this line is the culprit:
> # pagedresults:
> cookie=AQAAADQCAAD/////hiZDEOF1HmHDzgiafe+UPajr0z0XvrN8Nrs4JYyW

Yes, that does not seem like valid LDIF to me.

Why don't you implement the LDAP search with paged results control 
in a Python script? This would give you more control over it 
anyway than using CLI tools.

See examples scripts:

Ciao, Michael.

-------------- next part --------------
A non-text attachment was scrubbed...
Name: smime.p7s
Type: application/pkcs7-signature
Size: 3829 bytes
Desc: S/MIME Cryptographic Signature
URL: <http://mail.python.org/pipermail/python-ldap/attachments/20170908/ce37f0d2/attachment-0001.bin>

More information about the python-ldap mailing list