GNOME Bugzilla – Bug 682467
With automatic login, logging out logs me in again immediately
Last modified: 2012-11-06 21:07:32 UTC
Reproducible with GDM 3.5.90 - Enable automatic login, and boot your system - Click Log out from the shell menu Expected: - The login screen is displayed Actual: - I'm logged in automatically again See attached video. Note that at this point, if I log out again from the user menu, I hit bug 682465
Created attachment 222146 [details] video
We are having this same issue while trying to get auto-login setup for the Ubuntu GNOME live CD. we want the live CD to auto-login on boot, but users need to be able to logout if they want to try the fallback session. Mostly clicking 'log out' in the usermenu results in and autologin again, however occasionally it does work and go to the login screen. Even more occasionally it just crashes.
Created attachment 225449 [details] syslog with gdm debugging
Strangely, log out seems to work if I set both the system username and hostname to the same value.
hmm Sep 30 21:49:14 ubuntu gdm[7073]: DEBUG(+): GdmSignalHandler: handling signal 15 Sep 30 21:49:14 ubuntu gdm[7073]: DEBUG(+): GdmSignalHandler: Found 1 callbacks Sep 30 21:49:14 ubuntu gdm[7073]: DEBUG(+): GdmSignalHandler: running 15 handler: 0x409240 Sep 30 21:49:14 ubuntu gdm[7073]: DEBUG(+): Got callback for signal 15 Sep 30 21:49:14 ubuntu gdm[7073]: DEBUG(+): Caught signal 15, shutting down normally. Sep 30 21:49:14 ubuntu gdm[7073]: DEBUG(+): GdmSignalHandler: Caught termination signal - calling fatal func Sep 30 21:49:14 ubuntu gdm[7073]: DEBUG(+): GDM finished, cleaning up... so the main gdm process is getting killed. We currently store whether or not it's the first login in the main gdm process. I guess we need to find out why it's getting killed and fix that, and potentially also record to /var/run/gdm instead of using a static variable. actually one "quick fix" might be something like +++ b/data/pam-redhat/gdm-autologin.pam @@ -1,5 +1,6 @@ #%PAM-1.0 auth required pam_env.so +auth required pam_tally2.so file=/var/run/gdm/autologin-counter deny=2 auth required pam_permit.so auth include postlogin account required pam_nologin.so but i don't really like that.
Created attachment 225852 [details] [review] slave: only set up autologin conversations Right now any time any session conversation is started, we run its setup call if autologin is enabled. We should only do this for autologin sessions, otherwise, we may repeat work done by the greeter.
Created attachment 225853 [details] [review] daemon: user marker file for tracking autologin instead of static variable. We currently decide whether or not to skip autologin by a first_login state variable in the static display object. These days we can have multiple static display objects, so storing the state variable doesn't make much sense. We could make the variable static, but instead this commit switches to using a marker file in /var/run/gdm.
Tim do you mind giving these a go?
ok, I have tested the patches, and can now logout when autologin is enabled. However X is still respawning on a new display each time (i.e :2, :3 etc.). This only happens with autologin enabled and only for the autologin user.
Review of attachment 225853 [details] [review]: ::: configure.ac @@ +1349,3 @@ +AC_SUBST(GDM_RAN_ONCE_MARKER_FILE) +AC_DEFINE_UNQUOTED(GDM_RAN_ONCE_MARKER_FILE, "$GDM_RAN_ONCE_MARKER_FILE", [ran once marker file]) + Is there any reason to make this configurable ? How does that make the world a better place ?
(In reply to comment #10) > Review of attachment 225853 [details] [review]: > > ::: configure.ac > @@ +1349,3 @@ > +AC_SUBST(GDM_RAN_ONCE_MARKER_FILE) > +AC_DEFINE_UNQUOTED(GDM_RAN_ONCE_MARKER_FILE, "$GDM_RAN_ONCE_MARKER_FILE", [ran > once marker file]) > + > > Is there any reason to make this configurable ? > How does that make the world a better place ? No reason, other than there is already a bunch of things that shouldn't be configurable in configure.ac, I wanted to be consistent in my handling of the ways the variable gets defined. I could do a preliminary patch to drop the other bits and then hard code this one as well.
Ray are you planning to include these patches in 3.6.1?
yea
Leaving open for now given comment 9 Attachment 225852 [details] pushed as 47c7302 - slave: only set up autologin conversations Attachment 225853 [details] pushed as 11d4b97 - daemon: user marker file for tracking autologin instead of static variable.
I think comment 9 might be because of bug 686186 Tim do you mind checking? If so I'll close this report out.
Just tested the patch from bug 686186 and it does not seem to fix the issue from comment 9.
bummer
I still seem to reproduce this bug with GDM 3.6.1, bumping version.
oh we fixed this with commit 11d4b97bfda92a254d2ef55b4795456367a3cfbb