如何修改密码过期提示?

如何修改密码过期提示?

我在运行 Ubuntu 16.04/18.04 的服务器上为一些用户创建了帐户。用户会收到一封电子邮件,要求提供默认的临时密码。他们在第一次登录时被强制更改密码。

如何配置密码过期提示?当前提示是:

WARNING: Your password has expired.
You must change your password now and login again!
Enter login(LDAP) password:

我认为这很令人困惑。用户可能会因为警告消息而认为默认密码错误。我希望它是其他内容,例如:

WARNING: Your temporary password has expired.
You must now enter a NEW password and login again.
Enter NEW login password:

结论:提示符不可配置。它是在 pam_ldap 中硬编码的这里

答案1

看起来像 pam_ldap。运行时列出并启用了哪些配置文件pam-auth-update?还可以看看 ubuntu 的LDAPClientAuthentication 文档

相关内容