1
  • I downloaded the current iso file of Ubuntu MATE from the website.
  • I did a completely fresh install of Ubuntu MATE 16.04 (specifically 16.04.5).
  • I created a default user while installing with its GUI called test (full name Test). The system thus created a UPG called test.
  • after installation had finished, I restarted the system.
  • Now on the completely fresh system I open System > Control Center > Users and Groups > Manage Groups.
  • I look for the test group and press Properties, and here it is... user test is not member of group test!

it looks like /etc/group suggests the same: (2nd last line)

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

but according to how should `id` and `/etc/group` be read? the primary group of a user is only listed in /etc/passwd and not additional in /etc/group to avoid redundancy.

id <username> seems to suggest a little bit different:

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)

the best way to proof is groups <username>:

test@test ~ $ groups test
test : test adm cdrom sudo dip plugdev lpadmin sambashare

So is this a bug by the GUIs? - Somehow i doubt it, because of how long time it is there and also present in two well known DEs...

DJCrashdummy
  • 1,881
  • 3
  • 24
  • 34
  • 4
    Whether a user gets assigned a UPG or not *at account creation* is determined by the `/etc/adduser.conf` settings (unless the account is created using lower-level means such as `useradd`) . What happens after that is up to the admin. – steeldriver Aug 27 '18 at 12:06
  • @steeldriver reads as an answer to me; besides maybe a remark that UPG is not used by default ;) – Rinzwind Aug 27 '18 at 17:01
  • 2
    @Rinzwind everything in the OP's terminal output says that user `test` *is* in group `test` (the UPG) - so I guess the question should really be why the GUI users-and-groups pane said something different? – steeldriver Aug 27 '18 at 17:15
  • I can confirm this behavior in Ubuntu Studio 18.04 (xfce4). The GUI shows that I'm not a member of my UPG, but for all other groups I am a member of (according to `id`) the membership is displayed correctly. Likely a bug in the GUI. – mook765 Aug 27 '18 at 17:49
  • It's correct in my Ubuntu MATE 18.04, same settings structure as OP - Properties for my group lists me as a member – Zanna Aug 27 '18 at 17:55
  • @steeldriver thanks for understanding my confusion...! ;-) – DJCrashdummy Aug 27 '18 at 20:23
  • @Zanna i did exactly the same with Ubuntu MATE 18.04.1 as described in the OP and got the same result... (just different GID for `lpadmin` and `sambashare`). :-/ – DJCrashdummy Aug 27 '18 at 20:25
  • I'm talking about the GUI, not `/etc/group` which afaik is normal the way you showed. It's the same in mine. The possible weirdness here is the GUI which should show the user in the group (I believe `id` and you can also run `groups` I think)(Also OP is a person and it's you!) – Zanna Aug 27 '18 at 21:00
  • It looks like the GUI only uses the information from `/etc/groups`. When I use the GUI to add or remove myself to or from my UPG I definitely have a change in `/etc/groups` but no change in the output of `id`. – mook765 Aug 28 '18 at 08:43
  • @mook765 yes, this is also my assumption... but why is this so? for a reason? a bug? - IMHO the only GUI-item *"Users and Groups"* should list all groups/users/members no matter if primary or supplementary groups nor where they are noted. ...the average GUI-user has no idea of and mostly also no interest in such internals. – DJCrashdummy Aug 28 '18 at 10:15
  • 1
    I think the UPG is handled in a special way, I believe one must belong to this group, the UPG is defined in `/etc/passwd`. The GUI is probably meant to manage `/etc/groups` and nothing else. I agree with you that this is confusing, in my opinion we could call it a bug. – mook765 Aug 28 '18 at 11:55

0 Answers0