After an evaluation, GNOME has moved from Bugzilla to GitLab. Learn more about GitLab.
No new issues can be reported in GNOME Bugzilla anymore.
To report an issue in a GNOME project, go to GNOME GitLab.
Do not go to GNOME Gitlab for: Bluefish, Doxygen, GnuCash, GStreamer, java-gnome, LDTP, NetworkManager, Tomboy.
Bug 695250 - be more robust against autologin having an invalid user
be more robust against autologin having an invalid user
Status: RESOLVED FIXED
Product: gdm
Classification: Core
Component: general
unspecified
Other Linux
: Normal normal
: ---
Assigned To: GDM maintainers
GDM maintainers
Depends on:
Blocks:
 
 
Reported: 2013-03-05 22:02 UTC by Ray Strode [halfline]
Modified: 2017-03-10 18:56 UTC
See Also:
GNOME target: ---
GNOME version: ---


Attachments
manager: fix small leak (852 bytes, patch)
2016-01-13 03:47 UTC, Michael Catanzaro
committed Details | Review
manager: be more robust against autologin having an invalid user (6.11 KB, patch)
2016-01-13 03:47 UTC, Michael Catanzaro
committed Details | Review

Description Ray Strode [halfline] 2013-03-05 22:02:40 UTC
We apparently just fail to load if autologin is configured for an invalid user.  We should instead fall back to showing the login screen probably.
Comment 1 Michael Heyns 2015-02-09 02:31:56 UTC
We had multiple computers fail to boot today. GDM log shows:

gdm-session-worker: <5>AccountsService: ActUserManager: user (null) has no username (uid: 0)
gdm-autologin: pam_unix(gdm-autologin:account): could not identify user (from getpwnam(guest))

Turns out GDM won't start if an autologin user is deleted. Worked around by setting a different user to autologin (by starting gnome-session via xorg-xinit)
Comment 2 Jasper St. Pierre (not reading bugmail) 2015-02-09 23:33:56 UTC
I ran into this today as well.
Comment 3 Michael Catanzaro 2016-01-13 03:47:08 UTC
Created attachment 318931 [details] [review]
manager: fix small leak
Comment 4 Michael Catanzaro 2016-01-13 03:47:11 UTC
Created attachment 318932 [details] [review]
manager: be more robust against autologin having an invalid user

If the configured autologin user does not exist, fall back to a
greeter session.
Comment 5 Michael Catanzaro 2016-01-18 17:54:47 UTC
(In reply to Michael Catanzaro from comment #4)
> Created attachment 318932 [details] [review] [review]
> manager: be more robust against autologin having an invalid user
> 
> If the configured autologin user does not exist, fall back to a
> greeter session.

It would be better to fall back to a greeter session if autologin fails for any reason, rather than trying to guess upfront if autologin will succeed or not. (There is the pathological case where the user account gets deleted by some program immediately after the check, after all, and other reasons while autologin might fail.) But that's harder!
Comment 6 Michael Catanzaro 2016-03-03 02:00:21 UTC
Comment on attachment 318931 [details] [review]
manager: fix small leak

Attachment 318931 [details] pushed as be4ee31 - manager: fix small leak
Comment 7 Ray Strode [halfline] 2017-03-10 18:56:40 UTC
let's get this in since it makes things more robust than they are today. if you get free time and want to work on comment 5 that's even better, of course.

Attachment 318932 [details] pushed as cdc7c32 - manager: be more robust against autologin having an invalid user