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:
- Uncomment the line in the sudoers file to enable the definition.
- 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:
- How would you add yourself to a group using only the command line tools?
- What is the history and meaning the "wheel" group?
Have fun!
usermod -G wheel username
ReplyDeleteWithout Googleyballing a search about the wheel group, I'd like to know about it's history and meaning being a Linux newbie.