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
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.
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
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
Summary: I have a fresh install of Mandrake 10.1 but Mozilla and Firefox will only run from a Konsile as root.. Konqueror is fine from a "normal" user Any ideas? Thanks ...
Summary: Does anyone have any idea what might have happened here? All of a sudden, I can't login as a regular user on my Fedora Linux box anymore. I can only login as ROOT. Every other account gives me an e...
Summary: If you want to use the program without typing the root password, do it this way (from a shell): chmod u+s program If you wanted to make `ls' always run as root (Even though that is stupid) you could: ...