使用 LogonUser 在 Windows 2008 服务器中登录用户时,LogonType LOGON32_LOGON_SERVICE 失败

使用 LogonUser 在 Windows 2008 服务器中登录用户时,LogonType LOGON32_LOGON_SERVICE 失败

我在用登录用户使用 clusterring 登录帐户到域中的 Windows 2008 R2 服务器的功能。

当使用 LOGON32_LOGON_INTERACTIVE 作为 LogonType 时,我成功登录。

当使用 LOGON32_LOGON_SERVICE 作为 LogonType 时,登录失败,EventViewer 显示:

帐户登录失败。登录类型:5

登录失败的帐户:

Security ID:        NULL SID
Account Name:       thename
Account Domain:     thedomain
Logon ID: 0x1009371c Logon Type: 5

Failure Information:
Failure Reason:     The user has not been granted the requested logon type at this machine.
Status:         0xc000015b
Sub Status:     0x0

不确定它是否适用于超级用户或 stackoverflow(从 C# 代码调用 LogonUser),但我猜测它是一些 Windows 服务器问题*。

事件 ID = 4625

编辑:发现 - 0xc000015b 用户尚未被授予此计算机上请求的登录类型(又名登录权)

编辑:应该是服务器故障问题......

答案1

好的,经过深入研究发现,在本地安全策略中,在用户权限分配下

应向使用 LOGON32_LOGON_SERVICE 登录类型登录的用户授予“作为服务登录”权限。

相关内容