Reset permissions on thousands of user home directories

S

Shameem Murad

I have thousands of user's home directories with incorrect permissions. Is
there any way to reset them all without having to access each folder
individually and resetting them? I need the domain admin group and respective
user to have full control on those.
Thanks you guys in advance..
Regards.
 
M

Maincat

Shameem Murad said:
I have thousands of user's home directories with incorrect permissions. Is
there any way to reset them all without having to access each folder
individually and resetting them? I need the domain admin group and
respective
user to have full control on those.
Thanks you guys in advance..
Regards.
I'm assuming Windows Server 2003.
Look up dsquery and dsmod
 
S

Shameem Murad

Maincat said:
I'm assuming Windows Server 2003.
Look up dsquery and dsmod


Yes, 2003 server. Both DSMOD and DSQUERY are geared towards Active Directory object (i.e. users, groups, ou's, etc..). Not to be used for ACL modification on folder. Thank you anyways.
 
P

Pegasus \(MVP\)

Shameem Murad said:
I have thousands of user's home directories with incorrect permissions. Is
there any way to reset them all without having to access each folder
individually and resetting them? I need the domain admin group and
respective
user to have full control on those.
Thanks you guys in advance..
Regards.

If you intend to use a script, how should the script know
what permission to apply to which home folder? Do you
have a look-up table?
 
S

Shameem Murad

Pegasus (MVP) said:
If you intend to use a script, how should the script know
what permission to apply to which home folder? Do you
have a look-up table?

Thanks..
I can certainly use AD to run a query and save as TXT. And then?
 
P

Pegasus \(MVP\)

Shameem Murad said:
Thanks..
I can certainly use AD to run a query and save as TXT. And then?

Many administrators arrange it so that all home directories
are kept in a folder such as
d:\User Files\{UserName}
where {UserName} agrees with the user's logon name. This
eliminates the need for any AD query. Is your setup different?
 
S

Shameem Murad

Setup is not different Pegasus. That is exactly how the file server is
hosting.
Thanks..
Shameem
 
P

Pegasus \(MVP\)

Shameem Murad said:
Setup is not different Pegasus. That is exactly how the file server is
hosting.
Thanks..
Shameem

Try this batch file:
1. @echo off
2. set Target=d:\User Files
3.
4. cd /d "%Target%"
5. for /d %%a in (*.*) do (
6. echo Processing %%a
7. echo cacls "%%a" /t /e /g "%%a":f "System":f "DomainAdmins":f
8. )
Remove the word "echo" in Line 7 to activate the batch file.
 
S

Shameem Murad

Looks like the batchfile runs but makes no changes.
Questions:
Should the letter D be something different since my CD Rom is D?
As for Users, how does this grab list of users from AD and then apply to
respective user directory with full control?
My set is as follows:
C:\Users
In this users dir, I have test1, test2, test3.....folders and the user names
are also test1, test2, test3...etc.
Thanks a lot...
Regards,
Shameem
 
P

Pegasus \(MVP\)

Shameem Murad said:
Looks like the batchfile runs but makes no changes.
Questions:
Should the letter D be something different since my CD Rom is D?
As for Users, how does this grab list of users from AD and then apply to
respective user directory with full control?
My set is as follows:
C:\Users
In this users dir, I have test1, test2, test3.....folders and the user
names
are also test1, test2, test3...etc.
Thanks a lot...
Regards,
Shameem

Have another look at the batch file. It very prominently sets "Target"
to "d:\User Files". You obviously have to set it to a folder name that
is appropriate for YOUR environment!
 

Ask a Question

Want to reply to this thread or ask your own question?

You'll need to choose a username for the site, which only take a couple of moments. After that, you can post your question and our members will help you out.

Ask a Question

Top