Saturday, December 30, 2006

Add yourself to the sudoer's list

Add yourself to the sudoers list. Open a terminal. Type 'su' without the quotes, and enter root's password. Type '/usr/sbin/visudo', without the quotes. This will open the visudo configuration file. Hit the escape key and then hit the insert key. This will allow you to edit the file. Scroll down until you see these lines:

## Allows people in group wheel to run all commands

# %wheel ALL=(ALL) ALL


Remove the # in front of %wheel. Hit escape once and then :wq! (colon, w, q and ! ,in that order) and press enter. This will exit the editor and save the changes that you have made. You are now added to the sudoers list. On the top panel select System / Administration / Users and Groups. Type root's password and select your user. Click on the properties icon for your user. Select the groups tab, and scroll down to where you see the wheel group. Select that check box, click ok and close out all windows. You will now be able to use a terminal with root permissions so that any time you are in a terminal and need to do something as root you can preface your command with 'sudo', without the quotes, as in sudo updatedb or sudo gedit foo.

As always, comments and suggestions are welcome. If I'm in error and need to make a correction please, by all means, let me know. I want all info presented here to be accurate.

1 comment:

rakesh said...

It acted like a charm for me. I had to logout to reload the new grouplist.
Blogs twistedgenes.com