Skip to main content
Skip table of contents

How to Create User on Centos Server

In this article, we will describe how to define user creation and root rights in our Centos instance.

To connect to your instance, you need to follow the steps in the Remote Access to Your Instance article.

You can connect to your instance via

CODE
ssh -i <path/to/file.pem> <defaultusername>@<instance_public_ip>

Switch to root user to add user.

CODE
$ sudo su 

Use the adduser command to add a new user to your instance.

CODE
# adduser <username>

Use the passwd command to update the new user's password.

CODE
# passwd <username>

Set the password for new user

CODE
Changing password for user <username>.
New password:
Retype new password:
passwd: all authentication tokens updated successfully.

We need to add the user to the wheel group in order to give the root rights to the new user.

CODE
# usermod -aG wheel <username>

Test sudo access on new user account :

CODE
# su <username>

JavaScript errors detected

Please note, these errors can depend on your browser setup.

If this problem persists, please contact our support.