HOWTO: Enable sudo
If you get an error saying that your user is not a sudoer, do the following to enable your user.
First open a terminal and type the folowing to become root.
su -
After entering your root password, and getting to a root prompt, enter the following to edit the sudoers list:
visudo
We are editing the sudoers access file now. There are a few ways to enable your user to use sudo.
First, we can enable the entire 'wheel' group to use sudo. The default user created during installation belongs to this group.
# Uncomment to allow people in group wheel to run all commands # %wheel ALL=(ALL) ALL
Make the previous line look like the following:
# Uncomment to allow people in group wheel to run all commands %wheel ALL=(ALL) ALL
Uncommenting that line will allow all users in 'wheel' to use sudo.
groups john usermod -G wheel -a john
The first command checks which groups "john" is in and the second adds wheel to his group list. Logging out and back in is usually necessary to update your user's groups.
Another way is to add your specific user to the list. Just add your username under root, like so:
# User privilege specification root ALL=(ALL) ALL youruser ALL=(ALL) ALL
Thats it! Press ctrl-x and say yes to save changes, and you are done.