Debian GNU/Linux · Accounts & authentication

Do not list nologin as a valid shell

When it fails: nologin is declared as a valid login shell. Programs that only allow accounts with a valid shell (FTP servers, chsh) treat no-login accounts as normal ones.

CB-DEB-AUTH-021lowactiveautomatedautomated fixprofile server-hardenedprofile desktop-hardened

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

Description

/etc/shells lists the valid login shells. Some programs, like chsh and FTP servers, use it to decide whether an account may log in. nologin exists precisely to refuse logins and must not appear there.

Rationale

Listing nologin makes service accounts look like regular users to programs that rely on /etc/shells, which can open them to FTP logins or let users switch to it and back.

Impact

None known. Debian does not list it by default.

Audit

Run grep nologin /etc/shells. There must be no match.

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

shells

path: /etc/shells
pattern: nologin
expect: no_match

Remediation

Remove the nologin lines from /etc/shells.

Restartnone
Disruptionnone

remove

cb_backup /etc/shells
sed -i '/nologin/d' /etc/shells

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

FrameworkIDRelation
NIST SP 800-53 Rev. 55.1.1CM-6related

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