SV-268130r1131065_rule
V-268130
SRG-OS-000073-GPOS-00041
ANIX-00-000770
CAT I
10
Configure NixOS to store only encrypted representations of passwords.
Add the following Nix code to the NixOS Configuration, usually located in /etc/nixos/configuration.nix or /etc/nixos/flake.nix:
security.loginDefs.settings.ENCRYPT_METHOD = "SHA512";
Rebuild and switch to the new NixOS configuration:
$ sudo nixos-rebuild switch
Verify NixOS stores only encrypted representations of passwords with the following command:
$ grep ENCRYPT_METHOD /etc/login.defs
ENCRYPT_METHOD SHA512
If "ENCRYPT_METHOD" does not equal SHA512 or greater, is commented out, or is missing, this is a finding.
V-268130
False
ANIX-00-000770
Verify NixOS stores only encrypted representations of passwords with the following command:
$ grep ENCRYPT_METHOD /etc/login.defs
ENCRYPT_METHOD SHA512
If "ENCRYPT_METHOD" does not equal SHA512 or greater, is commented out, or is missing, this is a finding.
M
5658