Link to home
Start Free TrialLog in
Avatar of sirineni
sirineniFlag for United States of America

asked on

How to change "pwdlastset" attribute value manually

AD 2003 using ADSI EDIT
=========================
I need to test a password policy expiry. How this works is- a email is triggered when the password is expired.I need to test teh functionality.

I want to expire my password (say today).So trying to set the "pwdlastset" attribute and getting "The parameter is incorrect"

1. am doing right thing? Is this a configugarable attirbute?
2. If so how to do I edit this?
3. What values are accepted (ex.1, 0) and what they mean?

Any suggestions to help change the expiry value are greatly appreciated.
 
Avatar of Adam Brown
Adam Brown
Flag of United States of America image

The pwdlastset value is actually written as an LDAP timestamp. That timestamp is the number of 100 nanosecond intervals since January 1, 1601. You can get the value for the current time in Powershell by entering (get-date).toFileTime()

Today's is 129538456723328565
so if you enter that as the value of pwdlastset it will set the password last set value to Wednesday, June 29, 2011 18:27:52GMT
Avatar of sirineni

ASKER

acbrown2010,
Thanks for the note but still getting(while using 129538456723328565) same error when I hit apply "Parameter is incorrect". Only value it seems to be taking is "0" which might have a different meaning!
Yeah, just figured that out myself. Setting to 0 means that the user has to do a password reset immediately. Give me a minute and I'll figure it out.
Alright, got it. Setting it to -1 will reset the date to the current time. Note that this will only happen if the user does not have the Password Never Expires option set.
no luck. as soon as I type minus (-)Gives "unacceptable character and you can only type number here"/
Password never expire is not set on teh account
ASKER CERTIFIED SOLUTION
Avatar of oBdA
oBdA

Link to home
membership
This solution is only available to members.
To access this solution, you must be a member of Experts Exchange.
Start Free Trial