Script for setting rights on home folders

Here is a little script I did for a customer to set permissions on user home dirs. I goes through all of the subfolders and changes all permissions and ownerships.

@echo off
for /d %%v in (*) do call :CHANGE %%v

:CHANGE
echo y|cacls %1 /T /P “DOMAIN%1”:F “DOMAINDomain Admins”:F
chown -r -v -d DOMAIN %1 X:users%1*

Comments

Leave a Reply

To respond on your own website, enter the URL of your response which should contain a link to this post's permalink URL. Your response will then appear (possibly after moderation) on this page. Want to update or remove your response? Update or delete your post and re-enter your post's URL again. (Find out more about Webmentions.)