Home > Article > Operation and Maintenance > How to change user password in linux
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.
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!