VMware ESXi and vSphere Cluster Management
Create User Accounts in Linux
Learn to create local Linux users in Ubuntu Settings or with sudo adduser, choose account types, set passwords, and verify login access.
Why separate Linux user accounts matter
A user account is a local identity used for login, file ownership, and authorization decisions. Each person who regularly uses a Linux computer should normally have a distinct account rather than sharing one login.
Separate accounts keep personal files, login credentials, desktop preferences, and permissions associated with the correct person. This improves privacy and makes it easier to determine which account owns a file or performed an action.
User account administration includes more than creation. It can also include modifying account details, managing passwords, disabling or locking login access, and deleting accounts when they are no longer needed.
Important account terms
| Term | Meaning |
|---|---|
| Username | The short login identifier, usually lowercase and without spaces. For example, jwilliams. |
| Full name | A descriptive name shown in graphical interfaces. It is separate from the username. |
| Password | A credential used to authenticate the account. |
| Home directory | The personal filesystem directory normally created for a local user, such as /home/jwilliams. |
| Root | The superuser account with unrestricted system administrative authority. |
| Sudo | A mechanism that lets authorized users run individual commands with elevated privileges. |
Standard accounts and administrator accounts
A standard account is a regular account without broad system-management privileges. It is the appropriate choice for most people who need to use applications, create personal files, and browse the web.
An administrator account is permitted to perform system-level management actions. On Ubuntu, an administrator commonly performs privileged actions through sudo instead of logging in directly as root.
Grant administrator access only when it is needed. A standard account limits the damage that can result from an accidental command or compromised application.
Create a user with Ubuntu Settings
Ubuntu desktop releases may label the relevant panel Users or User Accounts. The exact appearance can vary by desktop environment and release, but the workflow is similar.
- Open the system Settings application.
- Locate and open Users or User Accounts.
- If the controls are locked, select the unlock control.
- Authenticate with the password of an authorized administrator. Account changes require administrative authorization; an ordinary standard account cannot normally add users.
- Choose the control for adding a new account.
- Select an account type: choose Standard for an ordinary user, or Administrator only when the person must manage the system.
- Enter the person’s full or display name.
- Choose a username. The username is the login name, not necessarily the same as the displayed full name. A lowercase name without spaces, such as
jwilliams, is a suitable convention when accepted by the system. - Confirm the dialog to create the account.
- Set an initial password when prompted or through the account’s password control.
Password configuration is an essential part of the process. An account may appear in the user list but not be usable for normal login until it has usable credentials and is enabled for login.
Create a user with adduser
adduser is an interactive account-creation utility commonly used on Debian-derived systems such as Ubuntu. Because creating an account changes system files, the command must run with elevated privileges.
Open a terminal and run:
sudo adduser jwilliamsReplace jwilliams with the desired login username. The account name in the command is the short login username; it is not the person’s full name.
The interactive workflow generally asks for:
- An initial password, entered without being displayed on the screen.
- The person’s full name.
- Optional profile fields, such as room number, work phone, home phone, or other information. These fields can usually be left blank when they are not needed.
- Confirmation that the collected information is correct.
After confirmation, the expected result is a new local account with a configured password and a home directory. The user should then be able to authenticate, assuming the account is not disabled and the correct username and password are used.
Graphical creation compared with adduser
| Method | Best for | Privilege requirement | Information entered | Result |
|---|---|---|---|---|
| Ubuntu Users/User Accounts settings | Beginners who prefer a desktop workflow | Unlock the panel with an authorized administrator credential | Account type, full name, username, and password | A local account configured through the graphical interface |
sudo adduser username | Terminal users and guided account creation | Run with sudo from an authorized administrator account | Password, full name, optional profile fields, and confirmation | A local account with a configured password and normally a home directory |
adduser versus useradd
Both adduser and useradd may appear in Linux account-creation instructions, but they do not always provide the same workflow.
useradd is generally the lower-level account-creation utility. It offers options that let administrators specify account properties explicitly, but it may require additional steps to establish a password, home directory, groups, or other settings.
adduser is generally a higher-level, interactive wrapper on Debian-derived systems such as Ubuntu. It guides the administrator through common fields and applies distribution conventions for a normal local account.
Implementation and behavior vary by distribution. On some systems, adduser may be a link or may have a different implementation. Do not assume that commands, defaults, or prompts behave identically everywhere. Follow the documentation and conventions of the distribution currently being administered.
| Command | Typical role | Interactivity | Distribution considerations | When to use it |
|---|---|---|---|---|
adduser | Higher-level account-management workflow | Usually interactive on Debian and Ubuntu | Commonly follows Debian-family conventions; behavior can vary elsewhere | Use the guided workflow on Debian/Ubuntu when appropriate |
useradd | Lower-level account creation utility | Often option-driven and less guided | Defaults and required follow-up steps differ by distribution | Use when precise, scripted, or low-level account configuration is required |
Read the local manual pages before substituting one command for the other:
man adduser
man useraddVerify the new account
Verification checks that the account exists, has the expected identity information, has a home directory, and can authenticate. In the graphical interface, confirm that the new account appears in the Users or User Accounts list and that it is enabled for login.
From a shell, inspect the account identity:
id jwilliamsThe output should identify the account and show its numeric user ID and group memberships.
You can also query the configured system account database:
getent passwd jwilliamsInspect the expected home directory:
ls -ld /home/jwilliamsConfirm that the directory exists and is owned by the new user. The exact directory location can follow local configuration, so do not assume every system uses /home without checking the account information.
To test login, keep the current administrator session open and use a separate terminal, desktop session, virtual console, or another safe test method. This avoids ending the session needed to correct a configuration problem. Authenticate with the exact username and the newly configured password.
Troubleshooting account creation
The graphical Add User controls are unavailable
The panel may still be locked, or the current account may lack administrative authorization. Unlock the panel and authenticate with an authorized administrator credential. If the current user cannot do that, ask an administrator to create the account.
The new account cannot log in
Possible causes include no usable password, a disabled account, or an incorrect username or password. Set or reset the password through the account settings or an approved administrative tool, ensure the account is enabled, and verify the exact login username.
adduser reports permission denied
The command may have been run without elevated privileges, or the current account may not be allowed to use sudo. Run it with sudo from an authorized administrator account. If that is not possible, ask a system administrator to create the account.
Instructions use useradd instead of adduser
The instructions may target another distribution or a lower-level workflow. On Debian and Ubuntu, use the guided adduser workflow when it fits the task, and consult the local manual pages before substituting commands.
The username is rejected
The name may contain unsupported characters, spaces, or uppercase letters under the system’s local policy, or an account with that username may already exist. Choose a valid lowercase login name and check whether the name is already present before retrying.
Key points to remember
- Give each person a separate account to isolate files, credentials, preferences, and permissions.
- Use Ubuntu Settings for a guided graphical workflow, or
sudo adduser usernamefor an interactive terminal workflow. - Creating an account requires an authorized administrator credential.
- Set a usable password and confirm that the account is enabled before expecting a successful login.
- Prefer a standard account unless administrative access is genuinely required.
- Use
id,getent passwd, andls -ldto verify identity, account lookup, and the home directory.