Creating a sudo user on Ubuntu

Once you have added a user to an Ubuntu server you will likely want to add them as a sudo user on the server. Do this as follows:

Adding a User to Sudo group:

usermod -aG sudo [username]

You can also allow the user to run sudo commands without having to enter their password. NOTE: This does have security risks so do this with care..

echo "[username] ALL=NOPASSWD: ALL" >> /etc/sudoers.d/[username]

You will need to log out/in for this to take affect.

Any comments or questions? Get in touch here or Email me at [email protected]