Jump to content

Recommended Posts

Posted

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

Posted

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.

  • Thanks 1

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 account

Sign in

Already have an account? Sign in here.

Sign In Now



×
×
  • Create New...