Linux - Password (User)

1 - About

user password are password of a user stored in the secure shadow file.

3 - 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)

4 - Management

4.1 - 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)

4.2 - Example

4.2.1 - 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.

4.2.2 - 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.


Data Science
Data Analysis
Statistics
Data Science
Linear Algebra Mathematics
Trigonometry

Powered by ComboStrap