Make guest-account script more distro-agnostic

Bug #1496939 reported by Laércio de Sousa
6
This bug affects 1 person
Affects Status Importance Assigned to Milestone
Light Display Manager
Triaged
Medium
Unassigned

Bug Description

Please consider making guest-account script more suitable for non-Debian distros. It's just a matter of replacing Debian-specific adduser/deluser calls with generic useradd/userdel ones.

See also: https://github.com/chenxiaolong/Unity-for-Fedora-Extra/blob/master/lightdm-guest-session/guest-session-cross-distro.patch

Related branches

Changed in lightdm:
status: New → Triaged
importance: Undecided → Medium
Revision history for this message
Robert Ancell (robert-ancell) wrote :

Branch please!!

Revision history for this message
Robert Ancell (robert-ancell) wrote :

I don't know the differences between the Debian versions and the standard versions. I asked around and no-one near me is an expert. There are some small differences so it might make sense to use the Debian versions if they exist. Otherwise happy to switch to the standard versions for Ubuntu 16.04 and see if we find any issues.

Revision history for this message
Laércio de Sousa (lbssousa) wrote :

Robert, I've just uploaded my branch. To the moment, I've made the following changes:

* Convert guest account username to lowercase (some distros like Debian complain about uppercase letters in usernames).

* Replace adduser/deluser (Debian/Ubuntu-specific) with their couterparts useradd/userdel (found in any distro).

* Try to clean up /run/media/guest-XXXXXX as well as /media/guest-XXXXXX, since some systemd-based distros now mount removable media under /run/media.

My only remaining concern is about /etc/default/locale, which seems not to be available in all distros.

Revision history for this message
Laércio de Sousa (lbssousa) wrote :

Definitely I can't get gettext to translate guest-account related strings in Debian. I'm not a gettext expert, but I can't find any reference to string "Guest" in lightdm PO sources, so I guess its translation is got from elsewhere in Ubuntu.

Anyone could give us any hint about it?

Revision history for this message
Robert Ancell (robert-ancell) wrote :

This change introduced a security issue, see bug 1677924.

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.