You are on page 1of 3

CST8207_Linux Operating system I Algonquin College – Winter 2020

Assignment 10 Part 1 by: Arsalan

Prerequisites
a) Boot up your CentOS Linux Box and open Terminal

Deliverables
• A MS-Word file of all screenshots and Qs and Tasks, to be uploaded in Assignment 10 (Week12&13)
DropBox as Part1
• Total 10 points for part1 ( you lose one point for each wrong answer)
• Due date: as written on Dropbox

Log files in Linux

Write a script called “showlog.sh”. As you see in below screen shot, it should ask what log you want to
see, you type “messages” which refer to /var/log/messages file. Then it shows the last 5 lines of the
content of the messages log file. Make sure your script has proper permission to run in super user
mode (su) so script has enough permission to access log files.

Put script screen shot and output screen shot here


CST8207_Linux Operating system I Algonquin College – Winter 2020

Assignment 10 Part 1 by: Arsalan

Part 2
Now, complete your script that could show following log files on top of messages log.
/var/log/secure
/var/log/yum.log

Basically you add more condition to your script to verify the input if it is secure or yum or
messages log.

Similar to below screen shot:

Put script screen shot and output screen shot here


CST8207_Linux Operating system I Algonquin College – Winter 2020

Assignment 10 Part 1 by: Arsalan

Q1: What is the purpose of secure log?

Q2: try to login with wrong password in your Linux Box, what message you see in your secure log

Q3: What is the purpose of message log?

 Shutdown your VM gracefully

You might also like