Managing Sudo Permissions

30 minutes
  • 2 Learning Objectives

About this Hands-on Lab

In this lab, we will take a look at how to give a user account permissions to use `sudo`. We will accomplish this task by adding the user to the sudoers file, which will then allow the user to use the sudo command.

Learning Objectives

Successfully complete this lab by achieving the following learning objectives:

Create new user account.
  1. To create the new user account, use the following command:

    sudo adduser hpotter

    When prompted for the password, enter:

Add user to `sudoers` file.
  1. To add a new user account to the sudoers file, run the following command:

    sudo visudo
  2. Then, edit the file and include the following line:

    hpotter ALL=(ALL:ALL) ALL  
  3. Now exit the file, saving the changes.

Additional Resources

There is a new employee starting tomorrow who will need sudo capabilities on one of the Linux servers, so your supervisor has asked you to create a user account for them. The new user account name is hpotter and the password to be set is ButterB33r!.

What are Hands-on Labs

Hands-on Labs are real environments created by industry experts to help you learn. These environments help you gain knowledge and experience, practice without compromising your system, test without risk, destroy without fear, and let you learn from your mistakes. Hands-on Labs: practice your skills before delivering in the real world.

Sign In
Welcome Back!

Psst…this one if you’ve been moved to ACG!

Get Started
Who’s going to be learning?