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 |
| Default | 10-uname executable |
| Recommended | 10-uname not executable, /etc/motd without OS details |
Audit
/etc/motdmust not contain the escape sequences\m,\r,\s,\vor the OS name./etc/update-motd.d/10-unamemust 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
- Run
chmod 644 /etc/update-motd.d/10-uname. - Remove OS names, versions and escape sequences from
/etc/motd.
| Restart | none |
| Disruption | none |
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
- pam_motd(8), Debian manual pages Debian, vendor-doc, accessed 2026-10-18
- motd(5), Debian manual pages Debian, vendor-doc, accessed 2026-10-18
Mappings
| Framework | ID | Relation | Note |
|---|---|---|---|
| NIST SP 800-53 Rev. 55.1.1 | AC-8 | related |
How this control relates to the other framework's: equivalent, stricter, looser, partial or related.
Threats mitigated
| Taxonomy | ID |
|---|---|
| MITRE ATT&CK | T1082 |
People and lifecycle
| Authors |
|
| Verified | 2026-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. |
| Verified | 2026-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 in | v0.1.0 |
| Created, updated | 2026-10-18, 2026-10-18 |
| Translations | fr |