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

Ritesh Nadhani riteshn at gmail.com
Thu Sep 7 18:36:36 EDT 2017


Well, sometimes we just dont have access to the server and customer
give us the ldif file generated from the command line that we have to
injest.

On Thu, Sep 7, 2017 at 3:32 PM, Michael Ströder <michael at stroeder.com> wrote:
> 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:
> Demo/page_control.py
> Demo/paged_search_ext_s.py
>
> Ciao, Michael.
>



-- 
Ritesh


More information about the python-ldap mailing list