Skip to content

TechDirectArchive

Hands-on IT, Cloud, Security & DevOps Insights

  • Home
  • About
  • Advertise With US
  • Reviews
  • Contact
  • Toggle search form
Home » Linux » Add a User to the Sudoers List in Linux

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 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

  • google sdk feature
    How To Install Google Cloud SDK on a Linux System Linux
  • Run Linux on Windows Server
    How to install Windows Subsystem for Linux on Windows Server Linux
  • Screenshot 2020 05 14 at 19.28.50
    How to install and configure Rancid Linux
  • 1 pUEZd8z  1p 7ICIO1NZFA
    The package python-virtualenv has no installation candidate error Linux
  • FimageUbuntuUpgrade
    How to Upgrade From Ubuntu 20.04 LTS to 22.04 LTS Linux
  • dns
    How to setup a cache-only DNS server Linux

More Related Articles

google sdk feature How To Install Google Cloud SDK on a Linux System Linux
Run Linux on Windows Server How to install Windows Subsystem for Linux on Windows Server Linux
Screenshot 2020 05 14 at 19.28.50 How to install and configure Rancid Linux
1 pUEZd8z  1p 7ICIO1NZFA The package python-virtualenv has no installation candidate error Linux
FimageUbuntuUpgrade How to Upgrade From Ubuntu 20.04 LTS to 22.04 LTS Linux
dns How to setup a cache-only DNS server 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

Veeam Vanguard

  • azure file share feature image
    Deploy Legacy App to Azure Fileshare AWS/Azure/OpenShift
  • screenshot 2020 05 05 at 10.26.12
    How to enable or disable User Account Control Windows
  • unabletouninstallonedriveonmac
    Cannot Uninstall the OneDrive App: The item “OneDrive” canot be moved to the Bin because it is open JIRA|Confluence|Apps
  • Featured image WSL2 installation
    How to install WSL2 on Windows Server Linux
  • How to Install Winget on Windows Server
    How to Install Winget on Windows Server Windows Server
  • SSL on WAMPServer
    Setup VirtualHost with SSL on WAMP Server Linux
  • fix this PC cannot run on Windows
    How to Fix “This PC Can’t Run Windows 11” on Hyper Windows
  • windows 10 creators
    Various methods on how to launch Windows Task Manager 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,821 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 Azure Bitlocker Microsoft Windows PowerShell WDS Windows 10 Windows 11 Windows Deployment Services Windows Server 2016

Copyright © 2025 TechDirectArchive

 

Loading Comments...
 

You must be logged in to post a comment.