How to authorize common-user to run "ifconfig eth0 up"???
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.
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).
Get it! Thank you for your nice and quick reply, and It is so detailed!
|All times are GMT -5. The time now is 08:40 PM.|