Answered step by step
Verified Expert Solution
Link Copied!

Question

1 Approved Answer

I need the commands for the following request, in debian 11 ii. Write a script that does the following: If the current user is a

I need the commands for the following request, in debian 11 image text in transcribed
ii. Write a script that does the following: If the current user is a regular user, the script displays the last sudo entry in "auth.log" for that user. If the current user is the root, it requires one argument, which is the username for whom to display the last sudo entry in "auth.log". Sample execution: $ /usr/local/bin/last_sudo (or, \# /usr/local/bin/last_sudo john) Dec 2016:05:16 john-linux sudo: john : TTY=pts/0; PWD=/home/john/Desktop ; USER=root; COMMAND=/sbin/reboot Check arguments and show usage message if wrong arguments

Step by Step Solution

There are 3 Steps involved in it

Step: 1

blur-text-image

Get Instant Access to Expert-Tailored Solutions

See step-by-step solutions with expert insights and AI powered tools for academic success

Step: 2

blur-text-image

Step: 3

blur-text-image

Ace Your Homework with AI

Get the answers you need in no time with our AI-driven, step-by-step assistance

Get Started

Recommended Textbook for

Databases Organizing Information Digital And Information Literacy

Authors: Greg Roza

1st Edition

1448805929, 978-1448805921

More Books

Students also viewed these Databases questions