[Date Prev][Date Next] [Thread Prev][Thread Next] [Date Index] [Thread Index]

Re: Some newbie questions



vanillicat <vanilli@nycap.rr.com> writes:
> On Sat, 2002-07-27 at 03:20, Paul Johnson wrote:
>> 1) Don't do that!  Seriously, log in as a regular user, if you need to
>>    do something as root, su, and be sure to hit ^D when you're doing
>>    what you need to as superuser.  If you, for whatever reason, need
>>    an X display as root, use xhost or xauth (I'm not horribly familiar
>>    with the usage of either command).
>
> How about doing xhost + local:root ?

xhost is almost always the wrong answer.  Your proposed invocation
would completely remove all access control to the X server; this would
be Really Bad if the default Debian settings weren't to disallow
direct remote X connections and now is just Somewhat Bad.  (Worse
because the original questioner is proposing to do things as root, so
there's obvious possibilities for attackers to pick up the root
password with a connection to the X server.)

There are several good ways to run X applications as root which have
come up on this list; I'd search the list archives.  'sudo' will let
you run a single command as root (or another user), and does the right
things to get X access.  There's also a 'sux' package which acts like
normal su but also sets up the environment to run X commands.

Whether this is a good thing or not is somewhat questionable, though.
GNOME has a *huge* code bass, for example; do you *really* trust all
of the code in it to be bug-free and not trample on things you care
about when you're mucking around as root?

-- 
David Maze         dmaze@debian.org      http://people.debian.org/~dmaze/
"Theoretical politics is interesting.  Politicking should be illegal."
	-- Abra Mitchell


-- 
To UNSUBSCRIBE, email to debian-user-request@lists.debian.org 
with a subject of "unsubscribe". Trouble? Contact listmaster@lists.debian.org



Reply to: