ldapsearch limit returned results

[problem]

You want to perform an ldap search but only receive a limited number of records in return.

[/problem]

[solution]

Use -z # to restrict the number of records returned.

[/solution]

[example]

Search and return only 5 records.


ldapsearch -x -z 5 -v-D"cn=Manager,dc=demo,dc=net"-w secret
-b"dc=demo,dc=net" "(lastlogin>=99999999)"

[/example]

[reference]

[tags], LDAP Training School[/tags]

[/reference]

If you have found my website useful, please consider buying me a coffee below 😉

Leave a Reply

Your email address will not be published. Required fields are marked *