"chmod u-w ~/.ICEauthority" breaks login

Bug #1800277 reported by James Hunt
6
This bug affects 1 person
Affects Status Importance Assigned to Milestone
gdm3 (Ubuntu)
Triaged
High
Unassigned

Bug Description

= Problem =

It is too easy to make a system unusable.

https://gitlab.gnome.org/GNOME/gdm/issues/438

= Examples

The following commands will all cause subsequent graphical logins to fail:

== User is returned to login screen ==

- chmod 400 ~/.ICEauthority
- rm ~/.ICEauthority

In this scenario, the user is returned to the login screen with no indication of what went wrong.

== Session "dead" ==

- chmod 444 ~/.cache
- chmod 000 ~/.config
- chmod 444 ~
- chmod 000 ~

In this scenario, the system just freezes: the cursor is unresponsive and users will be reaching for the power button.

= Observation =

These scenarios would all be caused by human error.

However, clearly it is possible for the system to detect such issues and either alert the user to the problem or simply just fix the problem. This does not happen in Ubuntu 18.04 LTS though.

= Idea =

Have the display manager call a utility prior to executing the users preferred session. This utility -- which could be a simple shell script I think ("friendly-session-fixer" maybe? :) -- would do one or both of the following:

- Perform checks for the issues outlined above warn the user graphically if any are found.

- Fix any issues found to allow the user to login.

However they are treated, all issues should also be logged in the journal (could be the user journal, but the system journal may be best to allow admins to spot such issues being detected more easily?)

= Rationale =

1) All the problems above, although user-generated, are:

- trivially fixable.
- potentially very hard / impossible for a naeve user to debug and resolve.

2) By handling such errors, users won't have a bad experience of Linux if they inadvertently perturb a critical file.

3) Users will not need to resort to a re-install (which I can imagine some may have to given the current behaviour).

= Ideas for further checks =

- Check to ensure key files exist and if not, copy them in from /etc/skel/, etc.
- Check to ensure users home directory is owned by them and not root, etc.
- If the home partition / disk is 100% full, the script could logrotate and compress the contents of ~/.cache/ ?

= Notes =

You could argue that the session managers themselves should deal with these issues. In some cases that may be a fair comment. However, by having a single central check/fix script, the problems can be handled centrally without the issue whereby some session managers tolerate certain scenarios whereas others don't.
---
ApportVersion: 2.20.9-0ubuntu7
Architecture: amd64
CurrentDesktop: ubuntu:GNOME
DistroRelease: Ubuntu 18.04
InstallationDate: Installed on 2018-10-29 (0 days ago)
InstallationMedia: Ubuntu 18.04 LTS "Bionic Beaver" - Release amd64 (20180426)
Package: gdm3 3.28.0-0ubuntu1
PackageArchitecture: amd64
ProcEnviron:
 TERM=xterm-256color
 PATH=(custom, no user)
 XDG_RUNTIME_DIR=<set>
 LANG=en_GB.UTF-8
 SHELL=/bin/bash
ProcVersionSignature: Ubuntu 4.15.0-20.21-generic 4.15.17
Tags: bionic
Uname: Linux 4.15.0-20-generic x86_64
UpgradeStatus: No upgrade log present (probably fresh install)
UserGroups: adm cdrom dip lpadmin plugdev sambashare sudo
_MarkForUpload: True

Revision history for this message
Daniel van Vugt (vanvugt) wrote :

Please run this command to send us more information about the system:

   apport-collect 1800277

Changed in gdm3 (Ubuntu):
status: New → Incomplete
Revision history for this message
James Hunt (jamesodhunt) wrote :

I can do that if really required, but this is not a bug with my system - it's just the way the system works right now, so I'm suggesting an idea for how we can make it better :)

Revision history for this message
Daniel van Vugt (vanvugt) wrote :

Yes, in the least it helps us track the affected release and package versions.

Revision history for this message
Sebastien Bacher (seb128) wrote :

Ideally that would be reported upstream (https://gitlab.gnome.org/GNOME/gdm/issues/), there is more chance to have one of the project contributors looking at the problem there

Changed in gdm3 (Ubuntu):
status: Incomplete → New
Revision history for this message
Sebastien Bacher (seb128) wrote :

it's better if bugs are opened with apport so they get proper tagging for the ubuntu version they are reported against, etc, but I don't think it's a requirement for that one

Revision history for this message
James Hunt (jamesodhunt) wrote : Dependencies.txt

apport information

tags: added: apport-collected bionic
description: updated
Revision history for this message
James Hunt (jamesodhunt) wrote : ProcCpuinfoMinimal.txt

apport information

Revision history for this message
James Hunt (jamesodhunt) wrote :

apport info added.

Revision history for this message
James Hunt (jamesodhunt) wrote :
description: updated
Revision history for this message
Sebastien Bacher (seb128) wrote :

Thanks for the info and reporting upstream!

Changed in gdm3 (Ubuntu):
importance: Undecided → High
status: New → Triaged
To post a comment you must log in.
This report contains Public information  
Everyone can see this information.

Other bug subscribers

Remote bug watches

Bug watches keep track of this bug in other bug trackers.