about summary refs log tree commit diff
path: root/nixos
diff options
context:
space:
mode:
authorMatthew Bauer <mjbauer95@gmail.com>2019-08-26 15:54:13 -0400
committerGitHub <noreply@github.com>2019-08-26 15:54:13 -0400
commited87d121879241b27fa5a6d95000c84be7aab3c4 (patch)
tree6d48671c1f53deb3c18f0fd6ac96952ea53bba98 /nixos
parent8345c77cfec0603f8a2e23eb6fbce77d1e694b47 (diff)
parentfc565c1b9d59a4a1b96d8ead859d3ea6f03a7d0e (diff)
downloadnixlib-ed87d121879241b27fa5a6d95000c84be7aab3c4.tar
nixlib-ed87d121879241b27fa5a6d95000c84be7aab3c4.tar.gz
nixlib-ed87d121879241b27fa5a6d95000c84be7aab3c4.tar.bz2
nixlib-ed87d121879241b27fa5a6d95000c84be7aab3c4.tar.lz
nixlib-ed87d121879241b27fa5a6d95000c84be7aab3c4.tar.xz
nixlib-ed87d121879241b27fa5a6d95000c84be7aab3c4.tar.zst
nixlib-ed87d121879241b27fa5a6d95000c84be7aab3c4.zip
Merge pull request #67476 from matthewbauer/fix-66745
nixos/update-users-groups.pl: chomp hashedPassword
Diffstat (limited to 'nixos')
-rw-r--r--nixos/modules/config/update-users-groups.pl1
1 files changed, 1 insertions, 0 deletions
diff --git a/nixos/modules/config/update-users-groups.pl b/nixos/modules/config/update-users-groups.pl
index ef5e6346f02e..59cea51c611b 100644
--- a/nixos/modules/config/update-users-groups.pl
+++ b/nixos/modules/config/update-users-groups.pl
@@ -267,6 +267,7 @@ foreach my $line (-f "/etc/shadow" ? read_file("/etc/shadow") : ()) {
     next if !defined $u;
     $hashedPassword = "!" if !$spec->{mutableUsers};
     $hashedPassword = $u->{hashedPassword} if defined $u->{hashedPassword} && !$spec->{mutableUsers}; # FIXME
+    chomp $hashedPassword;
     push @shadowNew, join(":", $name, $hashedPassword, @rest) . "\n";
     $shadowSeen{$name} = 1;
 }