在我的CentOS 7笔记本电脑上,从切换为root
以root身份user
使用时su user
,要求输入user
密码。
-bash-4.2# su user
Password:
从root
其他帐户切换到该帐户时,无需输入密码。
我已经在Fedora 27和另一台CentOS 7机器上尝试了相同的方法。有su user
作为root
简单的切换user
,而不要求user
的密码。
我正在使用su
仅提供的版本库。
关于为什么会发生这种情况的任何帮助都将有所帮助。
更新
的内容/etc/pam.d/su
如下
#%PAM-1.0
auth sufficient pam_rootok.so
# Uncomment the following line to implicitly trust users in the "wheel" group.
#auth sufficient pam_wheel.so trust use_uid
# Uncomment the following line to require a user to be in the "wheel" group.
#auth required pam_wheel.so use_uid
auth substack system-auth
auth include postlogin
account sufficient pam_succeed_if.so uid = 0 use_uid quiet
account include system-auth
password include system-auth
session include system-auth
session include postlogin
session optional pam_xauth.so
使用定期更新后,该问题已解决yum update
。如果我对导致此问题的原因有所了解,还是很有帮助的。
本文收集自互联网,转载请注明来源。
如有侵权,请联系 [email protected] 删除。
我来说两句