How to Add a User on Ubuntu 12.04
To add a new user in Ubuntu, use the adduser command, replacing the “newuser” with your preferred username
sudo adduser <span class="highlight">newuser
As soon as you type this command, Ubuntu will automatically start the process:
- Type in and confirm your password
- Enter in the user’s information. This is not required, pressing enter will automatically fill in the field with the default information
- Press Y (or enter) when Ubuntu asks you if the information is correct
How to Grant a User Root Privileges
As mentioned earlier, you are much better off using a user with root privileges.
You can create the sudo user by opening the sudoers file with this command:
Adding the user’s name and the same permissions as root under the the user privilege specification will grant them the sudo privileges.
User privilege specification root ALL=(ALL:ALL) ALL <span class="highlight">newuser</span> ALL=(ALL:ALL) ALL
How to Delete a User
Should you find that you find that you no longer want to have a specific user on the virtual private server you can delete them with a single command.
sudo userdel <span class="highlight">newuser