Linux Labs

Users, permissions, and processes / Stage 7 of 13

Managing group membership

Not running Starting usually ~20 s
Leave the lesson

Step 6 of 6 · summary · 2 min

Summary

  • The primary group is recorded in /etc/passwd, supplementary ones in /etc/group; usermod -g changes the first, -G the whole list of the second.
  • You add a group with usermod -aG and remove one with gpasswd -d; look at id before and after.
  • Changing the account does not touch running processes: check granting and removal with a fresh process, sudo -u.
  • At the start of the lesson the request -G lab-writers set the supplementary list anew, and lab-readers dropped out of it.
Ubuntu 24.04
Loading…