Linux User Management

Cheatsheet for Linux User Management Handling users # adds a new user called 'schoeffm' useradd -m -s /bin/zsh -G docker schoeffm # └┬┘└────┬─────┘└─┬─────┘ # │ │ │ # │ │ └─> List of groups the user # │ │ should be a member of # │ └─> login shell of the new account # └────────> also create a home directory for this # account # Assigns a new UID to <─────┐ # this account │ # ┌──┴──┐ usermod -aG docker -s /bin/zsh -L|U -u 4711 schoeffm # └───┬────┘ └───┬─────┘ └─┬─┘ # │ │ └─> Lock or Unlock user # │ └─> set new login shell for account # └────────────> append to the list of groups # without 'a' this will replace # the group list userdel not explicitly shown here since it’s comprehensible....

August 10, 2019 · 3 min · schoeffm