diff --git a/modules/config/system-path.nix b/modules/config/system-path.nix index 4a22aabc946..d9074732418 100644 --- a/modules/config/system-path.nix +++ b/modules/config/system-path.nix @@ -44,12 +44,10 @@ let pkgs.pciutils pkgs.perl pkgs.procps - pkgs.pwdutils pkgs.reiserfsprogs pkgs.rsync pkgs.seccure pkgs.strace - pkgs.su pkgs.sysklogd pkgs.sysvtools pkgs.time diff --git a/modules/config/users-groups.nix b/modules/config/users-groups.nix index cb84117090b..6beb7b311aa 100644 --- a/modules/config/users-groups.nix +++ b/modules/config/users-groups.nix @@ -173,16 +173,16 @@ in if ! curEnt=$(getent passwd "$name"); then useradd --system \ - "$name" \ --comment "$description" \ ''${uid:+--uid $uid} \ --gid "$group" \ --groups "$extraGroups" \ --home "$home" \ --shell "$shell" \ - ''${createHome:+--create-home} + ''${createHome:+--create-home} \ + "$name" if test "''${password:0:1}" = 'X'; then - echo "''${password:1}" | ${pkgs.pwdutils}/bin/passwd --stdin "$name" + echo "''${password:1}" | ${pkgs.shadow}/bin/passwd --stdin "$name" fi else #echo "updating user $name..." @@ -196,22 +196,13 @@ in # unnecessary warnings about logged in users. if test "$prevHome" = "$home"; then unset home; fi usermod \ - "$name" \ --comment "$description" \ ''${uid:+--uid $uid} \ --gid "$group" \ --groups "$extraGroups" \ ''${home:+--home "$home"} \ - --shell "$shell" - fi - - if test "$group" = nixbld; then - # As a special hack, add users that have nixbld as the - # primary group to the /etc/group entry for the nixbld - # group. `nix-store' currently expects this in order - # to get the UIDs of all the build users by doing a - # getprnam("nixbld") call. - groupmod "$group" -A "$name" + --shell "$shell" \ + "$name" fi done @@ -227,14 +218,14 @@ in if ! curEnt=$(getent group "$name"); then groupadd --system \ - "$name" \ - ''${gid:+--gid $gid} + ''${gid:+--gid $gid} \ + "$name" else #echo "updating group $name..." oldIFS="$IFS"; IFS=:; set -- $curEnt; IFS="$oldIFS" prevGid=$3 if test -n "$gid" -a "$prevGid" != "$gid"; then - groupmod "$name" --gid $gid + groupmod --gid $gid "$name" fi fi done <>>" echo "" - ${pkgs.pam_login}/bin/login root + ${pkgs.shadow}/bin/login root initctl emit -n startup exit 0 fi diff --git a/modules/tasks/network-interfaces.nix b/modules/tasks/network-interfaces.nix index 836950f42a6..46d608dbb9b 100644 --- a/modules/tasks/network-interfaces.nix +++ b/modules/tasks/network-interfaces.nix @@ -142,6 +142,8 @@ in pkgs.wirelesstools pkgs.rfkill ]; + + security.setuidPrograms = [ "ping" "ping6" ]; jobs.networkInterfaces = { name = "network-interfaces";