How to Create a Sudo User on Fedora
Sudo is a program that runs on Unix-like computer operating systems that enables users to execute programs under the privileges provided by another user, usually the superuser. Sudo refers to either “substitute user do” or “super user do”, either of which allows you to temporarily elevate your user account to have root privileges. This is not the same as “su”, which has a more permanent effect.
Our goal here is to walk you through setting up a sudo user on Fedora.
Step 1: Configure VPSie cloud server
- Sign in to your system or register a newly created one by logging in to your VPSie account.
- Connect by SSH using the credentials we emailed you.
- Once you have logged into your Fedora instance and update your system.
# sudo dnf upgrade
Step 2: Create a New User Account
Use the adduser command to create a new user account. A user named “testuser” will be created here.
# adduser testuser
Make sure the new user has a strong password. You can do this by running the following command,
# passwd testuser# usermod -aG wheel testuser
Changing password for user testuser. New password: Retype new password: passwd: all authentication tokens updated successfully.
Step 3: Adding the user to the wheel group
Run the following command to add the new user to the wheel group,
# usermod -aG wheel testuser
Step 4: Test the Sudo user
The sudo command will let you log in as the user,
# su - testuser [testuser@fedora ~]$
The new account can now be used. I hope you found this information helpful, bye for now.