How to Create a New User
By default a new server (Cloud or Dedicated) will come with with the root user and no additional users. Although the root user does not have any restrictions which allows you to fully manage your server, this can also be a liability from a security standpoint. Using a few simple commands you can add a new user account to your server, which will allow you to do more common tasks or grant someone more restricted access to your server. Let’s take a look at how we can add a new user in Ubuntu.
How To Create A New User in Ubuntu
Before we dive all the way in, you’ll need to login to your server via SSH. If you’re not certain how to access your server via SSH, please refer to the following guide which covers this topic in full: Connecting to Your Server via SSH. Once logged in, you can add a new user account via the following steps.
Step 1: Use the adduser command followed by the username you’d like to create
Step 2: Answer the questions as they appear on your screen
- Set and confirm a password for the new user
- Enter in additional information about the new user (Optional and can be skipped by pushing enter)
- Confirm that the information you have entered is accurate by entering “y”
The new user account should now be set up and ready for use! If you’d like to give this user account Sudo access, you can do so by utilizing the information in the following guide: Create a sudo user (Ubuntu). You can test that this account was created successfully and is in working order by issuing the following command replacing “newusernamehere” with the username you just created.
su - newusernamehere
If the account was created correctly and is in working order, you should now be logged in as the new user!
- How to Delete a User (Ubuntu)
- Create a Sudo User (Ubuntu)
- How To Install LAMP On Ubuntu 16.04
- Install WordPress On Ubuntu 16.04