用户使用过期密码登录后,如何再次禁用“(当前)UNIX 密码:”的问题?
我需要的是,在用户在下一步中提供过期密码后,系统会立即询问他是否提供新密码两次。
所以而不是:
xxxxx@host's password:
You are required to change your password immediately (root enforced)
Last login: Mon Oct 29 11:21:22 2018 from abcdefgh
WARNING: Your password has expired.
You must change your password now and login again!
Changing password for user xxxxx
(current) UNIX Password:
New password:
Retype new password:
有:
xxxxx@host's password:
You are required to change your password immediately (root enforced)
Last login: Mon Oct 29 11:21:22 2018 from abcdefgh
WARNING: Your password has expired.
You must change your password now and login again!
Changing password for user xxxxx
New password:
Retype new password:
答案1
根据发行版,可以在 /etc/pam.d/passwd 中配置 passwd 命令的行为。