Format of pwdLastSet in Active Directory

  • Thread starter Thread starter Hari
  • Start date Start date
H

Hari

Hi,
I have retrieved the value of "pwdLastSet" for a given
user and i am getting the following value:
pwdLastSet = 127060341143915620

Does this value indicate the milliseconds elapsed from a
specific date? Which i dont think is true.
So what is the actual format of the attribute.
how do i retrieve the actual date on which the password
was last set from the above value?

Regards
Hari
 
The PWDLASTSET is set in UTC time. Below is an API that
can used to convertto local time.
Steve

You can use FileTimeToLocalFileTime() to convert a UTC
file time to a local time. However, if you automatically
adjust for Daylight Savings Time, FileTimeToLocalFileTime
() will adjust for Daylight Savings Time based on whether
the current date should be adjusted
for Daylight Savings Time, not based on whether the date
returned by GetFileTime API call should be adjusted.
 
Hi steve,
Well foremost thank you very much for ur quick response.
Also well the problem is that i am using JNDI(java) to
retrieve the "pwdLastSet" attribute.

I think this time is Windows FILETIME timestamps...
Actually i am getting the UTC time for the pwdLastSet as
1061560514 (this value is in milliseconds past Jan 1 1970).

Actually i was browsing the internet i found that the
FILETIME timestamp are:
100-nanosecond units passed since 1.1.1600 00:00:00.

Is that correct?
 
Back
Top