Please make /etc/update-motd.d snippets runnable by regular users

Bug #1855271 reported by Balint Reczey
8
This bug affects 1 person
Affects Status Importance Assigned to Milestone
base-files (Ubuntu)
Fix Released
Undecided
Unassigned
Eoan
Fix Released
Undecided
Unassigned
ubuntu-release-upgrader (Ubuntu)
Fix Released
Undecided
Unassigned
Eoan
Fix Released
Undecided
Unassigned
update-notifier (Ubuntu)
Fix Released
Undecided
Unassigned
Eoan
Fix Released
Undecided
Unassigned

Bug Description

[Impact]

 * /etc/update-motd.d snippets throw errors when a normal user runs them.
 * This prevents showing MOTD when the user is dropped to a regular user's shell in WSL.

[Test Case]

 * Run update-motd's autopkgtest and observe scripts not throwing errors.

[Regression Potential]

 * The fixes are fairly simple, but to ensure no breakage the scripts are also run as root.

Related branches

Balint Reczey (rbalint)
summary: - Please make update-notifier's /etc/update-motd.d snippets runnable by
- regular users
+ Please make /etc/update-motd.d snippets runnable by regular users
Balint Reczey (rbalint)
description: updated
Revision history for this message
Launchpad Janitor (janitor) wrote :

This bug was fixed in the package base-files - 11ubuntu2

---------------
base-files (11ubuntu2) focal; urgency=medium

  * motd/50-motd-news: Don't show error when /var/cache/motd-news is missing
    and runnig as regular user (LP: #1855271)

 -- Balint Reczey <email address hidden> Thu, 05 Dec 2019 15:39:21 +0100

Changed in base-files (Ubuntu):
status: New → Fix Released
Revision history for this message
Launchpad Janitor (janitor) wrote :

This bug was fixed in the package ubuntu-release-upgrader - 1:20.04.6

---------------
ubuntu-release-upgrader (1:20.04.6) focal; urgency=medium

  * debian/control: Update Vcs-*: URLs
  * Rename .bzrignore to .gitignore
  * debian/gbp.conf: Add default configuration
  * debian/gbp.conf: Move prebuild command here from .bzr-builddeb/default.conf
  * Build source on Focal (LP: #1855437)

ubuntu-release-upgrader (1:20.04.5) focal; urgency=medium

  * debian/release-upgrade-motd: Don't try to update cached info
    as a regular user. That would fail.
    (LP: #1855271)

 -- Balint Reczey <email address hidden> Fri, 06 Dec 2019 12:55:52 +0100

Changed in ubuntu-release-upgrader (Ubuntu):
status: New → Fix Released
Steve Langasek (vorlon)
description: updated
Revision history for this message
Brian Murray (brian-murray) wrote : Proposed package upload rejected

An upload of base-files to eoan-proposed has been rejected from the upload queue for the following reason: "This version number seems like a strange mash-up of focal and eoan's version.".

Revision history for this message
Brian Murray (brian-murray) wrote : Please test proposed package

Hello Balint, or anyone else affected,

Accepted base-files into eoan-proposed. The package will build now and be available at https://launchpad.net/ubuntu/+source/base-files/10.2ubuntu7.19.10.0 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 on 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-eoan to verification-done-eoan. If it does not fix the bug for you, please add a comment stating that, and change the tag to verification-failed-eoan. In either case, without details of your testing we will not be able to proceed.

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

N.B. The updated package will be released to -updates after the bug(s) fixed by this package have been verified and the package has been in -proposed for a minimum of 7 days.

Changed in base-files (Ubuntu Eoan):
status: New → Fix Committed
tags: added: verification-needed verification-needed-eoan
Balint Reczey (rbalint)
tags: added: wsl
Revision history for this message
Łukasz Zemczak (sil2100) wrote : Proposed package upload rejected

An upload of ubuntu-release-upgrader to eoan-proposed has been rejected from the upload queue for the following reason: "The demotion updates seem suspicious, please re-upload with those left intact from the previous upload.".

Revision history for this message
Łukasz Zemczak (sil2100) wrote : Please test proposed package

Hello Balint, or anyone else affected,

Accepted ubuntu-release-upgrader into eoan-proposed. The package will build now and be available at https://launchpad.net/ubuntu/+source/ubuntu-release-upgrader/1:19.10.15.4 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 on 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-eoan to verification-done-eoan. If it does not fix the bug for you, please add a comment stating that, and change the tag to verification-failed-eoan. In either case, without details of your testing we will not be able to proceed.

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

N.B. The updated package will be released to -updates after the bug(s) fixed by this package have been verified and the package has been in -proposed for a minimum of 7 days.

Changed in ubuntu-release-upgrader (Ubuntu Eoan):
status: New → Fix Committed
Revision history for this message
Łukasz Zemczak (sil2100) wrote :

Hello Balint, or anyone else affected,

Accepted update-notifier into eoan-proposed. The package will build now and be available at https://launchpad.net/ubuntu/+source/update-notifier/3.192.26.1 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 on 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-eoan to verification-done-eoan. If it does not fix the bug for you, please add a comment stating that, and change the tag to verification-failed-eoan. In either case, without details of your testing we will not be able to proceed.

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

N.B. The updated package will be released to -updates after the bug(s) fixed by this package have been verified and the package has been in -proposed for a minimum of 7 days.

Changed in update-notifier (Ubuntu Eoan):
status: New → Fix Committed
Revision history for this message
Balint Reczey (rbalint) wrote :

Verified 3.192.26.1 on Eoan:

https://objectstorage.prodstack4-5.canonical.com/v1/AUTH_77e2ada1e7a84929a74ba3b87153c0ac/autopkgtest-eoan/eoan/amd64/u/update-motd/20191211_173053_e85d9@/log.gz :

autopkgtest [17:30:02]: test show-motd: [-----------------------
Welcome to Ubuntu 19.10 (GNU/Linux 5.3.0-24-generic x86_64)

 * Documentation: https://help.ubuntu.com
 * Management: https://landscape.canonical.com
 * Support: https://ubuntu.com/advantage

                         .--._ _.--.
                        ( \ / )
                         \ /\ /
                          \_ \/ _/
                           / \
                          ( /\ )
                           `--' `--'

                           FreedomBox

FreedomBox is a pure blend of Debian GNU/Linux. Web interface is available at
https://localhost/ . FreedomBox manual is available in /usr/share/doc/freedombox
and from the web interface.

Successive commands usually process the same argument. 'Alt-.' inserts the
last argument of the previous command. GNU readline rocks, read the manual.

25 updates can be installed immediately.
0 of these updates are security updates.
To see these additional updates run: apt list --upgradable

*** System restart required ***

This message is shown once once a day. To disable it please create the
/home/ubuntu/.hushlogin file.
autopkgtest [17:30:03]: test show-motd: -----------------------]
show-motd PASS

tags: added: verification-done verification-done-eoan
removed: verification-needed verification-needed-eoan
Changed in update-notifier (Ubuntu):
status: New → Fix Released
Revision history for this message
Balint Reczey (rbalint) wrote :

The verification covered all the three SRU-d source packages:

Get:1 http://ftpmaster.internal/ubuntu eoan-proposed/main amd64 base-files amd64 10.2ubuntu7.19.10.0 [60.6 kB]
...
Get:5 http://ftpmaster.internal/ubuntu eoan-proposed/main amd64 python3-distupgrade all 1:19.10.15.4 [102 kB]
Get:6 http://ftpmaster.internal/ubuntu eoan-proposed/main amd64 update-notifier-common all 3.192.26.1 [162 kB]

Revision history for this message
Launchpad Janitor (janitor) wrote :

This bug was fixed in the package base-files - 10.2ubuntu7.19.10.0

---------------
base-files (10.2ubuntu7.19.10.0) eoan; urgency=medium

  * motd/50-motd-news: Don't show error when /var/cache/motd-news is missing
    and runnig as regular user (LP: #1855271)

 -- Balint Reczey <email address hidden> Thu, 05 Dec 2019 15:39:21 +0100

Changed in base-files (Ubuntu Eoan):
status: Fix Committed → Fix Released
Revision history for this message
Brian Murray (brian-murray) wrote : Update Released

The verification of the Stable Release Update for base-files has completed successfully and the package is now being 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
Launchpad Janitor (janitor) wrote :

This bug was fixed in the package ubuntu-release-upgrader - 1:19.10.15.4

---------------
ubuntu-release-upgrader (1:19.10.15.4) eoan; urgency=medium

  * debian/control: Update Vcs-*: URLs
  * Rename .bzrignore to .gitignore
  * debian/gbp.conf: Add default configuration
  * debian/gbp.conf: Move prebuild command here from .bzr-builddeb/default.conf
  * debian/release-upgrade-motd: Don't try to update cached info
    as a regular user. That would fail. (LP: #1855271)

 -- Balint Reczey <email address hidden> Fri, 06 Dec 2019 22:52:48 +0100

Changed in ubuntu-release-upgrader (Ubuntu Eoan):
status: Fix Committed → Fix Released
Revision history for this message
Launchpad Janitor (janitor) wrote :

This bug was fixed in the package update-notifier - 3.192.26.1

---------------
update-notifier (3.192.26.1) eoan; urgency=medium

  * Notify user about stale updates information in motd (LP: #1842159)
  * Make /var/lib/update-notifier/updates-available world-readable
    (LP: #1844704)
  * data/update-motd-hwe-eol: Run as a regular user without printing errors
    (LP: #1855271)
  * data/update-motd-hwe-eol: Shortcut script when running in a container.
    There is no point in checking the HWE stack in a container since upgrading
    it would not affect the host system. (LP: #1855290)
  * data/update-motd-fsck-at-reboot: Shortcut script when running it as
    a regular user (LP: #1855271)

 -- Balint Reczey <email address hidden> Thu, 05 Dec 2019 15:02:52 +0100

Changed in update-notifier (Ubuntu Eoan):
status: Fix Committed → Fix Released
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.