fix_last_password_change helper
This helper function updates last password change timestamp of a user(s).
It doesn't update password itself.
In case username (a list of usernames) passed as input to this function,
only these users might be affected.
If there is no input, then all the users in the system will be tried.
Regardless of how username(s) was/were get, all the following rules SHOULD
match in order to succeed:
* user ID MUST be >= 1000
* user's password from /etc/shadow MUST be '*'. This is an indicator that
password is disabled for this user, and last password change timestamp
can safely be updated.
If an account ID is < 1000 (system account) or a user have locked
password (that starts with exclamation mark) or have a valid password
string (even if it's an empty string) then last password change timestamp
won't be updated.
Change-Id: I426c5af790e8ca28e8ae4def010388096223e365
Related-Prod: PROD-29769
1 file changed