[Touch-packages] [Bug 1803601] Re: motd-news.service scheduled even when /etc/update-motd.d/50-motd-news is not executable
Tired Sysadmin (wearyofallthiscrap) wrote on 2022-07-26: >it likely wouldn't be there for a standard desktop installation. Legal is giving the same directions for both. The collected data output example uses the Intel i5-8500B CPU which is a mobile CPU, not a server CPU. https://ark.intel.com/content/www/us/en/ark/products/134892/intel- core-i58500b-processor-9m-cache-up-to-4-10-ghz.html https://ubuntu.com/legal/motd -- You received this bug notification because you are a member of Ubuntu Touch seeded packages, 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: Triaged 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. The motd-news.service unit looks like this: $ systemctl cat motd-news.service # /lib/systemd/system/motd-news.service [Unit] Description=Message of the Day After=network-online.target Documentation=man:update-motd(8) [Service] Type=oneshot ExecStart=/etc/update-motd.d/50-motd-news --force 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 -- Mailing list: https://launchpad.net/~touch-packages Post to : touch-packages@lists.launchpad.net Unsubscribe : https://launchpad.net/~touch-packages More help : https://help.launchpad.net/ListHelp
[Touch-packages] [Bug 1803601] Re: motd-news.service scheduled even when /etc/update-motd.d/50-motd-news is not executable
** Tags added: jammy kinetic lunar -- You received this bug notification because you are a member of Ubuntu Touch seeded packages, 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: Triaged 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. The motd-news.service unit looks like this: $ systemctl cat motd-news.service # /lib/systemd/system/motd-news.service [Unit] Description=Message of the Day After=network-online.target Documentation=man:update-motd(8) [Service] Type=oneshot ExecStart=/etc/update-motd.d/50-motd-news --force 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 -- Mailing list: https://launchpad.net/~touch-packages Post to : touch-packages@lists.launchpad.net Unsubscribe : https://launchpad.net/~touch-packages More help : https://help.launchpad.net/ListHelp
[Touch-packages] [Bug 1803601] Re: motd-news.service scheduled even when /etc/update-motd.d/50-motd-news is not executable
I should also have mentioned that 'ubuntu-server' has a hard dependency on 'motd-news-config', so anybody wanting a standard server-type installation will automatically get the advert updater and /etc/default/motd-news. -- You received this bug notification because you are a member of Ubuntu Touch seeded packages, 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: Triaged 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. The motd-news.service unit looks like this: $ systemctl cat motd-news.service # /lib/systemd/system/motd-news.service [Unit] Description=Message of the Day After=network-online.target Documentation=man:update-motd(8) [Service] Type=oneshot ExecStart=/etc/update-motd.d/50-motd-news --force 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 -- Mailing list: https://launchpad.net/~touch-packages Post to : touch-packages@lists.launchpad.net Unsubscribe : https://launchpad.net/~touch-packages More help : https://help.launchpad.net/ListHelp
[Touch-packages] [Bug 1803601] Re: motd-news.service scheduled even when /etc/update-motd.d/50-motd-news is not executable
Simon Déziel (sdeziel) wrote: > IIRC, `chmod -x` snippets from /etc/update-motd.d/ was the way to go a > few releases ago when it was consumed by run-parts. In 22.04 it's still handled by run-parts, and the man page documents it as such. Specifically by $ strings /lib/x86_64-linux-gnu/security/pam_motd.so | grep run-parts /usr/bin/env -i PATH=/usr/local/sbin:/usr/local/bin:/usr/sbin:/usr/bin:/sbin:/bin run-parts --lsbsysinit /etc/update-motd.d > /run/motd.dynamic.new in its primary use case. The "fetch new ads on boot" motd-news.service for this bug report runs one of the scripts directly, but the directory is still a run-parts input. We could disable scripts by renaming them to something that won't be found by the '--lsbsysinit' file patterns, but that would only solve the problem for "at login" updates, not the "at boot" updates through systemd. > It's merely to avoid harmless surprise and keep the old sysadmins happy, Service errors is hardly a "surprise", and you don't need to be condescending about it. wontfix (wontfix) wrote: > and that is to set ENABLED=0 in /etc/default/motd-news." > > This file no longer exists by default in Ubuntu 22.04 Jammy. $ grep VERSION /etc/os-release VERSION_ID="22.04" VERSION="22.04 LTS (Jammy Jellyfish)" VERSION_CODENAME=jammy $ dpkg -S /etc/default/motd-news motd-news-config: /etc/default/motd-news $ apt show motd-news-config Package: motd-news-config Priority: optional Source: base-files Task: cloud-image, ubuntu-wsl, server, ubuntu-server-raspi APT-Manual-Installed: no [several header elided] It certainly existed by default from the beginning of the server installation I'm working with. However, it's "priority: optional" so perhaps that's what you mean by "not default"; it likely wouldn't be there for a standard desktop installation. -- You received this bug notification because you are a member of Ubuntu Touch seeded packages, 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: Triaged 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. The motd-news.service unit looks like this: $ systemctl cat motd-news.service # /lib/systemd/system/motd-news.service [Unit] Description=Message of the Day After=network-online.target Documentation=man:update-motd(8) [Service] Type=oneshot ExecStart=/etc/update-motd.d/50-motd-news --force 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 -- Mailing list: https://launchpad.net/~touch-packages Post to : touch-packages@lists.launchpad.net Unsubscribe : https://launchpad.net/~touch-packages More help : https://help.launchpad.net/ListHelp
[Touch-packages] [Bug 1803601] Re: motd-news.service scheduled even when /etc/update-motd.d/50-motd-news is not executable
"Another one is specific to this service, and that is to set ENABLED=0 in /etc/default/motd-news." This file no longer exists by default in Ubuntu 22.04 Jammy. The language in the fix in many places including https://ubuntu.com/legal/motd is to change a number in a file that isn't there. As you know, systemd services that are disabled can still be enabled. -- You received this bug notification because you are a member of Ubuntu Touch seeded packages, 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: Triaged 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. The motd-news.service unit looks like this: $ systemctl cat motd-news.service # /lib/systemd/system/motd-news.service [Unit] Description=Message of the Day After=network-online.target Documentation=man:update-motd(8) [Service] Type=oneshot ExecStart=/etc/update-motd.d/50-motd-news --force 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 -- Mailing list: https://launchpad.net/~touch-packages Post to : touch-packages@lists.launchpad.net Unsubscribe : https://launchpad.net/~touch-packages More help : https://help.launchpad.net/ListHelp
Re: [Touch-packages] [Bug 1803601] Re: motd-news.service scheduled even when /etc/update-motd.d/50-motd-news is not executable
On 2020-05-06 2:49 p.m., Andreas Hasenack wrote: > There are many alternatives here. IIRC, `chmod -x` snippets from /etc/update-motd.d/ was the way to go a few releases ago when it was consumed by run-parts. > I think fixing this doesn't warrant an SRU, but should be considered for > the devel release of ubuntu (groovy at the moment). It's merely to avoid harmless surprise and keep the old sysadmins happy, certainly not worth a SRU. Thanks, Simon -- You received this bug notification because you are a member of Ubuntu Touch seeded packages, 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: Triaged 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. The motd-news.service unit looks like this: $ systemctl cat motd-news.service # /lib/systemd/system/motd-news.service [Unit] Description=Message of the Day After=network-online.target Documentation=man:update-motd(8) [Service] Type=oneshot ExecStart=/etc/update-motd.d/50-motd-news --force 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 -- Mailing list: https://launchpad.net/~touch-packages Post to : touch-packages@lists.launchpad.net Unsubscribe : https://launchpad.net/~touch-packages More help : https://help.launchpad.net/ListHelp
[Touch-packages] [Bug 1803601] Re: motd-news.service scheduled even when /etc/update-motd.d/50-motd-news is not executable
There are many alternatives here. What you describe is one, and you could then also add a systemd override with that exec check. A bit cumbersome, though. Another one is specific to this service, and that is to set ENABLED=0 in /etc/default/motd-news. I think fixing this doesn't warrant an SRU, but should be considered for the devel release of ubuntu (groovy at the moment). ** Changed in: base-files (Ubuntu) Status: New => Triaged -- You received this bug notification because you are a member of Ubuntu Touch seeded packages, 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: Triaged 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. The motd-news.service unit looks like this: $ systemctl cat motd-news.service # /lib/systemd/system/motd-news.service [Unit] Description=Message of the Day After=network-online.target Documentation=man:update-motd(8) [Service] Type=oneshot ExecStart=/etc/update-motd.d/50-motd-news --force 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 -- Mailing list: https://launchpad.net/~touch-packages Post to : touch-packages@lists.launchpad.net Unsubscribe : https://launchpad.net/~touch-packages More help : https://help.launchpad.net/ListHelp
[Touch-packages] [Bug 1803601] Re: motd-news.service scheduled even when /etc/update-motd.d/50-motd-news is not executable
** Merge proposal linked: https://code.launchpad.net/~sdeziel/ubuntu/+source/base-files/+git/base-files/+merge/383068 -- You received this bug notification because you are a member of Ubuntu Touch seeded packages, 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. The motd-news.service unit looks like this: $ systemctl cat motd-news.service # /lib/systemd/system/motd-news.service [Unit] Description=Message of the Day After=network-online.target Documentation=man:update-motd(8) [Service] Type=oneshot ExecStart=/etc/update-motd.d/50-motd-news --force 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 -- Mailing list: https://launchpad.net/~touch-packages Post to : touch-packages@lists.launchpad.net Unsubscribe : https://launchpad.net/~touch-packages More help : https://help.launchpad.net/ListHelp
[Touch-packages] [Bug 1803601] Re: motd-news.service scheduled even when /etc/update-motd.d/50-motd-news is not executable
** Tags added: bionic bitsize eoan ** Tags removed: bitsize ** Tags added: bitesize ** Changed in: base-files (Ubuntu) Importance: Undecided => Low -- You received this bug notification because you are a member of Ubuntu Touch seeded packages, 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. The motd-news.service unit looks like this: $ systemctl cat motd-news.service # /lib/systemd/system/motd-news.service [Unit] Description=Message of the Day After=network-online.target Documentation=man:update-motd(8) [Service] Type=oneshot ExecStart=/etc/update-motd.d/50-motd-news --force 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 -- Mailing list: https://launchpad.net/~touch-packages Post to : touch-packages@lists.launchpad.net Unsubscribe : https://launchpad.net/~touch-packages More help : https://help.launchpad.net/ListHelp
[Touch-packages] [Bug 1803601] Re: motd-news.service scheduled even when /etc/update-motd.d/50-motd-news is not executable
I have the same problem and it looks like this issue brings my server in real trouble. I deactivated this services completly now and hope it helps. -- You received this bug notification because you are a member of Ubuntu Touch seeded packages, 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. The motd-news.service unit looks like this: $ systemctl cat motd-news.service # /lib/systemd/system/motd-news.service [Unit] Description=Message of the Day After=network-online.target Documentation=man:update-motd(8) [Service] Type=oneshot ExecStart=/etc/update-motd.d/50-motd-news --force 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 -- Mailing list: https://launchpad.net/~touch-packages Post to : touch-packages@lists.launchpad.net Unsubscribe : https://launchpad.net/~touch-packages More help : https://help.launchpad.net/ListHelp
[Touch-packages] [Bug 1803601] Re: motd-news.service scheduled even when /etc/update-motd.d/50-motd-news is not executable
A possible fix would be to make the unit execution conditional to the update-motd fragment being executable: [Unit] ConditionFileIsExecutable=/etc/update-motd.d/50-motd-news I'm not sure if this should be added to motd-news.service, motd- news.timer or both. ** Description changed: 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). + 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. + 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. + + + The motd-news.service unit looks like this: + + $ systemctl cat motd-news.service + # /lib/systemd/system/motd-news.service + [Unit] + Description=Message of the Day + After=network-online.target + Documentation=man:update-motd(8) + + [Service] + Type=oneshot + ExecStart=/etc/update-motd.d/50-motd-news --force 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 + 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. -- You received this bug notification because you are a member of Ubuntu Touch seeded packages, 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. The motd-news.service unit looks like this: $ systemctl cat motd-news.service # /lib/systemd/system/motd-news.service [Unit] Description=Message of the D