From 45223989b7d9f4652bf1f6389a004b087e145c68 Mon Sep 17 00:00:00 2001 From: rnhmjoj Date: Sun, 21 Jun 2020 17:01:34 +0200 Subject: nixos/users-groups: do not check validity of empty hashes (cherry picked from commit 751c2ed6e4af9e525fe57b7c0f0ee8a611eab9fa) --- nixpkgs/nixos/modules/config/users-groups.nix | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/nixpkgs/nixos/modules/config/users-groups.nix b/nixpkgs/nixos/modules/config/users-groups.nix index d9261e16773d..278f9ab6d25a 100644 --- a/nixpkgs/nixos/modules/config/users-groups.nix +++ b/nixpkgs/nixos/modules/config/users-groups.nix @@ -618,7 +618,8 @@ in { content = "${base64}${sep}${base64}"; mcf = "^${sep}${scheme}${sep}${content}$"; in - if (user.hashedPassword != null + if (user.hashedPassword != null # login disabled + && user.hashedPassword != "" # login without password && builtins.match mcf user.hashedPassword == null) then '' -- cgit 1.4.1