Snippets Linux / Create a sudo user

Create a sudo User

By Marcelo Fernandes Sep 8, 2017

Creating a sudo User

*Considering that you are a root user already*

adduser username

It will prompt:

Enter new UNIX password:
Retype new UNIX password:
passwd: password updated successfully

Follow the registration flow and then user usermod to add the user to the sudo group

usermod -aG sudo username

Test sudo access to the new user account

# switch to the new user account

su - username

# check if you have root access.
sudo ls -la /root



link 1