4

I have default user that i've created when installed ubuntu

ubuntu@primary:~$ id
uid=1000(ubuntu) gid=1000(ubuntu) groups=1000(ubuntu),4(adm),24(cdrom),27(sudo),30(dip),46(plugdev),120(lpadmin),132(lxd),133(sambashare)

but the group shows nothing in its members

cat /etc/group | grep ubu
adm:x:4:syslog,ubuntu
cdrom:x:24:ubuntu
sudo:x:27:ubuntu
dip:x:30:ubuntu
plugdev:x:46:ubuntu
lpadmin:x:120:ubuntu
lxd:x:132:ubuntu
ubuntu:x:1000:
sambashare:x:133:ubuntu

Can you explain the origin of that behaviour please?

NAME="Ubuntu"
VERSION="20.04.4 LTS (Focal Fossa)"

1 Answer 1

6

The origin is the UPG (user private groups) model of user management. According to UserPrivateGroups: How it works:

[...] The group is set as the main group of the user (in /etc/passwd) while the user is NOT added to his group in /etc/groups.

=> Allows to detect that a group has been set up explicitly as a UPG even if additional users are added to the group.

I'm not sure which user-management tools (if any) rely on this method of UPG detection though.

0

You must log in to answer this question.

Not the answer you're looking for? Browse other questions tagged .