I'm on arch and am using a network namespace wiredlan
for ethernet, using it for LAN based applications and big downloads. I run commands/apps on the netns as:
alias runonlan='sudo ip netns exec wiredlan sudo -u me --'
runonlan command
This works, but I want to be able to run it without having to enter password, to make things easier. But as the command
part of runonlan command
varies, I can't figure out what to put in sudoers in order to make it run without prompting for password.
So, I tried editing sudoers, adding (one at a time):
me ALL=(ALL) NOPASSWD: /bin/ip *
me ALL=(ALL) NOPASSWD: /bin/ip netns
me ALL=(ALL) NOPASSWD: /bin/ip netns exec wiredlan
me ALL=(ALL) NOPASSWD: /bin/ip netns exec wiredlan sudo -u me --
but it still asks for the password. What am I doing wrong? Is this even possible?
runonlan
varies according to what I want to run on the LAN. I'll edit the question to make it clearer. – aksh1618 Sep 09 '18 at 16:28runonlan tmux -L wiredlantmux
and have an indicator in the prompt for the namespace. – aksh1618 Sep 10 '18 at 10:43