windows 本地安全策略脚本
声明:本页面是StackOverFlow热门问题的中英对照翻译,遵循CC BY-SA 4.0协议,如果您需要使用它,必须同样遵循CC BY-SA许可,注明原文地址和作者信息,同时你必须将它归于原作者(不是我):StackOverFlow
原文地址: http://stackoverflow.com/questions/2910978/
Warning: these are provided under cc-by-sa 4.0 license. You are free to use/share it, But you must attribute it to the original authors (not me):
StackOverFlow
script for Local Security Policy
提问by gates
I'm looking for some guidance on how to automat applying a set of permissions withn the local security policy to a multiple users on multiple servers.
我正在寻找有关如何自动将一组权限和本地安全策略应用于多个服务器上的多个用户的指南。
For example, via a script, I want to apply "act as part of the operating system" and "adjust memoroy quotas for a process" to user TEST1 and TEST2.
例如,通过脚本,我想对用户 TEST1 和 TEST2 应用“作为操作系统的一部分”和“调整进程的内存配额”。
Any feedback on how to get started would be appreciated. thanks!
任何关于如何开始的反馈将不胜感激。谢谢!
回答by Jeff McJunkin
From a command line, the Microsoft-provided solution is secedit. AppDeploy is a great resource for packaging in general, and they have a good page on secedit here: http://www.osdeploy.com/tips/detail.asp?id=23
从命令行,Microsoft 提供的解决方案是 secedit。AppDeploy 是一个很好的打包资源,他们在 secedit 上有一个很好的页面:http: //www.osdeploy.com/tips/detail.asp?id=23
In short, change your policies using the Local Security Settings MMC snap-in, then export with secedit as in this page (http://www.webservertalk.com/message534715.html-- also assuming this computer isn't a member of a domain), then import as usual.
简而言之,使用本地安全设置 MMC 管理单元更改您的策略,然后使用本页中的 secedit 导出(http://www.webservertalk.com/message534715.html- 还假设这台计算机不是域),然后照常导入。
Is this machine domain joined? If so, you'll need to make sure no domain policies are applied. Otherwise the domain policies will be exported along with the local ones.
这台机器域加入了吗?如果是这样,您需要确保没有应用域策略。否则域策略将与本地策略一起导出。
回答by sherbang
Simpler answer here:
更简单的答案在这里:
Scripting Local Security Policy
Use ntrights.exe from the Windows 2003 Resource Kit.
使用 Windows 2003 Resource Kit 中的 ntrights.exe。
However, this doesn't seem to help with the "adjust memory quotas for a process" right.
但是,这似乎对“调整进程的内存配额”权利没有帮助。