Code: Select all
nagios ALL=(ALL) NOPASSWD: /sbin/iptables -S INPUT | /usr/bin/wc -l
Code: Select all
[nagios@server ~]$ sudo /sbin/iptables -S INPUT | /usr/bin/wc -l
[sudo] password for nagios:
Code: Select all
nagios ALL=(ALL) NOPASSWD: /sbin/iptables -S INPUT | /usr/bin/wc -l
Code: Select all
[nagios@server ~]$ sudo /sbin/iptables -S INPUT | /usr/bin/wc -l
[sudo] password for nagios:
Code: Select all
/sbin/iptables -S INPUT | /usr/bin/wc -l > /tmp/iptcount
Code: Select all
echo "/sbin/iptables -S INPUT | /usr/bin/wc -l" | sudo sh