About
user password are password of a user stored in the secure shadow file.
Special value
The password is the second field of the shadow file
It's 13 character encrypted
- A blank entry (eg. ::) indicates a password is not required to log in
- A * indicates the account has been disabled.
- !! or ! : no password has been given (the account is locked)
Management
Set
To set/change a password, use the passwd command
Options:
- user's name (Only required if you are root and want to change another user's password)
Example
Change the password for the account you are currently logged in
passwd
Changing password for user gerardnico.
Changing password for gerardnico
(current) UNIX password:
New UNIX password:
Retype new UNIX password:
passwd: all authentication tokens updated successfully.
Change the password for a user
To change the password for the user 'gerardnico' (only if you are logged in as root)…
passwd gerardnico
Changing password for user gerardnico.
New UNIX password:
BAD PASSWORD: it is based on a dictionary word
Retype new UNIX password:
passwd: all authentication tokens updated successfully.