The following URL describes a method for an autologin to a Linux machine: http://www.gentoo-wiki.info/TIP_Passwordless_Login This autologin method fails with the login program from shadow packages that are greater than 4.1.3.1. Using any shadow package 4.1.4 and higher will cause the machine to hang when using the autologin method. Shadow packages 4.1.3.1 and lower will allow the autologin method to succeed as desribed in the wiki article. This obviously is an upstream issue because several changes have been made to the login source code by the developers. However, I thought it would be best to report this issue here because the wiki article is based on a Gentoo forum post and other Gentoo users will experience the same problem if they choose to autologin to their machines using this method. Reproducible: Always Steps to Reproduce: 1. Use any ebuild of shadow greater than 4.1.3.1 2. Change inittab and other files according to the method in the wiki article 3. Reboot the machine Actual Results: The machine, instead of automatically logging on, will hang. No messages of any kind are reported or logged. I traced the issue to a specific shadow version number by compiling the sources taken from this location: ftp://pkg-shadow.alioth.debian.org/pub/pkg-shadow I had to compile the source myself becaue the ebuilds available in the current portage tree do not include every shadow release.
you need to post `emerge --info` and a full build log as an attachment just like every bug report says to
Created attachment 235873 [details] emerge --info
Created attachment 235877 [details] Build log for shadow-4.1.4.2-r3
The problem was first noticed when I attempted to autologin using the login form the latest shadow-4.1.4.2 ebuild. The system hanged at the login process. To reclaim my machine, I had to boot using a backup system which contained an earlier version of the shadow package. Using login from this earlier package allowed the autologin method to be successful. My suspicion was that the login source code has been altered in the newer versions, and this is supported by the Changelog information. How these changes affect autologin I don't understand. But to pinpoint the exact version where the autologin failure first occurred, I compiled all versions of shadow taken from the Debian site. Gentoo portage does not have all prior versions of shadow as ebuilds. Autologin fails beginning with shadow-4.1.4. As I mentioned, this is likely an upstream issue, but since I use Gentoo I thought I'd report the problem here. I have two machines running Gentoo and the problem occurs with both.
i'm wondering if it's only an issue when USE=-pam
does this only happen when running from /etc/inittab ? if you login as root and then manually execute: login -f <user> does it work ? this works for me on USE=pam and USE=-pam ...
(In reply to comment #6) > does this only happen when running from /etc/inittab ? if you login as root > and then manually execute: > login -f <user> Yes, it seems to happen only when login is executed from /etc/inittab, or actually a script called from inittab as described in the wiki page. Manually executing "login -f <user>" causes the login program to hang. There is no response or log messages and only with Ctl-C can I regain control. However, using the older version of login (4.1.3.1) will allow the manual login command to complete normally. There is a new twist. Trying the autologin using login from the latest Gentoo shadow-4.1.4.2-r6, init now reports the following: Id "1" respawning too fast; disabling for 5 minutes ID "1" refers to the autologin entry in inittab, and it seems that login fails to execute at all. Until I can do some further debugging, I'll have to keep using the login from shadow-4.1.3.1.
(In reply to comment #7) > > Yes, it seems to happen only when login is executed from /etc/inittab, or > actually a script called from inittab as described in the wiki page. > I'm sorry. I used the wrong words. Here is what I should have wrote: No, it happens even when I manually execute the "login -f <user>" command.
the init behavior isnt really anything new. if a process launches and exits immediately over and over, then it'll stop trying to respawn it. run the login process through strace: strace -f -s 4096 -o log login -f <user> then post that "log" file as an attachment you might also want to try dropping the "-mfpmath=sse -mssse3 -m128bit-long-double" crap from your CFLAGS and rebuilding glibc/cracklib/zlib/shadow to see if it makes a difference.
(In reply to comment #9) > run the login process through strace: > strace -f -s 4096 -o log login -f <user> > then post that "log" file as an attachment The log file, strace.log, is uploaded. The last two lines result from stopping the process with Ctl-C after a few minutes.
Created attachment 254545 [details] Output of strace
you've got quite a bit of stuff changed from the default in /etc/login.defs. but it seems like it's your CONSOLE setting which is screwing things up. try setting it back to the default of /etc/securetty.
(In reply to comment #12) > but it seems like it's your CONSOLE setting which is screwing things up. try > setting it back to the default of /etc/securetty. > That fixes it. Changing the setting to "/etc/securetty" now allows the autologin procedure to work. The configuration was the fault, but is this issue still to be considered a bug? The previous versions of login did not fail when reading the same configuration file.
I also reported this issue to the Debian shadow maintainers. Based on the information in this Gentoo report, they have identified the source of the problem: http://bugs.debian.org/cgi-bin/bugreport.cgi?bug=600755 A bug in the CONSOLE parser code was introduced in shadow-4.1.4, which will be fixed shortly.
should be fixed in the versions we have in the tree now