Werbung: SecurityConsole.de verwaltet Ihre Computer mit Security Essentails aus der Cloud!
30 Tage kostenfrei testen und 20% Rabatt für Ihre Bestellung mit Promocode: WBF2685582
(Promocode gültig bis 31.12.2011)

Group:  English: Windows Server » microsoft.public.windows.server.scripting
Thread: managing NTFS permissions - cacls or wmi?

HTVi
TV Discussion Newsgroups

managing NTFS permissions - cacls or wmi?
"James" <noone[ at ]nowhere.com> 11/14/2008 9:05:08 PM
cacls or wmi for managing ntfs permissions?

I was going to go with cacls but having an issue using 'echo y | cacls...'
command? my cacls command is good, it works until I try to echo y into it so
it can go without user interaction. Anyone know whats up with that?

how is wmi for this? haven't looked yet, just looking for others opinions
based on their experiences using either of these

thanks


Re: managing NTFS permissions - cacls or wmi?
"James" <noone[ at ]nowhere.com> 11/14/2008 9:30:55 PM
I was putting a space after y in: echo y | cacls...

echo y| cacls... without the space works, of course :)

regardless, still interested in hearing about others experience using this
and/or wmi for scripting ntfs permission managment tasks. I have not looked
into the wmi route but do recall an example somewhere that looked overly
complicated for the goal at hand... I'm thinking cacls is much simpler, with
the only negative being I need to shell out from wsh.

thanks

"James" <noone[ at ]nowhere.com> wrote in message
news:Or$atypRJHA.4772[ at ]TK2MSFTNGP06.phx.gbl...
[Quoted Text]
> cacls or wmi for managing ntfs permissions?
>
> I was going to go with cacls but having an issue using 'echo y | cacls...'
> command? my cacls command is good, it works until I try to echo y into it
> so it can go without user interaction. Anyone know whats up with that?
>
> how is wmi for this? haven't looked yet, just looking for others opinions
> based on their experiences using either of these
>
> thanks
>


Re: managing NTFS permissions - cacls or wmi?
"Marcin" <marcin[ at ]community.nospam> 11/16/2008 1:38:33 PM
James - stick to cacls (try xcacls or icacls if you are running Vista).
While managing permissions via scripting (with or without WMI) is certainly
possible, such approach is considerably more complex and time consuming.
Check http://technet.microsoft.com/en-us/magazine/cc160995.aspx to get a
taste of it...

hth
Marcin

"James" <noone[ at ]nowhere.com> wrote in message
news:%230IcIBqRJHA.5344[ at ]TK2MSFTNGP06.phx.gbl...
[Quoted Text]
>I was putting a space after y in: echo y | cacls...
>
> echo y| cacls... without the space works, of course :)
>
> regardless, still interested in hearing about others experience using this
> and/or wmi for scripting ntfs permission managment tasks. I have not
> looked into the wmi route but do recall an example somewhere that looked
> overly complicated for the goal at hand... I'm thinking cacls is much
> simpler, with the only negative being I need to shell out from wsh.
>
> thanks
>
> "James" <noone[ at ]nowhere.com> wrote in message
> news:Or$atypRJHA.4772[ at ]TK2MSFTNGP06.phx.gbl...
>> cacls or wmi for managing ntfs permissions?
>>
>> I was going to go with cacls but having an issue using 'echo y |
>> cacls...' command? my cacls command is good, it works until I try to echo
>> y into it so it can go without user interaction. Anyone know whats up
>> with that?
>>
>> how is wmi for this? haven't looked yet, just looking for others opinions
>> based on their experiences using either of these
>>
>> thanks
>>
>
>


Re: managing NTFS permissions - cacls or wmi?
"James Whitlow" <jwhitlow.60372693[ at ]bloglines.com> 11/16/2008 3:14:29 PM
"James" <noone[ at ]nowhere.com> wrote in message
news:%230IcIBqRJHA.5344[ at ]TK2MSFTNGP06.phx.gbl...
[Quoted Text]
>I was putting a space after y in: echo y | cacls...
>
> echo y| cacls... without the space works, of course :)
>
> regardless, still interested in hearing about others experience using this
> and/or wmi for scripting ntfs permission managment tasks. I have not
> looked into the wmi route but do recall an example somewhere that looked
> overly complicated for the goal at hand... I'm thinking cacls is much
> simpler, with the only negative being I need to shell out from wsh.

I frequently use cacls from both command line and script. I use it
exclusively with the /E switch, which does not present a confirmation
prompt. In my case, I am just wanting to grant (or revoke) a specific user
from the directory or file. I am not concerned with altering other
permissions on the directory.

I also looked at the WMI method sometime back & came to the same
conclusion as you. It is indeed a lot of learning and work to accomplish
what shelling out to cacls could accomplish easily.


Re: managing NTFS permissions - cacls or wmi?
David Trimboli <trimboli[ at ]cshl.edu> 11/17/2008 2:37:52 PM
James wrote:
[Quoted Text]
> I was putting a space after y in: echo y | cacls...
>
> echo y| cacls... without the space works, of course :)

Just so you know: cacls also takes a /f (“force”) parameter to skip
confirmation.

--
David Trimboli
Windows Systems Analyst
Cold Spring Harbor Laboratory
Re: managing NTFS permissions - cacls or wmi?
"James" <noone[ at ]nowhere.com> 11/17/2008 4:23:23 PM
thanks all for the great input. I appreciate it.

"James" <noone[ at ]nowhere.com> wrote in message
news:%230IcIBqRJHA.5344[ at ]TK2MSFTNGP06.phx.gbl...
[Quoted Text]
>I was putting a space after y in: echo y | cacls...
>
> echo y| cacls... without the space works, of course :)
>
> regardless, still interested in hearing about others experience using this
> and/or wmi for scripting ntfs permission managment tasks. I have not
> looked into the wmi route but do recall an example somewhere that looked
> overly complicated for the goal at hand... I'm thinking cacls is much
> simpler, with the only negative being I need to shell out from wsh.
>
> thanks
>
> "James" <noone[ at ]nowhere.com> wrote in message
> news:Or$atypRJHA.4772[ at ]TK2MSFTNGP06.phx.gbl...
>> cacls or wmi for managing ntfs permissions?
>>
>> I was going to go with cacls but having an issue using 'echo y |
>> cacls...' command? my cacls command is good, it works until I try to echo
>> y into it so it can go without user interaction. Anyone know whats up
>> with that?
>>
>> how is wmi for this? haven't looked yet, just looking for others opinions
>> based on their experiences using either of these
>>
>> thanks
>>
>
>


Re: managing NTFS permissions - cacls or wmi?
"David" <David[ at ]nospam.goodwinpictures.com> 11/19/2008 9:11:22 PM
we use the following in a bacth file during our initial image building to
set it up.

xcacls.vbs c:\temp /t /e /g BUILTIN\USERS:F /E /I ENABLE
xcacls.vbs c:\temp /t /e /g "domain\DOMAIN USERS":F /E /I ENABLE

"James" <noone[ at ]nowhere.com> wrote in message
news:%230IcIBqRJHA.5344[ at ]TK2MSFTNGP06.phx.gbl...
[Quoted Text]
>I was putting a space after y in: echo y | cacls...
>
> echo y| cacls... without the space works, of course :)
>
> regardless, still interested in hearing about others experience using this
> and/or wmi for scripting ntfs permission managment tasks. I have not
> looked into the wmi route but do recall an example somewhere that looked
> overly complicated for the goal at hand... I'm thinking cacls is much
> simpler, with the only negative being I need to shell out from wsh.
>
> thanks
>
> "James" <noone[ at ]nowhere.com> wrote in message
> news:Or$atypRJHA.4772[ at ]TK2MSFTNGP06.phx.gbl...
>> cacls or wmi for managing ntfs permissions?
>>
>> I was going to go with cacls but having an issue using 'echo y |
>> cacls...' command? my cacls command is good, it works until I try to echo
>> y into it so it can go without user interaction. Anyone know whats up
>> with that?
>>
>> how is wmi for this? haven't looked yet, just looking for others opinions
>> based on their experiences using either of these
>>
>> thanks
>>
>
>

Home | Search | Terms | Imprint Contact
Newsgroups Reader - provided by WiredBox.Net
Suche nach Orten, Städten, Postleitzahlen, Vorwahlen, Kfz-Kennzeichen