VPS - Create a Non-Root User

Setting up a non-root user for every day tasks on a VPS is easy. Only 3 minutes of your time are needed and some basic Linux knowledge!

Why Should You Create a Non-Root User in Your VPS Instance

The default root account you are given when you first set up your server can have highly destructive powers. It is not meant for every day use. For this reason, we must create a new user that is still able to execute administrative permissions when needed.

#The following command creates a new user named mistletoe with regular permissions.

adduser mistletoe

You will be asked to choose and confirm the new UNIX password.

Now that we have our new user, it’s time to add it to the sudoer’s group.

What is Sudo?

sudo is a program for Unix-like computer operating systems that allows users to run programs with the security privileges of another user…


#The following command will add the user mistletoe to the sudo/root group.

usermod -aG sudo mistletoe


That’s all folks. Next, I’ll teach you how to add SSH keys.


Further Reading

Change the Password of your Default Root Account.