Ubuntu/Apt
Users Commands
Create and manage users, groups, and permissions on Ubuntu. Handle user accounts, sudo access, password policies, and group memberships for system security.
12 commands
Pro Tips
Use 'adduser username' instead of 'useradd' on Ubuntu — it's interactive and sets up home directory, shell, etc.
Add sudo access: 'usermod -aG sudo username' — the user needs to log out and back in.
Use 'passwd -e username' to force a password change on next login.
Common Mistakes
'usermod -G' without '-a' replaces ALL groups. Always use '-aG' to append to existing groups.
Deleting a user with 'userdel -r' removes their home directory permanently. Back up data first.