PC Review


Reply
Thread Tools Rate Thread

Automating file permission amendments ?

 
 
BertieBigBollox@gmail.com
Guest
Posts: n/a
 
      5th Sep 2006
Trying to lock down a windows 2000 server machine so that the end user
does not have access to certain facilites (e.g. regedit).

Unfortunately, we've tried deleting the files in question, but Windows
File Protection replaces them. On SP4, its also a little difficult to
disable this.

So, another idea is to change the permissions on the files so that only
admin has access (end user does not have admin access). Will this work?
Or will WFP change the access rights back as well?

If we can do this, is there any way to automate setting, say, 20 files
to these permissions without having to manually change the permissions
individually? Like a batch file or something? (Got lots of machines to
do).

 
Reply With Quote
 
 
 
 
Pegasus \(MVP\)
Guest
Posts: n/a
 
      5th Sep 2006

<(E-Mail Removed)> wrote in message
news:(E-Mail Removed)...
> Trying to lock down a windows 2000 server machine so that the end user
> does not have access to certain facilites (e.g. regedit).
>
> Unfortunately, we've tried deleting the files in question, but Windows
> File Protection replaces them. On SP4, its also a little difficult to
> disable this.
>
> So, another idea is to change the permissions on the files so that only
> admin has access (end user does not have admin access). Will this work?
> Or will WFP change the access rights back as well?
>
> If we can do this, is there any way to automate setting, say, 20 files
> to these permissions without having to manually change the permissions
> individually? Like a batch file or something? (Got lots of machines to
> do).
>


Windows File Protection runs most likely under the System account,
hence if you include this account in your permissions you won't
cause a problem.

@echo off
cacls %SystemRoot%\system32\regedit.exe /e /r "domain users" /d SomeUser /g
system:F
cacls %SystemRoot%\system32\eventvwr.exe /e /r "domain users" /d SomeUser /g
system:F
etc.

You have to check your current permissions to come up with
the correct switches. When you get it right, run the batch file
from your own machine, using psexec.exe (www.sysinternals.com).


 
Reply With Quote
 
BertieBigBollox@gmail.com
Guest
Posts: n/a
 
      5th Sep 2006

Pegasus (MVP) wrote:
> <(E-Mail Removed)> wrote in message
> news:(E-Mail Removed)...
> > Trying to lock down a windows 2000 server machine so that the end user
> > does not have access to certain facilites (e.g. regedit).
> >
> > Unfortunately, we've tried deleting the files in question, but Windows
> > File Protection replaces them. On SP4, its also a little difficult to
> > disable this.
> >
> > So, another idea is to change the permissions on the files so that only
> > admin has access (end user does not have admin access). Will this work?
> > Or will WFP change the access rights back as well?
> >
> > If we can do this, is there any way to automate setting, say, 20 files
> > to these permissions without having to manually change the permissions
> > individually? Like a batch file or something? (Got lots of machines to
> > do).
> >

>
> Windows File Protection runs most likely under the System account,
> hence if you include this account in your permissions you won't
> cause a problem.
>
> @echo off
> cacls %SystemRoot%\system32\regedit.exe /e /r "domain users" /d SomeUser /g
> system:F
> cacls %SystemRoot%\system32\eventvwr.exe /e /r "domain users" /d SomeUser /g
> system:F
> etc.
>
> You have to check your current permissions to come up with
> the correct switches. When you get it right, run the batch file
> from your own machine, using psexec.exe (www.sysinternals.com).


Thansk for the help.

Could I use :-

cacls <filename> /d <groupname>

or do I have to specify exact user name?

Can u use wildcards to specify ALL users ?

 
Reply With Quote
 
Pegasus \(MVP\)
Guest
Posts: n/a
 
      5th Sep 2006

<(E-Mail Removed)> wrote in message
news:(E-Mail Removed)...
>
> Pegasus (MVP) wrote:
> > <(E-Mail Removed)> wrote in message
> > news:(E-Mail Removed)...
> > > Trying to lock down a windows 2000 server machine so that the end user
> > > does not have access to certain facilites (e.g. regedit).
> > >
> > > Unfortunately, we've tried deleting the files in question, but Windows
> > > File Protection replaces them. On SP4, its also a little difficult to
> > > disable this.
> > >
> > > So, another idea is to change the permissions on the files so that

only
> > > admin has access (end user does not have admin access). Will this

work?
> > > Or will WFP change the access rights back as well?
> > >
> > > If we can do this, is there any way to automate setting, say, 20 files
> > > to these permissions without having to manually change the permissions
> > > individually? Like a batch file or something? (Got lots of machines to
> > > do).
> > >

> >
> > Windows File Protection runs most likely under the System account,
> > hence if you include this account in your permissions you won't
> > cause a problem.
> >
> > @echo off
> > cacls %SystemRoot%\system32\regedit.exe /e /r "domain users" /d SomeUser

/g
> > system:F
> > cacls %SystemRoot%\system32\eventvwr.exe /e /r "domain users" /d

SomeUser /g
> > system:F
> > etc.
> >
> > You have to check your current permissions to come up with
> > the correct switches. When you get it right, run the batch file
> > from your own machine, using psexec.exe (www.sysinternals.com).

>
> Thansk for the help.
>
> Could I use :-
>
> cacls <filename> /d <groupname>
>
> or do I have to specify exact user name?
>
> Can u use wildcards to specify ALL users ?
>


You can use user names or group names.
Wildcards are not acceptable.
"Everyone" is a valid group.


 
Reply With Quote
 
BertieBigBollox@gmail.com
Guest
Posts: n/a
 
      5th Sep 2006
> You can use user names or group names.
> Wildcards are not acceptable.
> "Everyone" is a valid group.


Thanks one again.

So could I deny "Everyone" access and then explicitly grant access to a
user called "admin" (or by denying everyone I'd lose the right to
change permissions for all users including admin ?)

 
Reply With Quote
 
Pegasus \(MVP\)
Guest
Posts: n/a
 
      5th Sep 2006

<(E-Mail Removed)> wrote in message
news:(E-Mail Removed)...
> > You can use user names or group names.
> > Wildcards are not acceptable.
> > "Everyone" is a valid group.

>
> Thanks one again.
>
> So could I deny "Everyone" access and then explicitly grant access to a
> user called "admin" (or by denying everyone I'd lose the right to
> change permissions for all users including admin ?)
>


Denying access to "everyone" is not a good idea, for
the reasons you mention. You can actually recover
from this situation by seizing ownership of the folder.


 
Reply With Quote
 
 
 
Reply

Thread Tools
Rate This Thread
Rate This Thread:

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is On
HTML code is Off
Trackbacks are On
Pingbacks are On
Refbacks are Off


Similar Threads
Thread Thread Starter Forum Replies Last Post
permission denied error when automating explorer festdaddy Microsoft Excel Programming 5 26th Sep 2008 01:33 PM
TIMESTAMPING AMENDMENTS? Tim Microsoft Excel Misc 1 20th Mar 2008 06:35 PM
Track Changes Amendments =?Utf-8?B?TWFyayBX?= Microsoft Word Document Management 2 8th May 2007 01:18 PM
How give copy permission on a file without read permission Sam Windows Networking 1 19th Jan 2007 03:06 PM
Resx file amendments not working =?Utf-8?B?Sm9u?= Microsoft ASP .NET 1 12th Dec 2006 01:49 PM


Features
 

Advertising
 

Newsgroups
 


All times are GMT +1. The time now is 09:38 PM.