How to make Fedora user a sudoer?
Add the user to the wheel
group:
gpasswd wheel -a username
I use gpasswd because not all versions of usermod
have an easy way to add the user to a group without changing all the users' groups. However, on any recent Fedora, usermod username -a -G wheel
should have the same effect. You could also use the system-config-users
GUI, of course.
If you are using Fedora 14 or earlier, use visudo
to edit the sudoers
file, removing the #
from this line:
%wheel ALL=(ALL) ALL
This is the default in the sudoers file on Fedora 15 and newer, so adding the user to wheel
is all you need to do. Note that this won't take effect immediately; the easiest thing to do is log out and in again.
See also this question and answer over on Server Fault for information on granting sudo-like "auth as self" behavior to wheel
group members for graphical apps which use consolehelper or PackageKit.
I suppose that the first question is, do you have sudo installed on the server(s) in question? Assuming so, it is just a matter of deciding whether you want to treat the user as a unique entity or as part of a group, a group which may have only 1 member. The command visudo
as root will give you access to edit the sudoers file, often /etc/sudoers.
the former:
user ALL= /foo/bar
the latter:
%group ALL= /foo/bar
These are merely two examples, the sudo package has a tremendous number of features and settings options at your disposal. I recommend reading the sudoers, sudo's configuration file, manual. I would also recommend starting simple and building up to the actual desired configuration.