活动目录“pwdLastSet”价值问题 [英] Active Directory "pwdLastSet" Value issue

查看:82
本文介绍了活动目录“pwdLastSet”价值问题的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

你好开始我有一个VBScript而不是VB。我不确定它在哪里,但我认为这将是一个很好的起点。


所以我查询AD以提取个人设置密码的最后数据。我的工作正常,但我遇到了一个障碍,并非所有人都有一个Last Password Set值。我必须将大整数转换为日期的代码处理值为null或更具体的值不存在。然而,它返回错误的日期,我知道错误的日期,因为我有个人重置他们的密码,以确认它不是一个实际的重置问题。


我正在使用标准的aDODB连接进入AD,这就是我如何提取密码设置值

Hello to start off i have a VBScript not VB. I am not sure where it goes but I figured this would be a good place to start.

So I am querying AD to pull the Last Data an individual set their password. I have that working just fine but I have ran into a snag where not all individuals have a Last Password Set value. My code that I have to convert big integer into date handles the value which is null or to be more specific does not exist. However it returns the wrong date, I know its the wrong date because I have had individuals reset their password to confirm that its not an actual reset issue.

I am using a standard aDODB connection into AD and this is how i am pulling the Password Set Value

展开 | 选择 | Wrap | 行号

推荐答案

我不确定我理解,如果有些人没有设置,如果他们更改了密码,那么现在应该设置值。对于那些设置的,你说它返回正确的值。但听起来你说即使他们更改密码,价值也不会被设定?这听起来像一个活跃的目录问题。或者您是说该值已设置但代码返回错误的值?
I''m not sure I understand, if some people don''t have it set, if they change their password, then the value should now be set. And for those that are set, you say it returns the correct value. But it sounds like you''re saying that the value doesn''t get set even if they change their password? That sounds like an active directory issue. Or are you saying that the value is set but the code returns the wrong value?


Rabbit,


感谢您的回复。我想弄清楚它的活动目录是否存在。我倾向于不,因为我实际上有一个约4天前的一个代码,正确处理这个未知值。


让我试着解释一下。我有这个用户持续返回值4/17/2014 5:68 PM。现在为了讨论,我们将约翰威廉姆斯。我亲自与约翰合作,让他重置密码11/4/2014。在我改变代码之前的星期一,约翰在下一次密码更改时获得了2月4日。当我做出改变时,我不能完全记住我做了什么,我开始得到2014年4月17日的日期与实际日期。


第二部分是我的调试会话。我多次尝试从pwdLastSet中检索一个值。 attritube。我继续收到指示无效对象的错误。利用On Error Resume下一个错误处理接受无效的值并拔出4/7/2014的日期。加上设置密码的90天,我们有七月。所以我不确定导致错误的价值是什么。
Rabbit,

Thanks for your response. I am trying to figure out whether its active directory or not. I am leaning to no since i actually had a piece code about 4 days ago that handled this unknown value properly.


Let me try to explain a bit more. I have this one user that keeps returning a value of 4/17/2014 5:68PM. Now for the sake of the discussion we will him John Williams. I personally worked with John and had him reset his password 11/4/2014. On Monday before i changed the code, John was getting February 4th as his next password change. When I made a change, which I can''t totally remember what I did I started getting this 4/17/2014 date versus the actual date.

The second part to this was my debugging session. I tried multiple times to retrieve a value from the "pwdLastSet" attritube. I continued to get an error indicating invalid object. Leverage an On Error Resume next error handling the value that is invalid is accepted and the date of 4/7/2014 is pulled out. Plus the 90 days to set the password and we have July. So i am not sure what it is about the value that is causing the error.


所以让我们采取一种完全不同的方法。如果您要做的是检索用户上次设置密码的日期以及他们将要更改密码的日期,那么我之前使用过此代码:
So let''s take a completely different approach. If what you want to do is to retrieve the date that a user last set their password and the date that they are due to change it, then I''ve used this code before to do that:
展开 | 选择 | Wrap | 行号


这篇关于活动目录“pwdLastSet”价值问题的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

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