-   Slackware (
-   -   How to authorize common-user to run "ifconfig eth0 up"??? (

cqmyg5 04-03-2005 11:03 PM

How to authorize common-user to run "ifconfig eth0 up"???
Hello All,

I couldn't run "ifconfig eth0 up" command if login as a common user, the error message is "Permission deny".

How to authorize common-user to run "ifconfig eth0 up"?

BTW, My linux is Slackware 10.1 and I could run "ifconfig -a" properly as a common user.


gbonvehi 04-03-2005 11:10 PM

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).

cqmyg5 04-03-2005 11:22 PM

Get it! Thank you for your nice and quick reply, and It is so detailed!

All times are GMT -5. The time now is 01:48 AM.