STIGUI
V-268166CAT II — Medium severitySV-268166r1131137_rule

NixOS must generate audit records when concurrent logons to the same account occur from different sources.

Rule version ANIX-00-001790 · STIG v1 · 2025-08-19

Discussion

Without generating audit records that are specific to the security and mission needs of the organization, it would be difficult to establish, correlate, and investigate the events relating to an incident or identify those responsible for one.

Audit records can be generated from various components within the information system (e.g., module or policy filter).

Satisfies: SRG-OS-000473-GPOS-00218, SRG-OS-000042-GPOS-00020, SRG-OS-000475-GPOS-00220

Check

Verify NixOS is configured to generate audit records with the following command:

$ sudo auditctl -l | grep -w lastlog

-w /var/log/lastlog -p wa -k logins

If the command does not return a watch for the lastlog file, this is a finding.

Fix

Configure NixOS to generate audit logs on account creations and modifications.

Add the following Nix code to the NixOS Configuration, usually located in /etc/nixos/configuration.nix or /etc/nixos/flake.nix:

security.audit.rules = [ "-w /var/log/lastlog -p wa -k logins" ];

Rebuild and switch to the new NixOS configuration: $ sudo nixos-rebuild switch

Identifiers

Group ID
V-268166
Group title
SRG-OS-000473-GPOS-00218
Rule ID
SV-268166r1131137_rule
Check ID
C-72090r1039384_chk
Fix ID
F-71993r1131136_fix