Wednesday 22 February 2012

Password reset

The resetting of a users password on Solaris is performed via the passwd command. You must be running as root to reset passwords other than for your own (or have the appropriate roles).
To set the password to a known value use
 
# passwd username

where username is the appropriate user name. Solaris will prompt you to supply a new password and will then ask for verification.

To clear a users password and allow them to reset it use the following commands
 
# passwd -d username
# passwd -f username

The first command deletes the users password (i.e. they will not require a password to log on). The second forces the user to change their password. So a user logging on via an interactive method (ssh, telnet etc) will not require a password but will be required to set one. This does not work for non-interactive logons such as FTP.

This approach should only be used when the user in question is able to set a new password at the time. If the user doesn't log on straight away and set a password then the account can be used by anyone who knows the username. Therefore this method should only be used where the user is being dealt with directly.

No comments:

Post a Comment