Windows 2008 R2 TS打印机安全 – 不能采取owership

我有安装了terminal服务器angular色的Windows 2008 R2服务器。 我看到服务器上的本地打印机操作员组的成员普通用户遇到问题。

如果用户使用“以pipe理员身份运行”打开cmd窗口,则可以运行printmanager.msc而无需再次input密码。 在打印pipe理者中,他们可以毫无问题地改变redirect(易打印)打印机的所有权。

如果从同一个cmd窗口,他们使用subinacl尝试和更改队列的onwership自己他们得到访问被拒绝:

>subinacl.exe /printer "_#MyPrinter (2 redirected)" /setowner="MyDom\MyUsr" Elapsed Time: 00 00:00:00 Done: 1, Modified 0, Failed 1, Syntax errors 0 Last Done : _#MyPrinter (2 redirected) Last Failed: _#MyPrinter (2 redirected) - OpenPrinter Error : 5 Access denied 

所以,相同的背景下,同样的行动,但一个工作,一个不。 任何想法这种奇怪的行为?

我在x64服务器上使用subinacl x86,因为我找不到任何更新的东西。 我试过icacls和其他人,但无法让他们做任何事情与打印机。

编辑:格雷格关于setacl下面的意见后添加

如果我以Testusr身份login到TS服务器并打开pipe理工具>打印机pipe理员(以pipe理员身份),然后键入mydomain \ testusr和testusr的密码,则可以更改打印机队列的所有权,并将testusr设置为所有者。

但是,如果我以pipe理员身份打开cmd,并且当我尝试更改redirect的打印机的所有权时,再次inputmydomain \ testusr和用户密码,我会得到以下内容:

 C:\>setacl -on "Bullzip PDF Printer (12 redireccionado)" -ot prn -actn setowner -ownr n:mydom\testusr WARNING: Privilege 'Back up files and directories' could not be enabled. SetACL's powers are restricted. WARNING: Privilege 'Restore files and directories' could not be enabled. SetACL's powers are restricted. INFORMATION: Processing ACL of: <Bullzip PDF Printer (12 redireccionado)> ERROR: Enabling the privilege SeTakeOwnershipPrivilege failed with: No todos los privilegios o grupos a los que se hace referencia son asignados al llamador. [meaning not all referenced privs or groups are assigned to the caller] SetACL finished with error(s): SetACL error message: A privilege could not be enabled 

也许我得到了一些错误,但如果内置的Windows工具可以做到“打印操作员”组的成员,那么setacl应该也可以,不是吗?

然而,setacl似乎取决于其他特权,实际上并不需要这样做。

也许你可以使用setprinter工具(setprinter -examples 3)设置安全性.SetPrinter用于2003,但也适用于2008 R2。

除非是pipe理员,否则Windows通常不会将用户的所有权更改为pipe理员以外的任何对象(或者如果他们对对象具有获取所有权的权限),或者他们有一些特殊的Windows用户权限(您不应该授予)。

我会推测七年的x86版本的subinacl.exe在升级过程中无法正常使用安全令牌。

几点build议:

尝试使用更新版本的subinacl,5.2.3790.1180,可在:

http://www.microsoft.com/downloads/en/details.aspx?FamilyID=e8ba3e56-d8fe-4a91-93cf-ed6985e3927b

尝试使用免费的SetAcl.exe实用程序。 这是权限pipe理工具的瑞士军队厨房水槽,包括一个x64版本。 这是一个活跃的项目,包括微软实用程序中缺less的许多function。

http://helgeklein.com/setacl/

文档:

http://helgeklein.com/setacl/documentation/command-line-version-setacl-exe/
http://helgeklein.com/setacl/examples/managing-printer-service-and-share-permissions-with-setacl-exe/

用法示例:

 setacl -on "Printer Name" -ot prn -actn setowner -ownr n:domainNetbiosName\userName