Ubuntu · Accounts & authentication

Turn off MOTD content fetched from the network (motd-news, update-notifier)

When it fails: The system contacts Canonical servers to build the message of the day. The news fetch sends the release, kernel, CPU model and cloud type to an outside server, and its answer is shown to every user at login.

CB-UBU-AUTH-030lowactiveautomatedautomated fixprofile core

Description

Two timers refresh parts of the Ubuntu message of the day from the network:

  • motd-news.timer (package base-files) runs /etc/update-motd.d/50-motd-news --force twice a day. It downloads short news from https://motd.ubuntu.com and caches them in /var/cache/motd-news, shown at every login. Its HTTP user agent carries the distribution and version, the kernel release and architecture, the CPU model and the cloud type. It is controlled by ENABLED in /etc/default/motd-news.
  • update-notifier-motd.timer and its service (package update-notifier-common, from Ubuntu 22.04 on servers) check weekly whether a new Ubuntu release is available, and update the message shown by 91-release-upgrade.

This control sets ENABLED=0 in /etc/default/motd-news and masks the timers and the update-notifier-motd service.

The 91-release-upgrade script can still check for a new release when someone logs in, through /usr/lib/ubuntu-release-upgrader/release-upgrade-motd; set Prompt=never in /etc/update-manager/release-upgrades to stop it too. On Ubuntu 20.04 servers, update-notifier-motd is not installed and its checks are reported as compliant.

Rationale

The news request is an unsolicited outbound connection that describes the system to a third party, from servers that otherwise only talk to approved repositories. Its content, chosen by an outside server, is displayed to every user who logs in. Release upgrade notices are useless on managed systems, where upgrades are planned centrally.

Impact

The message of the day no longer shows Ubuntu news, nor the notice that a new release is available. Package update counts (90-updates-available) and reboot notices are not affected; security updates are covered by the package controls.

Setting

Location/etc/default/motd-news; units motd-news.timer, update-notifier-motd.timer, update-notifier-motd.service
DefaultENABLED=1, timers enabled
RecommendedENABLED=0, timers and service masked

Audit

  1. grep ENABLED /etc/default/motd-news shows ENABLED=0.
  2. systemctl is-enabled motd-news.timer update-notifier-motd.timer update-notifier-motd.service prints masked for each unit that exists.

Automated: every check must pass. Scanners report each check by its id.

motd-news-config

Effective ENABLED value in /etc/default/motd-news.

script: |
  f=/etc/default/motd-news
  [ -f "$f" ] || { echo "no $f"; exit 2; }
  v=$(sed -n 's/^[[:space:]]*ENABLED[[:space:]]*=[[:space:]]*"\{0,1\}\([0-9]*\).*/\1/p' "$f" | tail -n 1)
  echo "ENABLED=${v:-unset}"
  [ "$v" = 0 ]

motd-news-timer

The motd-news download timer is masked.

unit: motd-news.timer
state: masked

update-notifier-timer

The update-notifier-motd timer is masked.

unit: update-notifier-motd.timer
state: masked

update-notifier-service

The update-notifier-motd service is masked.

unit: update-notifier-motd.service
state: masked

Remediation

  1. In /etc/default/motd-news, set ENABLED=0.
  2. Run systemctl mask --now motd-news.timer update-notifier-motd.timer update-notifier-motd.service.
Restartnone
Disruptionnone

Rollback

Set ENABLED=1 in /etc/default/motd-news, then run systemctl unmask and systemctl enable --now for motd-news.timer and update-notifier-motd.timer, and systemctl unmask update-notifier-motd.service.

motd-news-config

f=/etc/default/motd-news
[ -f "$f" ] || exit 0
cb_backup "$f"
if grep -Eq '^[[:space:]]*ENABLED[[:space:]]*=' "$f"; then
  sed -i 's/^[[:space:]]*ENABLED[[:space:]]*=.*/ENABLED=0/' "$f"
else
  printf '%s\n' 'ENABLED=0' >>"$f"
fi

motd-news-timer

Generated from check motd-news-timer: the engine writes the fix for every output, it sets the expected value and the check runs again after.

update-notifier-timer

Generated from check update-notifier-timer: the engine writes the fix for every output, it sets the expected value and the check runs again after.

update-notifier-service

Generated from check update-notifier-service: the engine writes the fix for every output, it sets the expected value and the check runs again after.

Handwritten code reads parameters from CB_<NAME> environment variables. Each release turns these fixes into remediate.sh and an Ansible role per profile: dry run by default, a fix runs only when its check fails.

References

Mappings

FrameworkIDRelationNote
ANSSI-BP-028 - Recommandations de configuration d'un système GNU/Linux2.0R62partialR62 asks to disable every unneeded service; this control covers the MOTD network timers.
NIST SP 800-53 Rev. 55.1.1CM-7related

How this control relates to the other framework's: equivalent, stricter, looser, partial or related.

Threats mitigated

People and lifecycle

Authors
Verified2026-10-19 by Sn0wAlice on 20.04, Proxmox VM, Ubuntu 20.04 cloud image, kernel 5.4.0-216-generic. Fails on a fresh install (ENABLED=1, motd-news.timer enabled; update-notifier-motd not installed, compliant); fix masks the timer; kept after reboot; fix idempotent.
Verified2026-10-19 by Sn0wAlice on 22.04, Proxmox VM, Ubuntu 22.04 cloud image, kernel 5.15.0-198-generic. Fails on a fresh install (ENABLED=1, motd-news and update-notifier-motd timers enabled); fix masks the units; kept after reboot; fix idempotent.
Verified2026-10-19 by Sn0wAlice on 24.04, Proxmox VM, Ubuntu 24.04 cloud image, kernel 6.8.0-147-generic. Fails on a fresh install (ENABLED=1, motd-news and update-notifier-motd timers enabled); fix masks the units; kept after reboot; fix idempotent.
Verified2026-10-19 by Sn0wAlice on 26.04, Proxmox VM, Ubuntu 26.04 cloud image, kernel 7.0.0-38-generic. Fails on a fresh install (ENABLED=1, motd-news and update-notifier-motd timers enabled); fix masks the units; kept after reboot; fix idempotent.
Introduced inv0.1.0
Created, updated2026-10-19, 2026-10-19
Translationsfr