如何检查,当用户的口令在Active Directory LDS(ADAM)已过期,编程? [英] How to check when user's password has expired in Active Directory LDS (ADAM), programmatically?

查看:179
本文介绍了如何检查,当用户的口令在Active Directory LDS(ADAM)已过期,编程?的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

有没有一种方法来检查的Active Directory轻型目录服务实例的用户的密码是否已过期?具体来说,就是有一个属性(但愿是布尔),它定义了密码是否到期,考虑到用户的密码是否已过期的和用户的密码还是否设置到期在所有(在这种情况下,它应该总是返回)。

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).

我们正在试图查询使用的DirectoryEntry API和PrincipalContext API这些信息的Active Directory,但无法弄清楚它的存储位置。刚刚查询的pwdLastSet 是不够的,因为我们没有进入有效期限域,我们希望能够支持就地密码策略。

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的 属性。

Inspect the userAccountControl attribute.

这篇关于如何检查,当用户的口令在Active Directory LDS(ADAM)已过期,编程?的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

查看全文
登录 关闭
扫码关注1秒登录
发送“验证码”获取 | 15天全站免登陆