Search
Close this search box.

How to Create a Sudo User on Fedora

Table of Contents

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

 

  1. Sign in to your system or register a newly created one by logging in to your VPSie account. 
  2. Connect by SSH using the credentials we emailed you.
  3. 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.

 

Simple ways to secure MongoDB

 

A sudo user on Fedora is a user account that has been granted permission to perform administrative tasks on a system. This permission is granted through the sudo command, which allows a user to run commands with root-level privileges.

Creating a sudo user on Fedora is important for security reasons. By default, the root account on Fedora is disabled, which means that it cannot be used to perform administrative tasks. Instead, a sudo user is created to allow users to perform administrative tasks without having to log in as the root user.

The wheel group is a special group in Fedora that is used to grant sudo privileges to users. By adding a user to the wheel group, you are granting that user the ability to run commands with root-level privileges using the sudo command.

Yes, you can create multiple sudo users on Fedora. Simply follow the steps above to create a new user account, add it to the wheel group, and test the user’s sudo privileges. Repeat this process for each additional sudo user you want to create.

Make a Comment
Share on
Facebook
Twitter
LinkedIn
Print
VPSie Cloud service

Fast and Secure Cloud VPS Service

Try FREE
For a month

The First 1 orders gets free discount today! Try Sign up on VPSie to get a chance to get the discount.