简体   繁体   中英

How to check when user's password has expired in Active Directory LDS (ADAM), programmatically?

Is there a way to check whether a user's password has expired in a Active Directory Lightweight Directory Services instance? Specifically, is there a property (hopefully a boolean ) that defines whether the password expired, taking into consideration whether the user's password is past expiration date and also whether the user's password is set to expire at all (in which case it should always return false ).

We're trying to query Active Directory for this information using the DirectoryEntry API and the PrincipalContext API, but can't figure out where it is stored. Just querying the pwdLastSet won't be enough since we don't have access to the expiration period for the domain, and we want to be able to support the in-place password policy.

检查userAccountControl属性。

The technical post webpages of this site follow the CC BY-SA 4.0 protocol. If you need to reprint, please indicate the site URL or the original address.Any question please contact:yoyou2525@163.com.

 
粤ICP备18138465号  © 2020-2024 STACKOOM.COM