How To Find How Many LDAP Entries#

Using eDirectory#

If you are lucky enough to be using eDirectory you can use the following ldapsearch command to retrieve the counts:
ldapsearch -LLL -h -b "" -D cn=admin,ou=administration,dc=willeke,dc=com -W "(&(objectClass=*)(subordinateCount>=0))" subordinatecount

dn: ou=Planning,o=test,dc=com
subordinateCount: 0

dn: ou=Peons,o=test,dc=com
subordinateCount: 1226

dn: ou=Administrative,o=test,dc=com
subordinateCount: 1325

dn: ou=Management,o=test,dc=com
subordinateCount: 1251

dn: ou=Janitorial,o=test,dc=com
subordinateCount: 1292

dn: ou=Payroll,o=test,dc=com
subordinateCount: 1260

dn: ou=Human Resources,o=test,dc=com
subordinateCount: 1235

dn: ou=Product Testing,o=test,dc=com
subordinateCount: 1248

dn: ou=Product Development,o=test,dc=com
subordinateCount: 1163

dn: ou=UnitThree,o=test,dc=com
subordinateCount: 2


Some other LDAP Servers may implement a similar method to the above, but we do not know about them. If you do Contact Us You will have to:
  • perform a search for all Interested Entries
  • Export to LDIF
  • Count the number of dn: items in the LDIF file.

More Information#

There might be more information for this subject on one of the following:

Add new attachment

Only authorized users are allowed to upload new attachments.
« This page (revision-11) was last changed on 07-Jun-2013 11:41 by jim