LinuxQuestions.org
Go Job Hunting at the LQ Job Marketplace
Go Back   LinuxQuestions.org > Forums > Linux Forums > Linux - Distributions > Slackware
User Name
Password
Slackware This Forum is for the discussion of Slackware Linux.

Notices



Reply
 
Search this Thread
Old 04-04-2005, 12:03 AM   #1
cqmyg5
LQ Newbie
 
Registered: Apr 2005
Posts: 29

Rep: Reputation: 15
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!

Last edited by cqmyg5; 04-04-2005 at 12:16 AM.
 
Old 04-04-2005, 12:10 AM   #2
gbonvehi
Senior Member
 
Registered: Jun 2004
Location: Argentina (SR, LP)
Distribution: Slackware
Posts: 3,145

Rep: Reputation: 51
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-04-2005 at 12:12 AM.
 
Old 04-04-2005, 12:22 AM   #3
cqmyg5
LQ Newbie
 
Registered: Apr 2005
Posts: 29

Original Poster
Rep: Reputation: 15
Get it! Thank you for your nice and quick reply, and It is so detailed!
 
  


Reply


Thread Tools Search this Thread
Search this Thread:

Advanced Search

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is Off
HTML code is Off


Similar Threads
Thread Thread Starter Forum Replies Last Post
X says "user not authorized to run the x server" infamous41md Linux - Newbie 3 08-05-2009 09:36 PM
Shell Script: Find "Word" Run "Command" granatica Linux - Software 5 07-25-2007 08:42 AM
tying "dhcpcd" into "ifconfig" up and down Riddick Linux - Software 8 09-10-2005 08:14 PM
which file can i set "ifconfig eth0 up"? Mathsniper Debian 6 04-27-2005 03:17 PM
Can't run "halt" or "reboot" as user, can somebody help? ro_nicu Slackware 4 11-01-2004 08:57 AM


All times are GMT -5. The time now is 08:23 AM.

Main Menu
Advertisement
My LQ
Write for LQ
LinuxQuestions.org is looking for people interested in writing Editorials, Articles, Reviews, and more. If you'd like to contribute content, let us know.
Main Menu
Syndicate
RSS1  Latest Threads
RSS1  LQ News
Twitter: @linuxquestions
identi.ca: @linuxquestions
Facebook: linuxquestions Google+: linuxquestions
Open Source Consulting | Domain Registration