检查的用户密码有效期,当密码过期在活动猪病用户密码、有效期、密码、猪病

由网友(买醉)分享简介:我工作在这样一个场景,用户密码已经过期在Active Directory中。我试图检查用户输入有效的用户名和相应有效,但已过期的密码或者没有。如果用户输入有效的用户名和正确的密码过期,我将它们重定向到一个页面,在这里,他们可以重新设置密码。但是,如果用户输入错误的密码过期,那么用户应该用标准的消息通知用户名和密码,或不...

我工作在这样一个场景,用户密码已经过期在Active Directory中。我试图检查用户输入有效的用户名和相应有效,但已过期的密码或者没有。如果用户输入有效的用户名和正确的密码过期,我将它们重定向到一个页面,在这里,他们可以重新设置密码。但是,如果用户输入错误的密码过期,那么用户应该用标准的消息通知用户名和密码,或不正确。我查了网上和他们谈论使用 validatecredentials 设置方法后的pwdLastSet -1以禁用用户下次登录时须更改密码。

I’m working in a scenario where the user password is already expired in Active Directory. I’m trying to check if the user has entered the valid username and corresponding valid but expired password or not. If the user enters the valid user name and correct expired password, I’ll be redirecting them to a page where they can reset the password. However, if the user enters wrong expired password, then the user should be notified with standard message UserName and or password is not correct. I checked online and they are talking about using validatecredentials method after setting pwdLastSet to -1 to disable user must change password at next logon.

How检查AD用户凭据,当用户密码已过期或QUOT;用户下次登录时须&QUOT更改密码;

请问这种方法可以让我来检查过期密码的有效期是多久?我试过这种方法,它似乎并没有为我工作。

Will this approach allows me to check the validity of the expired password? I tried this approach and it does not seem to be working for me.

推荐答案

是啊 - 的ValidateCredentials API给太多的误报

Yup - the ValidateCredentials API gives too many false positives.

这是是黑色艺术,但你可以检查的用户帐户控制属性并的 MS-DS-用户帐户控制计算的属性双方已密码过期位。

This is something of a black art but you can check User-Account-Control attribute and ms-DS-User-Account-Control-Computed attribute both of which have "Password Expired" bits.

我通常使用上述但有些人建议直接使用Windows API - 参见Active目录(LDAP) - 检查帐户锁定/密码过期

I normally use the above but some people suggest using the Windows API directly - refer Active Directory (LDAP) - Check account locked out / Password expired.

阅读全文

相关推荐

最新文章