Jump to content

Recommended Posts

Posted

Hi

 

having moved to a new domain over the summer and moved all user files over. How do I reset the ownrship for the users files and folders in one hit based on there folder name (username).

 

Is there any software or script anyone know of that can help

 

Thanks

 

Mark

Posted

ok, what i normally do to do this is

 

- Move the user areas to another location

- re-create the folders using AD which will re-create all of the security permissions on the folders

- move the user areas back which will keep the security permissions in place but put all of the documents back under that folder

 

Bit of messing about i know, but i personally dont know any other way to do this but i am sure if there is someone else will post :)

 

James.

Posted

subinacl (resource kit tool) can do this.

 

Assuming you've got something like d:\users\ then you can do:

 

d:
cd \users
for /d %i in (*) do subinacl.exe /subdirectories "%i" /setowner="%i"

 

The loop will step through each directory and set the owner to be the same name (so directory steve gets owner steve and so on)

 

Note that this could take some time if you've got lots of files. if you're using Windows quotas then turn them off while you do this - if any user is over quota then the update process will fail (as you change ownership, the quota count increases. If you try going over the limit then the owner won't get updated but you end up in an inconsistent state)

Posted
having moved to a new domain over the summer and moved all user files over. How do I reset the ownrship for the users files and folders in one hit based on there folder name (username).

 

AutoShare will do exactly this. It'll take you minutes to do thousands of users :)

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...