XFCE starts as root w/o login screen

Doug Laidlaw laidlaws at hotkey.net.au
Thu Feb 4 01:22:49 CET 2010


On Thu, 4 Feb 2010 01:06:18 am Mark Knecht wrote:
> On Tue, Feb 2, 2010 at 10:49 PM, Doug Laidlaw <laidlaws at hotkey.net.au> 
wrote:
> > (Copy for the list.  I hit the wrong Reply button - again  :(
> > Addendum: I think that Suse uses init 4, called unused by default.)
> >
> > On Wed, 3 Feb 2010 02:54:39 pm you wrote:
> >> On Tue, Feb 2, 2010 at 5:51 PM, Doug Laidlaw <laidlaws at hotkey.net.au> 
wrote:
> >> > On Wed, 3 Feb 2010 10:19:05 am Mark Knecht wrote:
> >> >> On Tue, Feb 2, 2010 at 3:09 PM, Mark Neis <neismark at gmx.de> wrote:
> >> >> > -----BEGIN PGP SIGNED MESSAGE-----
> >> >> > Hash: SHA1
> >> >> >
> >> >> > Hi Doug,
> >> >> >
> >> >> > thanks for taking the time to answer.
> >> >> >
> >> >> > You said:
> >> >> >> Since XFCE is only the desktop, your problem is further up, or
> >> >> >> back.
> >> >> >
> >> >> > That's exactly my problem. I'm not sure where to look.
> >> >> > My understanding so far has been that the display manager asks for
> >> >> > a login. Hence I should probably try to install and start xdm...
> >> >> >
> >> >> >> You need to have a user account in the OS, and login as that user.
> >> >> >
> >> >> > I do have a user account on the system (I created one), but finding
> >> >> > a way to make the system require a login beats me. It does on the
> >> >> > console (i. e. on a different tty), but not when starting X.
> >> >> >
> >> >> >> http://fos.foxconn.com/index.php?lanmu_id=44
> >> >> >
> >> >> > Documentation about FoxOS is virtually non-existent. I also tried
> >> >> > Fedora, but as they use Gnome or KDE by default, that didn't take
> >> >> > me any further, either.
> >> >> >
> >> >> >
> >> >> > Mark
> >> >>
> >> >> What's in your /etc/inittab file? I have a couple of machine I do
> >> >> auto-login setups on by modifying that file. Maybe these FoxOS guys
> >> >> did something like that?
> >> >>
> >> >> Cheers,
> >> >> Mark
> >> >> _______________________________________________
> >> >> Xfce mailing list
> >> >> Xfce at xfce.org
> >> >> http://foo-projects.org/mailman/listinfo/xfce
> >> >> http://www.xfce.org
> >> >
> >> > But before you decide about the login, you need to have a user.
> >> >  /etc/inittab decides whether your display is text-only (level 3) or
> >> > graphical (level 5). It doesn't create any users.  A proper login
> >> > needs an xdm or similar file, although KDE allows you to bypass it.
> >> > There should be a configurator somewhere, but since I run Mandriva, I
> >> > don't know where to look.  Run "less /etc/passwd"; that will show you
> >> > which users are known to the system.  If you weren't invited to create
> >> > a user, there probably isn't one.  If a user such as "guest" is
> >> > listed, you should be able to log in as that.
> >> >
> >> > This is not an Xfce problem.  You need a forum for the OS.  There is a
> >> > "Support" link on the Web page I gave you; I am not going to do any
> >> > more of your homework for you.
> >> >
> >> > Doug.
> >>
> >> I agree that it's not an XFCE problem so he could take the question
> >> elsewhere, but I disagree that he doesn't have a user. He said in the
> >> original post that XFCE is running as root. root is his user, and that
> >> can be done in inittab.
> >>
> >> - Mark
> >
> > What is the line in /etc/inittab?  Mine is set out below.
> >
> > "#
> > # inittab       This file describes how the INIT process should set up
> > #               the system in a certain run-level.
> > #
> > # Author:       Miquel van Smoorenburg, <miquels at drinkel.nl.mugnet.org>
> > #               Modified for RHS Linux by Marc Ewing and Donnie Barnes
> > #
> >
> > # Default runlevel. The runlevels used by Mandriva Linux are:
> > #   0 - halt (Do NOT set initdefault to this)
> > #   1 - Single user mode
> > #   2 - Multiuser, without NFS (The same as 3, if you do not have
> > networking) #   3 - Full multiuser mode
> > #   4 - unused
> > #   5 - X11
> > #   6 - reboot (Do NOT set initdefault to this)
> > #
> > id:5:initdefault:
> >
> > # System initialization.
> > si::sysinit:/etc/rc.d/rc.sysinit
> >
> > l0:0:wait:/etc/rc.d/rc 0
> > l1:1:wait:/etc/rc.d/rc 1
> > l2:2:wait:/etc/rc.d/rc 2
> > l3:3:wait:/etc/rc.d/rc 3
> > l4:4:wait:/etc/rc.d/rc 4
> > l5:5:wait:/etc/rc.d/rc 5
> > l6:6:wait:/etc/rc.d/rc 6
> >
> > # Trap CTRL-ALT-DELETE
> > ca::ctrlaltdel:/sbin/shutdown -t3 -r now
> >
> > # When our UPS tells us power has failed, assume we have a few minutes
> > # of power left.  Schedule a shutdown for 2 minutes from now.
> > # This does, of course, assume you have powerd installed and your
> > # UPS connected and working correctly.
> > pf::powerfail:/sbin/shutdown -f -h +2 "Power Failure; System Shutting
> > Down"
> >
> > # If power was restored before the shutdown kicked in, cancel it.
> > pr:12345:powerokwait:/sbin/shutdown -c "Power Restored; Shutdown
> > Cancelled"
> >
> >
> > # Run gettys in standard runlevels
> > 1:2345:respawn:/sbin/mingetty tty1
> > 2:2345:respawn:/sbin/mingetty tty2
> > 3:2345:respawn:/sbin/mingetty tty3
> > 4:2345:respawn:/sbin/mingetty tty4
> > 5:2345:respawn:/sbin/mingetty tty5
> > 6:2345:respawn:/sbin/mingetty tty6
> >
> > # Single user mode
> > ~~:S:wait:/bin/sh "
> >
> >
> > It only says that the system can be started in Single User mode
> > (failsafe) by changing the line:
> >
> > id:5:initdefault:       #i.e. normal graphical mode
> >
> > to read:
> >
> > id:1:initdefault:
> >
> > Single user mode is a text-only mode, and only the root user is allowed.
> > Presumably he is running a graphical view, which is init 5, multi-user.
> >
> > Apart from single user, there is nothing in /etc/inittab to set him to
> > login as anybody in particular -- that is, if there are any other users
> > on the system to select.  It happens elsewhere.  If you change the 5 to
> > 3, you get console mode, but the usual choice of users.  If he logs in as
> > himself, he has to have his own home directory under /home.  The
> > unprivileged user can't write to /root/*
> >
> > Since he is the root user at present, he should be able to look at the
> > directory tree under /home, to see what other users there are.
> >
> > I suspect that because everybody runs Windows with administrative
> > privileges, this "consumer" product has set up Linux to run the same way
> > for convenience, but without looking at it, I can't say.  I would suggest
> > that he install his own choice of distro.
> >
> > I have no authority here. Can't some guru settle the question?
> >
> > Doug.
> > _______________________________________________
> > Xfce mailing list
> > Xfce at xfce.org
> > http://foo-projects.org/mailman/listinfo/xfce
> > http://www.xfce.org
> 
> I  use this to start some mythtv frontends each time they boot. No
> login, they just come up running MythTV.
> 
> In /etc/inittab
> 
> # TERMINALS
> #c1:12345:respawn:/sbin/agetty 38400 tty1 linux
> c1:12345:respawn:/bin/su mythtv -c startx
> c2:2345:respawn:/sbin/agetty 38400 tty2 linux
> c3:2345:respawn:/sbin/agetty 38400 tty3 linux
> c4:2345:respawn:/sbin/agetty 38400 tty4 linux
> c5:2345:respawn:/sbin/agetty 38400 tty5 linux
> c6:2345:respawn:/sbin/agetty 38400 tty6 linux
> 
> and then inside the .xinitrc file (because I used startx above) in the
> mythtv home directory:
> 
> myth12 mythtv # cat .xinitrc
> # .xinitrc
> #exec /usr/bin/fluxbox &
> #exec /usr/bin/evilwm &
> exec /usr/bin/mythfrontend
> myth12 mythtv #
> 
> I'm sure someone smarter than me can figure out using init scripts how
> to do really fancy stuff, but as I show here I run mythfrontend this
> way as well as having tried fluxbox and evilwm. I'm sure you can
> /bin/su root and do whatever you want.
> 
> Again, __clearly__ this is not an XFCE problem he's experiencing. It's
> someone's idea of how to make a Linux machine 'friendly', probably
> gone amuck...
> 
> Cheers,
> Mark
> _______________________________________________
> Xfce mailing list
> Xfce at xfce.org
> http://foo-projects.org/mailman/listinfo/xfce
> http://www.xfce.org
> 
You are using a custom inittab which I can't imagine the OP being able to do, 
or to debug.   He is asking you to do it for him, but can't give you the data 
you need to start doing it. Personally, I can't use respawn.  I am an 
experienced novice only, and I don't touch anything so basic as inittab.

But what you have quoted still doesn't create the user.  inittab runs mythtv 
as user mythtv, but that user must already exist on the system. .xinitrc 
starts your choice of desktop, but not the user, because it is in the $HOME of 
the user you have already selected (mythtv).  (I use startx only occasionally, 
either recovering from runlevel 3 or if X failed to start for some reason.  
That must be why I got the impression that .xinitrc was simply ignored.)

We still come back to the basic question: what users already exist on the 
system?  I have suggested two ways of finding out: /etc/passwd and a list of 
directories in /home.  Neither has been provided.  The OP doesn't know where 
to look to view that info.  A Fedora user may be able to suggest how he would 
find out, but I am running Mandriva.  Without that info, neither of us can 
suggest anything.

Doug.



More information about the Xfce mailing list