An ADS entry is created with .ExpirePasswordNow() (requiring user to change the password on firstLogin).. But authentication fails if the .ExpiresPasswordNow() is set.. How could I get authenticator (Domain principal) to accept this as a valid account ?
views:
38answers:
1
+2
A:
Instead of using ExpirePasswordNow, set the property [pwdLastSet] to 0.
usr.Properties["pwdLastSet"].Value = -1; // To turn on, set this value to 0.
usr.CommitChanges();
Joel Etherton
2010-02-04 15:41:16