SV-268129r1131063_rule
V-268129
SRG-OS-000072-GPOS-00040
ANIX-00-000760
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 = ''
difok=8
'';
Rebuild and switch to the new NixOS configuration:
$ sudo nixos-rebuild switch
Verify NixOS enforces password complexity by requiring that at least 50 percent of the characters are changed with the following command:
$ grep difok /etc/security/pwquality.conf
difok=8
If the value of "difok" is set to less than "8", or is commented out, this is a finding.
V-268129
False
ANIX-00-000760
Verify NixOS enforces password complexity by requiring that at least 50 percent of the characters are changed with the following command:
$ grep difok /etc/security/pwquality.conf
difok=8
If the value of "difok" is set to less than "8", or is commented out, this is a finding.
M
5658