Scenario:
A folder E:\users contains the homedirectories for many users which is
copied from an old domain.
The need is to edit the permissions on all folder so the users and
administrator got full access. The names of the folders are the same as the
usernames.

Is this possible by using VBScript?
Are there any examplescripts?

Re: Edit folder permissions by Jerold

Jerold
Wed Feb 22 06:11:45 CST 2006

On Wed, 22 Feb 2006 01:06:32 -0800, jering <jering@discussions.microsoft.com> wrote:

>Scenario:
>A folder E:\users contains the homedirectories for many users which is
>copied from an old domain.
>The need is to edit the permissions on all folder so the users and
>administrator got full access. The names of the folders are the same as the
>usernames.
>
>Is this possible by using VBScript?
>Are there any examplescripts?

See tip 9520 » After insuring that Administrators have Full Control of newly redirected user folders, how do I 'fix' existing redirected folders? 05-Jul-05
and links in the 'Tips & Tricks' at http://www.jsifaq.com

Jerold Schulman
Windows Server MVP
JSI, Inc.
http://www.jsiinc.com
http://www.jsifaq.com

Re: Edit folder permissions by jering

jering
Wed Feb 22 16:22:29 CST 2006

Thanks for the answer.

But maybe I declared my question a bit unclear:

Folder: E:\Users

Contains these subfolders:
user1
user2
user3
user4
user5
and so on...

XCACLS gives administrator the correct permissions by:
XCACLS E:\Users\*.* /G administrator:RW /E

But also, the user should have Full control. So the permissions for folder
E:\Users\user1 would be:
Adminstrator - Full control
User1 - Full control

For folder E:\Users\user2:
Adminstrator - Full control
User2 - Full control

And so on...

Is this what your script does?


"Jerold Schulman" wrote:

> On Wed, 22 Feb 2006 01:06:32 -0800, jering <jering@discussions.microsoft.com> wrote:
>
> >Scenario:
> >A folder E:\users contains the homedirectories for many users which is
> >copied from an old domain.
> >The need is to edit the permissions on all folder so the users and
> >administrator got full access. The names of the folders are the same as the
> >usernames.
> >
> >Is this possible by using VBScript?
> >Are there any examplescripts?
>
> See tip 9520 » After insuring that Administrators have Full Control of newly redirected user folders, how do I 'fix' existing redirected folders? 05-Jul-05
> and links in the 'Tips & Tricks' at http://www.jsifaq.com
>
> Jerold Schulman
> Windows Server MVP
> JSI, Inc.
> http://www.jsiinc.com
> http://www.jsifaq.com
>

Re: Edit folder permissions by Jeremy

Jeremy
Wed Feb 22 21:29:59 CST 2006

How about trying something like this:

1. Redirect the directory output of the users folder to a text file (i.e.
e:\users dir > users.txt)
2. Open the text file in Excel
3. Insert the first cell to be xcacls e:\
4. Make a third cell to be /G
5. Make a fifth cell to be :RW /E
6. In the second and fourth cells, manipulate the info from the output
files so that it's just the user names (instead of e:\users\joe,etc)
7. Save the file as permissions.txt.
8. Open the permissions.txt file in Word
9. Use the Find/Replace function to strip out unwanted tabs and spaces.
10. Rename the file to permissions.bat and run it.

"jering" <jering@discussions.microsoft.com> wrote in message
news:C6746E00-F95E-4430-96EB-F6850157FAA1@microsoft.com...
> Thanks for the answer.
>
> But maybe I declared my question a bit unclear:
>
> Folder: E:\Users
>
> Contains these subfolders:
> user1
> user2
> user3
> user4
> user5
> and so on...
>
> XCACLS gives administrator the correct permissions by:
> XCACLS E:\Users\*.* /G administrator:RW /E
>
> But also, the user should have Full control. So the permissions for folder
> E:\Users\user1 would be:
> Adminstrator - Full control
> User1 - Full control
>
> For folder E:\Users\user2:
> Adminstrator - Full control
> User2 - Full control
>
> And so on...
>
> Is this what your script does?
>
>
> "Jerold Schulman" wrote:
>
>> On Wed, 22 Feb 2006 01:06:32 -0800, jering
>> <jering@discussions.microsoft.com> wrote:
>>
>> >Scenario:
>> >A folder E:\users contains the homedirectories for many users which is
>> >copied from an old domain.
>> >The need is to edit the permissions on all folder so the users and
>> >administrator got full access. The names of the folders are the same as
>> >the
>> >usernames.
>> >
>> >Is this possible by using VBScript?
>> >Are there any examplescripts?
>>
>> See tip 9520 » After insuring that Administrators have Full Control of
>> newly redirected user folders, how do I 'fix' existing redirected
>> folders? 05-Jul-05
>> and links in the 'Tips & Tricks' at http://www.jsifaq.com
>>
>> Jerold Schulman
>> Windows Server MVP
>> JSI, Inc.
>> http://www.jsiinc.com
>> http://www.jsifaq.com
>>