Home  >  Article  >  Operation and Maintenance  >  How to change user password under linux

How to change user password under linux

王林
王林Original
2020-10-20 09:34:1846433browse

How to change the user password under Linux: 1. Execute the [passwd username] command; 2. Enter the new password according to the prompts and press Enter; 3. Enter the new password again and press Enter.

How to change user password under linux

Linux uses the passwd command to change the password. Run passwd as the root user. passwd user_name can set or modify the password of any user. An ordinary user can only modify it by running passwd. own password.

(Video tutorial recommendation: linux video tutorial)

[root@localhost ~]#  passwd  ##修改root用户密码
Changing password for user root..
New password: ##输入新密码
Retype new password:  ##再次确认新密码
passwd: all authentication tokens updated successfully.

[root@localhost ~]# passwd hadoop  ##修改hadoop用户密码
Changing password for user hadoop.
New password:  ##输入新密码
Retype new password:  ##再次确认新密码
passwd: all authentication tokens updated successfully.

Related recommendation: linux tutorial

The above is the detailed content of How to change user password under linux. For more information, please follow other related articles on the PHP Chinese website!

Statement:
The content of this article is voluntarily contributed by netizens, and the copyright belongs to the original author. This site does not assume corresponding legal responsibility. If you find any content suspected of plagiarism or infringement, please contact admin@php.cn