This is a follow-up question to Why is a user not a member of their private group (UPG)? although the first question isn't really necessary to understand this one.
id seems pretty clear...
test@test ~ $ id test uid=1000(test) gid=1000(test) groups=1000(test),4(adm),24(cdrom),27(sudo),30(dip),46(plugdev),113(lpadmin),129(sambashare)
it shows the UID and GID of
test (resp. its UPG) and then additionally lists all groups of which the user
test is a member.
But then how should
/etc/group be read?
test@test ~ $ less /etc/group | grep test adm:x:4:syslog,test cdrom:x:24:test sudo:x:27:test dip:x:30:test plugdev:x:46:test lpadmin:x:113:test test:x:1000: sambashare:x:129:test
The group-name at the beginning is pretty clear and also that the number is the GID; and after that the names of the group-members are listed. But why isn't the second last line
test:x:1000:test instead of
test:x:1000: to indicate, that the user
test is member of the group
bonus question: what is the
x in the second column for?