Bug 363058 - Autologin not working
Summary: Autologin not working
Status: RESOLVED FIXED
Alias: None
Product: user-manager
Classification: Plasma
Component: kcontrol module (show other bugs)
Version: 5.8.0
Platform: Neon Linux
: NOR normal
Target Milestone: ---
Assignee: David Edmundson
URL:
Keywords:
: 358441 (view as bug list)
Depends on:
Blocks:
 
Reported: 2016-05-14 06:39 UTC by Sven Claussner
Modified: 2016-12-14 11:35 UTC (History)
7 users (show)

See Also:
Latest Commit:
Version Fixed In:


Attachments
Screen1 (24.76 KB, image/jpeg)
2016-09-07 06:22 UTC, Frank
Details
Screen2 (25.87 KB, image/jpeg)
2016-09-07 06:22 UTC, Frank
Details

Note You need to log in before you can comment on or make changes to this bug.
Description Sven Claussner 2016-05-14 06:39:09 UTC
KDE does not use the autologin data entered in the user manager. It forgets about the data.

Reproducible: Always

Steps to Reproduce:
1. Open System settings, then User Manager.
2. Select an account.
3. Optionally enter the user password in the text field.
4. Tick the automatic login checkbox.
5. Click Apply and confirm with the root account password.
6. Restart computer.

Actual Results:  
After reboot I am asked for the user login again.
The User Manager has forgotten the autologin checkbox value.

Expected Results:  
After reboot I am not asked for the user login data, but automatically logged in with the given user account.
The User Manager still shows the autologin checkbox ticked.
Comment 1 Moritz 2016-05-22 11:21:07 UTC
Similar problem here, I can not disable autologin.
Duplicate of this bug? https://bugs.kde.org/show_bug.cgi?id=358441
Comment 2 Frank 2016-09-06 16:02:06 UTC
Also have the bug on Kubuntu 16.04 - auto-login was working on 14.04
Comment 3 Frank 2016-09-07 06:22:14 UTC
Created attachment 100960 [details]
Screen1
Comment 4 Frank 2016-09-07 06:22:53 UTC
Created attachment 100961 [details]
Screen2
Comment 5 Frank 2016-09-07 06:25:46 UTC
There seems to be 2 different way to set auto-login, which creates confusion for the user, and the system. See 2 attachments above. I think I now have auto-login, but the box [ ] Auto login in screen2 is not persistent.
Comment 6 Tony 2016-09-08 11:07:31 UTC
Can confirm this one,  the auto-login only works if you set it on sddm advanced settings.
Comment 7 Roman Gilg 2016-10-09 18:09:37 UTC
Needs to be dealt with! It's very confusing for the user. Since Alex gave up on KDE hacking according to his blog I'll claim the report in the meantime until I can gather some information what to do with this confusing option in the user manager.

I'll also bump up the version number, since it's still present in 5.8 and master branch.
Comment 8 David Edmundson 2016-10-14 22:24:20 UTC
See also 
system settings -> startup and shutdown -> login scren ->automatic login
Comment 9 David Edmundson 2016-10-14 22:32:27 UTC
Worst still it's writing into the GDM config.

#define PATH_GDM_CUSTOM "/etc/gdm/custom.conf"

...
        if (!g_key_file_load_from_file (keyfile,
                                        PATH_GDM_CUSTOM,
                                        G_KEY_FILE_KEEP_COMMENTS,
                                        error)) {
                g_key_file_free (keyfile);
                return FALSE;
        }
..

That's a bit rubbish from our side.
Comment 10 David Edmundson 2016-10-14 22:42:56 UTC
As an added failure, if /etc/gdm/custom.conf does not exist it will return an error rather than creating it.

Meaning if we queried the data from SDDM it still isn't going to work. 

I'll remove this option for now, maybe I'll use the SDDM helper that changes the SDDM conf.
Comment 11 Roman Gilg 2016-10-14 23:02:13 UTC
*** Bug 358441 has been marked as a duplicate of this bug. ***
Comment 12 André Brait 2016-10-19 21:53:44 UTC
(In reply to David Edmundson from comment #10)
> As an added failure, if /etc/gdm/custom.conf does not exist it will return
> an error rather than creating it.
> 
> Meaning if we queried the data from SDDM it still isn't going to work. 
> 
> I'll remove this option for now, maybe I'll use the SDDM helper that changes
> the SDDM conf.

Is it the same mechanism that the Advanced Settings for the Login Screen uses?
Comment 13 David Edmundson 2016-12-14 11:33:52 UTC
Git commit b154c7522b639c54f9a0da889069255b327727f3 by David Edmundson.
Committed on 13/12/2016 at 00:03.
Pushed by davidedmundson into branch 'master'.

Set Automatic login flag to adjust SDDM config directly

Summary:
AccountsService is a bit weird, the automatic login flag adjusts a
config file in /etc/gdm/

This doesn't work for two reasons:
1) SDDM (our Display Manager) obviously doesn't read this file
2) AccountsService doesn't create the folder if it doesn't exist, so we
can't even use if we tried.

This patch adjusts UserManager to write /etc/sddm.conf directly. It's
not ideal, but I think it's the only option we have, certainly in the
short term.

Test Plan:
Set automatic login on a user
Restarted KCM, still set
Set it on another user, config changed properly, old user was updated
Unchecked it on my current user, config file was unset properly

Reviewers: #plasma

Subscribers: plasma-devel

Tags: #plasma

Differential Revision: https://phabricator.kde.org/D3658

M  +1    -1    CMakeLists.txt
M  +1    -0    src/CMakeLists.txt
M  +31   -4    src/account.ui
M  +67   -5    src/lib/accountmodel.cpp
M  +11   -1    src/lib/accountmodel.h

https://commits.kde.org/user-manager/b154c7522b639c54f9a0da889069255b327727f3
Comment 14 David Edmundson 2016-12-14 11:35:24 UTC
Git commit 4761ae39b60d6bb1923d78c2e4333b477cb3c240 by David Edmundson.
Committed on 14/12/2016 at 11:35.
Pushed by davidedmundson into branch 'Plasma/5.8'.

Hide "automatic login" button in UserAccounts since is does absolutely nothing

Summary:
automaticLogin only sets a flag in AccountsService, which is only
supported by GDM.

This is fixed in 5.9, but as that includes a dependency change, it can't
go into stable.

So we should hide the completely broken option in 5.8

Test Plan: Looked at it.

Reviewers: #plasma, mart

Reviewed By: mart

Subscribers: mart, subdiff, plasma-devel

Tags: #plasma

Differential Revision: https://phabricator.kde.org/D3062

M  +31   -4    src/account.ui
M  +5    -0    src/accountinfo.cpp

https://commits.kde.org/user-manager/4761ae39b60d6bb1923d78c2e4333b477cb3c240