Source prefs.sh as privileged user to allow user mods

Bug #1581853 reported by Gunnar Hjalmarsson
18
This bug affects 3 people
Affects Status Importance Assigned to Milestone
lightdm (Ubuntu)
Fix Released
Medium
Gunnar Hjalmarsson
Xenial
Fix Released
Medium
Gunnar Hjalmarsson

Bug Description

[Impact] including [Test Case]

The Ask Ubuntu question <http://askubuntu.com/q/771080> called my attention to a regression in 16.04 as regards the possibilities for the system owner to configure the guest account. Up to 15.10 you can put e.g. this line in /etc/guest-session/prefs.sh:

adduser $USER somegroup

But if you try that in 16.04, the guest session won't launch. The explanation is that after the reorganization of the guest session code in 16.04, prefs.sh is sourced by /usr/share/lightdm/guest-session/setup.sh, which is not run as root.

The linked merge proposals restore the previous behavior by letting prefs.sh be sourced by /usr/sbin/guest-account again.

[Regression Potential]

Low.

Changed in lightdm (Ubuntu Xenial):
assignee: nobody → Gunnar Hjalmarsson (gunnarhj)
importance: Undecided → Medium
status: New → In Progress
description: updated
Revision history for this message
Launchpad Janitor (janitor) wrote :

This bug was fixed in the package lightdm - 1.19.1-0ubuntu1

---------------
lightdm (1.19.1-0ubuntu1) yakkety; urgency=medium

  * New upstream release:
  * debian/lightdm.dirs:
    - Rename "xlocal" seat type to "local". Using "xlocal" will continue to work
      but report a warning.
    - Ensure user configuration directories /etc/lightdm/lightdm.conf.d and
      /etc/guest-session exist
    - Use MIR_SERVER_HOST_SOCKET instead of MIR_SOCKET to report compositor
      socket to sessions. This used to work but no longer works in Mir 0.21
      (LP: #1583624)
    - Allow XMir to run on the xlocal seat using the new x-server-backend=mir
      option
    - Use only a single compositor on local seats (LP: #1594229)
    - Fix Mir greeter log filename having "(null)" in the name (LP: #1590582)
    - Copy fcitx/mozc rules so session works when these aren't installed
      (LP #1581187)
    - Revert lxsession change - it caused the AppArmor to fail to compile
  * debian/rules:
    - Revert dh_installinit change - we don't want to start LightDM on install
      (LP: #1581106)
  * debian/guest-account.sh:
  * debian/guest-session-setup.sh:
    - Source prefs.sh as privileged user to allow user modification
      (LP: #1581853)

 -- Robert Ancell <email address hidden> Mon, 20 Jun 2016 16:18:36 +1200

Changed in lightdm (Ubuntu):
status: In Progress → Fix Released
Changed in lightdm (Ubuntu Xenial):
status: In Progress → Fix Committed
Revision history for this message
Brian Murray (brian-murray) wrote : Please test proposed package

Hello Gunnar, or anyone else affected,

Accepted lightdm into xenial-proposed. The package will build now and be available at https://launchpad.net/ubuntu/+source/lightdm/1.18.2-0ubuntu1 in a few hours, and then in the -proposed repository.

Please help us by testing this new package. See https://wiki.ubuntu.com/Testing/EnableProposed for documentation how to enable and use -proposed. Your feedback will aid us getting this update out to other Ubuntu users.

If this package fixes the bug for you, please add a comment to this bug, mentioning the version of the package you tested, and change the tag from verification-needed to verification-done. If it does not fix the bug for you, please add a comment stating that, and change the tag to verification-failed. In either case, details of your testing will help us make a better decision.

Further information regarding the verification process can be found at https://wiki.ubuntu.com/QATeam/PerformingSRUVerification . Thank you in advance!

tags: added: verification-needed
Revision history for this message
Gunnar Hjalmarsson (gunnarhj) wrote :

Installed lightdm 1.18.2-0ubuntu1 from xenial-proposed and confirm that the guest user can be modified via /etc/guest-session/prefs.sh using e.g. the adduser command.

tags: added: verification-done
removed: verification-needed
Revision history for this message
Launchpad Janitor (janitor) wrote :

This bug was fixed in the package lightdm - 1.18.2-0ubuntu1

---------------
lightdm (1.18.2-0ubuntu1) xenial; urgency=medium

  * New upstream release:
    - Don't quit on SIGUSR1, SIGUSR2 or SIGHUP (LP: #960157)
    - Use MIR_SERVER_HOST_SOCKET instead of MIR_SOCKET to report compositor
      socket to sessions. This used to work but no longer works in Mir 0.21
      (LP: #1583624)
    - Use only a single compositor on xlocal seats (LP: #1594229)
    - Fix Mir greeter log filename having "(null)" in the name (LP: #1590582)
    - Set XDMCP hostname field in to system hostname or configured value
      (LP: #1578442)
    - Improve XDMCP IPv6 address selection (LP: #1575200)
    - Allow fcitx and mozc to run in guest session (LP: #1509829)
    - Fix uninitialized memory errors
  * debian/lightdm.dirs:
    - Ensure user configuration directories /etc/lightdm/lightdm.conf.d and
      /etc/guest-session exist
  * debian/guest-account.sh:
  * debian/guest-session-setup.sh:
    - Source prefs.sh as privileged user to allow user modification
      (LP: #1581853)

 -- Robert Ancell <email address hidden> Tue, 21 Jun 2016 12:49:01 +1200

Changed in lightdm (Ubuntu Xenial):
status: Fix Committed → Fix Released
Revision history for this message
Martin Pitt (pitti) wrote : Update Released

The verification of the Stable Release Update for lightdm has completed successfully and the package has now been released to -updates. Subsequently, the Ubuntu Stable Release Updates Team is being unsubscribed and will not receive messages about this bug report. In the event that you encounter a regression using the package from -updates please report a new bug using ubuntu-bug and tag the bug report regression-update so we can easily find any regressions.

Revision history for this message
Jude Hungerford (smiley7c0) wrote :

From my reading of the above, it seems that this bug should be fixed in Yakkety, and probably also in up-to-date installations of Xenial.

I believe this is the bug I'm currently seeing (prefs.sh not sourced as privileged user) in both Yakkety and Xenial (lightdm versions 1.19.5-0ubuntu1 and 1.18.3-0ubuntu1 respectively). Should I open a new bug report tagged regression-update as mentioned above, or have I misunderstood in thinking it should be fixed in these versions?

The symptom I'm seeing is that if I put commands into /etc/guest-session/prefs.sh requiring execution by a privileged user, the guest login loops back around to the login screen without any messages. Behaviour is the same in both Yakkety and Xenial with all packages up-to-date.

Revision history for this message
Jude Hungerford (smiley7c0) wrote :

Sorry, please ignore my previous comment. It does work with some commands, I'm experiencing the failure mentioned above when trying to run "cupsdisable" and "cupsreject" upon login, but when I try other privileged commands they work.

I'll see if I can narrow down exactly what is failing and where, but my post above is incorrect, prefs.sh is being sourced as a privileged user (I can't seem to edit or delete the post hence this addition).

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.