[Date Prev][Date Next]
[Chronological]
[Thread]
[Top]
Re: Getting group sAMAccountName lists
This question is seems to be very specific to MS Active Directory since the
most helpful answer is AD-specific. You should ask in an appropriate AD
forum, e.g. the MS news groups (probably how to use the user entry attribute
'memberOf' ;-).
Ciao, Michael.
Ian Barnes wrote:
>
> 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 users.
>
> Here is my current query. It returns the full information of the users.
> The string i searched for is:
>
> ldapsearch -h 10.0.0.50 -D Administrator@2003.my.host -w 'mypassword' -b
> "cn=Users,dc=2003,dc=my,dc=host" '(cn=Managers)' member
>
> which returned the following:
>
> CN=Managers,CN=Users,DC=2003,DC=my,DC=host 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, Ian