RE: [SLE] Running a program as root?
-----Original Message----- From: Jerry Feldman [mailto:gaf@blu.org] Sent: Tuesday, September 13, 2005 3:43 PM To: suse-linux-e@suse.com Subject: Re: [SLE] Running a program as root?
On Tuesday 13 September 2005 3:35 pm, Jay Paulson wrote:
Hopefully this is an easy question.
I need to run a program as root user in the KDE GUI Desktop. I'm currently logged in as a local user. Is there a way to run a single program as the root use when logged in as a local user? This way
the
program will have all the permissions it needs in order to do it's job.
There are a few ways of doing that. Some will automagically ask you for the root password and then run. You can also use sudoers. Another method is to simply su- or sux - to root and run from there.
I got it working. However, let me tell you what I did to make sure this is correct and secure. I just opened a terminal and su'ed to root. Then I went to the directory the application is in that I wanted to run and I executed the command. Poof that application is now running as root. :) This is one way to do it. As James alluded to there is a program called sudo(1). Sudo uses a file, /etc/sudoers, that allows various users to use sudo. Sudo is very useful for running a quick program: sudo foo In this case, foo will run as root.
As a general thing, get in the habit of using sudo for everything -- ideally, you shouldn't ever have to log in as root.... It's just good security practice.
As a general thing, get in the habit of using sudo for everything -- ideally, you shouldn't ever have to log in as root....
It's just good security practice. Very good advice. We run the BLU servers remotely as they are buried in our colo host. I have
On Tuesday 13 September 2005 4:56 pm, Marlier, Ian wrote: the root password squirreled away, but we never use it. -- Jerry Feldman <gaf@blu.org> Boston Linux and Unix user group http://www.blu.org PGP key id:C5061EA9 PGP Key fingerprint:053C 73EC 3AC1 5C44 3E14 9245 FB00 3ED5 C506 1EA9
participants (2)
-
Jerry Feldman
-
Marlier, Ian