← Rules Catalog
mediumaccess-control

Ensure there are no unauthorized local accounts

no-unauthorized-accounts · RHEL ≥ 8, UBUNTU ≥ 22 · 1 impl

Description

Local interactive accounts (UID 1000 and above) must match the set the site authorized. The authorized set is a statement about this site's staff, so it cannot be derived from the host: an operator declares it in the authorized_local_accounts variable, as user names, numeric UIDs, or a mix of both. Until it is declared the check reports that it cannot assess the host and names what to set.

Rationale

An account nobody authorized is the account an assessor looks for. It may be an attacker's way back in, or an orphan left behind by someone who has gone. The host can list who exists; only the site can say who should. Comparing the two is the whole control, and it is why an undeclared list produces no verdict rather than a pass.

Check → Remediate

Checkset_compare
observed_command:
awk -F: '$3 >= 1000 && $3 < 65534 {print $1 ":" $3}' /etc/passwd 2>/dev/null
authorized:
{{ authorized_local_accounts }}
alias_separator:
:
Remediatemanual
note:
Remove or disable any local interactive account that is not in authorized_local_accounts (userdel -r <user> for a removable account, or lock it if it must be retained). If the account is legitimate, add it to the variable instead: the finding is a disagreement between the host and the declared list, and either side may be the one that is wrong.

Framework references

STIG

V-281199 / RHEL-10-600450

NIST 800-53

AC-2

NIST 800-171

3.1.1[d]

CMMC Level 2

AC.L2-3.1.1
#accounts#users#authorization#stig