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

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

Leave a Reply