japitsolution
asked on
Batch file to extract 'Security' on a Folder
Hi Guys,
I need some help with extracting the 'Security' information on a Shared folder.
So I need a script which extracts:
1. Security Groups on the Folder
2. In addition, the members of the concerned groups.
Cheers.
I need some help with extracting the 'Security' information on a Shared folder.
So I need a script which extracts:
1. Security Groups on the Folder
2. In addition, the members of the concerned groups.
Cheers.
the second command should be:
subinacl /playfile c:\perms.txt
subinacl /playfile c:\perms.txt
ASKER
Well I prefer either an portable tool or a command base script. I cannot make the below changes on the server:
1. Install a Program
2. Make changes to permissions/security on a folder.
Hence the above solution is not appropriate.
Any other suggestions?
1. Install a Program
2. Make changes to permissions/security on a folder.
Hence the above solution is not appropriate.
Any other suggestions?
Hello, you can use CACLS command to display or modify Access Control Lists (ACLs) for files and folders. ACL determines which users (or groups of users) can read or edit the file.
In the new version of Windows (Windows 7 and Windows 2008 Server) there is a similar utility for command prompt which is "ICACLS".
The usage is easy as follow:
cacls C:\users\johns
icacls C:\users\johns\test.txt
you can save the output in a file as well with following argument:
> filename.txt
Examples:
cacls C:\users\johns > filename.txt
icacls C:\users\johns\test.txt > filename.txt
All the best,
In the new version of Windows (Windows 7 and Windows 2008 Server) there is a similar utility for command prompt which is "ICACLS".
The usage is easy as follow:
cacls C:\users\johns
icacls C:\users\johns\test.txt
you can save the output in a file as well with following argument:
> filename.txt
Examples:
cacls C:\users\johns > filename.txt
icacls C:\users\johns\test.txt > filename.txt
All the best,
ASKER
Well I prefer either an portable tool or a command base script. I cannot make the below changes on the server:
1. Install a Program
2. Make changes to permissions/security on a folder.
Hence the above solution is not appropriate.
Any other suggestions?
1. Install a Program
2. Make changes to permissions/security on a folder.
Hence the above solution is not appropriate.
Any other suggestions?
Hi,
Did you check my solution? It is windows command prompt utility and you can make a batch file easily. You do not need to change any permissions or install an application.
Thanks,
Ali
Did you check my solution? It is windows command prompt utility and you can make a batch file easily. You do not need to change any permissions or install an application.
Thanks,
Ali
ASKER
Hi Artsec/Ali,
Your solution is impressive however what I initially requested was a Tool/Batch file which can extract this information.
Are you able to prepare a Batchfile for me Please?
Thank you.
Your solution is impressive however what I initially requested was a Tool/Batch file which can extract this information.
Are you able to prepare a Batchfile for me Please?
Thank you.
ASKER CERTIFIED SOLUTION
membership
This solution is only available to members.
To access this solution, you must be a member of Experts Exchange.
If you have enough disk space run multiple versions of windows 7 each with a different version of sql installed and then select wich ever one you want at startup via the boot.ini
ASKER
Fantastic Solution Mike.
It worked like a treat
It worked like a treat
http://www.microsoft.com/download/en/details.aspx?displaylang=en&id=23510
You type the following command to extract the permissions for the entire C: drive toa file called perms.txt:
subinacl /noverbose /output=c:\perms.txt /subdirectories c:\*.*
If you find later that permissions have been changed and you want to change them back, you can type:
setacl /playfile c:\perms.txt
and the process will attempt to set them back.