Open pvhung1 opened 7 years ago
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
Use aduser.get_expiration instead; constructed values (like msDS-UserPasswordExpiryTimeComputed) are difficult to work with.
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 .