linux_wiki:change_passwords_and_adjust_password_aging_for_local_user_accounts

Change Passwords And Adjust Password Aging For Local User Accounts

General Information

Account password management.


Contains Default password aging

  • /etc/login.defs


/etc/shadow fields

user:$6$O30OJMIu$EvINhwnNKNkuovMpHyyXpNmbBrlwqHCQguggwnAQhvkur01BhCZI/MwDY0z3kJqKwJoJgYEVVchEvsCIebN3o0:16475:0:99999:7:::
  • login
  • encrypted password
  • date of last password change (# days since Jan 1, 1970)
  • minimum password age (0 days above)
  • max password age (99999 days)
  • password warning period (7 days before max pw age)
  • password inactivity period (null/no enforcement, after max age, wait this long before user will not be given the opportunity to change password)
  • account expiration date (null/never expire)

Change user password manually

passwd rjones
  • Will be prompted to enter new password twice


List account age information (Same age info from /etc/passwd)

chage -l rjones


Force user to change password on next login (change number of days since last pw change)

chage -d 0 rjones
OR
chage --lastday 0 rjones


Set account expiration

chage -E 2015-08-01 rjones
OR
usermod -e 2015-08-01 rjones
  • Account will lock on August 1st, 2015.
  • Passing an expire date of “-1” will remove an expiration date.

  • linux_wiki/change_passwords_and_adjust_password_aging_for_local_user_accounts.txt
  • Last modified: 2019/05/25 23:50
  • (external edit)