Skip to content

Instantly share code, notes, and snippets.

Show Gist options
  • Save daubac402/0d7e93fb09cc8338c34aef5d92d047a3 to your computer and use it in GitHub Desktop.
Save daubac402/0d7e93fb09cc8338c34aef5d92d047a3 to your computer and use it in GitHub Desktop.
Add an user to sudoers list (no password required)
# Let’s say you want to allow the user to run sudo commands without being asked for a password
# Login as root
$ su
# Edit /etc/sudoers
$ visudo
# Add this line to the last, with username is the username that you want to add to sudoers, then save (:wq)
username ALL=(ALL) NOPASSWD:ALL
$ exit
#then test with
$ sudo su
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment