Step 1 – Connecting #
Firstly you need terminal access, if you are on an Ubuntu desktop then load the terminal. However, you can SSH if it is a remote server
ssh root@SERVER_IP_ADDRESS
Step 2 – Adding the User #
Next we need to add the user with the following command
adduser NAME_OF_USER
You will be prompted with the below output to set the password:
# Output
Enter new UNIX password:
Retype new UNIX password:
passwd: password updated successfully
Again with the next following output, these can be left blank by pressing ENTER:
# Output
Changing the user information for sammy
Enter the new value, or press ENTER for the default
Full Name []:
Room Number []:
Work Phone []:
Home Phone []:
Other []:
Is the information correct? [Y/n]
Step 3 – Adding to Sudo Group #
Next we need to add the user to the sudo group:
usermod -aG sudo NAME_OF_USER
Step 4 – Testing the Sudo Privileges #
su - NAME_OF_USER
sudo ls -la /root
# Output
[sudo] password for NAME_OF_USER: