Also make sure to start a new session for the changes of the configuration to take effect.
You can at any point check what config is currently applied with sudo -l
I have reverted the changes previously done (in /etc/sudoers.d/01-skip_auth and /etc/polkit-1/rules.d/49-nopasswd_global.rules) and applied the NOPPASSWD: COMMAD ones.
This is what I get:
$ sudo -l
Runas and Command-specific defaults for spiros:
Defaults!/etc/ctdb/statd-callout !requiretty
User spiros may run the following commands on XXXX:
(ALL) NOPASSWD: /usr/bin/ip
(ALL) NOPASSWD: /usr/bin/iptables
(ALL) ALL
$ sudo iptables -L -nv --line-numbers
[sudo] password for spiros:
I did not just started a new session, I rebooted, but no joy…
@FadeMind
I stand corrected, its been a while since i did any sudo config…
Looking at the man page and that screenshot: Looks like @sng forgot to place spaces around the = char…
Hell now my brains are totally fried
/me goes to play a game to reset
$ sudo -l
Matching Defaults entries for spiros on home:
env_reset
Runas and Command-specific defaults for spiros:
Defaults!/etc/ctdb/statd-callout !requiretty
User spiros may run the following commands on home:
(ALL) ALL
(root) NOPASSWD: /usr/bin/iptables
(root) NOPASSWD: /usr/bin/ip
The (ALL) ALL was previously included by /etc/sudoers.d/10-installer.
So, I moved the includedir at the top of /etc/sudoers.