[windows2000] Re: Scripting help in setting permissions on folders

  • From: "Sorin Srbu" <sorin.srbu@xxxxxxxxxxxxx>
  • To: <windows2000@xxxxxxxxxxxxx>
  • Date: Thu, 18 Dec 2008 14:14:39 +0100

Heh, glad I'm not alone. Human Interface Error. ;-)

-- 
/Sorin


>-----Original Message-----
>From: windows2000-bounce@xxxxxxxxxxxxx
[mailto:windows2000-bounce@xxxxxxxxxxxxx]
>On Behalf Of Greg Reese
>Sent: Thursday, December 18, 2008 2:06 PM
>To: windows2000@xxxxxxxxxxxxx
>Subject: [windows2000] Re: Scripting help in setting permissions on folders
>
>sooner or later?  I miss them all the time.  nothing rare about it on this
end.
>
>
>On Thu, Dec 18, 2008 at 4:13 AM, Sorin Srbu <sorin.srbu@xxxxxxxxxxxxx> wrote:
>
>
>       For archival purposes:
>
>       Had a colleague check the script and he found a missing %%A, the
>second one
>       directly after cacls. The command line should be
>
>       for /f %%A in (users.txt) do cacls %%A /T /G domain\%%A:F
>"domain\domain
>
>       admins":F system:F /C
>
>
>       If you stare long enough on a command line with multiple variables
you're
>       bound to miss one sooner or later... 8-/
>       --
>       /Sorin
>
>
>
>       >-----Original Message-----
>       >From: windows2000-bounce@xxxxxxxxxxxxx
>       [mailto:windows2000-bounce@xxxxxxxxxxxxx]
>       >On Behalf Of Sorin Srbu
>       >Sent: Wednesday, December 17, 2008 3:43 PM
>       >To: windows2000@xxxxxxxxxxxxx
>       >Subject: [windows2000] Scripting help in setting permissions on
folders
>       >
>       >Hi all,
>       >
>       >I'm trying to set permissions on the user homefolders with a script,
but it
>       >just runs through w/o actually setting them. Can you help?
>       >
>       >I have a simple text file with all the user folders called users.txt
located
>       >in D:\users. The script cd's to this folder and then runs
>       >
>       >for /f %%A in (users.txt) do cacls /T /G domain\%%A:F "domain\domain
>       admins":F
>       >system:F /C
>       >
>       >Basically it sets Full Control permissions to the user himself,
Domain
>Admins
>       >and System.
>       >
>       >For what it's worth the command runs fine when run manually:
>       >       cacls /T /G domain\username:F "domain\domain admins":F
>system:F /C
>       >
>       >Any hints are greatly appreciated.
>
>
>

Other related posts: