sudoers
[root@gw107 root]# cat /etc/sudoers
# sudoers file.
#
# This file MUST be edited with the 'visudo' command as root.
#
# See the sudoers man page for the details on how to write a sudoers file.
#
# Host alias specification
Host_Alias HOST = gw107
# User alias specification
## User_Alias admin = nkwz
# Cmnd alias specification
Cmnd_Alias GW = /sbin/iptables
# Runas alias specification
Runas_Alias AD = root
# Defaults specification
# User privilege specification
root ALL=(ALL) ALL
#nkwz ALL=NOPASSWD: ALL
# Uncomment to allow people in group wheel to run all commands
# %wheel ALL=(ALL) ALL
# Same thing without a password
# %wheel ALL = (ALL) NOPASSWD: ALL
nkwz HOST = (AD) NOPASSWD: GW
# Samples
# %users ALL=/sbin/mount /cdrom,/sbin/umount /cdrom
# %users localhost=/sbin/shutdown -h now
## %nkwz gw107=/sbin/iptables
[root@gw107 root]#