【发布时间】:2014-02-18 02:10:28
【问题描述】:
我们正试图将一个 exe 的访问权限限制在一组用户中。
默认情况下,管理员也继承了访问权限。
如何删除对管理员的继承权并仅提供对用户组名称的访问权限,例如“特殊日志管理员”?
【问题讨论】:
-
这个问题应该是关于Serverfault的。使用 Applocker。
标签: batch-file powershell powershell-2.0 acl
我们正试图将一个 exe 的访问权限限制在一组用户中。
默认情况下,管理员也继承了访问权限。
如何删除对管理员的继承权并仅提供对用户组名称的访问权限,例如“特殊日志管理员”?
【问题讨论】:
标签: batch-file powershell powershell-2.0 acl
看看这里http://technet.microsoft.com/en-us/library/ff730951.aspx和这里https://www.angryadmin.co.uk/?p=425
$colRights = [System.Security.AccessControl.FileSystemRights]"FullControl"
$InheritanceFlag = [System.Security.AccessControl.InheritanceFlags]::None
$PropagationFlag = [System.Security.AccessControl.PropagationFlags]::None
$objType =[System.Security.AccessControl.AccessControlType]::Allow
$objUser = New-Object System.Security.Principal.NTAccount("BUILTIN\Users")
$objACE = New-Object System.Security.AccessControl.FileSystemAccessRule `
($objUser, $colRights, $InheritanceFlag, $PropagationFlag, $objType)
$objACL = Get-ACL "C:\Scripts\Test.ps1"
$objACL.AddAccessRule($objACE)
#!!!Remove the parent folder inheritance and don't copy the previously inherited permissions.
$objAcl.SetAccessRuleProtection($true,$false)
Set-ACL "C:\Scripts\Test.ps1" $objACL
【讨论】: