[Date Prev][Date Next] [Thread Prev][Thread Next] [Date Index] [Thread Index]

sudo fails to save IPTables rules



sudo fails with a permission denied error.
tmb@hp-debian:~$ sudo /usr/sbin/iptables-save > /etc/iptables/rules.v4
bash: /etc/iptables/rules.v4: Permission denied

Root user works
tmb@hp-debian:~$ su -l
Password:
 
Root user with sudo 
root@hp-debian:/home/tmb# sudo /usr/sbin/iptables-save > /etc/iptables/rules.v4

Root user without sudo
root@hp-debian:/home/tmb# /usr/sbin/iptables-save > /etc/iptables/rules.v4

Has anyone else had this problem? 

Here is the exert from /etc/sudoers:

# User privilege specification
root    ALL=(ALL:ALL) ALL
tmb    ALL=(ALL:ALL) ALL

Other than adding my username all other settings are default.

Other commands work with sudo.

Tim

--
⢀⣴⠾⠻⢶⣦⠀
⣾⠁⢠⠒⠀⣿⡁ Debian - The universal operating system
⢿⡄⠘⠷⠚⠋⠀ https://www.debian.org/
⠈⠳⣄⠀⠀

Reply to: