nixos/update-users-groups: read access to /etc/shadow for group shadow

This commit is contained in:
Jaakko Luttinen 2021-03-17 19:17:51 +02:00 committed by Cole Helbling
parent 4307699fdb
commit 099a9e809c

View file

@ -288,7 +288,7 @@ foreach my $u (values %usersOut) {
push @shadowNew, join(":", $u->{name}, $hashedPassword, "1::::::") . "\n"; push @shadowNew, join(":", $u->{name}, $hashedPassword, "1::::::") . "\n";
} }
updateFile("/etc/shadow", \@shadowNew, 0600); updateFile("/etc/shadow", \@shadowNew, 0640);
{ {
my $uid = getpwnam "root"; my $uid = getpwnam "root";
my $gid = getgrnam "shadow"; my $gid = getgrnam "shadow";