pyad icon indicating copy to clipboard operation
pyad copied to clipboard

Expiration date of password (password never expired )

Open pvhung1 opened this issue 7 years ago • 2 comments

From docs , you mention about expiration date of password . But in source def set_expiration(self, dt): self._ldap_adsi_obj.AccountExpirationDate = dt self._flush()

It is account expiration date, not password expired . Also no method for password never expired .

pvhung1 avatar Jun 06 '17 03:06 pvhung1

user.get_attribute("msDS-UserPasswordExpiryTimeComputed") //readonly user.get_attribute("pwdLastSet") //Writeable

msDS-UserPasswordExpiryTimeComputed = USER:pwdLastSet + Effective-MaximumPasswordAge (where Effective-MaximumPasswordAge is defined in MS-SAMR section 3.1.1.5).

msDS-UserPasswordExpiryTimeComputed: This is based on Effective-MaximumPasswordAge (A 64-bit value with delta time syntax, indicating the policy setting for the maximum time allowed before a password reset or change is required) http://ldapwiki.com/wiki/MsDS-UserPasswordExpiryTimeComputed https://msdn.microsoft.com/en-us/library/cc245830.aspx

Kipjr avatar Oct 19 '17 12:10 Kipjr

Use aduser.get_expiration instead; constructed values (like msDS-UserPasswordExpiryTimeComputed) are difficult to work with.

stevenpitts avatar Jan 23 '19 19:01 stevenpitts