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 |
Welcome to LinuxQuestions.org, a friendly and active Linux Community.
You are currently viewing LQ as a guest. By joining our community you will have the ability to post topics, receive our newsletter, use the advanced search, subscribe to threads and access many other special features. Registration is quick, simple and absolutely free. Join our community today!
Note that registered members see fewer ads, and ContentLink is completely disabled once you log in.
Are you new to LinuxQuestions.org? Visit the following links:
Site Howto |
Site FAQ |
Sitemap |
Register Now
If you have any problems with the registration process or your account login, please contact us. If you need to reset your password, click here.
Having a problem logging in? Please visit this page to clear all LQ-related cookies.
 |
GNU/Linux Basic Guide
This 255-page guide will provide you with the keys to understand the philosophy of free software, teach you how to use and handle it, and give you the tools required to move easily in the world of GNU/Linux. Many users and administrators will be taking their first steps with this GNU/Linux Basic guide and it will show you how to approach and solve the problems you encounter.
Click Here to receive this Complete Guide absolutely free. |
|
 |
04-25-2008, 11:25 AM
|
#1
|
|
LQ Newbie
Registered: Apr 2008
Posts: 7
Rep:
|
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.
|
|
|
|
04-25-2008, 01:28 PM
|
#2
|
|
Guru
Registered: Feb 2003
Location: Blue Ridge Mountain
Distribution: Debian Squeeze, Fedora 14
Posts: 7,268
Rep:
|
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
|
|
|
|
04-25-2008, 02:44 PM
|
#3
|
|
LQ Newbie
Registered: Apr 2008
Posts: 7
Original Poster
Rep:
|
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.
|
|
|
|
04-25-2008, 04:17 PM
|
#4
|
|
Guru
Registered: Feb 2003
Location: Blue Ridge Mountain
Distribution: Debian Squeeze, Fedora 14
Posts: 7,268
Rep:
|
Quote:
Originally Posted by un_pilote
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
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
|
|
|
|
04-25-2008, 07:31 PM
|
#5
|
|
LQ Newbie
Registered: Apr 2008
Posts: 7
Original Poster
Rep:
|
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
|
|
|
|
| Thread Tools |
Search this Thread |
|
|
|
Posting Rules
|
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts
HTML code is Off
|
|
|
All times are GMT -5. The time now is 01:48 AM.
|
|
LinuxQuestions.org is looking for people interested in writing
Editorials, Articles, Reviews, and more. If you'd like to contribute
content, let us know.
|
Latest Threads
LQ News
|
|