Page 1 of 1 1
Topic Options
#205412 - 2012-06-21 09:55 PM reset a security permissions on home folder
Jacob_Kreed Offline
Fresh Scripter

Registered: 2001-12-14
Posts: 19
Loc: UK
I have 1000 home folders on the on share that I need to reset permissions so only user and domain adminstrator can see it and remove inhertance. What is the best way

On Windows 2008 R8 Standard Server..

Top
#205413 - 2012-06-22 12:11 AM Re: reset a security permissions on home folder [Re: Jacob_Kreed]
Lonkero Administrator Offline
KiX Master Guru
*****

Registered: 2001-06-05
Posts: 22346
Loc: OK
cacls...

for each user in ou
shell comspec /c cacls user.homedrive ...
next

and since the post had no code, moving to basic.
_________________________
!

download KiXnet

Top
#205414 - 2012-06-23 04:10 AM Re: reset a security permissions on home folder [Re: Lonkero]
Glenn Barnas Administrator Offline
KiX Supporter
*****

Registered: 2003-01-28
Posts: 4401
Loc: New Jersey
Non-scripting solution might be quick -

Apply Administrators / Full Control to root of share folder, removing all user access. Remove inheritance.

In ADUC - select the users (click - shift-click to select a range. Delete the home path.

Re-select the group of users, define the home path to "\\server\share\%USERNAME%" - the user folders will be verified and permission assigned with the user having full control. Since the folder already exists, you will be prompted to grant the user access to the existing folder.

If you are going to script, look for the UDFs to query AD for a list of users. If you have a list of users that need to be modified, use something like FileIO() to read the text file into an array. As before, start by granting Admin/Full without inheritance, then enumerate the array of user IDs. Use Shell to call CACLS to grant the user full control on the folder. Use the /E switch to edit rather than replace the ACLs!

Note that messing with user home folders on 2K8 platforms isn't always a good idea. That's why I always let AD create the home folder and set the permissions. Clean and always works.

Glenn
_________________________
Actually I am a Rocket Scientist! \:D

Top
Page 1 of 1 1


Moderator:  Jochen, Allen, Radimus, Glenn Barnas, ShaneEP, Ruud van Velsen, Arend_, Mart 
Hop to:
Shout Box

Who's Online
0 registered and 793 anonymous users online.
Newest Members
M_Moore, BeeEm, min_seow, Audio, Hoschi
17883 Registered Users

Generated in 0.065 seconds in which 0.05 seconds were spent on a total of 13 queries. Zlib compression enabled.

Search the board with:
superb Board Search
or try with google:
Google
Web kixtart.org