administering user passwords in linux
Change a user’s password
# passwd username
Force password change at next login
# passwd -e username
Lock a user’s password
# passwd -l username
NOTE: this option does not disable a user, it only prevents the user to login using password as an authentication token, but it can still access using other means (for example, using ssh keys)
Unlock a user’s password
# passwd -u username
Show user password expiration
# chage -l username Minimum: 0 Maximum: 99999 Warning: 7 Inactive: -1 Last Change: May 10, 2011 Password Expires: Never Password Inactive: Never Account Expires: Never
Leave a Reply