> ## Knowledge Base Index
> Fetch the complete knowledge base index at: https://docs.infrawire.net/sitemap.xml
> Use this file to discover available pages before exploring further.
> Pure-Markdown content can be obtained by appending a '.md' suffix to the content URLs listed in the sitemap (without the trailing slash).

# How to Create a New User on Your Linux VPS

# How to Create a New User on Your Linux VPS

In this guide, you will learn how to create a new user account on your Infrawire Linux VPS. This is a great security practice, as it lets you avoid using the `root` account for everyday tasks.

Before starting, make sure you are already connected to your server via SSH as `root` or another user with administrator privileges. If you haven't connected yet, check out our SSH connection guide first.

---

## Step-by-Step Instructions

### Step 1: Connect to Your VPS

Open your terminal and connect to your server via SSH:

```bash
ssh root@SERVER_IP
```

Replace `SERVER_IP` with your actual server IP address.

### Step 2: Create the New User

Once connected, run the following command, replacing `newuser` with the username you want to create:

```bash
adduser newuser
```

> On some distributions (like CentOS or older Debian systems), you may need to use `useradd newuser` instead, followed by `passwd newuser` to set the password separately.

### Step 3: Set a Password

If you used `adduser`, you'll be prompted to enter and confirm a password for the new user right away:

```
New password:
Retype new password:
```

Choose a strong, unique password.

### Step 4: Fill in User Information (Optional)

The system may ask for additional details like Full Name, Room Number, Work Phone, etc.

```
Full Name []:
Room Number []:
Work Phone []:
Home Phone []:
Other []:
```

You can simply press **Enter** to skip these fields, they are optional.

### Step 5: Confirm the Information

You'll be asked to confirm that the details are correct:

```
Is the information correct? [Y/n]
```

Type **Y** and press **Enter**.

### Step 6: Grant Administrator Privileges (Optional)

If you want your new user to be able to run commands with `sudo` (administrator privileges), add them to the `sudo` group:

```bash
usermod -aG sudo newuser
```

> On CentOS/RHEL systems, the group is usually called `wheel` instead:
```bash
usermod -aG wheel newuser
```

### Step 7: Test the New Account

You can now test your new user by opening a new terminal session and logging in:

```bash
ssh newuser@SERVER_IP
```

If you granted sudo privileges, you can verify they work by running:

```bash
sudo whoami
```

This should return `root` after you enter the user's password.

> 🔒 **Security Best Practice:** We recommend creating a dedicated user with sudo privileges for daily use, and disabling direct root login via SSH afterwards to further secure your server.