For W2k the initial, install defaults for the security ACLs on reg vals,
folders, files, services, etc. are contained in the file setup security.inf
to be found in your c:\WINNT\security\templates folder.
If you look in this text file with notepad you will see many
lines in the [File Security] section that look like
8="c:\winnt", 2,
"D
(A;CIOI;GRGX;;;BU)(A;CIOI;GRGWGXSD;;;PU)(A;CIOI;GA;;;BA)(A;CIOI;GA;;;SY)
(A;CIOI;GA;;;CO)(A;;GRGX;;;WD)"
The third and last of these is a string representation of an ACL
in a syntax called SDDL (security descriptor definition language,
about which you could search in msdn.microsoft.com for info)
The way to view what the settings actual mean is to
start / run mmc
and then under the file drop menu select to add/remove snapin
and then add to locate the Security Templates snapin.
Then, with an mmc console where you can look at templates
(these .inf files) you can open the template and see the settings
there translated into groups and the associated grants and also
inheritance. You would be snart to make a copy and do this on
the copy - as that would give you room to play.
In the SDDL above for the initial W2k permissions on winnt
dir, the initial D: means this part is the dacl (access rather than
audit ACL), the first () in it is (A;CIOI;GRGX;;;BU) which is
the spec for one ACE in the ACL, which A: Allows to Users
(the BU for built-in Users) generic read and generic execute
(the GRGX). The CIOI are specifying the inheritance attributes
of this ACE. The other principals in the remaining ACEs of
this ACL spec are PU=Power Users, BA=built-in Administrators,
SY=System, CO=Creator Owner, and WD=Everyone (aka world).
With the Security Templates snap-in it is not possible to change
the state of the running system. To do that one uses the Security
Configuration and Analysis snap-in, into which one Imports the
template (use caution, always Analyze first and consider before
doing an Apply).
If you wanted to alter all of these so that instead of granting to
Users the same would instead be granted to CustomGroup,
what one could do is
1. obtain the SID of CustomGroup
2. make a copy of this inf file, and trim out all sections except
those that you want to impact, for example trim out all except
for [File Security] (note: leave the intial header part, that is,
the [Unicode] and [Version] parts, and do not overlook removing
the seciton [Service General Setting] following files section)
3. do a global replace of BU with the SID of CustomGroup
When this altered template is applied, everyplace that there is a
grant to Users in the filesystem due to the original template's use
during intall will instead have the same grant made to CustomGroup
instead (the grant to Users will be gone). To reverse this, one
would import and apply the original template's [File Security] section.