One of the neat things about Ubuntu is the absence of a discreet user account for root. This was an unusual idea when it was introduced a couple of years ago, and I myself, had some initial doubts about it. But that was then and this is now. I have come to really enjoy this feature.

I recently installed Fedora 10 on one of my test systems and decided to see what was involved in getting a similar feature in Fedora.

The sudo command is governed by a configuration file named /etc/sudoers. This file defines the users who are allowed to use sudo and precisely what commands they are allowed to execute with elevated privileges. I have written definitions for this before, so I took a look at the Fedora 10 sudoers files to see how to add myself to the list of users that can execute any command as root.

What I discovered was that the Fedora 10 sudoers thoughtfully provides the following lines:

## Allows people in group wheel to run all commands
# %wheel ALL=(ALL) ALL

This definition states that any user belonging to the group wheel will have full access to all commands. Just what the doctor ordered!

So this leaves me with two things to do:

  1. Uncomment the line in the sudoers file to enable the definition.
  2. Add myself to the wheel group.

The first task is pretty easy. I just fire up vi (as root) and edit /etc/sudoers. I only need to remove the leading pound symbol to make the change:

## Allows people in group wheel to run all commands
%wheel ALL=(ALL) ALL

The second task is not very hard either. I bring up the graphical (yes, I'm cheating) user configuration tool and select my user account and press the "Properties" button, then select the "Groups" tab on the properties dialog. Scrolling to the bottom of the list, check the box labeled "wheel":

Press OK and we're done!

Here are a couple of questions for all you geniuses out there:

  1. How would you add yourself to a group using only the command line tools?
  2. What is the history and meaning the "wheel" group?

Have fun!

Posted By William Shotts to News And Rants at 1/29/2009 08:41:00 PM