SV-268132r1131069_rule
V-268132
SRG-OS-000075-GPOS-00043
ANIX-00-000790
CAT II
10
Configure NixOS operating system to enforce 24 hours/one day as the minimum password lifetime.
Add the following Nix code to the NixOS Configuration, usually located in /etc/nixos/configuration.nix or /etc/nixos/flake.nix:
security.loginDefs.settings.PASS_MIN_DAYS = "1";
Rebuild and switch to the new NixOS configuration:
$ sudo nixos-rebuild switch
Verify NixOS enforces 24 hours/one day as the minimum password lifetime with the following command:
$ grep PASS_MIN_DAYS /etc/login.defs
PASS_MIN_DAYS 1
If PASS_MIN_DAYS_1 is not present, is commented out, or is a value different from 1, this is a finding.
V-268132
False
ANIX-00-000790
Verify NixOS enforces 24 hours/one day as the minimum password lifetime with the following command:
$ grep PASS_MIN_DAYS /etc/login.defs
PASS_MIN_DAYS 1
If PASS_MIN_DAYS_1 is not present, is commented out, or is a value different from 1, this is a finding.
M
5658