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

Getting group sAMAccountName lists


I am trying to get a list of users sAMAccountNames of users in specified
groups. The group that im searching for here is Managers. And it contains 2

Here is my current query. It returns the full information of the users. The
string i searched for is:

ldapsearch -h -D Administrator@2003.my.host -w 'mypassword' -b
 '(cn=Managers)' member

which returned the following:

member=CN=Joe Somebody,CN=Users,DC=2003,DC=my,DC=host
member=CN=Dave Blakey,CN=Users,DC=2003,DC=my,DC=host

I then have todo another query to get the users sAMAccountName which is what
i need.

How could I do one query to return only a list of the sAMAccountNames of all
the users in that group? Or isnt that possible ?

Thanks alot,