Skip to content

TechDirectArchive

Hands-on IT, Cloud, Security & DevOps Insights

  • Home
  • About
  • Advertise With US
  • Contact
  • Reviews
  • Toggle search form
Home » Linux » Add a User to the Sudoers List in Linux
  • 41592 3264bitw10
    What is the difference between 32-bit and 64-bit processors Windows Server
  • Webp.net resizeimage 1
    Automate Infrastructure Deployments in the Cloud with Ansible and Azure Pipelines AWS/Azure/OpenShift
  • drivelock header 002
    The push installation of the agent failed for the computer – Error message (67) The network cannot be found Security | Vulnerability Scans and Assessment
  • Group Policy Error
    How to Fix Failed to open the Group Policy Object on this Computer Windows
  • powershell commands lede 1024x276 1
    PowerShell Remoting: Guide to Windows Management Instrumentation Scripts
  • Docker Installation on Ubuntu
    Docker Engine Installation on Ubuntu Network | Monitoring
  • microsoft azure new logo 2017 e1572843284943
    Pass-Through Authentication: Azure AD Connect Tool status displays inactive AWS/Azure/OpenShift
  • Featured image TeamsGif.
    How to fix Microsoft Teams GIFs or Images not working Windows

Add a User to the Sudoers List in Linux

Posted on 15/01/202318/03/2023 Imoh Etuk By Imoh Etuk No Comments on Add a User to the Sudoers List in Linux
Add-User-to-Sudoers

As system administrators, performing some administrative tasks on our PC is crucial. However, it must be noted that while it is crucial to perform administrative tasks using the superuser do command (Sudo). It has the overall administrative power on your PC. This command must be used with caution so as to prevent accidental deletion and destruction of your PC. Learn how to add a User to the Sudoers List in Linux. Here are some interesting guides: How to Switch between Users in Linux, how to use Systemd Timers on Linux, how to Install PlayonLinux on a Linux System, How to install WireShark on a Linux Ubuntu System, and how to Create Symbolic Links in Linux.

Sudo, which stands for “superuser do” or “substitute user do,” is a command that allows you to run an elevated prompt without changing your identity. It is one of the most crucial commands you can use as a Linux system administrator or power user. Depending on your settings in the /etc/sudoers file, you can issue single commands as root or as another user. You can grant common users administrative access by adding them to the sudoers list.

By doing this, you can avoid having to disclose your system’s root password to other users. Users who have been added to the sudoers list can run system commands as root.

You have the ability as the root or superuser to perform functions such as installing and installing files, deleting any or all files, modifying the permissions of one or more files, and even deleting and modifying other users. Root users can also modify the system’s run level and create, change, or delete file systems.

How to add Users to the Sudoers Group

Let’s assume that you have a list of users that you wish to add to the Sudoers list already created.

Note: Before you can add a user to the sudoers list, you must first create the user. 

The steps to add users to the sudoers list are:

1. Create a New User

To create a new user, run the below command in your terminal:

sudo adduser <user name> or sudo useradd <user name>
Adding-a-user-in-Linux
Creating a New User

From the screenshot above, we create a new user tova with the adduser command. Notice that the user was assigned the user id of 1006 and added to a group named tova with the group id of 1004 and we were also prompted to supply the user details such as full name, room number, work/home phone number and so on.

Note: Adding a user with the "sudo useradd <user name>" will not prompt to supply user details but adds user automatically.

To view the user list, run:

sudo cat /etc/passwd
List-of-user
Viewing user list

2. Adding a User to the Sudoer Group

Let’s take a look at the groups we have already in our system by running the below command:

sudo cat /etc/group
Viewing-the-list-of-groups
Viewing list of Groups

As you can see, we have the sudo the group listed in the above screenshot.

Now, let’s add the user tova we created previously to the sudo group using the below command:

sudo adduser tova sudo
Added-a-user-to-Sudo-group
Adding a user to the Sudoer Group

Finally, run the sudo cat /etc/group command to verify that the user has been added to the Sudoer group successfully.

Viewing-the-list-of-groups1
User Added to the Sudeors Group

The user tova is rightly added to the Sudoers group.

I hope you found this blog post helpful. You have learned how to add a User to the Sudoers List in Linux. If you have any questions, please let me know in the comment session.

Rate this post

Thank you for reading this post. Kindly share it with others.

  • Share on X (Opens in new window) X
  • Share on Reddit (Opens in new window) Reddit
  • Share on LinkedIn (Opens in new window) LinkedIn
  • Share on Facebook (Opens in new window) Facebook
  • Share on Pinterest (Opens in new window) Pinterest
  • Share on Tumblr (Opens in new window) Tumblr
  • Share on Telegram (Opens in new window) Telegram
  • Share on WhatsApp (Opens in new window) WhatsApp
  • Share on Pocket (Opens in new window) Pocket
  • Share on Mastodon (Opens in new window) Mastodon
  • Share on Bluesky (Opens in new window) Bluesky
  • Share on Threads (Opens in new window) Threads
  • Share on Nextdoor (Opens in new window) Nextdoor
Linux Tags:sudo, Ubunt 20.04 LTS, Ubuntu

Post navigation

Previous Post: Performance and Diagnostics in Microsoft Cloud with Azure Monitor
Next Post: Azure Hybrid Use Cases and Benefits

Related Posts

  • apache ubuntu 20 04
    How to Install Apache HTTP Server on Ubuntu 20.04 LTS Linux
  • LINUX CONTAINERS
    How to install LXC/LXD for container management Linux
  • Edge
    Install Microsoft Edge Browser on Ubuntu Linux Linux
  • squid proxy feature
    How to Set Up and Configure a Squid Proxy Server Linux
  • images copy
    How to clean packages lying around in Linux Linux
  • wine 2 1
    How to install and uninstall WineHQ on Linux Linux

More Related Articles

apache ubuntu 20 04 How to Install Apache HTTP Server on Ubuntu 20.04 LTS Linux
LINUX CONTAINERS How to install LXC/LXD for container management Linux
Edge Install Microsoft Edge Browser on Ubuntu Linux Linux
squid proxy feature How to Set Up and Configure a Squid Proxy Server Linux
images copy How to clean packages lying around in Linux Linux
wine 2 1 How to install and uninstall WineHQ on Linux Linux

Leave a Reply Cancel reply

You must be logged in to post a comment.

Microsoft MVP

VEEAMLEGEND

vexpert-badge-stars-5

Virtual Background

GoogleNews

Categories

veeaam100

sysadmin top30a

  • 41592 3264bitw10
    What is the difference between 32-bit and 64-bit processors Windows Server
  • Webp.net resizeimage 1
    Automate Infrastructure Deployments in the Cloud with Ansible and Azure Pipelines AWS/Azure/OpenShift
  • drivelock header 002
    The push installation of the agent failed for the computer – Error message (67) The network cannot be found Security | Vulnerability Scans and Assessment
  • Group Policy Error
    How to Fix Failed to open the Group Policy Object on this Computer Windows
  • powershell commands lede 1024x276 1
    PowerShell Remoting: Guide to Windows Management Instrumentation Scripts
  • Docker Installation on Ubuntu
    Docker Engine Installation on Ubuntu Network | Monitoring
  • microsoft azure new logo 2017 e1572843284943
    Pass-Through Authentication: Azure AD Connect Tool status displays inactive AWS/Azure/OpenShift
  • Featured image TeamsGif.
    How to fix Microsoft Teams GIFs or Images not working Windows

Subscribe to Blog via Email

Enter your email address to subscribe to this blog and receive notifications of new posts by email.

Join 1,831 other subscribers
  • RSS - Posts
  • RSS - Comments
  • About
  • Authors
  • Write for us
  • Advertise with us
  • General Terms and Conditions
  • Privacy policy
  • Feedly
  • Telegram
  • Youtube
  • Facebook
  • Instagram
  • LinkedIn
  • Tumblr
  • Pinterest
  • Twitter
  • mastodon

Tags

Active Directory AWS Azure Bitlocker Microsoft Windows PowerShell WDS Windows 10 Windows 11 Windows Server 2016

Copyright © 2025 TechDirectArchive

 

Loading Comments...
 

You must be logged in to post a comment.