Debian GNU/Linux · Accounts & authentication

Protect the login banner files from modification

When it fails: Login banner files can be changed by non-root users. Someone who can rewrite the banners can remove the legal notice or plant misleading instructions for users.

CB-DEB-AUTH-003lowactiveautomatedautomated fixprofile core

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

Description

/etc/issue, /etc/issue.net and /etc/motd are shown to users before or after login. They must be owned by root and writable only by root.

Rationale

A writable banner lets an attacker remove the legal warning, or display fake instructions that trick users into running commands or giving out credentials.

Impact

None known. These are the Debian defaults.

Setting

Location/etc/issue, /etc/issue.net, /etc/motd
Defaultroot:root 0644
Recommendedroot:root, mode 0644 or stricter

Audit

Run stat -c '%n %U:%G %a' /etc/issue /etc/issue.net /etc/motd. Each file must be root:root with mode 644 or stricter.

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

issue

path: /etc/issue
owner: root
group: root
mode: '0644'

issue-net

path: /etc/issue.net
owner: root
group: root
mode: '0644'

motd

path: /etc/motd
owner: root
group: root
mode: '0644'

Remediation

Run chown root:root /etc/issue /etc/issue.net /etc/motd and chmod 644 /etc/issue /etc/issue.net /etc/motd.

Restartnone
Disruptionnone

issue

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

issue-net

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

motd

Generated from check motd: 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
ANSSI-BP-028 - Recommandations de configuration d'un système GNU/Linux2.0R50partialR50 covers every sensitive file; this control covers the login banners.
NIST SP 800-53 Rev. 55.1.1AC-3related

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