LinuxQuestions.org
Download your favorite Linux distribution at LQ ISO.
Home Forums Tutorials Articles Register
Go Back   LinuxQuestions.org > Forums > Linux Forums > Linux - Distributions > Debian
User Name
Password
Debian This forum is for the discussion of Debian Linux.

Notices


Reply
  Search this Thread
Old 12-18-2004, 08:10 PM   #1
rksanders
LQ Newbie
 
Registered: Nov 2004
Distribution: Debian gnu/linux
Posts: 28

Rep: Reputation: 15
have to be root to run pump


I have to run pump to access the internet. I have to be root to run pump. It allworks fine, but it would be severalsteps faster for me if I could run pump as user rather than as root.
I have tried changing pump's group to mine--still get the message "pump: must be run as root." Then I changed owner to my username. Same message. pump is located in /sbin, so I changed the group ownership of sbin to my group. Still the samemessage.
The permissions for pump are (and have always been) -rwxr-xr-x suggesting that the "world" as well as the owner and the group members should be able to run pump.
It's just one of those frustrating little problems that I should be able to to solve and havn't been able to.

Any ideas?

Thanks

Rusty
 
Old 12-19-2004, 04:57 PM   #2
corfe
Member
 
Registered: Dec 2004
Location: Washington State, USA
Distribution: Debian Sid
Posts: 128

Rep: Reputation: 16
Well, right off the bat I want to say - for a good security system, you SHOULD have to be root to run pump. If this seems cumbersome, try the "su -" command - this will ask you for the root password, and change your shell to root accesses temporarily. Type "exit" in that same shell to become your regular user again. Even better, you can type "sudo command", it will ask you for the password, and then run only that command as root (e.g. pump).

Anyways, you are correct those file permissions allow people to run pump. However, just because you can run pump, doesn't mean pump has the proper permissions to change your network settings. For example, if you downloaded a pump binary yourself from the internet into your user directory and ran it, the system wouldn't let you just modify all the network settings either, just like putting a USB stick in the machine with "fdisk" on it wouldn't let you format the boot drive of the system. You have to be running pump as root for it to do its work. You can solve this problem by setting pump's binary to have root permissions. You can do this by typing "chmod +s /sbin/pump" - then this will probably work. However, THIS IS A VERY BAD IDEA, AND I STRONGLY SUGGEST YOU DO NOT DO THIS. You can revert this change with "chmod -s /sbin/pump". If later a bug is found in pump that allows you to manipulate the program to do other things (like a buffer overflow), any user will be able to get root access to your system to do ANYTHING THEY WANT. Further, even without a flaw in pump, any user who logs into your machine, or any program a user runs will be able to change any of the network settings they can get pump to change for them. The system is set in place to protect you and your system, so please check out the solution in the first paragraph. I'm only telling you this solution to teach you more about how your system works, but please don't actually use it in your system, unless you just want to test that it works.

If you have any questions about any of this, please ask, it's a good thing for administering a linux box to understand well!
 
Old 12-19-2004, 06:39 PM   #3
rksanders
LQ Newbie
 
Registered: Nov 2004
Distribution: Debian gnu/linux
Posts: 28

Original Poster
Rep: Reputation: 15
Hi Corfe,

Thanks for such a complete and educational answer.

My machine boots to a command line login. At this point I login as user. I have been
doing the following:

su
enter
root password
enter
pump
enter
wait several seconds for pump to return
"etho: setting 100mbs full-duples based on auto-negotiated partner ability 45 e1.
exit
enter
and I am back to user at which point I startx.

I thought I wanted to cut out the extra steps su to root in order to have the internet access
set up when I started x.
It looks like the sudo-command-password would be the appropriate way to go since
I only want to run the one command. However, when I type 'sudo pump' I get "sudo: command not found

I had no concept of the dangers involved. Haven't learned much about security yet.

BTW the chmod +s /sbin/pump worked perfectly, as did chmod -s /sbin/pump.

What was bugging me was being unable to run pump as user. I have now
"been there, done that" and I can now go back to becoming root to run pump, without being frustrated.


Many Thanks!!

Rusty

Last edited by rksanders; 12-19-2004 at 06:50 PM.
 
Old 12-20-2004, 11:39 AM   #4
corfe
Member
 
Registered: Dec 2004
Location: Washington State, USA
Distribution: Debian Sid
Posts: 128

Rep: Reputation: 16
Anytime - by the way, the "sudo" program should be in a package in your distro by the same name, you might want to look it up . It's also handy to let you run X programs as root, which "su" won't let you easily do.

And, your system should have an option to run "pump" as part of the system startup, and then you won't have to worry about "su"ing into root or anything like that to get connected. Maybe you already know this, or maybe there's some reason you're not doing that, but just making sure you've thought of it.
 
  


Reply



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
no pump stabu Ubuntu 3 04-03-2005 04:39 AM
I have to ssh -l root to run root processes!? paul.nel Red Hat 3 11-15-2004 11:55 AM
LimeWire installed as root, can't run if not root sulzla Linux - Newbie 1 07-01-2003 07:48 PM
Pump.. Pongo Linux - Newbie 1 01-20-2003 11:33 AM
pump febisfebi Linux - Networking 1 11-29-2001 06:25 AM

LinuxQuestions.org > Forums > Linux Forums > Linux - Distributions > Debian

All times are GMT -5. The time now is 05:13 PM.

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
Open Source Consulting | Domain Registration