Link to home
Start Free TrialLog in
Avatar of OSXFreak
OSXFreakFlag for United States of America

asked on

Give Ownership to Users Home Directory

I have a simular problem that is shown in the following question:
https://www.experts-exchange.com/questions/22911303/Change-ownership-of-home-folders-to-individual-users.html?sfQueryTermInfo=1+folder+home+ownership

I downloaded and installed the SUBINACL , I then copied and modified Shift-3's script and named it ownership.bat. Below is that script...

@echo off
setlocal

REM The directory containing the home folders.
set homeroot=S:\dfsshared\home\hoffman\

REM Your domain name
set dom=idn.local

for /F "usebackq tokens=*" %%G in (`dir "%homeroot%" /A:D /B`) do (
   subinacl /file "%homeroot%\%%G" /setowner="%dom%\%%G"
)

endlocal
 I then went to the Start>Program files>Windows Resource Kits tols>Command Shell and ran ownership.bat and got the results below.
I had orginally run Shift-3's 1st script in that answer, but got the same results as indicated below....
Elapsed Time: 00 00:00:00
Done:        0, Modified        0, Failed        0, Syntax errors        0
+file S:\dfsshared\home\hoffman\\testuser
/setowner=idn.local\testuser

The Home folders for the users is located on a SAN so not sure if NTFS Permissions need to be set and not sure how to do this sort of thing either.
Any help on this would be apperciated.

Thanks
Chip
edit One more thinkg worth adding, I was using xcacls to give users permissions to their home and profile directories. I also had a version of this that set up ownership but it seems to not work so was looking for alternate solutions.
ASKER CERTIFIED SOLUTION
Avatar of StuFox100
StuFox100
Flag of Australia 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
Avatar of OSXFreak

ASKER

Tried that, no such luck. :(
Elapsed Time: 00 00:00:00
Done:        0, Modified        0, Failed        0, Syntax errors        0
+file S:\dfsshared\home\hoffman\testuser
/setowner=idn.local\testuser
This is the results I get now, I do see the difference in that the +file line now has \testuser instead of \\testuser, but still not getting the results of changing the directory's ownership.

Chip
Any help on this one. Shift-3 if yor out there, have a look as you might be able to solve my issue.

Thanks.

Chip