[root@qll251 ~]# echo “123123” | passwd --stdin user01
Changing password for user user01.
passwd: all authentication tokens updated successfully.
##### 2、一条命令解决
[root@qll251 ~]# chage -d 0 user01
>
> `-d 0 user01`设置该用户密码是在1970年1月1日更改的,这实际上是让当前密码立即到期,从而让密码在下一次登录时被更改。
>
>
>
##### 3、验证
[root@qll251 ~]# ssh user01@10.43.187.251
user01@10.43.187.251’s password:
You are required to change your password immediately (root enforced)
Last login: Mon Jun 1 20:09:10 2020 from 10.43.187.251
WARNING: Your password has expired.
You must change your passwor
打赏

支付宝微信扫一扫,打赏作者吧~
本文链接:https://www.kinber.cn/post/4121.html 转载需授权!
推荐本站淘宝优惠价购买喜欢的宝贝:
您阅读本篇文章共花了: