Tek-Tips is the largest IT community on the Internet today!

Members share and learn making Tek-Tips Forums the best source of peer-reviewed technical information on the Internet!

  • Congratulations SkipVought on being selected by the Tek-Tips community for having the most helpful posts in the forums last week. Way to Go!

Identify all Users with access to network Folder

Status
Not open for further replies.

bmclean2

MIS
Jul 20, 2005
22
0
0
US
Does anybody have a script that will allow you to enter a network folder name and return all groups (and users of those groups) that have access to the folder? I've seen a few things that will return groups but I really need a User List.

This script will return Groups:

I'm wondering if I would have to run the script above and then somehow run a recursive query to determine each member of the groups that are returned?

Please let me know if you have done something similar. THanks..
 
>I'm wondering if I would have to run the script above and then somehow run a recursive query to determine each member of the groups that are returned?
I did not read the link. But, that is what to do. The only difference is by yourself or by somebody else.
 
Ok....Since it seems I need to have a recursive query to check Group memberships with the eventual output of users that have access to a particular folder, does anyone have any idea on how to do this? Thank in advance.
 
How about this for quick ??

Code:
rc=WshShell.run("cmd /c CACLS \\server\c$\Path-",1,TRUE)

you can have this run in loop form to if you wish to list several path's. Just the share name alone will not work, you need the full UNC Path administratively.

-SWarrior
 

Code:
rc=WshShell.run("cmd /c CACLS \\server\c$\Path",1,TRUE)

didn't need the '-' in there, was a typo.

-SWarrior
 
Based on what you said above, can I break it out and allow a user defined path?

Code:
strCommand = "cmd /c CACLS " & strPath & """,1,TRUE

rc=WshShell.run(strCommand)

Would this work??? I would request the full UNC path from the user in an inputbox and then check to verify that it is a full UNC path before running.

 
[tt]>strCommand = "cmd /c CACLS " & strPath & """,1,TRUE
>rc=WshShell.run(strCommand)

strCommand = "cmd /c CACLS " & strPath
rc=WshShell.run(strCommand,1,TRUE)[/tt]
 
Status
Not open for further replies.

Part and Inventory Search

Sponsor

Back
Top