Solved

Via Ldap how can i retrieve all group members?

Posted on 2011-09-15
11
512 Views
Last Modified: 2012-05-12
Hi,

Via Ldap how can i retrieve all group members?
So can use as a query in AD.
Thanks
0
Comment
Question by:bsharath
  • 4
  • 4
  • 3
11 Comments
 
LVL 57

Accepted Solution

by:
Mike Kline earned 250 total points
ID: 36541725
You can use this in ADUC


 (&(objectcategory=person)(objectClass=user)(memberOf=DN of your group))

Thanks


Mike
0
 
LVL 11

Author Comment

by:bsharath
ID: 36541738
Thanks
But does not work

(&(&(objectcategory=person)(objectClass=user)(memberOf=IUK)))

IUK is the group name
0
 
LVL 65

Expert Comment

by:RobSampson
ID: 36547100
When people refer to a DN, or distringuishedName, in Active Directory, it is the fully qualified name structure, as in
memberOf=CN=IUK,OU=SecondOU,OU=FirstOU,DC=domain,DC=com

Rob.
0
 
LVL 11

Author Comment

by:bsharath
ID: 36547331
Thanks Rob it does work
Can we just give the group name rather than whole
0
 
LVL 57

Expert Comment

by:Mike Kline
ID: 36547357
not via an ldap query using memberof, you need then entire DN

thanks

Mike
0
Is Your AD Toolbox Looking More Like a Toybox?

Managing Active Directory can get complicated.  Often, the native tools for managing AD are just not up to the task.  The largest Active Directory installations in the world have relied on one tool to manage their day-to-day administration tasks: Hyena. Start your trial today.

 
LVL 11

Author Comment

by:bsharath
ID: 36547382
Any other ways?
0
 
LVL 65

Expert Comment

by:RobSampson
ID: 36547392
The only other way is via a script, or the command line tools, I think something like
dsquery group domainroot -name iuk* | dsget group -members

Rob.
0
 
LVL 65

Expert Comment

by:RobSampson
ID: 36547401
If you get
dsget failed:`Target object for this command' is missing.

that means that the dsquery did not find a group name matching your string value.

Rob.
0
 
LVL 57

Expert Comment

by:Mike Kline
ID: 36547494
are you just trying to run queries against AD?   Can you use third party (free) tools also?
0
 
LVL 11

Author Comment

by:bsharath
ID: 36547507
I want it via the AD queries
0
 
LVL 65

Assisted Solution

by:RobSampson
RobSampson earned 250 total points
ID: 36547525
You can't do wildcards in ADUC with MemberOf. You have to use the dsquery and dsget tools for the simplest method, or write a script to prompt from the group name.
0

Featured Post

Is Your AD Toolbox Looking More Like a Toybox?

Managing Active Directory can get complicated.  Often, the native tools for managing AD are just not up to the task.  The largest Active Directory installations in the world have relied on one tool to manage their day-to-day administration tasks: Hyena. Start your trial today.

Question has a verified solution.

If you are experiencing a similar issue, please ask a related question

Go is an acronym of golang, is a programming language developed Google in 2007. Go is a new language that is mostly in the C family, with significant input from Pascal/Modula/Oberon family. Hence Go arisen as low-level language with fast compilation…
In this article, we will see the basic design consideration while designing a Multi-tenant web application in a simple manner. Though, many frameworks are available in the market to develop a multi - tenant application, but do they provide data, cod…
The goal of the video will be to teach the user the concept of local variables and scope. An example of a locally defined variable will be given as well as an explanation of what scope is in C++. The local variable and concept of scope will be relat…
The viewer will be introduced to the member functions push_back and pop_back of the vector class. The video will teach the difference between the two as well as how to use each one along with its functionality.

948 members asked questions and received personalized solutions in the past 7 days.

Join the community of 500,000 technology professionals and ask your questions.

Join & Ask a Question

Need Help in Real-Time?

Connect with top rated Experts

18 Experts available now in Live!

Get 1:1 Help Now