【发布时间】:2018-10-11 15:02:09
【问题描述】:
我们试图为使用 Chef 的客户端提供管理 Windows 2012 服务器的解决方案,但不幸的是,由于 Chef::Exceptions::WindowsNotAdmin: can not get the security information for <some_file> due to missing Administrator privileges 异常,chef-client 运行失败。
这有点奇怪,因为我们已经确认我们用来远程管理服务器的域帐户是管理员组的成员。我们能够使用它来管理同一域中的其他服务器。此外,当我们通过远程桌面使用域帐户连接到服务器,以管理员身份启动 PowerShell 并启动 chef-client 运行时,它失败并出现同样的异常。
运行以下命令表明域帐户确实是管理员组的成员。这可以通过群里的SID来验证。
Get-WmiObject -Class Win32_UserAccount
Get-WmiObject -Class Win32_Group
[System.Security.Principal.WindowsIdentity]::GetCurrent().Groups
不确定服务器上的哪些设置可能导致此问题。
【问题讨论】:
标签: windows powershell chef-infra