linux 6.4如何改密码,如何更改Linux NIS主服务器上的密码?

这似乎应该很简单,但如果是这样,我一定会遗漏一些东西.我有一个

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密码?

  • 0
    点赞
  • 0
    收藏
    觉得还不错? 一键收藏
  • 0
    评论
评论
添加红包

请填写红包祝福语或标题

红包个数最小为10个

红包金额最低5元

当前余额3.43前往充值 >
需支付:10.00
成就一亿技术人!
领取后你会自动成为博主和红包主的粉丝 规则
hope_wisdom
发出的红包
实付
使用余额支付
点击重新获取
扫码支付
钱包余额 0

抵扣说明:

1.余额是钱包充值的虚拟货币,按照1:1的比例进行支付金额的抵扣。
2.余额无法直接购买下载,可以购买VIP、付费专栏及课程。

余额充值