Moved groups assignment out of useradd to avoid errors when the group is the same as the default user group