diff --git a/modules/config/users-groups.nix b/modules/config/users-groups.nix index 598d68eb91db..76b6c2854a9c 100644 --- a/modules/config/users-groups.nix +++ b/modules/config/users-groups.nix @@ -265,15 +265,11 @@ in oldIFS="$IFS"; IFS=:; set -- $curEnt; IFS="$oldIFS" prevUid=$3 prevHome=$6 - # Don't change the UID if it's the same, otherwise usermod - # will complain. - if test "$prevUid" = "$uid"; then unset uid; fi # Don't change the home directory if it's the same to prevent # unnecessary warnings about logged in users. if test "$prevHome" = "$home"; then unset home; fi usermod \ --comment "$description" \ - ''${uid:+--uid $uid} \ --gid "$group" \ --groups "$extraGroups" \ ''${home:+--home "$home"} \ @@ -296,13 +292,6 @@ in groupadd --system \ ''${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 --gid $gid "$name" - fi fi }