Reset or Change User Password in Linux | To set or reset a user password in Linux, use the command passwd Here are some tips! When logged in as your regular account, simply type passwd at the command prompt to change your own password: scott@localhost:~$ passwd Changing password for scott (current) UNIX password: Enter new UNIX password: Retype new UNIX password: passwd: password
Set Password Expiration for Linux Accounts
Set Password Expiration for Linux Accounts | For security, it is good to enforce password expiration. Here’s how you do it in Linux. Edit the file /etc/login.defs: sudo nano /etc/login.defs Here you can specify options for password expiration: PASS_MAX_DAYS 90 PASS_MIN_DAYS 7 PASS_MIN_LEN 14 PASS_WARN_AGE 7 Max Days: maximum life of a password Min Days: prevent a second change again for X

