I'm trying to add a list of users to different groups on a debian VM. I am using the following sequence of commands in my bash script:getent group $uid || groupadd $uid                        #add group before adding useruseradd -s $shell -m -d $users_directory -g $uid $uname   #add user with group id $uidHowever running this  prints out the following:groupadd: group '5067' already existsuseradd: group '5067' does not existlooking at my groups with cut-d: -f1 /etc/group I see that '5067' exists there, but when I run groups all I see is 'root' as the lone group.Any tips?
Trying to add user to group that exists in /etc/group not working
debian;users;group;useradd