Made LiveCD, root account "auto-logs in" but it shouldnt!
Linux - GeneralThis 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.
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.
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.
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)
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.
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
LinuxQuestions.org is looking for people interested in writing
Editorials, Articles, Reviews, and more. If you'd like to contribute
content, let us know.