Ric_ Posted June 21, 2006 Posted June 21, 2006 This script is a development of a piece of work by ChrisH. You need to extract the files and edit the script so that it knows where your user shares are and what permissions to give out. It assumes that the folder names are the same as the usernames. The script runs through all the folders setting permissions and ownership on the files/folders within. I ACCEPT NO RESPONSIBILITY IF THIS SCRIPT BUGGERS ANYTHING UP SO TEST THOROUGHLY!permissions_115.rar
ChrisH Posted June 21, 2006 Posted June 21, 2006 Needs some constants in it for some of the settings I reckon My add user script needs a bit of development as well if your in the scripting mood Ric
Ric_ Posted June 21, 2006 Author Posted June 21, 2006 @ChrisH: You wrote it (for your adduser script), I just hacked it and refined it for use on previously created folders. I spose I could add the constants but I know that this definately works... as opposed to maybe working if I tinker too much.
NetworkGeezer Posted June 21, 2006 Posted June 21, 2006 I spose I could add the constants but I know that this definately works... as opposed to maybe working if I tinker too much. Spoken like a true admin
sahmeepee Posted June 21, 2006 Posted June 21, 2006 blimey! All that vb seems a bit longwinded to me! Mine's a windows batch file: for /f "Tokens=*" %%i in ('dir /b /ad "E:\year7\"') do subinacl /subdir "E:\year7\%%i\*.*" /setowner=mydomain\%%i (one line per parent folder) to do the ownership. It could be tweaked easily to take an argument on the commandline, but I feel safer using hard-coded values. You need to use a recent version of subinacl (mine is 5.2.3790.1180) To give the folder's owner NTFS full control, I do: for /f "Tokens=*" %%i in ('dir /b /ad "\\myserver\year7\"') do @cacls "\\myserver\year7\%%i" /E /T /G "mydomain\%%i":f Having them separate is handy because it can take a long time to run these through.
Recommended Posts
Create an account or sign in to comment
You need to be a member in order to leave a comment
Create an account
Sign up for a new account in our community. It's easy!
Register a new accountSign in
Already have an account? Sign in here.
Sign In Now