I've been scared too much by the warning about setuid. However I cannot find a way around using it.
I want to be able to run:
arp -s 198.51.100.1 00:53:00:12:34:56
as the user steven but arp -s requires root.
Would this be the correct way to do it?
sudo nano example.sh
sudo chmod u+s example.sh
sudo chmod og-w example.sh
sudo chmod o+x example.sh
./example.sh
nanoinstead? – Steven Apr 19 '14 at 10:41visudoto edit the sudoers file. It verifies the syntax. Despite the name, it doesn't necessarily invokevi; set the environment variableVISUALto your favorite editor, e.g.export VISUAL=nano. – Gilles 'SO- stop being evil' Apr 19 '14 at 10:58steven ALL = (root) NOPASSWD: /usr/sbin/arpworks however – Steven Apr 19 '14 at 10:59:needs escaping in the command. Edited. – Gilles 'SO- stop being evil' Apr 19 '14 at 11:06