sudo visudo
## Next comes the main part: which users can run what software on
## which machines (the sudoers file can be shared between multiple
## systems).
## Syntax:
##
## user MACHINE=COMMANDS
##
## The COMMANDS section may have other options added to it.
##
## Allow root to run any commands anywhere
root ALL=(ALL) ALL
simonsun ALL=(root)NOPASSWD:ALL
sun ALL=(root)NOPASSWD:/usr/sbin/br2684ctl,/sbin/ifconfig,/sbin/ifup,/bin/mount,/sbin/mount.ntfs-3g,/sbin/mount.ntfs-fuse,/bin/umount,/etc/rc.d/init.d/iptables,/usr/bin/yum,/usr/sbin/adsl-connect,/usr/sbin/adsl-start,/usr/sbin/adsl-setup,/usr/sbin/adsl-status,/usr/sbin/adsl-stop
## Allows members of the 'sys' group to run networking, software,
## service management apps and more.
# %sys ALL = NETWORKING, SOFTWARE, SERVICES, STORAGE, DELEGATING, PROCESSES, LOCATE, DRIVERS
本文介绍如何通过编辑sudoers文件来配置不同用户的权限,包括允许root用户无限制运行命令、指定用户无需密码即可执行特定命令等。此外,还展示了如何为sys组成员分配一系列网络和服务管理应用的运行权限。

被折叠的 条评论
为什么被折叠?



