[Date Prev][Date Next] [Chronological] [Thread] [Top]

Re: ldapsearch fails with limit exceeded

Ah, the man page was not up to date, but giving the wrong options, shows a usage information, among which is:

Search options:
 -a deref   one of never (default), always, search, or find
 -A         retrieve attribute names only (no values)
 -b basedn  base dn for search
 -E [!]<ext>[=<extparam>] search extensions (! indicates criticality)
            [!]domainScope              (domain scope)
            [!]mv=<filter>              (matched values filter)
            [!]pr=<size>[/prompt|noprompt]   (paged results/prompt)
            [!]subentries[=true|false]  (subentries)
            [!]sync=ro[/<cookie>]            (LDAP Sync refreshOnly)
                    rp[/<cookie>][/<slimit>] (LDAP Sync refreshAndPersist)

So adding  -E pr=100/noprompt to the ldapsearch options solved the problem.
Maybe the man page could be updated.

Norbert Wegener

Norbert Wegener schrieb:
ldapsearch returns max. 2000 items, hot honouring the
Size limit exceeded (4)
This problem and a possible solution have been proposed already some years ago at:

Is it possible to ask openldap get [0..500] then [501..600]... etc?

If you want to toy with paged results (elective) extension to LDAP, you might try 2.2 (currently in beta). ....

My current ldapsearch :

ldapsearch: @(#) $OpenLDAP: ldapsearch 2.2.26 (Jun 26 2006 13:03:11) $

       (LDAP library: OpenLDAP 20226)

seems to contain some support for this:
root@de70171c:/home# type ldapsearch
ldapsearch is hashed (/usr/bin/ldapsearch)
root@de70171c:/home# strings /usr/bin/ldapsearch|grep paged
            [!]pr=<size>[/prompt|noprompt]   (paged results/prompt)
Invalid entries estimate in paged results response.
# with pagedResults %scontrol: size=%d

man ldapsearch does not mention anything about it, so does ldapsearch support this "paged results"? If so, how can I make use of it?

Norbert Wegener