Why is this command risky compared with usermod -aG docker alice?
sudo usermod -G docker alice
- It drops alice from her other groups
- It makes docker alice's primary group
- It locks alice's password until reset
- It deletes the docker group's members
Without
Play Linux CLI ▸
-a, -G replaces the supplementary group list instead of appending to it.