Celebrate National IT Professionals Day with 3 months of free Premium Membership. Use Code ITDAY17

x
?
Solved

Need a script to reset Windows home dir permissions

Posted on 2010-08-24
2
Medium Priority
?
322 Views
Last Modified: 2012-05-10
We migrated users over to a new file server.  The folder permissions were lost in translation.  All users home directories are \\lincoln\students\%username%.  I'm in need of a script to take the folder name (username) and give them full control of the folder.  Any suggestions would be greatly appreciated.  Thanks!
0
Comment
Question by:jjacksonwl
[X]
Welcome to Experts Exchange

Add your voice to the tech community where 5M+ people just like you are talking about what matters.

  • Help others & share knowledge
  • Earn cash & points
  • Learn & ask questions
2 Comments
 
LVL 85

Expert Comment

by:oBdA
ID: 33513195
Assuming Administrators and System already have access, save the script below somewhere on the new server as CorrectHomePerm.cmd or Whatever.cmd, and adjust the "HomeRoot" variable to point to the local path of the shared "students" folder (it's just way faster than over a share).
You can test it, it will currently only print the cacls commands it would normally run. To run it for real (try a test folder with some dummy user folders first), simply remove the capitalized ECHO in front of "cacls".

@echo off
setlocal
set HomeRoot=D:\students
for /d %%a in ("%HomeRoot%\*.*") do (
  echo Processing %%~nxa ...
  ECHO cacls.exe "%%a" /t /e /g "%UserDomain%\%%~nxa":F
)
pause

Open in new window

0
 
LVL 65

Accepted Solution

by:
rockiroads earned 2000 total points
ID: 33513231
MS has something called Xcacls.vbs. This website gives more info, with examples and download link  http://support.microsoft.com/kb/825751

Perphaps a script to take the folder name and supply permissions for each user

0

Featured Post

Back Up Your Microsoft Windows Server®

Back up all your Microsoft Windows Server – on-premises, in remote locations, in private and hybrid clouds. Your entire Windows Server will be backed up in one easy step with patented, block-level disk imaging. We achieve RTOs (recovery time objectives) as low as 15 seconds.

Question has a verified solution.

If you are experiencing a similar issue, please ask a related question

We have adopted the strategy to use Computers in Student Labs as the bulletin boards. The same target can be achieved by using a Login Notice feature in Group policy but it’s not as attractive as graphical wallpapers with message which grabs the att…
This article provides a convenient collection of links to Microsoft provided Security Patches for operating systems that have reached their End of Life support cycle. Included operating systems covered by this article are Windows XP,  Windows Server…
Two types of users will appreciate AOMEI Backupper Pro: 1 - Those with PCIe drives (and haven't found cloning software that works on them). 2 - Those who want a fast clone of their boot drive (no re-boots needed) and it can clone your drive wh…
Want to learn how to record your desktop screen without having to use an outside camera. Click on this video and learn how to use the cool google extension called "Screencastify"! Step 1: Open a new google tab Step 2: Go to the left hand upper corn…

730 members asked questions and received personalized solutions in the past 7 days.

Join the community of 500,000 technology professionals and ask your questions.

Join & Ask a Question