vim /etc/pam.d/su
将此行的注释打开
auth required pam_wheel.so use_uid
修改 /etc/login.defs
echo "SU_WHEEL_ONLY yes" >> /etc/login.defs
普通用户加入到wheel组才可以su,不然哪怕输入对root密码也不成功。
usermod -G wheel linyy
标签:wheel,defs,su,etc,linux,login,pam
来源: https://www.cnblogs.com/linyouyi/p/15619293.html