Hi all,

Good to see you all on my another blog post..!!

Here we are going to learn how to create a user in CentOS server initially in few simple steps.

Before start up we need to open SSH normally known as putty.

Is your PC doesn’t have putty, not an issue. Click here to download the installer file.

Step 1 :

Once you know your IP address and root password, login as the main user, root.

It is not encouraged to use root on a regular basis, and this tutorial will help you set up an alternative user to login with permanently.

ssh root@123.45.67.890

Terminal will asks to confirm Yes / No, Go ahead and type yes, and then enter your root password.

Step 2 :

After you have logged in , you will not need to login again to your VPS as root. In this step we will make a new user, with a new password, and give them all of the root capabilities.

First, create your user; you can choose any name for your user. Here I’ve suggested test

/usr/sbin/adduser test

Second, create a new user password:

passwd test

Step 3 :

As of yet, only root has all of the administrative capabilities. We are going to give the new user the root privileges.

Let’s go ahead and edit the sudo configuration. This can be done through the default editor, which in CentOS is called ‘vi’

/usr/sbin/visudo

# User privilege specification
root    ALL=(ALL)       ALL

To began typing in vi, press “a”.

test    ALL=(ALL)       ALL

Press Escape, :, w, q, then Enter to save and exit the file.

Step 4 :

Finally we need to restart the httpd service to complete the setup.

That can be achievable via below command

service httpd restart

 

Leave a Comment