You are not logged in.

#1 2013-01-07 13:37:43

graph
Member
Registered: 2010-12-21
Posts: 105

[SOLVED] My Xorg is running as root - Is that safe?

I just noticed that Xorg is running as root - Is this a security risk, and if so, how do I start it as an ordinary user?
Output from "ps lax" with only relevant bits:

UID     Command
1000   xinit xterm -nolisten tcp -- /etc/X11/xinit/xserverrc :0 -auth /tmp/serverauth.OIuDAcZ705
0        /usr/bin/X :0 -nolisten tcp :0 -auth /tmp/serverauth.OIuDAcZ705

I start X with the following snippet from /etc/zsh/zprofile:

if [[ -z $DISPLAY && $(tty) = /dev/tty1 && $UID = 1000 ]]; then
    startx -nolisten tcp;
    logout
fi

Last edited by graph (2013-01-07 13:56:12)

Offline

#2 2013-01-07 13:43:15

Trilby
Inspector Parrot
Registered: 2011-11-29
Posts: 30,554
Website

Re: [SOLVED] My Xorg is running as root - Is that safe?


"UNIX is simple and coherent" - Dennis Ritchie; "GNU's Not Unix" - Richard Stallman

Offline

#3 2013-01-07 13:55:28

graph
Member
Registered: 2010-12-21
Posts: 105

Re: [SOLVED] My Xorg is running as root - Is that safe?

Well, I tried the wiki, google and the forum's search mechanism before posting. Didn't thought about combining the last two though, which was kind of stupid.

This thread has the answer, and tl;dr is, it's doable, but a bit too complicated.
For an idea of the steps needed, take a look at this page on the Gentoo Wiki.

Last edited by graph (2013-01-07 13:55:49)

Offline

#4 2013-01-08 06:06:39

ConnorBehan
Package Maintainer (PM)
From: Long Island NY
Registered: 2007-07-05
Posts: 1,359
Website

Re: [SOLVED] My Xorg is running as root - Is that safe?

There is some interest in making non-root X the default. But yeah, this special case confused me as well. When I first saw that running "startx" as a user causes "X" to run as root, it seemed like any program could just decide to elevate its own privileges.


6EA3 F3F3 B908 2632 A9CB E931 D53A 0445 B47A 0DAB
Great things come in tar.xz packages.

Offline

Board footer

Powered by FluxBB