Hi *,
因为等保关系,设置了密码的过期天数为 90,然后好多机器得密码都过期了,今天 ansible 去批量操作的时候提示:
"changed": false,
"msg": "Authentication or permission failure. In some cases, you may have been able to authenticate and did not have permissions on the target directory. Consider changing the remote tmp path in ansible.cfg to a path rooted in \"/tmp\". Failed command was: ( umask 77 && mkdir -p \"` echo /tmp/.ansible/tmp/ansible-tmp-1590631400.07-259586530289547 `\" && echo ansible-tmp-1590631400.07-259586530289547=\"` echo /tmp/.ansible/tmp/ansible-tmp-1590631400.07-259586530289547 `\" ), exited with result 1",
"unreachable": true
通过跳板机登录提示:
You are required to change your password immediately (password aged)
su: Authentication token is no longer valid; new one required
(Ignored)
我的疑问是为什么密码过期了 key 也不能 ssh 登录了? 我们不用密码登录,只用 key 登录,在符合等保要求的“设置密码过期天数”的情况下,应该怎么配置呢,谢谢大家!
PS:系统为 ubuntu18.04
1
580a388da131 2020-05-28 15:18:17 +08:00 via iPhone
密码过期后账户背禁用了呀
到期前延长有效期呗 |
2
BadAngel 2020-05-28 15:21:18 +08:00
定时任务 推送新 Key 更新 Token
|
3
580a388da131 2020-05-28 15:22:26 +08:00 via iPhone
可以用 ansible 定期批量改密码 不是更安全么
|
4
mrco OP |