Ubuntu 26.04: Add User Accounts
Step-by-step guide to add, configure, and remove user accounts on Ubuntu 26.04 LTS, including sudo privileges administration.
After installing Ubuntu System, there is only a user you configured during installation besides system accounts, and that user is an administrative user. If you'd like to add more common user accounts on the system, configure as follows.
Add a New User
For example, add a user named resolute:
sudo adduser resolute
You will be prompted for:
- Your sudo password
- The new user's password
- Optional user information (Full Name, Room Number, etc.) — press Enter to leave blank
[sudo] password for ubuntu: # input your password
New password: # set user password
Retype new password: # confirm
passwd: password updated successfully
Changing the user information for resolute
Enter the new value, or press ENTER for the default
Full Name []: # press Enter to skip
Room Number []:
Work Phone []:
Home Phone []:
Other []:
Is the information correct? [Y/n] y
Grant Sudo Privileges
To give the new user administrative (sudo) privileges, add them to the sudo group:
sudo usermod -aG sudo resolute
Verify by switching to the new user and running a privileged command:
su - resolute
sudo ls -la /root
If the command succeeds, sudo access is working correctly.
Remove a User Account
To remove a user account while keeping their home directory:
sudo deluser resolute
To remove a user account along with their home directory:
sudo deluser resolute --remove-home
Summary
| Action | Command |
|---|---|
| Add user | sudo adduser <username> |
| Grant sudo | sudo usermod -aG sudo <username> |
| Remove user | sudo deluser <username> |
| Remove user + home | sudo deluser <username> --remove-home |