Table of Contents

Linux - Password (User)

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

Management

Set

To set/change a password, use the passwd command

Options:

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.