Answered step by step
Verified Expert Solution
Link Copied!

Question

1 Approved Answer

Question 3 In this task, you need to implement system security and access control in Linux operating system. Using Debian OS, write and implement one

image text in transcribed
image text in transcribed
Question 3 In this task, you need to implement system security and access control in Linux operating system. Using Debian OS, write and implement one bash shell script. You are to use the root account to execute the script. The bash shell script should have the following specifications: Part (a) The script will prompt the user to enter a password file (an example of a password file is /etc/passwd) o It will check whether the password file exist in the current folder, if the file does not exist, it will prompt the user to enter the file again. o It will keep asking the user to enter the file again until the user input a password file that exist in the current folder. If the file exists, it will proceed to check the content of the file and display the following on the screen: number of user accounts (you can assume that the user account is having a shell of /bin/bash) username of the user accounts and its home folder o the largest user id among all the user accounts (15 marks) Part (b) o While displaying the above on the screen, the script will also record all the information in a log file named as 'monitor.log' in the current folder Before the information is appended to monitor.log", the current date and time needs to be recorded to the file in the format of DD-MM-YY:HH:mm (e.g. if the current date and time is 10 Mar 2021 1:30pm, it should be recorded as 10-03-21:13-30) (note: this should not be displayed on the screen) o The following should then be changed o If user your name) doesn't exist, it needs to be added. However, if your name) is an existing user. "Iyour name) existed" needs to be displayed on the screen. Owner of the "monitor.log" file should be your name), group of the file should be your name) o Permissions of the "monitor.log" file should be owner can read and write, group can read, and others does NOT have any permissions. (15 marks) Part (C) A documentation (with appropriate screen-shots and explanations) needs to be produced on the execution of the bash shell script with different conditions (e.g. (your name) existed, [your name] does not existed, etc.). Necessary checking needs to be done (c.g. check that the permissions of the monitor.log has changed, etc.). Appropriate comments must be added in the script to make it easier to understand. (15 marks) IMPORTANT: A zero will be given if your bash shell script cannot be executed. Note: Your bash shell script should be in text format within the WORD document. Marks will be severely deducted if your bash shell script is NOT in text format (e.g. if you paste the bash shell script in WORD as an image)

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

Database Management With Website Development Applications

Authors: Greg Riccardi

1st Edition

0201743876, 978-0201743876

More Books

Students also viewed these Databases questions

Question

OUTCOME 4 Explain how labour relations differ around the world.

Answered: 1 week ago