visudo权限配置普通用户的使用权限范围配置文件:
(请根据自己公司需求配置)
[root@localhost ~]# visudo
## Allow root to run any commands anywhere
root ALL=(ALL) ALL
#user ALL=/usr/sbin/*,/sbin/*,/usr/bin/*,!/usr/bin/passwd, /usr/bin/passwd [a-zA-Z]*,!/usr/bin/passwd root,!/sbin/visudo,!/bin/bash,!/bin/sh,!/bin/tcsh
user ALL=NOPASSWD:ALL,!/usr/bin/passwd root,!/sbin/visudo,!/bin/bash,!/bin/sh,!/bin/tcsh
## Allows people in group wheel to run all commands
#%wheel ALL=(ALL) ALL
#%wheel ALL=NOPASSWD:ALL,!/usr/bin/passwd root,!/sbin/visudo,!/bin/bash,!/bin/sh,!/bin/tcsh
#%wheel ALL=NOPASSWD:ALL,!/usr/bin/passwd, !/usr/bin/passwd root,!/sbin/visudo,!/bin/bash,!/bin/sh,!/bin/tcsh