Link to home
Start Free TrialLog in
Avatar of IKWeb
IKWeb

asked on

Reset Ownership on users home areas

Morning All

I have an issues. I have just moved a large amount of data form one network to another.

I now need to be able to change the owner tag back to the user in question. At the moment it all belongs to administrator and due to this disk quota isnt working as it should.

I remember a few years back, there was a VBS file which you needed to say where the path to the home areas are located, you then run the VBS file and it changes the ownership flag back to the user..

I cant find this script and was wondering if anyone on here knows where I can find it, or post it, or even if there is now a better way to fix this.

Many Thanks
Danny
Avatar of Member_2_6582184
Member_2_6582184
Flag of Germany image

Why is this tagged OSX? What is the underlying file system for the user's home folders? If it is a POSIX file system, you can use a simple bash script to change the user's folders back to their owner, provided the owner's logon name is the same as it's home folder's name:
for d in /home/*; do chown -R $d /home/$d; done

Open in new window


Of course, when copying over home folders you should do this again and use rsync -a or robocopy /mir to keep the ACLs.
Avatar of IKWeb
IKWeb

ASKER

Hello, I have no idea why OSX is listed. I only selected Windows.

The OS is Windows 2008 R2.
Avatar of South Mod
IKWeb,

I changed the zones for this question from

--Microsoft Server

to
--Microsoft Server
--Shell Scripting


SouthMod
Community Support Moderator
Are the root folders named identically to the username?  If so, a vbs script would work.  If not, we need some way of figuring out which folder gets mapped to which user.    (you might get more responses if you raise this to 500 points)
Avatar of IKWeb

ASKER

Hi Weinberk

Yes, the folders are the same names as the users AD account.
ASKER CERTIFIED SOLUTION
Avatar of Coralon
Coralon
Flag of United States of America 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