quick-docs/modules/ROOT/pages/adding_user_to_sudoers_file.adoc

30 lines
931 B
Text
Raw Normal View History

2018-09-10 08:59:01 +00:00
= Adding a user to sudoers
2023-08-06 17:45:39 +00:00
Mirek Jahoda; Ankur Sinha ; The Fedora Docs Team
:revnumber: F38
:revdate: 2023-08-06
:category: Administration
:tags: How-to
2018-09-10 08:59:01 +00:00
One of the most common operations that administrators want to accomplish when managing `sudo` permissions is to grant a new user general `sudo` access. This is helpful if you want to give an account full administrative access to the system.
[discrete]
== Giving a user `sudo` privileges
On Fedora, it is the `wheel` group the user has to be added to, as this group has full admin privileges. Add a user to the group using the following command:
[subs=+quotes]
----
$ sudo usermod -aG wheel _username_
----
If adding the user to the group does not work immediately, you may have to edit the `/etc/sudoers` file to uncomment the line with the group name:
----
$ sudo visudo
...
%wheel ALL=(ALL) ALL
...
----
2020-03-05 18:15:33 +00:00
You will need to logout and back in for changes to take effect.