GNU bug report logs - #35674
GDM auto-login doesn't work

Previous Next

Package: guix;

Reported by: "Alex Griffin" <a <at> ajgrf.com>

Date: Fri, 10 May 2019 20:33:02 UTC

Severity: normal

Merged with 40411

Done: Alex Griffin <a <at> ajgrf.com>

Bug is archived. No further changes may be made.

To add a comment to this bug, you must first unarchive it, by sending
a message to control AT debbugs.gnu.org, with unarchive 35674 in the body.
You can then email your comments to 35674 AT debbugs.gnu.org in the normal way.

Toggle the display of automated, internal messages from the tracker.

View this report as an mbox folder, status mbox, maintainer mbox


Report forwarded to bug-guix <at> gnu.org:
bug#35674; Package guix. (Fri, 10 May 2019 20:33:03 GMT) Full text and rfc822 format available.

Acknowledgement sent to "Alex Griffin" <a <at> ajgrf.com>:
New bug report received and forwarded. Copy sent to bug-guix <at> gnu.org. (Fri, 10 May 2019 20:33:03 GMT) Full text and rfc822 format available.

Message #5 received at submit <at> debbugs.gnu.org (full text, mbox):

From: "Alex Griffin" <a <at> ajgrf.com>
To: bug-guix <at> gnu.org
Subject: GDM auto-login doesn't work
Date: Fri, 10 May 2019 16:31:27 -0400
[Message part 1 (text/plain, inline)]
After configuring Guix to enable GDM auto-login, I am still presented with a password prompt upon booting my machine. I'm not sure whether it's a bug in Guix or something I'm doing wrong, so I've attached the configuration I'm using just in case.
-- 
Alex Griffin
[system.scm (text/x-scheme, attachment)]

Information forwarded to bug-guix <at> gnu.org:
bug#35674; Package guix. (Fri, 10 May 2019 21:20:02 GMT) Full text and rfc822 format available.

Message #8 received at 35674 <at> debbugs.gnu.org (full text, mbox):

From: Ricardo Wurmus <rekado <at> elephly.net>
To: Alex Griffin <a <at> ajgrf.com>
Cc: 35674 <at> debbugs.gnu.org
Subject: Re: bug#35674: GDM auto-login doesn't work
Date: Fri, 10 May 2019 23:18:59 +0200
Hi Alex,

> After configuring Guix to enable GDM auto-login, I am still presented
> with a password prompt upon booting my machine. I'm not sure whether
> it's a bug in Guix or something I'm doing wrong, so I've attached the
> configuration I'm using just in case.

I have observed the same problem.  It’s not something you’re doing wrong.

--
Ricardo





Information forwarded to bug-guix <at> gnu.org:
bug#35674; Package guix. (Mon, 13 May 2019 14:26:02 GMT) Full text and rfc822 format available.

Message #11 received at 35674 <at> debbugs.gnu.org (full text, mbox):

From: Timothy Sample <samplet <at> ngyro.com>
To: 35674 <at> debbugs.gnu.org
Cc: Ricardo Wurmus <rekado <at> elephly.net>, Alex Griffin <a <at> ajgrf.com>
Subject: Re: bug#35674: GDM auto-login doesn't work
Date: Mon, 13 May 2019 10:24:58 -0400
Hello,

Ricardo Wurmus <rekado <at> elephly.net> writes:

> Hi Alex,
>
>> After configuring Guix to enable GDM auto-login, I am still presented
>> with a password prompt upon booting my machine. I'm not sure whether
>> it's a bug in Guix or something I'm doing wrong, so I've attached the
>> configuration I'm using just in case.
>
> I have observed the same problem.  It’s not something you’re doing wrong.

I noticed recently that GDM stopped reading its configuration file.  I
pushed a430a3501a6d3a565cb78e04a8dbb3ab846ec5fc, which fixes that
problem, but unfortunately does not fix auto-login.

If I turn on debugging output, I can see that the issue has to do with
the way PAM is configured.  Digging a little deeper, I found that our
auto-login PAM service is

    auth [success=ok default=1] pam_gdm.so
    auth sufficient pam_permit.so

What this means is that if “pam_gdm.so” is not successful, the
“pam_permit.so” line will be skipped, and auto-login will not work.  The
“pam_gdm.so” module does some sort of cached password lookup using the
“keyutils” library (presumably for an encrypted home directory).  Our
build of GDM does not support this (we don’t include “keyutils” in its
inputs), so the module never succeeds.  As a result, auto-login fails.

It looks like this particular way of doing things was cribbed from Red
Hat, where the module that gets skipped by “default=1” is
“pam_gnome_keyring.so” (and not “pam_permit.so”).  Other distros simply
mark it as optional.  I suggest we either omit the first rule, since it
will never do anything anyway, or follow other distros and change its
control field to “optional”.

My experience with PAM is limited, so I would appreciate a second
opinion before committing anything.


-- Tim




Information forwarded to bug-guix <at> gnu.org:
bug#35674; Package guix. (Fri, 01 Nov 2019 16:04:03 GMT) Full text and rfc822 format available.

Message #14 received at 35674 <at> debbugs.gnu.org (full text, mbox):

From: "Alex Griffin" <a <at> ajgrf.com>
To: "Timothy Sample" <samplet <at> ngyro.com>, 35674 <at> debbugs.gnu.org
Cc: Ricardo Wurmus <rekado <at> elephly.net>
Subject: Re: bug#35674: GDM auto-login doesn't work
Date: Fri, 01 Nov 2019 16:02:41 +0000
[Message part 1 (text/plain, inline)]
On Mon, May 13, 2019, at 2:24 PM, Timothy Sample wrote:
> If I turn on debugging output, I can see that the issue has to do with
> the way PAM is configured.  Digging a little deeper, I found that our
> auto-login PAM service is
> 
>     auth [success=ok default=1] pam_gdm.so
>     auth sufficient pam_permit.so
> 
> What this means is that if “pam_gdm.so” is not successful, the
> “pam_permit.so” line will be skipped, and auto-login will not work.  The
> “pam_gdm.so” module does some sort of cached password lookup using the
> “keyutils” library (presumably for an encrypted home directory).  Our
> build of GDM does not support this (we don’t include “keyutils” in its
> inputs), so the module never succeeds.  As a result, auto-login fails.

I tried adding keyutils to the GDM package and it made no difference. I confirmed that it linked correctly, but didn't look into it further.

> It looks like this particular way of doing things was cribbed from Red
> Hat, where the module that gets skipped by “default=1” is
> “pam_gnome_keyring.so” (and not “pam_permit.so”).  Other distros simply
> mark it as optional.  I suggest we either omit the first rule, since it
> will never do anything anyway, or follow other distros and change its
> control field to “optional”.

I can confirm that changing the control value to "optional" satisfies PAM, but I ran into another problem. GDM continually crashes and restarts about 40 times once autologin is enabled. If I switch to another tty and run `herd restart xorg-server`, then GDM starts fine and automatically logs me in.

I've attached a file with a bunch of log messages. Not full log files, but snippets from a bunch of logs that I thought looked relevant.

> My experience with PAM is limited, so I would appreciate a second
> opinion before committing anything.

This bug was my introduction to PAM, so perhaps my opinion isn't very reassuring, but changing pam_gdm.so to optional seems harmless in this case. Even if it somehow screws something up, it will only affect people who went out of their way to make their system less secure by enabling auto-login.

-- 
Alex Griffin
[gdm_errors.txt (text/plain, attachment)]

Merged 35674 40411. Request was from Pierre Neidhardt <mail <at> ambrevar.xyz> to control <at> debbugs.gnu.org. (Fri, 03 Apr 2020 18:27:02 GMT) Full text and rfc822 format available.

Information forwarded to bug-guix <at> gnu.org:
bug#35674; Package guix. (Sun, 14 Jun 2020 23:26:02 GMT) Full text and rfc822 format available.

Message #19 received at 35674 <at> debbugs.gnu.org (full text, mbox):

From: Alex Griffin <a <at> ajgrf.com>
To: "guix-patches <at> gnu.org" <guix-patches <at> gnu.org>
Cc: "35674 <at> debbugs.gnu.org" <35674 <at> debbugs.gnu.org>,
 "40411 <at> debbugs.gnu.org" <40411 <at> debbugs.gnu.org>
Subject: [PATCH] services: Fix gdm-autologin pam service.
Date: Sun, 14 Jun 2020 23:24:56 +0000
[Message part 1 (text/plain, inline)]
This patch fixes GDM's auto-login feature.

See the discussions in #35674 and #40411. It works for me, but I don't want to just commit it because I don't really understand PAM. (Then again, who does?)

--
Alex Griffin
[0001-services-Fix-gdm-autologin-pam-service.patch (text/x-patch, attachment)]

Information forwarded to bug-guix <at> gnu.org:
bug#35674; Package guix. (Fri, 02 Oct 2020 17:55:02 GMT) Full text and rfc822 format available.

Message #22 received at 35674 <at> debbugs.gnu.org (full text, mbox):

From: Marius Bakke <marius <at> gnu.org>
To: Alex Griffin <a <at> ajgrf.com>, 41863 <at> debbugs.gnu.org
Cc: "35674 <at> debbugs.gnu.org" <35674 <at> debbugs.gnu.org>,
 "40411 <at> debbugs.gnu.org" <40411 <at> debbugs.gnu.org>
Subject: Re: [bug#41863] [PATCH] services: Fix gdm-autologin pam service.
Date: Fri, 02 Oct 2020 19:54:28 +0200
[Message part 1 (text/plain, inline)]
Alex Griffin via Guix-patches via <guix-patches <at> gnu.org> writes:

> This patch fixes GDM's auto-login feature.
>
> See the discussions in #35674 and #40411. It works for me, but I don't want to just commit it because I don't really understand PAM. (Then again, who does?)

[...]

> @@ -925,7 +926,7 @@ the GNOME desktop environment.")
>      (inherit (unix-pam-service "gdm-autologin"
>                                 #:login-uid? #t))
>      (auth (list (pam-entry
> -                 (control "[success=ok default=1]")
> +                 (control "optional")

This is one of the alternatives Timothy proposed in #35674 back in May
last year(!).  As long as GDM still rejects wrong or blank passwords, I
think it is good to go.

It would be good to get it in 1.2.0.  :-)
[signature.asc (application/pgp-signature, inline)]

bug closed, send any further explanations to 35674 <at> debbugs.gnu.org and "Alex Griffin" <a <at> ajgrf.com> Request was from Alex Griffin <a <at> ajgrf.com> to control <at> debbugs.gnu.org. (Fri, 18 Feb 2022 16:29:02 GMT) Full text and rfc822 format available.

bug archived. Request was from Debbugs Internal Request <help-debbugs <at> gnu.org> to internal_control <at> debbugs.gnu.org. (Sat, 19 Mar 2022 11:24:04 GMT) Full text and rfc822 format available.

This bug report was last modified 2 years and 31 days ago.

Previous Next


GNU bug tracking system
Copyright (C) 1999 Darren O. Benham, 1997,2003 nCipher Corporation Ltd, 1994-97 Ian Jackson.