You can configure sudo to allow users to execute that command. You should use visudo and add a line like:
youruser yourmachinename= NOPASSWD: /sbin/ifconfig eth0 up
Then your user can do: sudo /sbin/ifconfig eth0 up
Note that, visudo is actually vi, i'll make a quick guide on how to use it.
Execute visudo as root, it will automatically open the sudoers file for you. Now,
scroll to the end using the arrow keys and press "o". That will insert a line and let you in Input mode. Type the line I said above, then press ESC and finally :wq .
If you need to delete, quit Input mode with ESC, use the "x" key to delete, then go back to Input mode with the "i" (that won't insert a line as the o).
Last edited by gbonvehi; 04-03-2005 at 11:12 PM.
|