系统相关
首页 > 系统相关> > linux 设置只有管理员组wheel才有su权限

linux 设置只有管理员组wheel才有su权限

作者:互联网

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