Question
Lab: Configuration for sudo Goal: in this lab, you will learn to configure sudo. Please follow the steps and answer all the questions at the
Lab: Configuration for sudo Goal: in this lab, you will learn to configure sudo. Please follow the steps and answer all the questions at the end of the lab instruction. 1. For this part you will need a 2nd normal user (non-root) account. If you don't already have an account for "auser" with password room1202, you can create one by running (as root): # useradd -c "A User" -m auser # passwd auser 2. Login as root, run the visudo command to edit the /etc/sudoers file to allow your normal user account (room1202 is used below) to change passwords for other users. (Never edit /etc/sudoers directly!) The new entry should look like this (assume your account name is room1202), at the bottom of the configuration file: room1202 ALL= /usr/bin/passwd 3. Login as room1202 (or whatever non-root account is called). What happened, if you use passwd to try to lock the account for auser as follows: $ passwd -l auser 4. Now try it again using sudo. This is done by running the command as normal but with the word sudo in front: $ sudo passwd -l auser What output did you see from sudo? Did you lock the account this time? (Check with sudo passwd -S auser.) 5. Try to unlock the account without using sudo: $ passwd -u auser What output did you see this time? Is the account unlocked now? 6. Unlock the account using sudo. What happened this time? 7. Using what you have learned about finding and reading system documentation, enable room1202 account to edit the file /etc/hosts using the sudoedit command. What changed did you make to the sudoers file for this? Questions: 1. What output did you see in step#3? (20pts.) 2. What output did you see in step#4? Then run sudo passwd S auser and descript what you see. (20pts.) 3. What output did you see in step#5? Then run sudo passwd S auser and descript what you see. (20pts.) 4. What output did you see in step#6? Then run sudo passwd S auser and descript what you see. (20pts.) 5. Save a screenshot in your report to prove that, on your system, room1202 can edit /etc/hosts by sudoedit command. (20pts.)
Step by Step Solution
There are 3 Steps involved in it
Step: 1
Get Instant Access to Expert-Tailored Solutions
See step-by-step solutions with expert insights and AI powered tools for academic success
Step: 2
Step: 3
Ace Your Homework with AI
Get the answers you need in no time with our AI-driven, step-by-step assistance
Get Started