Debian GNU/Linux · Accounts & authentication

Keep system details out of the message of the day

When it fails: The message of the day shows the kernel version to every user who logs in. Every login session, including a compromised account, learns the exact kernel release.

CB-DEB-AUTH-002lowactiveautomatedautomated fixprofile core

As released in v0.1.1 beta · pre-release. Current state.

Description

After login, pam_motd shows /etc/motd and the output of the executable scripts in /etc/update-motd.d/. Debian ships 10-uname, which prints the kernel name, release, version and architecture.

Rationale

The kernel release tells an attacker who reached a shell which local privilege escalation exploits apply. There is no need to show it to every user at every login.

Impact

Users no longer see the kernel version at login. They can still run uname -a.

Setting

Location/etc/motd, /etc/update-motd.d/10-uname
Default10-uname executable
Recommended10-uname not executable, /etc/motd without OS details

Audit

  1. /etc/motd must not contain the escape sequences \m, \r, \s, \v or the OS name.
  2. /etc/update-motd.d/10-uname must not be executable (ls -l).

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

motd-no-os

/etc/motd does not reveal the system version.

path: /etc/motd
pattern: \\[mrsv]|Debian GNU/Linux [0-9]
expect: no_match

uname-script

The 10-uname dynamic MOTD script is not executable.

path: /etc/update-motd.d/10-uname
owner: root
group: root
mode: '0644'

Remediation

  1. Run chmod 644 /etc/update-motd.d/10-uname.
  2. Remove OS names, versions and escape sequences from /etc/motd.
Restartnone
Disruptionnone

Rollback

Run chmod 755 /etc/update-motd.d/10-uname.

uname-script

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

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
NIST SP 800-53 Rev. 55.1.1AC-8related

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

Threats mitigated

People and lifecycle

Authors
Verified2026-10-18 by Sn0wAlice on 12, Proxmox VM, Debian 12 genericcloud image, kernel 6.1.0-54-cloud-amd64. Generated check, fix and check again for profiles core and server-hardened; state kept after reboot.
Verified2026-10-18 by Sn0wAlice on 13, Proxmox VM, Debian 13 genericcloud image, kernel 6.12.113+deb13-cloud-amd64. Generated check, fix and check again for profiles core and server-hardened; state kept after reboot.
Introduced inv0.1.0
Created, updated2026-10-18, 2026-10-18
Translationsfr