/etc/sudoers

unix and linux 2008. 11. 19. 22:53

iptables 명령어를 www계정으로 들어오는 사용자에게 쓸 수 있게 하기

 

 

chattr -i /etc/sudoers
chmod u+w /etc/sudoers

echo "Defaults:www \!authenticate" >> /etc/sudoers
echo "Cmnd_Alias CMD=/sbin/ifup,/sbin/ifdown,/sbin/iptables" >> /etc/sudoers
echo "www ALL=CMD:ALL=/sbin/swapon" >> /etc/sudoers

chmod u-w /etc/sudoers
chattr +i /etc/sudoers

Posted by '김용환'
,