linux 普通用户切换成root免密码的实现
[root@ok~]#vim/etc/pam.d/su
下面是/etc/pam.d/su文件的内容
#%PAM-1.0 authsufficientpam_rootok.so #Uncommentthefollowinglinetoimplicitlytrustusersinthe"wheel"group. #authsufficientpam_wheel.sotrustuse_uid #Uncommentthefollowinglinetorequireausertobeinthe"wheel"group. #authrequiredpam_wheel.souse_uid authincludesystem-auth accountsufficientpam_succeed_if.souid=0use_uidquiet accountincludesystem-auth passwordincludesystem-auth sessionincludesystem-auth sessionoptionalpam_xauth.so
将第4行的#号去掉,然后将登陆用户加入wheel组
[root@okok]#usermod-Gwheelok [ok@ok~]$su [root@okok]#
su直接切换成root
以上就是小编为大家带来的linux普通用户切换成root免密码的实现全部内容了,希望大家多多支持毛票票~
热门推荐
10 朋友新年祝福语大全 简短
11 新年祝福语简短大方兔年
12 搬新家礼物祝福语简短
13 同学见面花束祝福语简短
14 五一假期祝福语幽默简短
15 离职欢送敬酒祝福语简短
16 对学弟的祝福语简短
17 考老师辞职祝福语简短
18 祝福语驱散霉运的话简短