II. How to Remove (Delete) a User on Ubuntu 14.04 LTS
Pre-Flight Check
- These instructions are intended specifically for adding a user on an Ubuntu 14.04 LTS dedicated server.
- I’ll be working from a Liquid Web Core Managed Ubuntu VPS 14.04 LTS server, and I’ll be logged in as root.
Step 1: Add the User
It’s just one simple command to add a user. In this case, we’re adding a user called mynewuser:
adduser mynewuser
First you will be prompted to enter the user’s password (twice); do this step. Next you’ll be prompted to enter in the user’s information. This step is not required, and pressing enter fills the field with the default information:
Adding user `mynewuser' ...
Adding new group `mynewuser' (1001) ...
Adding new user `mynewuser' (1001) with group `mynewuser' ...
Creating home directory `/home/mynewuser' ...
Copying files from `/etc/skel' ...
Enter new UNIX password:
Retype new UNIX password:
passwd: password updated successfully
Changing the user information for mynewuser
Enter the new value, or press ENTER for the default
Full Name []: User
Room Number []:
Work Phone []:
Home Phone []:
Other []:
When prompted with the following question, enter Y then hit enter to continue.
Is the information correct? [Y/n] Y
Step 2: Grant Root Privileges to the User
visudo
Find the following code:
# User privilege specification
root ALL=(ALL:ALL) ALL
In this case, we’re granting root privileges to the user mynewuser. Add the following below that code:
mynewuser ALL=(ALL:ALL) ALL
Then exit and save the file with the key commands Ctrl-x, Y, enter.
If you’ve followed the instruction above correctly, then you should now have a user setup by the name of mynewuser which can use sudo to run commands as root!
When a standard Cloud VPS is not enough, Liquid Web’s Dedicated Servers are a dream come true. Liquid Web’s server outmatches the competition on performance and support. Check out how our Dedicated Servers can skyrocket your site’s performance.
Related Articles:
About the Author: J. Mays
As a previous contributor, JMays shares his insight with our Knowledge Base center. In our Knowledge Base, you'll be able to find how-to articles on Ubuntu, CentOS, Fedora and much more!
Our Sales and Support teams are available 24 hours by phone or e-mail to assist.
Latest Articles
How to Clone a Drupal Site to Another Domain
Read ArticleTop Eight Virtualization Security Issues and Risks
Read ArticleAccessing Man Pages on Ubuntu 16.04 LTS
Read ArticlePremium Business Email Pricing FAQ
Read ArticleMicrosoft Exchange Server Security Update
Read Article