SV-268134r1131073_rule
V-268134
SRG-OS-000078-GPOS-00046
ANIX-00-000810
CAT II
10
Configure NixOS to enforce password complexity.
Add the following Nix code to the NixOS Configuration, usually located in /etc/nixos/configuration.nix or /etc/nixos/flake.nix:
environment.etc."/security/pwquality.conf".text = ''
minlen=15
'';
Rebuild and switch to the new NixOS configuration:
$ sudo nixos-rebuild switch
Verify NixOS enforces a minimum 15-character password length with the following command:
$ grep minlen /etc/security/pwquality.conf
minlen=15
If the value of "minlen" is set to less than "15", or is commented out, this is a finding.
V-268134
False
ANIX-00-000810
Verify NixOS enforces a minimum 15-character password length with the following command:
$ grep minlen /etc/security/pwquality.conf
minlen=15
If the value of "minlen" is set to less than "15", or is commented out, this is a finding.
M
5658