Computing.Net > Forums > Linux > program only run as root

Computer Problems? Computing.Net has over 1,000,000 posts about all things technology related! Over 90% answered within 24 hours! Click here to start participating now! Also, be sure to check out the New User Guide.

program only run as root

Reply to Message Icon

Name: bruno buys
Date: November 24, 2003 at 12:11:15 Pacific
OS: suse 8.2
CPU/Ram: xp/256
Comment:

I compiled and installed fvcool (cpu cooling) in my suse 8.2. But I can only run it as root.

I couldn't compile it as a normal user, it doesn't accept "make install". But as root, I can't make it run as normal user.

How do I compile and isntall it as normal user?



Sponsored Link
Ads by Google

Response Number 1
Name: 987
Date: November 24, 2003 at 12:32:36 Pacific
Reply:

As user, you can't do a 'make install', only root can. Take a look at sudo. This lets regular users run programs specifed in the /etc/sudoers file as root. Also, to run programs on the fly, try 'su -c "[program]" '. This will give you a password prompt and run the prgram as root, but not log in as root.


0

Response Number 2
Name: bruno buys
Date: November 24, 2003 at 18:53:49 Pacific
Reply:

Now, the console, after logged as root says:

runo@frank:~> /usr/local/sbin/fvcool -e
cannot open IO-port, must run as root!
: Operation not permitted
bruno@frank:~>

But I was logged as root, indeed.

What is it? How can I overcome that?


0

Response Number 3
Name: unixhead
Date: November 25, 2003 at 02:45:40 Pacific
Reply:

If it reads: "bruno@frank", you are not in root.


0

Response Number 4
Name: 3Dave
Date: November 25, 2003 at 05:38:17 Pacific
Reply:

Another (but possibly not recommended) way might be to suid (Set User ID), as root:
# chmod +s /usr/local/sbin/fvcool

Bear in mind though that /usr/local/sbin/ will not be in a regular users path, so instead of running the program by just typing fvcool you will either have to type /usr/local/sbin/fvcool or create a symbolic link, eg:
# ln -s /usr/local/sbin/fvcool /usr/local/bin/


0

Response Number 5
Name: bruno buys
Date: November 25, 2003 at 19:24:07 Pacific
Reply:

Yes, thank you all. Now it works.

3Dave: Through this link a normal user can run root programs?


0

Related Posts

See More



Response Number 6
Name: 3Dave
Date: November 26, 2003 at 01:56:40 Pacific
Reply:

If you have the suid bit set (with the chmod commnad above) then yes....hence it is not always recommended to do it that way.

A better way would be to configure sudo to allow for users to run that command as root with no password. Then, provided that you set up the link, all they will need to type is:
$ sudo fvcool
Or instead of creating a link in /usr/local/bin , create a shell scipt called fvcool:
#!/bin/bash
sudo /usr/local/sbin/fvcool


0

Sponsored Link
Ads by Google
Reply to Message Icon






Post Locked

This post is quite old and has been locked from receiving new replies. Please create a new posting instead.


Go to Linux Forum Home


Sponsored links

Ads by Google


Results for: program only run as root

Mozilla only runs as root user www.computing.net/answers/linux/mozilla-only-runs-as-root-user/27334.html

Can only login as ROOT www.computing.net/answers/linux/can-only-login-as-root/27757.html

Running a program as root www.computing.net/answers/linux/running-a-program-as-root-/16372.html