这似乎应该很简单,但如果是这样,我一定会遗漏一些东西.我有一个
Linux NIS主机,我希望能够更改用户的密码(在忘记密码和类似的东西的情况下),但我不能.
一些细节:我正在运行Scientific Linux 6.4,使用ypserv-2.19-26,ypbind-1.20.4-30和yp-tools-2.9-12. NIS配置为使用/ etc / yp / passwd作为其passwd映射(即不是系统passwd文件).系统是其自身的客户端,ypwhich返回“localhost”.
由于非特权用户不应该登录NIS主服务器,因此我们在/etc/nsswitch.conf中设置了以下内容:
passwd: files compat
这在/ etc / passwd的末尾:
+::::::/bin/false
另外,/ etc / pam.d / passwd包含标准的RHEL指令:
password substack system-auth
/etc/pam.d/system-auth是/etc/pam.d/system-auth-ac的符号链接,其中包含:
password requisite pam_cracklib.so try_first_pass retry=3 type=
password sufficient pam_unix.so md5 shadow nis nullok try_first_pass use_authtok
password required pam_deny.so
(作为旁注,我们使用的是md5而不是sha512,因为我们有一些不支持sha512的Solaris客户端.)
如果我以root身份运行passwd,它会提示我输入新的passwd,但是后来无法更改它:
$sudo passwd phil
Changing password for user phil.
New password:
Retype new password:
NIS password could not be changed.
passwd: Authentication token manipulation error
日志文件(/ var / log / secure)无用:
passwd: pam_unix(passwd:chauthtok): password not changed for phil on ypmaster.domain.tld
相反,如果我运行yppasswd,我可以更改密码:
$sudo yppasswd phil
Changing NIS account information for phil on ypmaster.domain.tld.
Please enter root password:
Changing NIS password for phil on ypmaster.domain.tld.
Please enter new password:
Please retype new password:
The NIS password has been changed on ypmaster.domain.tld.
但这需要任何需要重置密码的系统管理员才能知道(或从我们锁定的密码安全查找)系统的root密码,这是我想避免的情况.
那么我如何配置主服务器以允许我们更改用户密码而无需每次都输入系统的root密码?