[Date Prev][Date Next]
[Chronological]
[Thread]
[Top]
Ldapsearch - how to retrieve multiple pages
Hello,
Below is a question I sent to the Linux redhat mailing list earlier today.
I received some replies, but most of which said, albeit not definitely, that
ldapsearch could not do what I wanted. It was suggested I ask on this list
instead.
-----------------------
We have a Microsoft windows server running ldap, and I am trying to obtain a
list of all the users in the ldap server. There are about 20,000 in total. I
can retrieve about 1000 using 'ldapsearch'. I'm trying this from a redhat
7.0 pc, a Solaris 9 Sun system (which has openldap on it), and a redhat 7.2
system.
The problem is I know little about ldap as such and have no dealing with the
server. I gather there is a limit imposed of returning 1000 records (a
'page' I am told) each time. My question though is how do I tell ldapsearch
to 'get the next 1000 records', so that I can create a loop and retrieve all
the records? I have looked through the man page, the openldap web site,
google search, redhat list search (couldn't get onto the actual redhat list,
but tried the valhalla one). Examples I have seen say to use something like
'ldapsearch -b ... -h ... -w .... (objectclass=*)' and it will return all
the records. Not true. It returns the number of records allowed by the
server, not all the records.
I'm sure this is an easy question, but as said I don't really know ldap
since we don't run any linux/unix ldap servers at all, I'm just trying to
create a small script using the client to return all the records.
---------------------------
Many thanks,
John.
------------------------------------------------------------------------
John Horne, University of Plymouth, UK Tel: +44 (0)1752 233914
E-mail: jhorne@plymouth.ac.uk
PGP key available from public key servers