通过以下方式设置密码过期后:
sudo chage -d 0 用户名
然后更改密码并以该用户身份登录。
当我输入“passwd”并尝试设置原始密码时,我收到消息;
“密码策略 - 错误密码:密码刚刚轮换为旧密码”
我查看了以下文件,但看不到可能导致此行为的政策行项目;
sudo nano /etc/pam.d/common-password
# here are the per-package modules (the "Primary" block)
password requisite pam_pwquality.so retry=3
password [success=2 default=ignore] pam_unix.so obscure use_authtok try_first_pass yesc>
password sufficient pam_sss.so use_authtok
# here's the fallback if no module succeeds
password requisite pam_deny.so
# prime the stack with a positive return value if there isn't one already;
# this avoids us returning an error just because nothing sets a success code
# …Run Code Online (Sandbox Code Playgroud) passwd ×1