When you first create a new server, you need to initial the server setup with CentOS 7, and there are some configuration steps that you should take first on as part of the basic setup.

If you follow this article, it will increase the security and usability of your CentOS 7 server and will give you a solid foundation for your next actions.

First Step: Root Login

When you log into your server, you will need to know first your server’s public IP address and the password for the “root” user.

You can purchase your hosting from Cloudsurph.comCloudsurph hosting is a reliable hosting option for business and personal projects. We offer insight and help on system configuration issues and code errors or bugs.

If you have not already logged into your server, you may want to follow this article Configuration and Additional Recommended Steps for New CentOS 7 Servers which covers this process in detail.

So, if you are not already connected to your CentOS 7 VPS server, go ahead and log in as the root user using the following command: Love to Code? We’re Your Helping Partner, click here for  Buy Our Service

[root@websdevusa ~]# ssh root@SERVER_IP_ADDRESS

About Root

The root user is the administrative user in a Linux server that has very broad privileges. Because of the elevated privileges of the root account, you are actually discouraged from using it regularly.

This is because part of the inherent power with root accounts is the ability to make highly destructive changes, even by accident. Next step we will create a new user before initialing the server setup with CentOS 7

Second Step: Create a New User

First, we need to login into CentOS 7 server used by the root user, now we are prepared to add the new user account that we will use to log in from now on our CentOS 7 VPS server.

This example creates a new user called “new_user”, but you should need to replace it with a user name that you choose: Love to Code? We’re Your Helping Partner, click here for  Buy Our Service

[root@websdevusa ~]# adduser demo

After then, set a password for the new user that we already created name is “new_user”. Now Enter a strong password, and repeat it again to verify the password.

[root@websdevusa ~]# passwd demo

Third Step: Root Privileges

Now, we have new user access with regular account privileges. However, we can use new user access for doing administrative tasks. IF you want then buy a good, reliable, secure web hosting service  from here: click here

To avoid logging out as our normal user and logging back in as the root account, we can set up what is known as “superuser” or root privileges for our normal account. This will allow our normal user to run commands with administrative privileges by placing the word sudo before each command.

To add these benefits to our new user, we need to add the new user to the “wheels” group. By default, in CentOS 7, users belonging to the “wheels” group are allowed to use the sudo command. IF you want then buy a good, reliable, secure web hosting service  from here: click here

As a root user, run this command to add your new user to the wheel group

[root@websdevusa ~]# gpasswd -a demo wheel

Now our new user can run commands with super user privileges, that’s it! For more information about how this works please follow our regular published article.

That’s it. If you enjoyed reading this article and have more questions please reach out to our support team via live chat or email and we would be glad to help you. we provide server hosting for all types of need and we can even get your server up and running with the service of your choice.