LinuxQuestions.org

LinuxQuestions.org (/questions/)
-   Slackware (http://www.linuxquestions.org/questions/slackware-14/)
-   -   How to authorize common-user to run "ifconfig eth0 up"??? (http://www.linuxquestions.org/questions/slackware-14/how-to-authorize-common-user-to-run-ifconfig-eth0-up-309448/)

cqmyg5 04-04-2005 12:03 AM

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.

Thanks!

gbonvehi 04-04-2005 12:10 AM

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-04-2005 12:22 AM

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


All times are GMT -5. The time now is 05:00 AM.