Create new user in centos 6

After purchasing a server from Bytehouse cloud products, refer the below steps to create a new user to manage your server

Create a user

It is always recommended to login as non-root user and perform administration activities. To create a user, execute the following commands in your server.

root@yourserver-$ adduser bob 

bob can be replaced by a username of your choice

Now we need to create a password for this newly created user.

passwd bob

please ensure to generate and use strong passwords

We have created user bob and created a password for the user. If you navigate to /home you will be able to see the home directory of user bob.

root@yourserver-$ cd /home/
root@yourserver-$ ls

However for performing certain administration tasks in the server, user bob requires higher privileges. You can use /usr/sbin/visudo to grant root privileges to the user.

Execute the below command.


Locate the following line

root    ALL=(ALL)       ALL

Add the line bob ALL=(ALL) ALL next to the above line.

## Syntax:
##      user    MACHINE=COMMANDS
## The COMMANDS section may have other options added to it.
## Allow root to run any commands anywhere
root    ALL=(ALL)       ALL
bob     ALL=(ALL)       ALL

Logout from the server using the command logout.

Login as user bob

$ ssh bob@your-server-ip
bob@'s password: 

Verify that user bob have root privileges, execute the command sudo su to switch to root. Enter password of user bob when prompted.

bob@yourserver$  sudo su

We trust you have received the usual lecture from the local System
Administrator. It usually boils down to these three things:

#1) Respect the privacy of others.
#2) Think before you type.
#3) With great power comes great responsibility.

[sudo] password for bob: 

We have created a new user in the server and succesffuly connected to the server using SSH protocol using the username/password combination.

Alternatively, you can use key based authentication to connect to the server.

Last update:
2016-06-29 21:13
Bytehouse Technical Support
Average rating:0 (0 Votes)

You cannot comment on this entry

Chuck Norris has counted to infinity. Twice.

Most popular FAQs RSS

  1. I require an additional IPv4 address. What is Bytehouse's ... (87981 views)
  2. The Most Common Problems When Migrating Websites (66436 views)
  3. How do I create a 301 redirect? (55004 views)
  4. Can I Backup Exchange 2010 with My Online Backup ... (53169 views)
  5. Steps to Add Administrator User for Windows Server (48716 views)

Latest FAQs RSS

  1. Steps to set/customize log rotation from plesk (2016-07-25 07:15)
  2. Generate a self-signed SSL certificate - Nginx,CentOS (2016-07-07 02:31)
  3. Procedure re-register Volume Shadow Copy Service(VSS) in a Windows ... (2016-07-05 04:18)
  4. Steps to Install Mcrypt in Plesk (2016-07-01 17:11)
  5. How to Retrieve a Plesk Password in Linux and ... (2016-07-01 17:09)

Regular new KB articles

Check back from time to time for new articles, or if you have any suggestions please feel free to recommend