LinuxQuestions.org
Visit the LQ Articles and Editorials section
Go Back   LinuxQuestions.org > Forums > Linux Forums > Linux - General
User Name
Password
Linux - General This Linux forum is for general Linux questions and discussion.
If it is Linux Related and doesn't seem to fit in any other forum then this is the place.

Notices

Reply
 
Search this Thread
Old 04-25-2008, 11:25 AM   #1
un_pilote
LQ Newbie
 
Registered: Apr 2008
Posts: 7

Rep: Reputation: 0
Made LiveCD, root account "auto-logs in" but it shouldnt!


Hello all!

I've succeeded in creating my own Gentoo LiveCD. The problem Im having with it now is that for some reason, it auto-logs in to a half-assed version of the root account. $HOME points to / though and to get everything to normal, I have to su root

Obviously this cant do. I need the LiveCD to boot to a CLI login prompt (everything is CLI right now I have no X support).

An initial version of the LiveCD did bring up the login prompt, but something changed when I rebuilt it, and I have no clue what.

Any help appreciated.
 
Old 04-25-2008, 01:28 PM   #2
jailbait
Guru
 
Registered: Feb 2003
Location: Blue Ridge Mountain
Distribution: Debian Wheezy, Debian Jessie
Posts: 7,503

Rep: Reputation: 174Reputation: 174
You need to start bash as a login shell:

bash --login

Take a look where you define your initial run level and make sure that your bash command has the --login option.

-----------------
Steve Stites
 
Old 04-25-2008, 02:44 PM   #3
un_pilote
LQ Newbie
 
Registered: Apr 2008
Posts: 7

Original Poster
Rep: Reputation: 0
I've looked at some of the most obvious files I could think of... comparing the ones on the LiveCD to the ones on my Gentoo host (laptop)

/etc/inittab
/sbin/rc
/etc/rc.conf
/etc/conf.d/rc
/etc/runlevels/

All the files are identical to the ones on my host Gentoo.

The thing that bugs me the most is that when I first made the LiveCD, it logged in fine. When I re-made it a day later (I added dhcpcd, elinks, irssi, yafc, nopaste) that version would do the auto-login thing.

Also (perhaps unrelated) that second version for some reason it seems some of the files and directories would get corrupt timestamps.

For example, normally:
drwxr-xr-x 15 root root 4096 Mar 23 19:11 usr

But the "corrupt" one looks like this:
drwxr-xr-x 13 root root 4096 Apr 19 2007 usr

I've no idea why. It didnt happen the first time 'round and Im wondering if perhaps thata would be the cause of the problem.

If I boot the LiveCD shortly after making it, I get a bunch of info messages during boot up about config files having edit times in the future. If I wait a few hours, the messages disappear.

Either way though, the auto-login still occurs.
 
Old 04-25-2008, 04:17 PM   #4
jailbait
Guru
 
Registered: Feb 2003
Location: Blue Ridge Mountain
Distribution: Debian Wheezy, Debian Jessie
Posts: 7,503

Rep: Reputation: 174Reputation: 174
Quote:
Originally Posted by un_pilote View Post

If I boot the LiveCD shortly after making it, I get a bunch of info messages during boot up about config files having edit times in the future. If I wait a few hours, the messages disappear.
This problem is probably due to the difference in local time and GMT. Your LiveCD is probably using the BIOS clock which is probably set to GMT. Gentoo may be using local time and setting your file times to local time which you then copy into the LiveCD.



Quote:
Originally Posted by un_pilote View Post

I've looked at some of the most obvious files I could think of... comparing the ones on the LiveCD to the ones on my Gentoo host (laptop)

/etc/inittab
/sbin/rc
/etc/rc.conf
/etc/conf.d/rc
/etc/runlevels/

All the files are identical to the ones on my host Gentoo.

The thing that bugs me the most is that when I first made the LiveCD, it logged in fine. When I re-made it a day later (I added dhcpcd, elinks, irssi, yafc, nopaste) that version would do the auto-login thing.


I've no idea why. It didnt happen the first time 'round and Im wondering if perhaps thata would be the cause of the problem.

Either way though, the auto-login still occurs.
What you are describing is exactly the difference between getting a CLI by issuing a bare bash command and getting a CLI by issuing a bash --login command. So you need to find where in the LiveCD you issue a bash command and change it to bash --login, even if that is not the way that Gentoo does it. I suspect that the Gentoo scripts go on to issue a GUI login screen so it doesn't have --login on the bash command that it uses to startx.

-------------------
Steve Stites
 
Old 04-25-2008, 07:31 PM   #5
un_pilote
LQ Newbie
 
Registered: Apr 2008
Posts: 7

Original Poster
Rep: Reputation: 0
It turns out the problem was due to a package livecd-tools which modifies /sbin/rc to load a script (/sbin/livecd-functions.sh) and one of the functions of this script is to modify /etc/inittab on bootup.

The modified inittab would bypass logging in, but its kinda screwy. Anyways, I commented out the lines in /sbin/livecd-functions.sh that dealt with modifying /etc/inittab, and then commented out the line in /sbin/rc that made reference to that section of the script.

So all is good.

It turns out in my first release of the livecd, I hadnt installed the package livecd-tools
 
  


Reply


Thread Tools Search this Thread
Search this Thread:

Advanced Search

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is On
HTML code is Off


Similar Threads
Thread Thread Starter Forum Replies Last Post
Logged in as "root"/Fedora 8 but get "Operation not permitted" when using "chmod etc gosunlee Linux - Newbie 7 02-10-2008 05:56 AM
Standard commands give "-bash: open: command not found" even in "su -" and "su root" mibo12 Linux - General 4 11-11-2007 10:18 PM
Root can log on, user account can't. "Error in service module" Charlie Spencer Linux - Newbie 3 09-13-2006 01:35 PM
have livecd of 'Linux Gentoo' how do i get past the "livecd root #" command line? randell6564 Linux - Distributions 11 11-20-2005 12:31 PM
[Redhat] make "admin" account same privledges as "root" Bi0haZarD Linux - Networking 20 01-12-2005 10:47 AM


All times are GMT -5. The time now is 05:06 AM.

Main Menu
My LQ
Write for LQ
LinuxQuestions.org is looking for people interested in writing Editorials, Articles, Reviews, and more. If you'd like to contribute content, let us know.
Main Menu
Syndicate
RSS1  Latest Threads
RSS1  LQ News
Twitter: @linuxquestions
identi.ca: @linuxquestions
Facebook: linuxquestions Google+: linuxquestions
Open Source Consulting | Domain Registration