---
title: "Creating a Linux User"
source: "https://docs.nexcess.com/hosting/server-administration/linux/creating-a-linux-user/"
description: "Learn how to create a Linux user outside cPanel via SSH for specific needs. *Use caution, as this bypasses cPanel's security & management.*"
vertical: "Hosting"
date: "2025-05-28"
last_modified: "2026-06-30"
---

# Creating a Linux User

#### Overview

This guide walks you through the process of creating a Linux user account outside of cPanel. This may be necessary for specialized use cases such as SSH-only access or non-cPanel-managed file uploads.

Warning**Strongly discourage** proceeding with this unless absolutely necessary.  
**This is NOT recommended** due to the following security concerns:  
1\. The user will not be managed by cPanel.  
2\. Files uploaded by this user won’t follow standard cPanel permission policies.  
3\. User will not have access to WHM, cPanel, or phpMyAdmin.  
If you need to access MySQL, you can still create a database user in cPanel and connect using a MySQL client.

##### Step 1: Create the Linux user

Run the following command via SSH as the `root` user:

```
useradd developer<br></br>
```

This creates a user named `developer` with its own home directory.

##### Step 2: Set a password for the new user

```
passwd developer<br></br>
```

You’ll be prompted to enter and confirm the password.

##### Step 3: Grant access to a specific directory

To allow this user to access a specific directory (e.g., `/home/example`), set the appropriate file access control:

```
setfacl -R -m u:developer:rwx /home/example
```

##### Step 4: Verify permissions

Check the permissions to confirm they were applied correctly:

```
getfacl /home/example 
```

You should see output similar to:

```
user::rwx<br></br>user:developer:rwx<br></br>group::--x<br></br>mask::rwx<br></br>other::--x<br></br>
```

If the `other` permission is not set to `--x`, correct it with:

```
setfacl -m o::--x /home/example<br></br>
```

---

##### Step 5: Add the user to the directory group (Optional)  

If needed, add the user to the group that owns the directory:

```
usermod -a -G example developer
```

##### Step 6: Test access restrictions  

To confirm security is intact, create a test user:

```
useradd testuser<br></br>su - testuser<br></br>cd /home/example<br></br>
```

Try running:

```
ls -l<br></br>touch testfile.sh<br></br>
```

If access is denied, the permission restrictions are working as expected.

##### How to remove the user later

If you no longer need this user, you can delete them with:

```
userdel developer
```

To confirm they were removed:

```
su - developer
```

You should see an error like:  
`su: user developer does not exist`

#### Summary

Creating a Linux user outside of cPanel is possible for advanced use cases like SFTP-only access. However, this method bypasses cPanel’s security and automation features, so proceed with caution and only when no other option fits.
