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

  • feature linux boot process
    Linux Boot Process Explained Step by Step for Beginners Linux
  • 517443 637084112713220326 16x9 1
    How can I tell if a password is set for a user account on Linux Linux
  • FLUTTER Feature
    How to Set Up Flutter with Android Studio on Linux Linux
  • linuxnethero
    Adding a subnetwork interface to an existing network interface Linux
  • greywireshark
    How to install WireShark on a Linux Ubuntu System Linux
  • how to install software packages from source files
    How to install a software package from source file in Linux Linux

More Related Articles

feature linux boot process Linux Boot Process Explained Step by Step for Beginners Linux
517443 637084112713220326 16x9 1 How can I tell if a password is set for a user account on Linux Linux
FLUTTER Feature How to Set Up Flutter with Android Studio on Linux Linux
linuxnethero Adding a subnetwork interface to an existing network interface Linux
greywireshark How to install WireShark on a Linux Ubuntu System Linux
how to install software packages from source files How to install a software package from source file in 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

Veeam Vanguard

  • rdp4
    How to change the default RDP port in Windows Network | Monitoring
  • linux tux minimalism 4k 42 2560x1700 1 1
    Warning useradd: the home directory already exists. Not copying any file from skel director into it Linux
  • rdp error
    The connection was denied because the user account is not authorized for remote login: How to add and remove Remote Desktop Users Windows
  • EFK Stack
    EFK Stack Installation on Docker Virtualization
  • sd 1
    How to link your Android or iPhone to your Windows PC Windows
  • Was ist Windows Server und wie unterscheidet er sich vom normalen Windows
    Create a certificate template for BitLocker Network Unlock Windows Server
  • original 1
    DISM “Failed to open image” CWimImageInfo Mount(hr:0x8007000d): Fix Error DISM WIM Provider Windows
  • Vro And Agent Deployment
    Deploy Veeam Recovery Orchestrator and Agents to VBR and VEM Backup

Subscribe to Blog via Email

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

Join 1,814 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.