20101111 how many members in that ldap group - plembo/onemoretech GitHub Wiki
title: How many members in that LDAP group? link: https://onemoretech.wordpress.com/2010/11/11/how-many-members-in-that-ldap-group/ author: lembobro description: post_id: 112 created: 2010/11/11 11:07:31 created_gmt: 2010/11/11 11:07:31 comment_status: open post_name: how-many-members-in-that-ldap-group status: publish post_type: post
How many members in that LDAP group?
Another reason to be running a Unix shell somewhere, anywhere.
Here’s the recipe:
ldapsearch -x -h [ldaphost] -D [userdn] -W -b [basedn] -s sub "(cn=[group name])" | grep -i uniquemember | wc
For example:
ldapsearch -x -h ldap.example.com -D "cn=directory manager" -W -b "dc=example,dc=com" -s sub "(cn=Human Resources)" | grep -i uniquemember | wc
Output would look something like:
1010 3084 67765
Number of uniquemembers will be in the leftmost column.
Copyright 2004-2019 Phil Lembo