Add New Sudo User on Ubuntu Using Command Line

May 10, 2014

First start by creating the user from your root account (This command will prompt you for the password and other user related information): adduser username

Next type the following command and hit Enter:


Now look for the section where you see root ALL=(ALL:ALL) ALL. We want to duplicate this line for our new user we just created so the type the following just below that line and save your changes:

username ALL=(ALL:ALL) ALL

Now login as your new user:

ssh username@your_server_ip_address