Bug 28378 - SDDM login does not remember previous desktop session, RememberLastSession=false in /etc/sddm.conf
Summary: SDDM login does not remember previous desktop session, RememberLastSession=fa...
Status: RESOLVED FIXED
Alias: None
Product: Mageia
Classification: Unclassified
Component: RPM Packages (show other bugs)
Version: 8
Hardware: All Linux
Priority: Normal major
Target Milestone: ---
Assignee: QA Team
QA Contact:
URL:
Whiteboard: MGA8-64-OK
Keywords: IN_ERRATA8, advisory, validated_update
Depends on:
Blocks:
 
Reported: 2021-02-19 07:20 CET by Ben McMonagle
Modified: 2022-05-11 11:11 CEST (History)
8 users (show)

See Also:
Source RPM: sddm-0.19.0-14.mga8.src.rpm
CVE:
Status comment:


Attachments
default sddm.conf (5.82 KB, text/plain)
2021-02-19 07:59 CET, Ben McMonagle
Details
msec setting (110.54 KB, image/png)
2021-02-19 08:04 CET, Ben McMonagle
Details

Description Ben McMonagle 2021-02-19 07:20:48 CET
Description of problem:when multi_DE system is installed, default session is Gnome(wayland) when DM is changed from GDM to SDDM and any other DE session is logged in and then out of.
I prefer that the greeter remembers my last session DE.


Version-Release number of selected component (if applicable):


How reproducible:every time


Steps to Reproduce:
1.install all DE from mga8-final CI.iso (32 or 64 bit)
2.reboot and change default DM from GDM to SDDM, login to Plasma DE
3.log-out and default Gnome(wayland) is offered as login DE
Ben McMonagle 2021-02-19 07:21:34 CET

Keywords: (none) => 8final
Target Milestone: --- => Mageia 8

Comment 1 Aurelien Oudelet 2021-02-19 07:48:23 CET
Hi, thanks reporting this.

Can you put here the content of /etc/sddm.conf ?
If there is this following line:
"RememberLastSession=false"
Please remove it.

Also, check the value of ALLOW_LIST_USER in MSEC.
This can be set to Yes.

CC: (none) => ouaurelien

Comment 2 Ben McMonagle 2021-02-19 07:59:30 CET
Created attachment 12354 [details]
default sddm.conf
Comment 3 Ben McMonagle 2021-02-19 08:03:54 CET
change in sdd.conf:

# RememberLastSession=false
Comment 4 Ben McMonagle 2021-02-19 08:04:38 CET
Created attachment 12355 [details]
msec setting
Comment 5 Ben McMonagle 2021-02-19 08:06:53 CET
reboot and it appears to have effected the required change
Comment 6 Aurelien Oudelet 2021-02-19 14:36:41 CET
Having

> RememberLastSession=false

set in /etc/sddm.conf is a downstream decision from our KDE Team.
We do not want that last successful session appears at login.

Meanwhile, with multi desktops environments installed, this can be problematic as it lists what it want first...

This add extra step by default...
No really user-friendly.

To be put in release notes/erratas...?

Status comment: (none) => RememberLastSession=false set in /etc/sddm.conf by defaut can confuse user.
Keywords: (none) => FOR_ERRATA8

Comment 7 Morgan Leijström 2021-02-19 16:00:31 CET
So SDDM is the only DM that do not per default remember last chosen DE?

And it is Mageia packaging that have changed this?
So why do we change SDDM?
- and not the other DM?
To me it seems we should logically get SDDM in line with the others.

CC: (none) => fri

Comment 8 Morgan Leijström 2021-02-20 18:29:18 CET
Added in Errata incl manual fix comment 1 + 3 

https://wiki.mageia.org/en/Mageia_8_Errata#Desktops

Keywords: FOR_ERRATA8 => IN_ERRATA8

Comment 9 Aurelien Oudelet 2021-02-21 12:30:05 CET Comment hidden (obsolete)
Comment 10 Lewis Smith 2021-02-25 21:23:52 CET
Thanks yet again Morgan for this embarrassing little ERRATA.

> We do not want that last successful session appears at login
Why on earth not? Most users would expect the last desktop used to be pre-selected. People with >1 desktop will be very annoyed if they use SDDM.

My Mageia 8 (not from a recent ISO) /etc/sddm.conf has:
#RememberLastSession=
#	If this flag is true, LastSession value will updated on every successful login, if false last session value won't be updated. Default
#	value is true.
So being commented out, it defaults to 'remember'.

#### Mageia-specific configuration
has no override of this.

BUT Ben's file has exactly the same as above, *plus*:
#### Mageia-specific configuration
...
RememberLastSession=false

This is not right. Assigning to the kde team; easy-peasy to correct.

Summary: SDDM greeter does not remember previous session, defaults to Gnome(Wayland) if installed => SDDM login does not remember previous desktop session, RememberLastSession=false in /etc/sddm.conf
Assignee: bugsquad => kde

Comment 11 Aurelien Oudelet 2021-02-25 21:26:24 CET
Sadly it was a relic from our internal testing of new theme. It will be fixed by an update post release, already in updates_testing now.
Comment 12 Nicolas Lécureuil 2021-02-26 15:15:04 CET
New rpm available.
src:
     sddm-0.19.0-15.mga8.src.rpm

CC: (none) => mageia
Assignee: kde => qa-bugs

Comment 13 Jose Manuel López 2021-02-26 15:39:39 CET
This morning in a clean install of Lxqt I encountered this bug. It's annoying for a user who only uses Lxqt, but who also gets it by default in Mageia with Icwm. 

I fixed it from Lxqt in sddm-config-editor, in the "users" section, checking "Remember the session of the last successfully logged in user". But for a user who doesn't know this, it can be confusing.

I'm glad this bug is fixed.

Greetings!

CC: (none) => joselp

Comment 14 Aurelien Oudelet 2021-02-26 16:30:08 CET Comment hidden (obsolete)
Comment 15 Thomas Andrews 2021-03-03 21:39:59 CET
Even Plasma-only systems have a second desktop session possible - Icewm.

Looking at my /etc, I see an sddm.conf.rpmnew that has the same Mageia-only settings that Ben's has, but the sddm.conf is different. Apparently, somewhere along the line I chose to "do nothing" rather than use an rpmnew with a sddm update. 

So, I will now install the update, and see what changes. Presumably, I will be given a chance to choose between using another rpmnew, or doing nothing.

CC: (none) => andrewsfarm

Comment 16 Thomas Backlund 2021-03-03 21:46:50 CET
(In reply to Aurelien Oudelet from comment #14)
> Suggested Advisory:
> ========================
> 
> Updated sddm package fixes RememberLastSession option
> 
> Mageia 8 ships with a sddm configuration (/etc/sddm.conf) that breaks
> last session remembering.
> 

it did not "break" anything, it disabled it. thats not the same...
Comment 17 Aurelien Oudelet 2021-03-03 22:00:01 CET
(In reply to Thomas Backlund from comment #16)
> it did not "break" anything, it disabled it. thats not the same...

True. Bad wording, sorry.

Advisory:
========================
Updated sddm package fixes RememberLastSession option

Mageia 8 ships with a sddm configuration (/etc/sddm.conf) that disabled last session remembering.

The updated sddm package fixes this by setting correct value in
/etc/sddm.conf file.

In this file, an option RememberLastSession was set to false instead of true.

References:
https://bugs.mageia.org/show_bug.cgi?id=28378
========================

Updated packages in core/updates_testing:
========================
sddm-0.19.0-15.mga8

from SRPMS:
sddm-0.19.0-15.mga8.src.rpm
Comment 18 Thomas Andrews 2021-03-03 22:06:38 CET
So I chose to use the rpmnew conf file, and it replaced the old sddm.conf while erasing sddm.conf.rpmnew.

The rememberlastsession setting now works as you want it, I guess, but something else is now different from previous Mageia releases. 

sddm used to remember the last user who logged in - after the first login - but now it doesn't. As somebody with only one "ordinary" user on his system, me, I find that annoying. 

If that's the way you guys want it OK, but it isn't the way *I* want it. I don't intend to argue for or against because I see it as a matter of personal preference, but if left this way *my* systems will be changed to work the old way again.
Comment 19 Morgan Leijström 2021-03-03 22:42:15 CET
@ThomasA
In the same file change RememberLastUser to true.
I also like it that way, btw.
Comment 20 Thomas Andrews 2021-03-03 23:34:28 CET
(In reply to Morgan Leijström from comment #19)
> @ThomasA
> In the same file change RememberLastUser to true.
> I also like it that way, btw.

I know. I was waiting for word from the developers if this was the way they want it, or if they want to make another change before sending this on. If they are happy, it can go.
Comment 21 Morgan Leijström 2021-03-03 23:39:29 CET
Yeah, lets ask

Assignee: qa-bugs => kde

Comment 22 Aurelien Oudelet 2021-03-04 16:35:21 CET
KDE Team does not want that SDDM shows by default a valid user name in login dialog.

But, newbie user experience, this is not an ideal situation.
We should provide user in mind experience with a User name displayed AFTER a first login is successful (next time computer reboots).

And, masking user name should be done by a MSEC policy, i.e., switching default policy from Standard to Secure...

Target Milestone: Mageia 8 => ---
Severity: normal => major
Assignee: kde => qa-bugs

Comment 23 Morgan Leijström 2021-03-04 16:53:55 CET
Good, it works as intended then.
OK from me.
Added tip about RememberLastUser to the existing note in Errata.
Comment 24 Aurelien Oudelet 2021-03-04 18:11:32 CET
Advisory pushed to SVN.

But, true:
/etc/sddm.conf from sddm-0.19.0-15.mga8 in updates_testing
contains:
RememberLastUser=false
RememberLastSession=true

Which is NOT user-friendly.
MSEC does the job for us.
These values should be unset totally as by default sddm considers "true" for them if they are not set before.

Not validating meanwhile. Assigning back.

Status comment: RememberLastSession=false set in /etc/sddm.conf by defaut can confuse user. => RememberLastSession=false and RememberLastUser=false set in /etc/sddm.conf
Source RPM: sddm-0.19.0-13.mga8 / sddm-kcm-5.20.4-1.mga8 => sddm-0.19.0-14.mga8.src.rpm
Keywords: (none) => advisory
Assignee: qa-bugs => mageia
Status: NEW => ASSIGNED

Comment 25 Thomas Andrews 2021-03-04 18:39:15 CET
For what it's worth... 

Looking at the sddm.conf in effect after an upgrade install (held over from the Mageia 7 install), I see that under the Mageia-specific commands, "RememberLastSession" is missing entirely, but "RememberLastUser=true" is there.
Comment 26 Morgan Leijström 2021-03-04 20:53:59 CET
In effect that keep the behaviour of mga7 if i understand correctly, which is good.
Comment 27 Nicolas Lécureuil 2021-03-15 22:58:09 CET
do you need more infos before validating ?
Comment 28 Dave Hodgins 2021-03-16 00:35:00 CET
No regressions found and is working as expected. Validating.

Whiteboard: (none) => MGA8-64-OK
Keywords: (none) => validated_update
CC: (none) => davidwhodgins, sysadmin-bugs

Comment 29 Aurelien Oudelet 2021-03-16 08:33:06 CET
(In reply to Nicolas Lécureuil from comment #27)
> do you need more infos before validating ?

Yes: RememberLastSession=false should not set by default in /etc/sddm.conf conf file shipped by default.
Comment 30 Dave Hodgins 2021-03-16 08:58:04 CET
Soory, removing validation

Keywords: validated_update => (none)

Comment 31 Dave Hodgins 2021-03-16 09:10:50 CET
Uninstalled sddm and reinstalled it. Default sddm.conf now has
RememberLastUser=false
RememberLastSession=true

Should it be RememberLastUser=false?

In Mageia 7 it isn't set, so it defaults to true.

I certainly don't like this change in behaviour depending on whether it's
an upgrade or a new install.
Comment 32 Aurelien Oudelet 2021-03-16 09:18:27 CET
(In reply to Dave Hodgins from comment #31)
> Uninstalled sddm and reinstalled it. Default sddm.conf now has
> RememberLastUser=false
> RememberLastSession=true
> 
> Should it be RememberLastUser=false?
> 
> In Mageia 7 it isn't set, so it defaults to true.
> 
> I certainly don't like this change in behaviour depending on whether it's
> an upgrade or a new install.

By default, it must be removed. The default value is true.
So RememberLastSession=true/false and RememberLastUser=true/false ; all 2 lines should be removed. The default value is true for both.

We shouldn't force it to true nor false by providing conf file.
In Mageia, only MSEC should be able to set it in other value and it does it well by putting Security Level to Secure at least.

These values were set as is when we were testing newer Mageia's sddm theme.
Comment 33 Dave Hodgins 2021-03-16 11:22:46 CET
Agreed. The only benefit of not showing the last used login to someone who has
physical access to the system anyway. If untrusted people have physical access
to the system, not showing the last used login doesn't provide any benefit.

This change is simply an annoyance, not a security improvement.

Whiteboard: MGA8-64-OK => (none)

Comment 34 Nicolas Lécureuil 2021-03-16 12:18:53 CET
ok i removed the 2 lines and pushed a new rpm.

Assignee: mageia => qa-bugs

Comment 35 Thomas Backlund 2021-03-16 12:24:02 CET
(In reply to Dave Hodgins from comment #33)
> Agreed. The only benefit of not showing the last used login to someone who
> has
> physical access to the system anyway. If untrusted people have physical
> access
> to the system, not showing the last used login doesn't provide any benefit.
> 
> This change is simply an annoyance, not a security improvement.


it actually is a security improvement...

not showing login name means you need to figure out both login and password.


and on multiuser setups, it catches those that simply type password in a box without checking if its the correct user, which can cause an account to get locked if user tries too many times a password on wrong login.

but on a single-user system I guess no-one cares...

and the rest should be locked down with security policies enforced by msec levels
Comment 36 Aurelien Oudelet 2021-03-16 15:46:54 CET
sddm-0.19.0-15.1.mga8.x86_64 updated on mar. 16 mars 2021 14:09:07


(In reply to Nicolas Lécureuil from comment #34)
> ok i removed the 2 lines and pushed a new rpm.

Lines removed.
Needed to select .rpmnew after updating because I choose other sddm theme.

This can update smoothly under a VM.

MGA8-64-OK
Validating
Advisory updated.

Keywords: (none) => validated_update
Whiteboard: (none) => MGA8-64-OK
Status comment: RememberLastSession=false and RememberLastUser=false set in /etc/sddm.conf => (none)

Comment 37 Dave Hodgins 2021-03-16 16:20:38 CET
(In reply to Thomas Backlund from comment #35)
> it actually is a security improvement...
> not showing login name means you need to figure out both login and password.

Only if the system is fully encrypted, or booting from external media has
been disabled. Stopping the display of the login without one of those two
features fails to add any security benefit. It increases the attacker's
work required by a tiny amount to give an illusion of increasing security.
Comment 38 Thomas Backlund 2021-03-16 16:29:30 CET
(In reply to Dave Hodgins from comment #37)
> (In reply to Thomas Backlund from comment #35)
> > it actually is a security improvement...
> > not showing login name means you need to figure out both login and password.
> 
> Only if the system is fully encrypted, or booting from external media has
> been disabled. Stopping the display of the login without one of those two
> features fails to add any security benefit. It increases the attacker's
> work required by a tiny amount to give an illusion of increasing security.

I know that.
I just responded to "not a security improvement"...
it is an improvement even if it's not "a big one" :)

here when I set up systems, after they are installed I disable any boot option besides the system disc and lock the bios.
Comment 39 Thomas Backlund 2021-03-16 16:30:15 CET
and lock the bootloader so no easy init mod
Comment 40 Mageia Robot 2021-03-17 07:17:21 CET
An update for this issue has been pushed to the Mageia Updates repository.

https://advisories.mageia.org/MGAA-2021-0041.html

Resolution: (none) => FIXED
Status: ASSIGNED => RESOLVED

Comment 41 Morgan Leijström 2021-03-31 11:52:33 CEST
Marked as fixed in errata, keeping a tip for if user already have upgraded before the update.
Comment 42 Tony Blackwell 2022-05-10 17:56:41 CEST
Hmmm Doesn't feel like it fixed/resolved.  Here we are 11th May and my system still doesn't remember last session - its still set to false.  I've been so frustrated by this behaviour; dumps me into 'Gnome Wayland, which then declines letting me logout until a full minute has passed.  I'm so used to the longterm behaviour of remembering that I last used (xfce), that I've even forgotten on forcing repeat login and done the same again and sentenced myself to repeating the above cycle with ill grace.

Only discovered this bug report by google-ing it.  Sure enough, my RememberLast session=false, but I had to scroll a 156 line file before finding it at line 151.

This is not user-friendly.  Surely a fix would include pushing an update to sddm.conf.
It doesn't seem fixed  (nearly 2 months after bug closed) without this.
We've got around 20 computers running M8 (teaching neighbourhood kids etc)  Sure, I could manually go to line 151 and edit it, but fixing sddm.conf for everyone would be nicer

Reopening.
Tony

Resolution: FIXED => (none)
CC: (none) => tablackwell
Status: RESOLVED => REOPENED

Comment 43 Tony Blackwell 2022-05-10 18:11:29 CEST
ha, its actually a year and 2 months since bug was closed.  Time to fix?
Comment 44 Tony Blackwell 2022-05-10 18:15:51 CEST
Reading the whole of this bug discussion, it sounds a bit as if the discussion veered to LastUser, losing sight of the OP's LastSession issue for opening the bug, which still isn't fixed in sddm.conf.
Tony
Comment 45 Thomas Andrews 2022-05-10 20:23:47 CEST
The problem was fixed, but required user action to apply it. Mageia's policy is to NOT change user configurations without knowledge/permission of the user. This is what happened here.

When this update was done, a file named /etc/sddm.conf.rpmnew was created. The user (you) is given the opportunity to do one of three things: 

Nothing (the default) and the new sddm.conf won't be used but sddm.conf.rpmnew will be saved. 
Use rpmnew as the main file. This will replace the old sddm.conf file, possibly eliminating any customization you might have done.
(I forget how this is worded, but) Use the existing file. This will retain the old sddm.conf and erase the rpmnew file.

If you chose to do nothing, check in /etc for a file named sddm.conf.rpmnew. If it is there, as root go to /etc, rename the present sddm.conf to something like sddm.conf.old, and rename sddm.conf.rpmnew to sddm.conf. That should solve the problem on that system.

If sddm.conf.rpmnew isn't there, you will have to edit sddm.conf manually.

Yes, I realize it's a bother, but there are reasons for the policy, and there have been several debates on it. About a year ago I accepted the use of an "rpmnew" file, and lost all use of my scanner until I removed it and re-installed it. So things can go either way.
Comment 46 Morgan Leijström 2022-05-10 21:53:40 CEST
I believe the ERRATA from Comment 8 is OK?
Comment 47 Thomas Andrews 2022-05-11 00:22:00 CEST
(In reply to Morgan Leijström from comment #46)
> I believe the ERRATA from Comment 8 is OK?

Looks correct to me.
Comment 48 Morgan Leijström 2022-05-11 11:11:33 CEST
Closing then - I agree with comment 45.

Resolution: (none) => FIXED
Status: REOPENED => RESOLVED


Note You need to log in before you can comment on or make changes to this bug.