Format of pwdLastSet in Active Directory

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
 
S

stevta [MSFT]

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

Hari

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?
 

Ask a Question

Want to reply to this thread or ask your own question?

You'll need to choose a username for the site, which only take a couple of moments. After that, you can post your question and our members will help you out.

Ask a Question

Top