Skip to content

Instantly share code, notes, and snippets.

@rynmrtn
Created October 15, 2010 17:59
Show Gist options
  • Save rynmrtn/628645 to your computer and use it in GitHub Desktop.
Save rynmrtn/628645 to your computer and use it in GitHub Desktop.
How to add a user to sudoer
# Used this on redhat - replace user-to-add with your username
echo 'user-to-add ALL=(ALL) ALL' >> /etc/sudoers
@atonse
Copy link

atonse commented Oct 17, 2010

This is good on a desktop machine but depending on your restrictions, may not be a good idea on a server. Typically with sudoers, you can also further restrict the user to only run certain commands (like httpd restart) with sudo on a server.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment