Link to home
Start Free TrialLog in
Avatar of netjets
netjets

asked on

Take Ownership of a folder - Many folders and many users

Hi Guys,

First time posting on here so I apologise if I do anything wrong or don't provide enough info.

What i need to do is simple to explain though:

My users are getting Roaming profile errors after the profile folders were moved from one server to another. The only way to stop these messages is to give ownership of the profile folder to the user (I think this is the only way). Now if a user is called user1 the folder will also be called user1. Is there a quick way to set the ownership of all the folders to the corresponding user?

I hope this makes sense. :-/
Thanks.
Avatar of merowinger
merowinger
Flag of Germany image

yes there's a commandline tool called cacls which configures permissions!
You can combine it with vbscript to write a procedure....

See here:
https://www.experts-exchange.com/questions/22141356/USING-CACLS-IN-A-VBS-SCRIPT.html?sfQueryTermInfo=1+30+cacl+script

here are more infos and the download:
http://support.microsoft.com/kb/318754
Avatar of netjets
netjets

ASKER

Thanks for the super fast response.

I don't know how to write VB scripts (very well). Is there an easier way?
You can use cacls in a  batch file:
http://support.microsoft.com/kb/135268
Another, updated utility -
Xcacls:
http://support.microsoft.com/kb/825751
ASKER CERTIFIED SOLUTION
Avatar of merowinger
merowinger
Flag of Germany image

Link to home
membership
This solution is only available to members.
To access this solution, you must be a member of Experts Exchange.
Start Free Trial
the cacls command could look like this:
cacls.exe profiles\%UserName% /g administrators:f system:f %UserName%:c
Avatar of netjets

ASKER

Thanks man! Genius...Thank you all for your help :-)