Home >Operation and Maintenance >Linux Operation and Maintenance >How to change user password in linux

How to change user password in linux

王林
王林Original
2021-01-28 17:18:2523344browse

How to change user password in Linux: You can use the passwd command to change the password. Specific method: first execute the [passwd username] command; then enter the new password twice and press Enter.

How to change user password in linux

The operating environment of this article: red hat enterprise linux 6.1 system, thinkpad t480 computer.

(Learning video sharing: linux video tutorial)

Use the passwd command to change the password in Linux. Run passwd as the root user. passwd user_name can set or modify the password of any user. , ordinary users running passwd can only modify their own passwords.

[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 recommendations: linux tutorial

The above is the detailed content of How to change user password in 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