I have a windows 2008 r2 file server. It is setup so that users get there home drive mapped to it H:. It is at the following location \\servername\home\%username%
I have ben having issues with the mac users being able to see other users home drives (even with enumeration enabled).
I need to change the permissions on the directory and all the users subdirectories. Is there an easy way to do this in bulk there are over a thousand.
I have looked at Set-Acl http://helgeklein.com/setacl/examples/managing-file-system-permissions-with-setacl-exe/ however I dont see how it will do all users home drives that already exist. If anyone knows of a good tool that would be great.
I want to apply the following permissions to the %username% folder
SYSTEM - Full control
local\Users special list and read attributes
local\administrators - Full control
%username% = modify
Thanks
This script is one I've used on win 2008 to reset the user security on a directory called e:\users. It resets the ownership to the correct owner and sets a standard security profile. It uses the builtin takeown and icacls that come with 2008 so no external tools needed.
It assumes that the usernames and the directory names are the same. i.e e:\users\j.doe is owned by mydomain\j.doe
If you pass it a parameter like j.doe it only 'corrects' that directory so you can test it on one directory. Check the security permissions are what you want before live use. I used this to correct things after a migration where I had been copying files in scripts.
I've made some minor changes while posting so there may be a syntax error.
Or if you prefer PowerShell, one of my techs wrote this which has worked well for us. I'm sure it can cleaned up some but I left in some testing lines to make it easier to play with and customize. This uses Quest tools which you no longer need, especially if you're on PowerShell v2 and SubInACL: