Solved

change the security permission of some files and directories to “Everyone - Full Control”.

Posted on 2003-11-27
2
360 Views
Last Modified: 2013-12-04
I need to change the security permission of some files and directories to “Everyone - Full Control”.
I have the cacls command (“cacls c:\mydir\*.* /e /g everyone:f”) but the problem is that on some OS the Everyone group has a different name (like "Jeder" in German OS).
I need a command that can make this change without using the “everyone” word.

0
Comment
Question by:igalb
  • 2
2 Comments
 
LVL 82

Accepted Solution

by:
oBdA earned 250 total points
Comment Utility
The "Everyone" group is a "well known group" with the SID S-1-1-0. You can use this information to extract the localized name.
Get SIDtoName.exe from Joeware.net:
http://www.joeware.net/win32/index.html
Then use a script like the following to set your permission; it's currently in test mode, it will only display the "cacls" command.

====8<----[Everyone.cmd]----
@echo off
setlocal
:: *** Retrieve the localized name of the "Everyone" group using sidtoname.exe:
for /f "tokens=2 delims=\" %%a in ('sidtoname.exe S-1-1-0 2^>NUL ^| find "[WellKnownGroup]"') do set Everyone=%%a
echo The local name of the Everyone group is %Everyone%.

:: *** Test mode: Remove the "ECHO" in fron of the next line to "arm" the script
ECHO cacls c:\mydir\*.* /e /g %Everyone%:f
====8<----[Everyone.cmd]----
0
 
LVL 82

Expert Comment

by:oBdA
Comment Utility
May I ask for the reason of the "C"?

What's the right grade to give?
http://www.experts-exchange.com/help.jsp#hi73
0

Featured Post

Threat Intelligence Starter Resources

Integrating threat intelligence can be challenging, and not all companies are ready. These resources can help you build awareness and prepare for defense.

Join & Write a Comment

Many people tend to confuse the function of a virus with the one of adware, this misunderstanding of the basic of what each software is and how it operates causes users and organizations to take the wrong security measures that would protect them ag…
Our Group Policy work started with Small Business Server in 2000. Microsoft gave us an excellent OU and GPO model in subsequent SBS editions that utilized WMI filters, OU linking, and VBS scripts. These are some of experiences plus our spending a lo…
Illustrator's Shape Builder tool will let you combine shapes visually and interactively. This video shows the Mac version, but the tool works the same way in Windows. To follow along with this video, you can draw your own shapes or download the file…
Access reports are powerful and flexible. Learn how to create a query and then a grouped report using the wizard. Modify the report design after the wizard is done to make it look better. There will be another video to explain how to put the final p…

762 members asked questions and received personalized solutions in the past 7 days.

Join the community of 500,000 technology professionals and ask your questions.

Join & Ask a Question

Need Help in Real-Time?

Connect with top rated Experts

9 Experts available now in Live!

Get 1:1 Help Now