Some links on this page are affiliate links: if you buy through them we may earn a commission, at no extra cost to you.
Adding or removing a user on Ubuntu Linux is straightforward, but the safe procedure depends on whether you are using Ubuntu Desktop or administering a server. On Desktop, open Settings > System > Users, unlock the panel, and use Add User or Remove User. On a server, Ubuntu recommends sudo adduser username to create a local account and sudo deluser username to remove one. Removing an account does not automatically remove its home directory, and server offboarding may also require revoking SSH keys, ending sessions, and checking external identity services.
This guide covers both interfaces, explains when to grant administrator rights, and separates account deletion from the decision about what to do with the user’s files.
As an Amazon Associate I earn from qualifying purchases.
What’s actually slowing this PC down?
Pick the symptom - the matching free tool is one click away.
Which Ubuntu user-management method should I use?
Use the graphical Users panel when you are working at an Ubuntu Desktop machine and want guided prompts. Use the terminal when you are on Ubuntu Server, connected over SSH, managing several accounts, or automating an administrative procedure. Both methods manage local accounts; neither one by itself removes an identity supplied by LDAP, Active Directory, or another external directory.
| Situation | Best method | What it does | Important limitation |
|---|---|---|---|
| Ubuntu Desktop with a local keyboard and screen | Settings > System > Users | Guides you through account type, name, username, password, and removal | You must unlock the panel with administrator authentication |
| Ubuntu Server or remote shell | sudo adduser username and sudo deluser username |
Creates or removes a local account from the command line | deluser does not remove the home directory automatically |
| Centralized identity environment | Use the identity provider’s process as well as local checks | Handles accounts that are not defined only in local files | Deleting a similarly named local account may not revoke the central identity |
Ubuntu Server documentation says Debian-based distributions encourage the adduser package for account management. The command is a friendlier front end to lower-level tools and follows Debian policy defaults; see the Ubuntu user-management documentation and the Ubuntu Noble adduser manpage.
Popular on Amazon
- 【90 Degree Full Function USB C Adapter】Supports the latest USB4 standard for up to 40Gbps of bandwidth, 8K video support, and up to 240W Fast charging; Support USB PD 3.1 Extended Power Range (EPR) including 140W, 180W and 240W. Your productivity is easily doubled. *Warm Tip: For the best fit, please make sure the USB-C port is fully exposed; thick or bulky cases may affect compatibility.
- 【Reliable Quality】Made from high-quality, scratch-resistant aluminum alloy, delicate metal frame. get excellent wear resistance and heat dissipation. Non-Slip Design for easier insertion and removal.
- 【Small and portable】Ultra thin size, ultra compact design, a petite physique that matches the minimalist design of your modern laptops. Coming with a slim figure that won't block the port next to the one it's plugged into.
- 【Compatibility】Widely work with most usb c, thunderbolt 4/3 devices. Compatibilit for ROG Ally, Steam Deck, Switch, MacBook Pro, Quest 3 VR headset, Surface Book 2, iPhone 18/17/16/15, Samsung Galaxy S23/S22/S21, Note 20/10, Google Pixel, ChromeBook, etc.
- 【Excellence Customer Support】If you experience any issues or cable failure, simply reach out to our dedicated customer service team. We provide a prompt response within 18 hours, providing you with the necessary technical support to resolve any concerns.
How do I add a user in Ubuntu Desktop?
On Ubuntu Desktop, an administrator can create a standard or administrator account from the Users panel. The exact labels can vary slightly between Ubuntu releases, but the current Desktop Guide uses the following path.
- Open Settings. Select Activities, search for System, and open Settings.
- Open the account panel. Select System, then Users. The panel shows the local accounts known to the desktop.
- Unlock the panel. Select the lock or unlock control and authenticate when prompted. Creating another account is an administrative action, so a normal locked panel will not allow the change.
- Start account creation. Select Add User.
- Choose the account type. Select a standard account for ordinary work. Select an administrator account only if the person must install software or drivers, change system settings, and run administrative commands through Ubuntu’s privilege mechanism.
- Enter the identity details. Type the person’s full name and the proposed username. Check the spelling before continuing because the username becomes part of the home-directory path and is used for sign-in.
- Choose password handling. You can set a password immediately or allow the user to set one at first login, depending on the options shown by your Ubuntu release.
- Finish. Select Add. The new local account should then appear in the Users panel.
The Ubuntu Desktop “Add a new user account” guide documents this flow. Keep the account standard unless there is a specific administrative need; adding a person to the administrator role is a separate privilege decision, not a required part of creating the account.
How do I add a local user from the Ubuntu terminal?
On Ubuntu Server, or on Desktop when you prefer a shell, run the documented adduser command with sudo:
sudo adduser username
Replace username with the local login name you want to create. Because account creation changes system files, sudo asks for authentication from an account that already has administrative privileges.
- Open a local terminal or connect to the server through an authorized administrative session.
- Run
sudo adduser username. - Enter and confirm the new account’s password when prompted.
- Answer the identifying-information prompts. Ubuntu may ask for a full name and other optional details.
- Confirm the information when the command presents the final summary.
The utility normally creates a home directory populated with the system’s skeletal configuration, following Debian policy defaults. Ubuntu’s adduser manpage describes it as a higher-level, friendlier front end to lower-level user and group tools. That is why adduser is the preferred documented starting point for ordinary local accounts rather than manually editing account databases.
Creating the account does not automatically make it an administrator. A newly created user should receive only the access needed for the job. On a server, that may mean membership in a narrowly chosen service or application group rather than full root-equivalent access.
Do these 3 things before closing this tab:
1Repair Windows errors before they cause bigger problems2Scan for outdated or missing drivers - takes under a minute3Clear out junk files and repair common Windows errorsHow do I give a user admin rights in Ubuntu?
Give administrator rights only when the user must perform system-wide operations. Ubuntu grants full administrative command access through membership in the sudo group; adding the account to that group is optional after account creation.
Use Ubuntu’s documented group-management form:
sudo adduser username sudo
Replace username with the existing local account. The general syntax is sudo adduser username groupname, so the same pattern can add a user to another group when a specific application requires it. The Ubuntu Server user-management guide explains the sudo group and group membership.
Also popular on Amazon
- 5-in-1 Connectivity: Equipped with a 4K HDMI port, a 5 Gbps USB-C data port, two 5 Gbps USB-A ports, and a USB C 100W PD-IN port. Note: The USB C 100W PD-IN port supports only charging and does not support data transfer devices such as headphones or speakers.
- Powerful Pass-Through Charging: Supports up to 85W pass-through charging so you can power up your laptop while you use the hub. Note: Pass-through charging requires a charger (not included). Note: To achieve full power for iPad, we recommend using a 45W wall charger.
- Transfer Files in Seconds: Move files to and from your laptop at speeds of up to 5 Gbps via the USB-C and USB-A data ports. Note: The USB C 5Gbps Data port does not support video output.
- HD Display: Connect to the HDMI port to stream or mirror content to an external monitor in resolutions of up to 4K@30Hz. Note: The USB-C ports do not support video output.
- What You Get: Anker 332 USB-C Hub (5-in-1), welcome guide, our worry-free 18-month warranty, and friendly customer service.
Consider the consequences before using this command. A member of sudo can run administrative commands, install software, alter system settings, and change other accounts. For a temporary contractor, service operator, or shared server, a narrower group assignment may be safer. If the account only needs to use an application or read a directory, do not make it an administrator merely because that is convenient.
On Ubuntu Desktop, selecting the administrator account type during the graphical creation process performs the equivalent privilege decision. You can therefore create a standard account first and grant additional rights later, rather than over-privileging every new user at creation time.
How do I delete a user in Ubuntu Desktop?
Use the same Users panel for a graphical removal. Before confirming, decide whether the person’s files must be preserved, archived, or removed; deleting the login and handling the home directory are separate decisions.
- Open Settings > System > Users.
- Unlock the panel and authenticate as an administrator.
- Select the account to remove.
- Select Remove User.
- Read the file-retention prompt carefully. Choose the option that matches your retention policy instead of treating removal as automatic secure erasure.
- Confirm the operation.
The Desktop Guide’s User accounts documentation links to the removal procedure. If the person may need records later, preserve the home directory according to your organization’s policy before completing a destructive cleanup. If the account is being removed because of a security incident, preserve evidence and coordinate with whoever manages the system rather than deleting files impulsively.
How do I delete a user from the Ubuntu terminal?
For a local account on Ubuntu Server, run:
sudo deluser username
This removes the account and its primary group according to Ubuntu’s documented behavior, but it does not automatically remove the user’s home folder. The Ubuntu Noble deluser manpage provides the removal utility reference, while the Ubuntu Server guide explains the home-directory retention warning.
- Identify the exact local username. Do not substitute a display name or email address.
- Decide whether the home directory must be retained or archived.
- Check for active work, scheduled jobs, application ownership, and SSH access before removal on a server.
- Run
sudo deluser username. - Handle the retained home directory separately under your file-retention and access-control policy.
Do not describe deluser as a secure wipe. Account removal changes the account database; it does not guarantee that every file, backup, log entry, or copy of the data has been erased. If you must destroy data, use an approved data-disposal process that matches the storage medium, backups, and legal requirements.
What should I do with the user’s home directory and files?
Ubuntu’s key rule is simple: deleting an account does not remove its home folder. Treat the account record and the files as two separate assets.
Keep the files in place
Keeping the home directory can be appropriate when the user may return, when another administrator needs to review configuration, or when retention rules require the data to remain available. Restrict access while the account is gone, and document who owns the retained data.
Also popular on Amazon
- Sleek 7-in-1 USB-C Hub: Features an HDMI port, two USB-A 3.0 ports, and a USB-C data port, each providing 5Gbps transfer speeds. It also includes a USB-C PD input port for charging up to 100W and dual SD and TF card slots, all in a compact design.
- Flawless 4K@60Hz Video with HDMI: Delivers exceptional clarity and smoothness with its 4K@60Hz HDMI port, making it ideal for high-definition presentations and entertainment. (Note: Only the HDMI port supports video projection; the USB-C port is for data transfer only.)
- Double Up on Efficiency: The two USB-A 3.0 ports and a USB-C port support a fast 5Gbps data rate, significantly boosting your transfer speeds and improving productivity.
- Fast and Reliable 85W Charging: Offers high-capacity, speedy charging for laptops up to 85W, so you spend less time tethered to an outlet and more time being productive.
- What You Get: Anker USB-C Hub (7-in-1), welcome guide, 18-month warranty, and our friendly customer service.
Archive the files
For offboarding, an archive can preserve documents while allowing the original home path to be removed later. Record the archive location, retention period, and responsible owner. Ensure that the archive itself has permissions appropriate to the sensitivity of the files.
Remove the files separately
If policy permits deletion, perform that as a deliberate second operation after confirming that no required records, application data, or backups depend on the directory. Ubuntu’s account-removal command does not promise secure erasure, so do not equate deleting a directory with eliminating every recoverable copy.
Understand UID and GID reuse
Linux file ownership is tied to numeric user and group IDs. Ubuntu warns that if a future account receives the same UID or GID, it could gain access to files left behind under that identity. This is why retaining a former home directory without documenting its ownership can create a later access problem. Keep the old data controlled, and review ownership before reusing an identity or handing the files to another person.
How do I revoke a departing user’s server access completely?
Deleting a local account is only one part of server offboarding. If the goal is to stop access immediately, review authentication methods, active sessions, and external identity sources as well as the local account record.
Check password authentication
Removing the local account prevents ordinary local authentication for that account. However, password locking by itself is not a complete SSH revocation when public-key authentication is configured.
Review SSH public keys
Inspect the departing user’s ~/.ssh/authorized_keys and any other account or service locations where their public key may have been installed. Remove keys that should no longer work, following your change-control process. Ubuntu specifically cautions that locking a password does not prevent SSH login through an authorized public key.
Quick wins for a faster PC:
Scan for outdated or missing drivers - takes under a minuteDriver Scan →Clear out junk files and repair common Windows errorsFree Scan →Fix the driver behind crashes, sound loss and screen glitchesFind Drivers →Consider existing sessions
An account can have an active shell, running process, screen or terminal multiplexer session, or long-lived service even after its password is changed or the account is removed. Identify and terminate sessions according to your operational policy, taking care not to interrupt unrelated services.
Check external identity providers
Ubuntu distinguishes local accounts from identities supplied by services such as LDAP or Active Directory. If the user signs in through centralized identity, remove or disable the identity in that provider as well. A local deluser command cannot revoke an account that is defined and authenticated elsewhere.
Also popular on Amazon
- Portable and powerful USB-C HUB: BENFEI USB Type-C HUB, with super-soft and knot-free silicone woven design cable, meets most mobile office needs. Compact, lightweight, stylish, and powerful portable USB C Hub equipped with 1 x HDMI port, 1 x 100W charging, and 3 x USB ports. 18-month warranty, 24-hour response, to ensure you feel at ease when using our product.
- Design centered on comfort and reliability: Thanks to BENFEI's end-to-end in-house cable production capability, in-house PCBA and assembly capability, using the industry's most advanced silicone woven design and process, 20cm cable in length, no knots, super-soft, the HUB is easy to use in all scenarios: laptop, tablet, stand etc. Super-soft, 25000+ life cycles, to meet your daily carrying and office needs.
- 100W Charging: Support up to 90W USB C pass-through charging via Type-C port to keep your laptop powered. 10W is reserved for other interface operations. No data and video function on the Type-C port.
- 4K HDMI Display: The HDMI port supports media display at resolutions up to 4K 30Hz, keeping every incredible moment detailed and ultra vivid. Please note that the C port of the Host device needs to support video output.
- Transfer Files in Seconds: Transfer files and from your laptop at speeds up to 10 Gbps with USB A 3.2 port. Extra 2 USB A 2.0 ports are perfectly for your keyboards and mouse.
Review SSH group restrictions
Some servers restrict SSH access with the AllowGroups setting. Ubuntu’s guidance is to place permitted accounts in the configured group and restart the SSH service after changing that policy. If your server uses this control, verify that the departing user is no longer in an allowed group and that the resulting configuration still permits the administrators who need access.
These checks are server-specific follow-up controls, not mandatory steps for every Ubuntu Desktop account deletion. Use them when the account had remote access, keys, scheduled work, or centralized identity.
The Tool Desk
Outbyte Driver Updater FREEFix the driver behind crashes, sound loss and screen glitchesFind Drivers →Outbyte PC Repair FREEClear out junk files and repair common Windows errorsFree Scan →What changes on newer Ubuntu releases?
Ubuntu’s current server documentation notes that Ubuntu 25.10 and later provide sudo-rs by default. The common account-management workflows in this guide remain the documented adduser, deluser, and group-management commands, but edge-case behavior should not be assumed to be identical across every sudo implementation or release.
The Noble manpage identifies the adduser package as version 3.137ubuntu1 for that Ubuntu release. Package versions and interface labels can change, so consult the documentation for the release you administer when a command behaves differently or when your organization has customized authentication.
What can go wrong when adding or removing users?
The Users panel is locked
Only an administrator can unlock the panel. Sign in with an account that has administrative rights, authenticate when prompted, and try again. If no usable administrator account remains, use an approved recovery procedure rather than changing account files manually.
sudo adduser says permission is denied
The invoking account may not have administrative rights, or the sudo policy may require a different administrator. Confirm that you are using an authorized account and the correct username, then ask an existing administrator to perform the operation if necessary.
Free tools Windows power users keep installed
One-click scans. No signup required.
The new user cannot perform an administrative task
Creating a standard account does not grant root access. If the task genuinely requires it, add the account to the sudo group with sudo adduser username sudo, then have the user start a new login session so the updated group membership is recognized. Do not grant this access merely to work around an unrelated file-permission problem.
The home folder still exists after deletion
That is expected. Ubuntu deliberately separates account removal from home-directory removal. Decide whether to retain, archive, or delete the files under your policy, and review ownership before another account is assigned the same UID or GID.
Also popular on Amazon
- 【Read before You Buy】 Note: This adapter is USB 2.0 version and cannot transmit HDM, VGA, or other video signals. Nevertheless, they are fully capable of charging devices,duplicating files, and can be seamlessly integrated with USB-C earphones, wireless network adapters, and SD card adapters.
- 【Easy to Use and Safe】Thanks to modern manufacturing techniques, we've made these adapters sufficiently compact so that they can remain inserted in your device without noticeable protrusion or inconvenience. This means you don't have to constantly plug and unplug them, reducing the likelihood of wear and misalignment, and making them more convenient to carry around.
- 【Reliable Quality】Engineered for enhanced durability, durable aluminum alloy shell material,get excellent wear resistance and heat dissipation,the male USB C and female USB connectors & the male USB and female USB C connectors are designed to be plugged and unplugged up to 20000 times. Provides data transfer, device charging, memory space expansion, and additional computer peripherals.
- 【Think more for you】Do you need to connect a USB-C-enabled device to an odd device that only has USB-A ports? Then these USB-A male to USB-C female adapters are made for you.Simply insert the adapter into the USB-A port on the device, and you can instantly connect your USB-C device to the device that originally didn't have the correct connection port.
- 【Trusted xiwxi Quality and Service】As a responsible brand seller, you will receive xiwxi's 12-month Quality assurance and lifetime friendly customer service, you're not just buying a product,you're investing in peace of mind with all-round quality and exceptional customer service.
SSH still works after password locking
Check public-key authentication and the user’s authorized_keys; a key can continue to authenticate even when password login is locked. Also inspect active sessions, SSH group restrictions, and any external identity provider.
The account keeps appearing through centralized login
The machine may be obtaining the identity from LDAP, Active Directory, or another directory service rather than from local account files. Follow the provider’s disable or deletion process and then verify the server’s access-control configuration.
Outdated Drivers Are Slowing You Down
One free scan finds every outdated or missing driver and matches the right update for your exact hardware.Free scan · exact hardware matchPC Slower Than It Used to Be?
A free scan shows the junk files, broken settings and background clutter dragging Windows down - then fixes them in one click.Free scan · Windows 10 & 11A safe Ubuntu account-change checklist
Use this short checklist whenever you add or remove a local account:
- Confirm whether the machine is Ubuntu Desktop or Ubuntu Server.
- Verify that you are using an authorized administrator account.
- For a new user, choose standard versus administrator access deliberately.
- Use
sudo adduser usernamefor a documented local command-line workflow. - Before removal, identify files, services, scheduled work, SSH keys, and active sessions owned by the account.
- Run
sudo deluser usernameonly after deciding what happens to the home directory. - Archive or delete retained files separately, and document their ownership.
- Check UID/GID reuse risks before assigning the identity to someone else.
- For centralized identities, disable the account in the external provider.
- For remote servers, verify that public-key access and existing sessions are revoked as intended.
The safest mental model is that Ubuntu user management has three layers: the account record, the privileges and groups attached to it, and the data and authentication paths associated with it. Handle each layer explicitly instead of assuming one command completes all three.
Frequently Asked Questions
Should I use adduser or the lower-level useradd command on Ubuntu?
Ubuntu Server documentation recommends the adduser package for normal account management. It provides an interactive, policy-aware front end that creates the account and its home-directory setup; use lower-level tools only when you have a specific administrative design that requires them.
Can deleting a local Ubuntu account disable an LDAP or Active Directory user?
No. A local account command affects accounts defined on that machine. If authentication comes from a directory service, disable or remove the identity in that provider and review the Ubuntu host’s group and SSH policies separately.
Recommended Free Tools
Why can a replacement user access files left by a deleted Ubuntu user?
Linux stores file ownership as numeric UID and GID values. If a later account is assigned the same identifiers, the kernel can treat that account as the owner of files left behind, even though the displayed username has changed; review ownership before reusing identities.
What should I check before removing a user from a production server?
Look for active sessions, running jobs, service processes, SSH public keys, scheduled tasks, and files that another service still needs. Coordinate a maintenance window when necessary, preserve required records, and confirm that the user is not supplied by an external identity service.

