enumerating users and groups on folders
I am going to try to explain this as efficiently as possible. I am wanting to be able to audit folders on a windows share and would like to see if there is a way from command line that I could run a script or something along those lines to enumerate which groups have access to which folders. At that point I would also like to take it a step further and enumerate what users are in the groups as well and have it all output to a text file or something so that I could ultimately copy the information into a spreadsheet. That make any sense?
Comments
-
dynamik Banned Posts: 12,312 ■■■■■■■■■□Check out icacls, cacls, or setacl.
icacls is an updated version of cacls, but I'm not sure if it's specific to Vista/2008 or if it works with older OSes. -
blargoe Member Posts: 4,174 ■■■■■■■■■□IT guy since 12/00
Recent: 11/2019 - RHCSA (RHEL 7); 2/2019 - Updated VCP to 6.5 (just a few days before VMware discontinued the re-cert policy...)
Working on: RHCE/Ansible
Future: Probably continued Red Hat Immersion, Possibly VCAP Design, or maybe a completely different path. Depends on job demands... -
HeroPsycho Inactive Imported Users Posts: 1,940You need a little PowerShell goodness...
get-acl <path> | select-object path,owner,accesstostring,group | export-csv c:\ACL.csv
get-group can be used to get all members of a group, or you can always use dsget for that.
Enjoy!Good luck to all! -
hypnotoad Banned Posts: 915zenlakin wrote:Looks like I am not able to run that get-acl or get group command.
Probably have to install powershell.
http://www.microsoft.com/windowsserver2003/technologies/management/powershell/default.mspx