linkazoid Posted January 31, 2011 Posted January 31, 2011 Hello All, I've been reading the thread about bulk setting the owner of user home directories http://www.edugeek.net/forums/windows/28452-mass-setting-owner-home-directories.html as i need to enforce staff quota as some are taking the micky.... I can't seem to get for /d %%i in (*) do subinacl /errorlog=subinacl.err /file %%i /setowner=%%i to work. I have subinacl installed but how do I run the code above?? I've tried creating a bat file in the root folder but nothing... Our Home Folders are in the following structure I:\UserHome\THGG\Staff\username I:\UserHome\THGG\Student\Year7 I:\UserHome\THGG\Student\Year8 etc Can someone shed some light as my googling powers are failing me?? Thanks, Michael
3s-gtech Posted January 31, 2011 Posted January 31, 2011 I use chown and this script as a .cmd: for /D %%i in (*) do ( chown -r %%i "%%i\*.*" ) This takes the folder name and sets it as the owner. Place chown and the script in the root of the home directories and run it from the command line. This assumes that their home folder is the same as their login. 1
linkazoid Posted January 31, 2011 Author Posted January 31, 2011 Brilliant!!!! Done exactly what I wanted to do.
3s-gtech Posted January 31, 2011 Posted January 31, 2011 No problem. It's a superb solution, very quick - not my code I hasten to add, think it came from a post on here. I use it for the same reason - FSRM.
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