gpt4 book ai didi

c++ - 传递给 LogonUser() 的密码不正确,但 Active Directory 帐户未按预期锁定

转载 作者:塔克拉玛干 更新时间:2023-11-03 02:18:23 24 4
gpt4 key购买 nike

我有事件目录“登录重试次数”= 3。我们调用 LogonUser使用错误的密码运行 5 次。之后,我用正确的密码调用 LogonUser,它起作用了,用户可以登录。

为什么账户没有被锁定?

最佳答案

这取决于您如何调用 LogonUser。如果您没有通过 lpszDomain 参数或通过在 UPN format 中指定 lpszUsername 指定域名,那么您将尝试在本地计算机上登录。

在 Active Directory 服务器不可用的情况下,用于域登录的 Windows 客户端 store cached credentials。在这种情况下,缓存的凭据将允许用户登录到本地计算机。

Cached credentials are used when using domain credentials for authentication to a computer that is not connected to a domain controller. Each time a domain user logs on, the operating system generates the cached credentials and stores them in the Security hive of the operating system.

根据微软的 Account Lockout Policy Technical Overview :

Account lockout policies apply to domain accounts. Account lockout is an interaction between a client computer and a domain controller and implements the following process:

在没有看到您的代码的情况下,我怀疑登录尝试是针对本地计算机而不是域进行的。这些不计入锁定政策。这使用户可以毫无问题地登录域。

关于c++ - 传递给 LogonUser() 的密码不正确,但 Active Directory 帐户未按预期锁定,我们在Stack Overflow上找到一个类似的问题: https://stackoverflow.com/questions/16587715/

24 4 0
Copyright 2021 - 2024 cfsdn All Rights Reserved 蜀ICP备2022000587号
广告合作:1813099741@qq.com 6ren.com