We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
There was an error while loading. Please reload this page.
1 parent 37bcd5f commit 80c5150Copy full SHA for 80c5150
command/passwd.md
@@ -85,6 +85,15 @@ Retype new UNIX password: # 再输入一次;
85
passwd: all authentication tokens updated successfully. # 成功;
86
```
87
88
+或通过管道符把`echo`命令和`passwd`命令的`--stdin`参数相结合,用一条命令来完成密码修改,无序交互。
89
+以 linuxde 用户的密码改成 123456 为例:
90
+
91
+```shell
92
+[root@localhost ~]# echo "123456" | passwd --stdin linuxde
93
+Changing password for user linuxde. # 正在更改 linuxde 用户的密码。
94
+passwd: all authentication tokens updated successfully. # passwd:所有身份验证令牌都已成功更新
95
+```
96
97
普通用户如果想更改自己的密码,直接运行passwd即可,比如当前操作的用户是linuxde。
98
99
```shell
0 commit comments