Difference between revisions of "HOWTO: Enable sudo"

From Sabayon Wiki
Jump to: navigation, search
 
m (Added 'de' to i18n)
 
Line 1: Line 1:
{{i18n| [[HOWTO: Enable sudo|en]] [[Tr:HOWTO: Enable sudo|tr]] }}
+
{{i18n| [[De:HOWTO: Enable sudo|de]] [[HOWTO: Enable sudo|en]] [[Tr:HOWTO: Enable sudo|tr]] }}
  
 
If you get an error saying that your user is not a sudoer, do the following to enable your user.
 
If you get an error saying that your user is not a sudoer, do the following to enable your user.

Latest revision as of 20:51, 4 January 2013

i18n: de en tr

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.