Changing the Linux User Password is actually very easy. Just enter "passwd User Name" and press enter, you will be prompted to enter a new password and confirm the new password. If the user name is omitted, the current user password will be changed.
If you log on as a root user, modify the root password.
The Code is as follows: |
Copy code |
Passwd The following error occurs: New password: Retype new password: |
Enter the password as prompted to confirm.
To change the password of another user, enter passwd username.
Example: passwd kook
The Code is as follows: |
Copy code |
New password: Retype new password: |
For example,Users created with useradd name in the terminal are not allowed to log on by default. Therefore, passwd name must be used to change the password.
The Code is as follows: |
Copy code |
[Root @ localhost ~] # Passwd single Changing password for user single. New UNIX password: ^ Retype new UNIX password: ^ Passwd: all authentication tokens updated successfully. [Root @ localhost ~] # |