Modifying permissions with XCACLS.vbs

Modifying permissions with XCACLS.vbs

Secure Home | Search | About
 Microsoft Applications Security    Post an article   get this group's latest topics as an RSS feed add this group's latest topics to your My MSN content add this group's latest topics to your My Yahoo content add this group's latest topics to your Google content
Subject Author Date
Modifying permissions with XCACLS.vbs Adam Sandler 02-07-2008
Posted by Adam Sandler on February 7, 2008, 10:45 pm
If you were  Registered and logged in, you could reply and use other advanced thread options
Hello,

I have a question about running XCACLS.vbs. I'm trying to change
folder permissions but I'm not using the built-in security groups - I
want to use domain groups; specifically domain admins and domain
users.

I read online that if one uses SID# in place if a group name then that
should work.

I call XCACLS. from a batch file. A sample of my existing (and
currently working as expected) file looks like this:
cscript xcacls.vbs "C:\WINDOWS\regedit.exe" /G Administrators:F

cscript xcacls.vbs "C:\WINDOWS\regedit.exe" /E /G SYSTEM:F

Additionally, I read that the domain SID can be found in
HKEY_LOCAL_MACHINE\SOFTWARE\Microsoft\Windows NT\CurrentVersion
\ProfileList. I also read the SIDs for domain admins and domain users
are:

SID: S-1-5-domain-512
Name: Domain Admins

SID: S-1-5-domain-513
Name: Domain Users

So, armed with this information I took the two lines above and tried
to do this:

cscript xcacls.vbs "C:\Temp" /G
SID#S-1-5-21-131504274-120818031-269197707-1108-512:F

cscript xcacls.vbs "C:\Temp" /E /G
SID#S-1-5-21-131504274-120818031-269197707-1108-513:F

It didn't work. While I didn't get a script engine error or anything,
when I checked the permissions on that folder, all the entries were
gone - it was a blank display.

How can I modify the permissions to use domain admins and users?
Suggestions are greatly appreciated.

Thanks!










Posted by Roger Abell [MVP] on February 8, 2008, 12:41 am
If you were  Registered and logged in, you could reply and use other advanced thread options
Hi Adam

I think you may be taking the long road, as instead of resorting to
naming principals with SIDs you can just quote their display name
if it contain spaces. For example
xcacls.vbs c:\temp /g "yourdomain\domain admins":f
of course replacing "yourdomain" and notice also that the target
folder/file does not need to be quoted if it contains no whitespace.

Roger

> Hello,
>
> I have a question about running XCACLS.vbs. I'm trying to change
> folder permissions but I'm not using the built-in security groups - I
> want to use domain groups; specifically domain admins and domain
> users.
>
> I read online that if one uses SID# in place if a group name then that
> should work.
>
> I call XCACLS. from a batch file. A sample of my existing (and
> currently working as expected) file looks like this:
> cscript xcacls.vbs "C:\WINDOWS\regedit.exe" /G Administrators:F
>
> cscript xcacls.vbs "C:\WINDOWS\regedit.exe" /E /G SYSTEM:F
>
> Additionally, I read that the domain SID can be found in
> HKEY_LOCAL_MACHINE\SOFTWARE\Microsoft\Windows NT\CurrentVersion
> \ProfileList. I also read the SIDs for domain admins and domain users
> are:
>
> SID: S-1-5-domain-512
> Name: Domain Admins
>
> SID: S-1-5-domain-513
> Name: Domain Users
>
> So, armed with this information I took the two lines above and tried
> to do this:
>
> cscript xcacls.vbs "C:\Temp" /G
> SID#S-1-5-21-131504274-120818031-269197707-1108-512:F
>
> cscript xcacls.vbs "C:\Temp" /E /G
> SID#S-1-5-21-131504274-120818031-269197707-1108-513:F
>
> It didn't work. While I didn't get a script engine error or anything,
> when I checked the permissions on that folder, all the entries were
> gone - it was a blank display.
>
> How can I modify the permissions to use domain admins and users?
> Suggestions are greatly appreciated.
>
> Thanks!
>
>
>
>
>
>
>
>
>



Similar ThreadsPosted
Restore file permissions using xcacls.exe October 25, 2005, 8:15 am
XCACLS.VBS and error March 5, 2008, 12:55 pm
Permissions January 4, 2006, 12:34 pm
Permissions July 6, 2006, 9:40 am
Permissions question August 22, 2005, 6:05 pm
NTFS Permissions September 12, 2005, 8:49 am
file permissions October 10, 2005, 12:30 pm
HiJackThis will not run? Permissions? November 11, 2005, 2:16 am
Dropbox permissions December 13, 2005, 5:17 pm
NTFS Permissions January 30, 2006, 5:33 am

The site map in XML format XML site map

Contact Us | Privacy Policy