Re: Root privilege (SOLVED)
On Sun, Jan 07, 2007 at 09:22:38PM EST, Roberto C. Sanchez wrote:
> On Mon, Jan 08, 2007 at 03:19:56AM +0100, Danesh Daroui wrote:
> > Actually I had tried it before and I couldn't. It is cool since Debian
> > increases security like this, but I modified login settings in login
> > page to allow "root" to login and now it works.
> I will reiterate the sentiments that some others have expressed. This
> is a very bad idea. There is nothing that absolutely requires that you
> login as root. Between su and sudo, you are able to do anything
> requiring elevated privileges.
Quick hack from a bash prompt:
$ /bin/su - /* switch to root */
# export DISPLAY=:0.0 /* let root access */
# export XAUTHORITY=~yourid/.Xauthority /* .. your display */
# guiapp & /* start application */
The above lets you run a single GUI application ("guiapp") as root ..
rather than an entire desktop session with all its bells and whistles.
Naturally, you may need to adjust the value of the DISPLAY variable if
you are running more than one X session.
Before you su to root just check the contents of the DISPLAY variable:
$ echo $DISPLAY
The only time I've used the above trick was to run ethereal capture in
I don't use gnome or KDE but I thought the sysadmin GUI's prompted for
root's password for tasks where root privileges were necessary.. ??
The OP doesn't say what graphical application he needs to run as root ..
and why it needs superuser privileges ¿
Likely, depending on what he wants to achieve, adding his user to the
relevant group(s) -- as recommended elsewhere in this thread, I think ..
would be a more sensible solution.