Bug 106904 - User not shown at login screen in certain conditions
Summary: User not shown at login screen in certain conditions
Alias: None
Product: accountsservice
Classification: Unclassified
Component: general (show other bugs)
Version: unspecified
Hardware: Other All
: medium normal
Assignee: Matthias Clasen
QA Contact:
Depends on:
Reported: 2018-06-13 05:43 UTC by Felix Zhang
Modified: 2018-06-13 16:44 UTC (History)
5 users (show)

See Also:
i915 platform:
i915 features:

A proposed patch. (1.15 KB, patch)
2018-06-13 05:45 UTC, Felix Zhang
Details | Splinter Review

Description Felix Zhang 2018-06-13 05:43:02 UTC
The issue is found updating SUSE Linux Enterprise 11 SP4 to SLE 15, when some users are not shown in the user list of the login screen.

Thanks to my colleague Xiaoguang Wang, he spotted that in /etc/passwd the missing users are listed after user "sshd", a user who has no entry in /etc/shadow. Seemingly from what I read, due to the "sshd" user created before the shadow file.

A glance at the code shows that, when the accountsservice daemon loads users entry by entry from /etc/passwd, if the user found missing from /etc/shadow, it quits the iteration and ignores all /etc/passwd entries after this user. Which explains the issue above and doesn't seem quite right.

Attached is a small patch to fix this issue, works fine on my machine.
Comment 1 Felix Zhang 2018-06-13 05:45:15 UTC
Created attachment 140142 [details] [review]
A proposed patch.
Comment 2 Ray Strode [halfline] 2018-06-13 16:44:51 UTC

Use of freedesktop.org services, including Bugzilla, is subject to our Code of Conduct. How we collect and use information is described in our Privacy Policy.