Hi ,
Is there any specific command to count the number of registered entries/users in ldapserver todate? This will help with us with the statitistics of how many users are registered?
Thanks!
Kalpana
_________________________________________________________________ Windows Live™: Keep your life in sync. http://windowslive.com/explore?ocid=TXT_TAGLM_WL_BR_life_in_synch_062009
--On Wednesday, June 10, 2009 05:43:44 PM +0000 KALPANA ANANTH kalpanaananth@hotmail.com wrote:
Hi ,
Is there any specific command to count the number of registered entries/users in ldapserver todate? This will help with us with the statitistics of how many users are registered?
Depends on what you mean by an account, i.e. how your directory is structured. In a couple of directories that I work on something as simple as
ldapsearch -b ou=people,dc=domain,dc=com "uid=*" uid \ | grep uid: | wc -l
will generate a count of posix accounts.
Bill
KALPANA ANANTH wrote:
Is there any specific command to count the number of registered entries/users in ldapserver todate?
There is no server-side count operation within LDAP. Actually you would have to search for the users, retrieve parts of the entries (only the DNs) and count them at the client side. Obviously this won't scale for many users.
Having an operational attribute like numSubordinates could help depending on your DIT layout (one container with all users being immediate subordinate entries). But my request to implement this in OpenLDAP's slapd was declined:
http://www.openldap.org/its/index.cgi/Archive.Incoming?id=4161
Ciao, Michael.
openldap-technical@openldap.org