Change the password directly
You can view the currently logged in user through whoami. Directly enter passwd and press Enter. Enter the password twice to modify the current username (the prompt all authentication tokens updated sucessfully indicates that the password modification is OK)
(Recommended tutorial: centos usage tutorial)
As shown in the picture:
Change the password of a certain user
(note that administrator rights or this account are required)
As an administrator, you can directly change the password of an account without knowing the original password.
Format: Passwd Username
As shown in the picture, enter the password twice to confirm after pressing Enter
## Recommended related video tutorials:The above is the detailed content of How to change user password in centos. For more information, please follow other related articles on the PHP Chinese website!