Score:0

/etc/group: why the username does not appear in its own primary group?

kz flag

According with many tutorials in the /etc/group file is listed all the groups.

Through the cat /etc/group | grep omicron command (omicron is the default custom user created in the Linux installation) appears:

adm:x:4:syslog,omicron
cdrom:x:24:omicron
sudo:x:27:omicron
dip:x:30:omicron
plugdev:x:46:omicron
lpadmin:x:120:omicron
lxd:x:132:omicron
omicron:x:1000:
sambashare:x:133:omicron

According with the output I can understand that each line represents:

  • The group name
  • The X represents something about password or some protection
  • The gid is the id of the group
  • Finally what users are assigned to the group.

What is not clear for me:

  • why appears omicron:x:1000: and not omicron:x:1000:omicron?

The omicron user has its primary group omicron too

Score:1
us flag

A user doesn't need to be listed as the member of a group in /etc/group if that group is their primary group. That's just how it is and has been for decades. Some user management tools do explicitly put the user in the /etc/group list, but not all.

mangohost

Post an answer

Most people don’t grasp that asking a lot of questions unlocks learning and improves interpersonal bonding. In Alison’s studies, for example, though people could accurately recall how many questions had been asked in their conversations, they didn’t intuit the link between questions and liking. Across four studies, in which participants were engaged in conversations themselves or read transcripts of others’ conversations, people tended not to realize that question asking would influence—or had influenced—the level of amity between the conversationalists.