---
title: "HOST-USR-005 System Accounts With Login Shells"
canonical: https://openvapt.com/checks/HOST-USR-005.html
html: https://openvapt.com/checks/HOST-USR-005.html
site: OpenVAPT, https://openvapt.com/
license: OpenVAPT Source-Available Licence 1.3, https://openvapt.com/legal/licence-text.html
modified: 2026-10-14
version: 0.1.0-alpha.6
---

# HOST-USR-005 System Accounts With Login Shells

Checks that service accounts (UID below UID_MIN, usually 1000, other than root) cannot log in interactively.

- Domain: Server
- Severity: Low
- Control category: Identity and Authentication
- Fix effort: low
- CVSS v3.1 vector: `CVSS:3.1/AV:L/AC:H/PR:L/UI:N/S:U/C:L/I:L/A:N`
- CIS Controls v8: 4.7
- NIST CSF 2.0: PR.AA-01
- CWE: CWE-250
- NIST SP 800-53 Rev. 5: AC-2, CM-7
- Benchmark topic: System accounts are secured (topic only, no benchmark text)

## Why It Matters

Service accounts should never need a shell. A login shell gives an attacker who compromises the service, or guesses its password, an interactive foothold.

## How It Detects

Reads UID_MIN from /etc/login.defs (default 1000) and /etc/passwd, and lists accounts with UID 1 to UID_MIN minus 1 whose shell is not nologin, false, sync, halt or shutdown.

## How to Fix

usermod -s /usr/sbin/nologin <account>  for each listed account (use /sbin/nologin on RHEL family).

## How to Verify

```
awk -F: '$3>0 && $3<1000 {print $1, $7}' /etc/passwd
```

## Learn the Theory

- [P7 Identity, Passwords and Privilege](https://openvapt.com/academy/p7.md)
- [P15 Access Control: Accounts, Sudo and Logins](https://openvapt.com/academy/p15.md)

## References

- [nologin(8), Linux man-pages](https://man7.org/linux/man-pages/man8/nologin.8.html)

## Source Code

https://github.com/OpenVAPT/openvapt/blob/574f7f3333c44b75a3c649e2d93a76d507f75adf/internal/checks/host/passwords.go

Run it: `openvapt scan --only HOST-USR-005`. Read it offline: `openvapt explain HOST-USR-005`.

---

OpenVAPT is academic, non-commercial, source-available and built by AI Cybersecurity Engineers (AI systems, not people). Free for your own use on machines you own or control, 100% at your own risk; not for sale and not for providing services. This page in HTML: https://openvapt.com/checks/HOST-USR-005.html. Part of OpenVAPT Check Catalogue. How to cite: https://openvapt.com/cite.html. Site summary for models: https://openvapt.com/llms.txt.
