Delayed Autologin broken by User List in Greeter
| Affects | Status | Importance | Assigned to | Milestone | |
|---|---|---|---|---|---|
| | Light Display Manager |
Low
|
Unassigned | ||
| | LightDM GTK+ Greeter |
Undecided
|
Unassigned | ||
| | LightDM Qt Greeter |
Undecided
|
Unassigned | ||
| | lightdm-gtk-greeter (Ubuntu) |
Undecided
|
Unassigned | ||
Bug Description
There is no way to set up time-out before autologin so other users could cancel the default login and log in themselves. I tried an option
autologin-
but it does not work.
Related branches
- Sean Davis: Approve on 2015-05-13
-
Diff: 45 lines (+28/-1)1 file modifiedsrc/lightdm-gtk-greeter.c (+28/-1)
- Sean Davis: Pending requested 2015-04-27
-
Diff: 45 lines (+28/-1)1 file modifiedsrc/lightdm-gtk-greeter.c (+28/-1)
- Sean Davis: Pending requested 2015-04-27
-
Diff: 45 lines (+28/-1)1 file modifiedsrc/lightdm-gtk-greeter.c (+28/-1)
| Changed in lightdm: | |
| importance: | Undecided → Medium |
| importance: | Medium → Low |
| Changed in lightdm: | |
| status: | New → Triaged |
| i (iiiiii-deactivatedaccount) wrote : | #1 |
| Paiiou (paiiou) wrote : | #2 |
Tht autologin-
The defect also affects the distributions) Mageia.
Can you take care of it?
| summary: |
- No time-out with auto login + Autologin Timeout makes auto login impossible |
Automatic Login fails reproducibly if autologin-
If not timeout is set, LightDM creates an "user session" after starting a seat. See the following comment for this log file.
With a delay set a "greeter session" is created, see the attached log file. Then after the delay the internal authorization for the auto-login-user seems to be successful. And that was it, nothing happens any more.
System is a brand new Lubuntu 14.04.2 installation. My /etc/lightdm/
[SeatDefaults]
autologin-
autologin-
autologin-
user-session=
greeter-
Delayed Autologin works here now after setting the option "greeter-
Conclusion is that automatic login without a timeout works always because the user list isn't asked for. When a timeout is set only suppressing the user list gives a working auto login.
I got the hint from http://
| summary: |
- Autologin Timeout makes auto login impossible + Delayed Autologin broken by User List in Greeter |
| Laércio de Sousa (lbssousa) wrote : | #6 |
I can confirm this with lightdm-gtk-greeter at Xubuntu 15.04.
I have a 2-seat computer and lightdm configured to autologin as a given user (also applies for guest) on both seats. If the user configured for autologin on a given seat is selected in user list when timeout reaches 0, it won't autologin. However, if I change the user selected before timeout reaches 0, autologin works as expected.
Not sure if it also happens for unity-greeter.
> ..., if I change the user selected before timeout reaches 0, autologin works as expected.
The current "Works as expected" is at least one other bug:
If the selection in the user list is changed but no password entered, the invisible count down does not stop. After the delay the predetermined auto-login user is logged in. That is wrong, any human action should stop the countdown. Otherwise the human user is forced to type in his super secure 24 digit long password within the delay time. This is bug 1121660.
It gets more interesting. The setting is
[SeatDefaults]
autologin-
autologin-
greeter-
This allows to type in the other username and the password The other user account is now started. After some inactivity time Light Locker locks up the screen. If activated again LightDM opens the initial autologin=user. The system now has two sessions with different users.
Hb
| Laércio de Sousa (lbssousa) wrote : | #10 |
I guess I may have found a better explanation about this bug.
Whenever a user is switched in greeter, i.e. a new user selection is made in greeter's user list, LightDM immediately sets its PAM authentication service to either "manual" (set by option [Seat*]
When autologin timeout expires, user currently selected in greeter's user list is switched to that one set in [Seat*]
However, if the user selected in greeter's user list matches that one set in [Seat*]
If my assumption is right, maybe we can fix the bug by forcing lightdm to "switch user to itself" when autologin timeout expires.
Robert, what do you think about it?
| Laércio de Sousa (lbssousa) wrote : | #11 |
I've did a quick test with 3 greeters in Xubuntu 15.04. The results are the following:
* unity-greeter: timed autologin works always
* lightdm-
* lightdm-
So, this bug is much more likely to be related to the greeters than to lightdm itself. However, what I did is a "dirty" test (all greeters installed in a same Ubuntu flavour), so I may have introduced some misconfiguration that may lead to the problems related here. A more reliable result may require that each greeter be tested on its proper Ubuntu flavour with default settings (i.e. Ubuntu with unity-greeter, Kubuntu with lightdm-
| Laércio de Sousa (lbssousa) wrote : | #12 |
I guess I can trace out the problem now:
1. When I change the selected user in lightdm-gtk-greeter user list, function set_displayed_
2. lightdm-
3. When autologin timeout expires, greeter calls lightdm_
In the end, lightdm_
A. In lightdm-
B. In lightdm-
C. In lightdm's function lightdm_
| Laércio de Sousa (lbssousa) wrote : | #13 |
I'm pretty close to address this problem. I've changed lightdm-
static void
autologin_cb (LightDMGreeter *greeter)
{
if (lightdm_
{
/* Autologin user is likely to be aready selected in user list.
If autologin-guest is enabled, just assume "*guest" is selected and
there are no mistakes in lightdm.conf (e.g. setting both autologin-guest
and autologin-user). */
if (lightdm_
else if (lightdm_
{
if (g_strcmp0 (lightdm_
else
{
/* Worst case: autologin-user is set in lightdm.conf, but "*guest"
/* FIXME: wait somehow until new authentication is completed
/* In this current state, the following call will fail. Autologin user
}
}
}
else
}
I've tested this function in all possible scenarios, and it only fails in one case, namely: if autologin-user is set, but "Guest session" is selected when autologin timeout expires. In this case, autologin user session doesn't start automatically, but it does start correctly when I click on login button after timeout, even if "Guest session" is shown in user list.
| Changed in lightdm: | |
| status: | Triaged → Invalid |
| Laércio de Sousa (lbssousa) wrote : | #14 |
Never mind! I've just found a VERY MUCH SIMPLER approach to solve this issue.
The key point is the global boolean variable "prompted". When lightdm-gtk-greeter calls lightdm_
So, all we have to do in my proposed autologin_cb() function is setting "prompted" to TRUE while calling lightdm_
static void
autologin_cb (LightDMGreeter *greeter)
{
prompted = TRUE;
lightdm_
}
I've tested it, and now it works in all possible scenarios.
| Laércio de Sousa (lbssousa) wrote : | #15 |
I've made some improvements in my timed autologin callback function proposal, merging the simple implementation right above with the other ones I've written before. You can see the final result in my merge proposal:
https:/
Basically, current implementation differs from that simple one by doing some additional checks in order to avoid authenticating the same user twice (when it's selected in user list, and when lighdm_
| Changed in lightdm-gtk-greeter: | |
| milestone: | none → 2.0.1 |
| Changed in lightdm-gtk-greeter: | |
| status: | New → Fix Released |
| Changed in lightdm-gtk-greeter (Ubuntu): | |
| status: | New → Fix Released |

lightdm.i686 1.4.0-2.fc18 (Fedora)
Auto-login works if time-out is set to 0 (zero) otherwise it fails. Do you need logs or other info?