Trying to add access to a normal user to append to iptables (it's for intrusion detection, since this machine is too small to run snort or fail2ban).
I'm having trouble getting a user to launch a command without being prompted for their password interactively.
Here's /etc/sudoers :
In another terminal on the same host, as user 'moses' I attempt the command, and I'm prompted for a password:
root ALL=(ALL) ALL
Cmnd_Alias BLACKLIST_ADD = /usr/sbin/iptables -A BLACKLIST -s [0-9.]* -j REFUSE
moses ALL = NOPASSWD: BLACKLIST_ADD
What am I doing wrong here?
[moses@nepeta ~]$ sudo /usr/sbin/iptables -A BLACKLIST -s 126.96.36.199 -j REFUSE
[sudo] password for moses: