?
Solved

Recursive Group parsing for members

Posted on 2006-04-18
4
Medium Priority
?
936 Views
Last Modified: 2012-06-27
I have a list of ACL dumps from a folder and I know what groups have access to specific directories.
I would like to find an example of a script (wmi or VBScript) which would give me a list of all users in those groups.
This sounds simple, if not the fact that each Domain group could contain other groups and I need to expand those to get Every User, having access to a particular directory, irregardless if it's a direct or nested membership through other groups. And there might be groups in groups in groups etc... theoretically endless, if there is a problem and two global groups are in a loop.

Does anyone have any working examples?
Or a utility that would expand the group membership for a particular group through all the nested groups into a simple text file would do good as well.
Thanks.
0
Comment
Question by:sstouk
  • 2
  • 2
4 Comments
 
LVL 11

Expert Comment

by:star_trek
ID: 16481392
0
 
LVL 6

Author Comment

by:sstouk
ID: 16481606
From what I can see this is an example of the script which gives the Group membership where user belongs in and I need the nested users, belonging to one group - quite the opposite.
I will try to see if I can customize it, but the direct example would be better.
I am looking for:
"List all users in a group and all nested groups"
0
 
LVL 11

Accepted Solution

by:
star_trek earned 2000 total points
ID: 16481689
Then it will be something like this:

On Error Resume Next
Set objGroup = GetObject _
  ("LDAP://cn=Scientists,ou=R&D,dc=NA,dc=fabrikam,dc=com")
objGroup.GetInfo
arrMemberOf = objGroup.GetEx("member")
WScript.Echo "Members:"
For Each strMember in arrMemberOf
    WScript.echo strMember
Next

In the above you can have something like if objectclass.strmember='group' then do the recursion
0
 
LVL 6

Author Comment

by:sstouk
ID: 16481825
Works.
Thank You.
0

Featured Post

[Webinar On Demand] Database Backup and Recovery

Does your company store data on premises, off site, in the cloud, or a combination of these? If you answered “yes”, you need a data backup recovery plan that fits each and every platform. Watch now as as Percona teaches us how to build agile data backup recovery plan.

Question has a verified solution.

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

Many of us need to configure DHCP server(s) in their environment. We can do that simply via DHCP console on server or using MMC snap-in on each computer with Administrative Tools installed in a network. But what if we have to configure many DHCP ser…
A quick step-by-step overview of installing and configuring Carbonite Server Backup.
With just a little bit of  SQL and VBA, many doors open to cool things like synchronize a list box to display data relevant to other information on a form.  If you have never written code or looked at an SQL statement before, no problem! ...  give i…
Is your organization moving toward a cloud and mobile-first environment? In this transition, your IT department will encounter many challenges, such as navigating how to: Deploy new applications and services to a growing team Accommodate employee…

612 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