How do I get a server-side count on an LDAP query from Sun Java System Directory Server?

Posted by cubetwo1729 on Server Fault See other posts from Server Fault or by cubetwo1729
Published on 2012-03-05T15:07:06Z Indexed on 2012/10/27 5:05 UTC
Read the original article Hit count: 571

Filed under:
|

I wish to count the number of objects returned from a query (but I do not need the actual objects themselves) from Sun Java System Directory Server 5.2.

E.g., if I want to find all people with surname Smith, I would want something like

ldapsearch -LLL -H ldaps://example.com -b "ou=people,dc=example,dc=com" "sn=Smith"

but with some sort of count. Is this possible without returning all of the results?

© Server Fault or respective owner

Related posts about ldap

Related posts about ldapsearch