[Date Prev][Date Next] [Chronological] [Thread] [Top]

Re: count the number of registered users in ldap





--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

--

Bill MacAllister <whm@stanford.edu>
Systems Software Programmer, ITS Unix Systems, Stanford University