Merge pull request #7017 from obadz/sg+sudo-g

Ability to switch groups with sg and sudo -g

Changed files
+2 -2
nixos
modules
programs
security
+1 -1
nixos/modules/programs/shadow.nix
···
chgpasswd = { rootOK = true; };
};
-
security.setuidPrograms = [ "passwd" "chfn" "su" "newgrp"
+
security.setuidPrograms = [ "passwd" "chfn" "su" "sg" "newgrp"
"newuidmap" "newgidmap" # new in shadow 4.2.x
];
+1 -1
nixos/modules/security/sudo.nix
···
root ALL=(ALL) SETENV: ALL
# Users in the "wheel" group can do anything.
-
%wheel ALL=(ALL) ${if cfg.wheelNeedsPassword then "" else "NOPASSWD: ALL, "}SETENV: ALL
+
%wheel ALL=(ALL:ALL) ${if cfg.wheelNeedsPassword then "" else "NOPASSWD: ALL, "}SETENV: ALL
${cfg.extraConfig}
'';