有没有办法更改密码已过期时在密码更改过程中显示的默认提示?在centos和rhel上?我想更改(current) UNIX password:
为Your previous password:
或Enter expired password:
原始提示误导了许多用户,他们询问在此步骤中应该输入什么密码(他们在登录期间已经输入了旧的过期密码,就在显示此过期警告和提示之前,它再次要求他们输入旧于(current) UNIX password:
)
Changing password for user.
(current) UNIX password:
New password:
Retype new password:
答案1
提示来自 PAM,因此您必须编辑源代码来更改其措辞。
user@host:/tmp/pam-1.1.8$ grep '(current) UNIX password:' -B2 -A3 modules/pam_unix/pam_unix_passwd.c
retval = _unix_read_password(pamh, lctrl
,Announce
,_("(current) UNIX password: ")
,NULL
,_UNIX_OLD_AUTHTOK
,&pass_old);
user@host:/tmp/pam-1.1.8$ _