SUMMARY: ldapsearch command to list all members of a group

From: Christopher Barnard <cbarnar1_at_earthlink.net>
Date: Thu Oct 01 2009 - 22:26:50 EDT
I asked:

>> At the end of the password file on one of my ldap client servers is
>>
>> +@admins:x:::::
>>
>> It is trivial to get the list of users in the java GUI.  However I
>> want
>> to craft an ldapsearch command so that it can be put into a script.
>> There are so many flags to ldapsearch and I just haven't gotten the
>> combination right.  I did not find this in the summaries or by
>> googling,
>> although I got lots of ldap hits.
>>
>> Has anyone crafted an ldapsearch command to retrieve all of the uids
>> and/or real names of all of the users in a particular ldap group?

The answer:

ldaplist, not ldapsearch.  I had missed that command.  Thats why I did  
not find what I was looking for in google, I guess.  <grin>

ldaplist -l netgroup admins

gives me exactly what I want.

Thank you to everyone who responded so quickly, including those who  
shared some pretty elaborate ldap search query strings.


Christopher L. Barnard
cbarnar1@earthlink.net
-------------------------------------------------------------------
Comment your code as if the person who will be maintaining it is a  
homicidal maniac who knows where you live.
_______________________________________________
sunmanagers mailing list
sunmanagers@sunmanagers.org
http://www.sunmanagers.org/mailman/listinfo/sunmanagers
Received on Thu Oct 1 22:28:02 2009

This archive was generated by hypermail 2.1.8 : Thu Mar 03 2016 - 06:44:14 EST