How to change user password on Solaris/Linux

This is a simple post provided details on how to change a users password on both Solaris and Linux systems.

Change user password

To change the user password, at the prompt, use the passwd command followed by the users id. For example...

On Solaris:

# passed <userid>

Replace <userid> with the actual user you wish to change

On Linux:

# passed <userid>

Force password change upon first login

On Solaris:

# passed -f <userid>

On Linux:

# change -d 0 <userid>

Password policies

On Solaris check the following files for password policy

  • /etc/default/login
  • /etc/default/passwd

On Linux, check the following files:

  • /etc/login.defs
  • /etc/pam.d/system-auth