nixos/update-users-groups: /etc/shadow owned by root:shadow
This commit is contained in:
parent
d6d1c121e1
commit
937359fcf1
|
@ -281,6 +281,12 @@ foreach my $u (values %usersOut) {
|
|||
}
|
||||
|
||||
updateFile("/etc/shadow", \@shadowNew, 0600);
|
||||
{
|
||||
my $uid = getpwnam "root";
|
||||
my $gid = getgrnam "shadow";
|
||||
my $path = "/etc/shadow";
|
||||
chown($uid, $gid, $path) || die "Failed to change ownership of $path: $!";
|
||||
}
|
||||
|
||||
# Rewrite /etc/subuid & /etc/subgid to include default container mappings
|
||||
|
||||
|
|
|
@ -537,6 +537,7 @@ in {
|
|||
input.gid = ids.gids.input;
|
||||
kvm.gid = ids.gids.kvm;
|
||||
render.gid = ids.gids.render;
|
||||
shadow.gid = ids.gids.shadow;
|
||||
};
|
||||
|
||||
system.activationScripts.users = stringAfter [ "stdio" ]
|
||||
|
|
|
@ -346,6 +346,7 @@ in
|
|||
paperless = 315;
|
||||
#mailman = 316; # removed 2019-08-30
|
||||
zigbee2mqtt = 317;
|
||||
# shadow = 318; # unused
|
||||
|
||||
# When adding a uid, make sure it doesn't match an existing gid. And don't use uids above 399!
|
||||
|
||||
|
@ -647,6 +648,7 @@ in
|
|||
paperless = 315;
|
||||
#mailman = 316; # removed 2019-08-30
|
||||
zigbee2mqtt = 317;
|
||||
shadow = 318;
|
||||
|
||||
# When adding a gid, make sure it doesn't match an existing
|
||||
# uid. Users and groups with the same name should have equal
|
||||
|
|
Loading…
Reference in a new issue