How to Create a Sudo User on Fedora Linux

Fedora Linux is not a new name in the world of computing. This Linux operating system distribution has Red Hat as its primary sponsor. Red Hat made its development possible via the Fedora Project. Through free and open-source licenses, Fedora hosts a variety of distributed software.

This Linux distribution also functions as an upstream for the Red hat Enterprise Linux Community version. The latter statement implies that the Fedora Project is a direct fork for Red Hat. In other words, Red Hat directly borrows its features’ implementation from Fedora.

Importance of Sudo/Sudoer Users in Linux

A Linux Sudoer user has more system privileges than a normal user in that this user can perform system updates, configurations, application installations, and configurations. Such system roles are reserved for Sudoer/root users and have the advantage of giving these users more operating system control.

Creating Sudo/Sudoer User on Fedora Linux

You need to be an existing sudoer or root user on your Fedora system before proceeding with this article section.

1. Create a new user account by executing the following command.

$ sudo adduser test_user

You should also set the username password associated with the created user.

$ sudo passwd test_user
Create User in Fedora Linux
Create User in Fedora Linux

2. Add the created new user to the Wheel Group in order to be considered as a Sudo user.

$ sudo usermod -aG wheel test_user

3. Next, switch to the new user account and confirm that this new user indeed has Sudoer privileges.

$ su – test_user
$ whoami
$ sudo whoami
Check Sudo User Privileges
Check Sudo User Privileges

If adding the new user to the wheel group does not work right away, you may have to edit the /etc/sudoers file.

$ sudo visudo

and uncomment the line with the group name:

%wheel  ALL=(ALL)       ALL

You will need to log out and back in for changes to take effect.

Remove Sudo User in Fedora Linux

If you want to remove the created sudo user from the system, you can use the gpasswd command-line utility, which manages /etc/groups and /etc/shadow.

$ sudo gpasswd -d test_user wheel 

We have successfully created a Sudoer user with root user privileges on Fedora Linux. If you have any questions or comments, don’t hesitate to reach out!

Got something to say? Join the discussion.

Have a question or suggestion? Please leave a comment to start the discussion. Please keep in mind that all comments are moderated and your email address will NOT be published.