[Bug 1803601] [NEW] motd-news.service scheduled even when /etc/update-motd.d/50-motd-news is not executable
Simon Déziel
1803601 at bugs.launchpad.net
Thu Nov 15 20:10:54 UTC 2018
Public bug reported:
update-motd(5) says:
Executable scripts in /etc/update-motd.d/* are executed by pam_motd(8) as the root user at each
login, and this information is concatenated in /run/motd.dynamic. The order of script execu‐
tion is determined by the run-parts(8) --lsbsysinit option (basically alphabetical order, with
a few caveats).
So sysadmins are used to "chmod -x" motd fragments from /etc/update-
motd.d/ to prevent their execution. When doing so for /etc/update-
motd.d/50-motd-news, I noticed that motd-news.timer was still trying to
execute the motd-news.service unit which then logged a failure:
systemd[3704]: motd-news.service: Failed to execute command: Permission denied
systemd[3704]: motd-news.service: Failed at step EXEC spawning /etc/update-motd.d/50-motd-news:
Permission denied
systemd[1]: motd-news.service: Main process exited, code=exited, status=203/EXEC
systemd[1]: motd-news.service: Failed with result 'exit-code'.
systemd[1]: Failed to start Message of the Day.
This problem was observed on a Bionic system:
$ lsb_release -rd
Description: Ubuntu 18.04.1 LTS
Release: 18.04
$ apt-cache policy base-files
base-files:
Installed: 10.1ubuntu2.3
Candidate: 10.1ubuntu2.3
Version table:
*** 10.1ubuntu2.3 500
500 http://archive.ubuntu.com/ubuntu bionic-updates/main amd64 Packages
100 /var/lib/dpkg/status
10.1ubuntu2.2 500
500 http://security.ubuntu.com/ubuntu bionic-security/main amd64 Packages
10.1ubuntu2 500
500 http://archive.ubuntu.com/ubuntu bionic/main amd64 Packages
But the problem also exist in Disco.
** Affects: base-files (Ubuntu)
Importance: Undecided
Status: New
--
You received this bug notification because you are a member of Ubuntu
Foundations Bugs, which is subscribed to base-files in Ubuntu.
https://bugs.launchpad.net/bugs/1803601
Title:
motd-news.service scheduled even when /etc/update-motd.d/50-motd-news
is not executable
Status in base-files package in Ubuntu:
New
Bug description:
update-motd(5) says:
Executable scripts in /etc/update-motd.d/* are executed by pam_motd(8) as the root user at each
login, and this information is concatenated in /run/motd.dynamic. The order of script execu‐
tion is determined by the run-parts(8) --lsbsysinit option (basically alphabetical order, with
a few caveats).
So sysadmins are used to "chmod -x" motd fragments from /etc/update-
motd.d/ to prevent their execution. When doing so for /etc/update-
motd.d/50-motd-news, I noticed that motd-news.timer was still trying
to execute the motd-news.service unit which then logged a failure:
systemd[3704]: motd-news.service: Failed to execute command: Permission denied
systemd[3704]: motd-news.service: Failed at step EXEC spawning /etc/update-motd.d/50-motd-news:
Permission denied
systemd[1]: motd-news.service: Main process exited, code=exited, status=203/EXEC
systemd[1]: motd-news.service: Failed with result 'exit-code'.
systemd[1]: Failed to start Message of the Day.
This problem was observed on a Bionic system:
$ lsb_release -rd
Description: Ubuntu 18.04.1 LTS
Release: 18.04
$ apt-cache policy base-files
base-files:
Installed: 10.1ubuntu2.3
Candidate: 10.1ubuntu2.3
Version table:
*** 10.1ubuntu2.3 500
500 http://archive.ubuntu.com/ubuntu bionic-updates/main amd64 Packages
100 /var/lib/dpkg/status
10.1ubuntu2.2 500
500 http://security.ubuntu.com/ubuntu bionic-security/main amd64 Packages
10.1ubuntu2 500
500 http://archive.ubuntu.com/ubuntu bionic/main amd64 Packages
But the problem also exist in Disco.
To manage notifications about this bug go to:
https://bugs.launchpad.net/ubuntu/+source/base-files/+bug/1803601/+subscriptions
More information about the foundations-bugs
mailing list