>_ IzzyLab

Topic breakdown

A user has one primary group (in /etc/passwd, the -g flag) and any number of supplementary ones (in /etc/group, the -G flag). usermod -G list overwrites the whole set of supplementary groups, so a forgotten -a silently removes the user from every group not listed. The correct "add without removing" idiom is usermod -aG group user. Current groups are shown by id -nG or groups.

What's checked

  1. alice added to docker
  2. staff membership kept

What it looks like