How to Create New User in Ubuntu Server?

Creating users on Ubuntu server is important and you can do this with the adduser and useradd tools using the CLI (command line).
4 min read
Beginner
Create New User in Ubuntu Server

User management in Ubuntu server is one of the first basic things you need to do as an administrator to control each user’s access and give them access according to their role and job, because it directly affects security and system organization.

Instead of everyone using the root account, you should create a separate account for each user and assign only the permissions they actually need, which also helps with better security and makes it easier to manage users permissions.

Here in this article, we are going to walk through creating a user with two system commands, adduser – useradd, and verify them.

Create a new user in Ubuntu VPS server

First, you need to connect to a personal or purchased Ubuntu virtual server. To connect via SSH, you can use Windows CMD or available software.

If necessary, you can read the article:

How to Connect to Linux Server From Windows Using SSH?
READ How to Connect to Linux Server From Windows Using SSH?

A simple way to use Ubuntu server on Windows OS, you can easily connect to your server with Putty, if you do not have Putty, you can easily download it from the official Putty website.

You need to log in to your server as Root or with a user with admin access.

Create User with useradd Command in Ubuntu Server

The “useradd” command is a low-level system command, and when using it, it doesn’t automatically configure needed things like creating a home directory for the user, setting a password, and doesn’t configure shell. You need to do all of them manually.

You can run a single line of command for both creating the Home directory and the login shell:

BASH
sudo useradd -m -s /bin/bash testuser

Method 2- Create a user and its home directory and configuration manually:

If you want to create a user on Ubuntu Server with limited access so that you can manage the access yourself, you can create a new user as follows:

1- Run this command to create a user:

BASH
sudo useradd testuser

This command will create a user without any home directory or SSH login configurations. To create a home directory and login shell, run the commands below.

2- create home directory:

BASH
sudo mkdir /home/testuser

3- Set its ownership to the user:

BASH
sudo chown testuser:testuser /home/testuser

4- set login shell for the user

BASH
sudo usermod -s /bin/bash testuser

Important:

Set home directory in user record

BASH
sudo usermod -d /home/testuser testuser

Create User with adduser Command in Ubuntu Server

The “adduser” command is a high-level command that automatically creates a home directory, sets permissions correctly, asks for a password, assigns a default login shell, and asks for some more information about the user.

BASH
sudo adduser testuser

Create User with adduser Command in Ubuntu Server

The “adduser” command is a high-level command that automatically creates a home directory, sets permissions correctly, asks for a password, assigns a default login shell, and asks for some more information about the user.

BASH
sudo adduser testuser

After creating a new user using the “adduser” method in Ubuntu, it will ask you for a password for the created user.

Enter the password you want to set to new user.

setting user password in linux Ubuntu server

After entering and confirming your password, you will be prompted to provide additional information about the user, such as full name, phone number, and other details. You can fill in these fields or leave them empty and press Enter to continue.

asking for user information while adding user in ubuntu

Then enter Y to add your users.

Check all users and group lists in Ubuntu server

To verify a user, you need to check whether the user exists on your server and confirm that their home directory has been created correctly.

List all users

List all users to check whether your user has been added.

BASH
cut -d: -f1 /etc/passwd
listing all users in linux ubuntu

After listing the users, if you see extra or unused accounts, or if you created a user incorrectly, you can easily delete users in Ubuntu just as simply as you added them.

Check user information individually:

You can check only one user with the following command:

BASH
id testuser

If you get output like this, it means the user creation was successful. When you create a new user, by default, it’s a Normal user, for whom you can change user permissions and give them admin access.

BASH
uid=1009(testuser) gid=1009(testuser) groups=1009(testuser),100(users)

Check the /home/ directory for your user folder. If you see your username there, the home directory was created successfully.

BASH
ls /home/

Try switching the user to the new one you’ve created.

BASH
su - User Name

Check your user with whoami

switching user in ubuntu

Conclusion

Adding users on Linux servers is a basic but important task for managing system access. Tools like adduser and useradd allow you to create accounts with the right settings and permissions.

Share:

Was this article helpful?

Your feedback helps us improve our technical guides.

Related Posts

You May Also Like

Explore more tutorials, guides, or documentation, from VPSMakers.

Learn how to install PHP on Windows Server, configure IIS with FastCGI, install PHP Manager, and test your PHP setup.
Richard Mourar
November 5, 2026
Learn IIS installation on Windows Server using Server Manager and PowerShell. In this guide you can learn how to install, and verify it.
Robert Smith
November 4, 2026
There are multiple ways to open a port Linux, depending on the distribution you're using. In this guide, we cover the most practical methods.
Richard Mourar
November 3, 2026
Enabling RDP on Windows Server invloves multiple methods, we've covered enabling with PowerShell, CMD, Server Manager, and Windows Settings.
Jacob Rafet
November 2, 2026