Shell/Bash: add user to sudoers Example


Shell/Bash Example: This is the "add user to sudoers" Example. compiled from many sources on the internet by

add user to sudoers

usermod -aG sudo username

add sudo user ubuntu

# add a user and set a password
adduser USERNAME

# add user to sudoers / sudo groupe with command below
usermod -aG sudo USERNAME

add user to sudoers

echo "username  ALL=(ALL) NOPASSWD:ALL" | sudo tee /etc/sudoers.d/username

* Summary: This "add user to sudoers" Shell/Bash Example is compiled from the internet. If you have any questions, please leave a comment. Thank you!