LinuxQuestions.org

LinuxQuestions.org (/questions/)
-   Arch (http://www.linuxquestions.org/questions/arch-29/)
-   -   I can only use KDE or e17 as root; I feel so exposed :( (http://www.linuxquestions.org/questions/arch-29/i-can-only-use-kde-or-e17-as-root%3B-i-feel-so-exposed-4175430525/)

Master_CAPS 10-04-2012 01:49 PM

I can only use KDE or e17 as root; I feel so exposed :(
 
I finally got everything setup b/c I stupidly decided to start with the base package...

But anyways I can issue "startx" and then "startkde" and use firefox, audacity, etc... But I cant even start xserver as a normal user.

All I did was "useradd dude". So do I need to create some kind of special group with a special user to run KDE? Also do I need to run KDE in a certain runlevel(I don't think I need to)?

(I don't wish to modify xinitrc yet until I'm done playing with different environments)

Please be easy on me, I just switched from the very cozy Linux Mint and had to learn all of this behind the GUI stuff in between school and work Because its so fun :)

pingu 10-04-2012 03:27 PM

My first guess is that dude's homedir wasn't created.
You need to use "useradd -m <username> to get the homedisr created.
(I'm still running pretty old Debian Lenny, maybe things have changed but in this case I don't think so.)
You can create the homedir by copying (as root) from /etc/skel/ and set permissions:
Code:

cp -a /etc/skel /home/dude
chown -R dude:<dude's group> /home/dude

( If you don't know group, use "user" or try checking with "cat /etc/group |grep dude"
(And remember, I'm on Debian Lenny *NOT* Arch, just in case some details differs.)

Master_CAPS 10-04-2012 06:14 PM

Well I deleted dude and created him again with the -m option

At least now when I issue "startx" my computer doesn't freeze up, but it spits this out:
Code:

[dude@(none) ~]$ startx


X.Org X Server 1.12.4
Release Date: 2012-08-27
X Protocol Version 11, Revision 0
Build Operating System: Linux 3.4.8-1-ARCH i686
Current Operating System: Linux (none) 3.5.4-1-ARCH #1 SMP PREEMPT Sat Sep 15 13:04:04 UTC 2012 i686
Kernel command line: BOOT_IMAGE=/vmlinuz-linux root=UUID=145d9f89-cc55-4378-a187-1fc696b0ea63 ro quiet
Build Date: 27 August 2012  08:08:29AM

Current version of pixman: 0.26.2
        Before reporting problems, check http://wiki.x.org
        to make sure that you have the latest version.
Markers: (--) probed, (**) from config file, (==) default setting,
        (++) from command line, (!!) notice, (II) informational,
        (WW) warning, (EE) error, (NI) not implemented, (??) unknown.
(==) Log file: "/var/log/Xorg.0.log", Time: Thu Oct  4 17:11:07 2012
(==) Using config directory: "/etc/X11/xorg.conf.d"
(II) [KMS] Kernel modesetting enabled.
E: [pulseaudio] main.c: Daemon startup failed.
xinit: connection to X server lost

waiting for X server to shut down Server terminated successfully (0). Closing log file.


I guess there's nothing to really hack, so I could use Firefox and everything as root for now I guess...

pingu 10-05-2012 02:16 AM

That's not a good idea!
The only error you get is about pulseaudio, the other messages are normal.
You need to look into the sound / pulseaudio issue, I suggest start with checking your users group membership.
On my Debian, I'm in these groups - you'll need most of:
dialout, floppy, cdrom, audio, video, plugdev, users, scanner, netdev, powerdev

Lone_Wolf 10-05-2012 05:53 AM

Master_Caps ,

there's an interactive equivalent of useradd that will setup the basic stuff correctly,

just run
Code:

adduser
to create your user.

for groups : audio,video,optical,storage are the ones most used on arch.

SilentSam 10-05-2012 10:05 AM

You can startx as root without error?

Perhaps installing a desktop manager (such as gdm or kdm), switching to runlevel 5 and pointing to it in /etc/inittab will work. Desktop managers start X as root, but everything else is run at the user level once you log in as a regular user in the DM.

Master_CAPS 10-05-2012 11:32 AM

Quote:

Originally Posted by SilentSam (Post 4798033)
You can startx as root without error?

Perhaps installing a desktop manager (such as gdm or kdm), switching to runlevel 5 and pointing to it in /etc/inittab will work. Desktop managers start X as root, but everything else is run at the user level once you log in as a regular user in the DM.


I have thought about this, but I need to read up on run levels and inittab first.
I didn't know xserver runs as root; so xserver runs as root and the KDE environment runs at the user level?

If the abouve is true than could I login as normal user and (su as root) to start Xserver than logout/exit back to normal and start KDE environment? (Ill try this when I get back)

Ill also try the KDM, but I just don't want anything automatically starting untill I'm ready...

Master_CAPS 10-05-2012 11:22 PM

Its time I face my fears and start "living on the edge"; thats right I'm gonna march right into the world-wide-battlefield as ROOT, my routers firewall and network address translation will protect me!

:)

pingu 10-06-2012 04:26 AM

Quote:

Originally Posted by Master_CAPS (Post 4798523)
Its time I face my fears and start "living on the edge"; thats right I'm gonna march right into the world-wide-battlefield as ROOT, my routers firewall and network address translation will protect me! :)

You obviously have no idea what you're doing.
Firewalls can protect you from intruders, but they doesn't protect you against yourself!
If you're on internet as root and download some bad program or click a link you should't have, then processes can be started on your computer - and they will run with root privileges!
You have only a small problem, fix it instead of ignoring it and live dangerously.

How about trying Lone_Wolf's suggestion, create a new user with "adduser", see if that user can run GUI properly?

Master_CAPS 10-07-2012 12:40 AM

Lol, Im back on my "solved thread" with a real solution:

I did add a user with the -m option, it turns out all I had to do was uncomment runlevel 5 and my KDM in the "inittab" file and reboot. From there I was able to login as a non-root user with all my apps and e17 or kde. Thank all you for your help. (And I cam back with a second hard drive this time!)


All times are GMT -5. The time now is 06:15 PM.