5

This question already has an answer here:

Attempting to install MythTV on Ubuntu 18.04, I ran...

sudo usermod -a -G mythtv roger

...and logged out and back in. This should be sufficient. But: my group memberships didn't change.

I had to reboot. Why?

marked as duplicate by user535733, Fabby, Eric Carvalho, qbi, pomsky May 14 at 5:21

This question has been asked before and already has an answer. If those answers do not fully address your question, please ask a new question.

  • Could very well be the cause in the linked dupe. systemd strikes again, I guess. – Roger Lipscombe May 12 at 21:54
6

Likely because /etc/gshadow was not updated (but don't ask me why that didn't happen as usermod should do that too; check /var/log/ if there is a notice). The 2 files important for groups are /etc/group and /etc/gshadow where gshadow supersedes group.

When both are correct logging out and in is enough to update the group for the user. If only the 1st was updated you will need to reboot or you can update gshadow with the grpconv command. Logging out and in is then enough.

  • 4
    Why does reboot fix it then? – Joshua May 12 at 19:11
  • 1
    A bug in systemd where they created a fix during boot – Rinzwind May 13 at 6:13

Not the answer you're looking for? Browse other questions tagged or ask your own question.