linux非交互式修改密码(仅限root)

# chpasswd命令使用起来很简洁
[root@host_221-81 ~]# echo "qa:1234" | chpasswd
 
# 使用passwd命令,也可以实现非交互式修改密码
[root@host_221-81 ~]# echo "1234" | passwd --stdin "qa"
Changing password for user qa.
passwd: all authentication tokens updated successfully.

猜你喜欢

转载自blog.csdn.net/c1052981766/article/details/79970939
今日推荐