Page 1 of 1 1
Topic Options
#159409 - 2006-03-19 09:56 PM ADD Everyone to a Folder and give Full Rights
Dmartin05 Offline
Fresh Scripter

Registered: 2006-02-01
Posts: 49
Hey All,

I am trying to either run a script that will do the following:

There is a specific folder called C:\SmrtClin on all of my computers on the network(About 30 pc's), That I need to add the everyone group to this machine and give it full control. Is there a way that I could do this through a kix script?

Thanks in advance:

Top
#159410 - 2006-03-19 10:16 PM Re: ADD Everyone to a Folder and give Full Rights
Les Offline
KiX Master
*****

Registered: 2001-06-11
Posts: 12734
Loc: fortfrances.on.ca
Yes.
Search the board for CACLS.
_________________________
Give a man a fish and he will be back for more. Slap him with a fish and he will go away forever.

Top
#159411 - 2006-03-19 10:21 PM Re: ADD Everyone to a Folder and give Full Rights
Co Offline
MM club member
***

Registered: 2000-11-20
Posts: 1342
Loc: NL
This is VBS but I'm sure you can translate it to Kix...

How to use Xcacls.vbs to modify NTFS permissions

Good luck!
_________________________
Co


Top
#159412 - 2006-03-19 10:39 PM Re: ADD Everyone to a Folder and give Full Rights
Les Offline
KiX Master
*****

Registered: 2001-06-11
Posts: 12734
Loc: fortfrances.on.ca
Quote:

but I'm sure you can translate it to Kix...



PFFT!
For 30 PCs, it would be less work to sneakernet it than translate it.
_________________________
Give a man a fish and he will be back for more. Slap him with a fish and he will go away forever.

Top
#159413 - 2006-03-19 10:43 PM Re: ADD Everyone to a Folder and give Full Rights
Co Offline
MM club member
***

Registered: 2000-11-20
Posts: 1342
Loc: NL
Thru, If they are in the same building...
_________________________
Co


Top
#159414 - 2006-03-19 10:50 PM Re: ADD Everyone to a Folder and give Full Rights
Mart Moderator Offline
KiX Supporter
*****

Registered: 2002-03-27
Posts: 4673
Loc: The Netherlands
There is also an exe version xcacls.
Xcacls.exe @ Microsoft

Code:

XCACLS filename [/T] [/E|/X] [/C] [/G user:perm;spec] [/R user [...]]
[/P user:perm;spec [...]] [/D user [...]] [/Y]

Description:
Displays or modifies access control lists (ACLs) of files.

Parameter List:
filename Displays ACLs.

/T Changes ACLs of specified files in
the current directory and all subdirectories.

/E Edits ACL instead of replacing it.

/X Same as /E except it only affects the ACEs that
the specified users already own.

/C Continues on access denied errors.

/G user:perm;spec Grants specified user access rights.

Perm can be:
R Read
C Change (write)
F Full control
P Change Permissions (Special access)
O Take Ownership (Special access)
X EXecute (Special access)
E REad (Special access)
W Write (Special access)
D Delete (Special access)

Spec can be the same as perm and will only be
applied to a directory. In this case, Perm
will be used for file inheritance in this
directory. By default, Spec=Perm.
Special values for Spec only:
T Valid for only for directories.
At least one access right has to
follow. Entries between ';' and T
will be ignored.

/R user Revokes specified user's access rights.

/P user:perm;spec Replaces specified user's access rights.
Access right specification as same as
/G option.

/D user Denies specified user access.

/Y Replaces user's rights without verify.

NOTE:
Wildcards can be used to specify more than one file.
More than one user can be specified.
Access rights can be combined.

Examples:
XCACLS /?
XCACLS TEMP.DOC /G ADMINISTRATOR:RC
XCACLS *.TXT /G ADMINISTRATOR:RC /Y
XCACLS *.* /R ADMINISTRATOR /Y
XCACLS TEST.DLL /D ADMINISTRATOR /Y
XCACLS TEST.DLL /P ADMINISTRATOR:F /Y
XCACLS *.* /G ADMINISTRATOR:F;TRW /Y
XCACLS *.* /G ADMINISTRATOR:F;TXE /C /Y

_________________________
Mart

- Chuck Norris once sold ebay to ebay on ebay.

Top
#159415 - 2006-03-19 10:59 PM Re: ADD Everyone to a Folder and give Full Rights
Mart Moderator Offline
KiX Supporter
*****

Registered: 2002-03-27
Posts: 4673
Loc: The Netherlands
!! WATCH OUT NOT TESTED COULD SCREW UP PRIVILEGES PLEASE TEST FIRST BEFORE USE !!

Something like this could work.

Code:

Shell @SCRIPTDIR + '\xcacls.exe C:\SmrtClin /t /c /g "PUT THE GROUPNAME HERE":F /y'

_________________________
Mart

- Chuck Norris once sold ebay to ebay on ebay.

Top
#159416 - 2006-03-19 11:02 PM Re: ADD Everyone to a Folder and give Full Rights
Lonkero Administrator Offline
KiX Master Guru
*****

Registered: 2001-06-05
Posts: 22346
Loc: OK
yes, xcacls, the real one is exe.
_________________________
!

download KiXnet

Top
#159417 - 2006-03-20 05:30 AM Re: ADD Everyone to a Folder and give Full Rights
NTDOC Administrator Offline
Administrator
*****

Registered: 2000-07-28
Posts: 11634
Loc: Space
Quote:

everyone group




Sorry, but I have to disagree with this.

1. You should never give any user or group FULL rights
(unless you fully understand why you're giving those rights)
You should give MODIFY rights instead.

2. You do realize that EVERYONE, means EVERYONE even users from another system if they can some how get onto your system. Perhaps a better group would be Domain Users or at least Authenticated Users, those groups at least require that the user be trusted from your Domain or trusts there of. The guest account should be disabled, but you will find that some admins seem to ignore this. Guests are a member of the Everyone group, but not the Authenticated or Domain Users groups.

As for your desire to give permissions I'd probably use XCACLS.exe to modify a bunch of systems and assign a specific group that you can control the membership.
As in your case you don't need to worry about any foler inheritence ACL issues.

XCACLS.exe
http://www.ss64.com/nt/xcalcs.html

 

Top
#159418 - 2006-03-20 06:19 AM Re: ADD Everyone to a Folder and give Full Rights
Co Offline
MM club member
***

Registered: 2000-11-20
Posts: 1342
Loc: NL
Maybe he means Share permissions. Lots of admins didn't change the Everyone Full control permissions at NT/W2K systems.
_________________________
Co


Top
#159419 - 2006-03-20 07:00 AM Re: ADD Everyone to a Folder and give Full Rights
NTDOC Administrator Offline
Administrator
*****

Registered: 2000-07-28
Posts: 11634
Loc: Space
Well agreed that the share permissions are not as critical, but those should not have EVERYONE either in order to maintain better security.

It should be CHANGE and specific Groups only.

The wide spread of worms is often due to this EVERYONE on Shares lack of security. Using specific groups helps to prevent things like that.

Setting up proper SHARE and NTFS permissions would be considered a best practice regardless of how easy it is to just leave the stupid defaults.

Top
#159420 - 2006-03-20 07:56 AM Re: ADD Everyone to a Folder and give Full Rights
Co Offline
MM club member
***

Registered: 2000-11-20
Posts: 1342
Loc: NL
Doc I'm totally on your side but I was wondering why Dmartin05 needs these permissions...

Edited by Co (2006-03-20 07:56 AM)
_________________________
Co


Top
Page 1 of 1 1


Moderator:  Jochen, Allen, Radimus, Glenn Barnas, ShaneEP, Ruud van Velsen, Arend_, Mart 
Hop to:
Shout Box

Who's Online
0 registered and 837 anonymous users online.
Newest Members
fgarcia, Viginette, ManuvdWielNL, Sir_Barrington, batdk82
17889 Registered Users

Generated in 0.059 seconds in which 0.022 seconds were spent on a total of 12 queries. Zlib compression enabled.

Search the board with:
superb Board Search
or try with google:
Google
Web kixtart.org