AD LDS 上下文密码间歇性重置
使用 C# 中的 DirectoryServices.AccountManagement 库,我建立了一个 PrimaryContext,然后使用该上下文来验证用户。
看来我用来建立上下文的用户名正在间歇性地损坏/重置,或者其他原因正在导致上下文的建立失败。
使用 ADSIEdit 手动重置密码后,我可以正常建立上下文。
我正在建立上下文,如下所示:
PrincipalContext ldsUserContext = 新的PrincipalContext( ContextType.ApplicationDirectory, “[服务器名称]:389”, “CN=用户,CN=XXX,O=XXX”, ContextOptions.SimpleBind, "CN=[用户名],CN=人员,CN=XXX,O=XXX", “[密码]”);
然后我使用 ValidateCredentials,如下所示:
context.ValidateCredentials("CN=[登录名],CN=USERS,CN=XXX,O=XXX",[用户密码],ContextOptions.SimpleBind)
目前大约有 15 个用户每天登录大约 5 次。每次问题发生之间可能相隔数天或数月。
关于可能发生的事情有什么想法吗?
谢谢,
马特
Using the DirectoryServices.AccountManagement library in C#, I am establishing a PrincipalContext, then using that context to validate users.
It seems that the username with which I am establishing the context is being intermittently corrupted/reset or something else is going on causing the establishing of context to fail.
After manually resetting the password to using ADSIEdit, I am able to establish context as normal.
I am establishing context as shown:
PrincipalContext ldsUserContext = new PrincipalContext(
ContextType.ApplicationDirectory,
"[servername]:389",
"CN=USERS,CN=XXX,O=XXX",
ContextOptions.SimpleBind,
"CN=[username],CN=PEOPLE,CN=XXX,O=XXX",
"[password]");
I then use ValidateCredentials as shown:
context.ValidateCredentials("CN=[login],CN=USERS,CN=XXX,O=XXX", [userpassword], ContextOptions.SimpleBind)
There are currently around 15 users logging in around 5 times each during the day. There can be days or months between each occurrence of the problem.
Any ideas as to what might be going on?
Thanks,
Matt
如果你对这篇内容有疑问,欢迎到本站社区发帖提问 参与讨论,获取更多帮助,或者扫码二维码加入 Web 技术交流群。
绑定邮箱获取回复消息
由于您还没有绑定你的真实邮箱,如果其他用户或者作者回复了您的评论,将不能在第一时间通知您!
发布评论
评论(1)
您是否检查过该帐户是否被入侵者锁定?即有人正在对该帐户进行随机密码猜测尝试。这会将其锁定,因此您无法登录。
我不确定的是,通过 ADSI 编辑更改密码是否会重置帐户锁定时间。
Have you looked to see if the account is getting intruder locked? I.e. Someone is making random password guess attempts against the account. This locks it, and thus you cannot log in.
What I am not sure of, is if a Password change via ADSI Edit will reset the accountLockout time.