Friday, February 3, 2012

sudo

configure file: /etc/soduers


%admin all=(all) all

--%admin: all member of group admin
--all: all the host/IP
--(all): run as all user
--all : all commands

%user 192.168.1.0/255.255.255.0=(root) NOPASSWD:/sbin/ifconfig

--%user: all member of group user
--192.168.1.0/255.255.255.0: IP range 192.168.1.1 -- 192.168.1.254
--(root): run as user root
--NOPASSWD:/sbin/ifconfig nopassword need to run /sbin/ifconfig


reference:
http://ubuntuforums.org/showthread.php?t=1132821

No comments:

Post a Comment