Answered step by step
Verified Expert Solution
Question
1 Approved Answer
PLEASE DO THE PART C ICT246 Tutor-Marked Assignment Question 3 In this task, you need to implement system security and access control in Linux operating
PLEASE DO THE PART C
ICT246 Tutor-Marked Assignment 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) 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: o 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) 0 Part (b) 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.y. 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) 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 nameexisted" 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) SINGAPORE LINIVERSITY OF SOCIAL SCIENCES (SUNS) Page 16 ICT246 Tutor-Marked Assignment Part (0) A documentation (with appropriate screen-shots and explanations) needs to be produced on the execution of the bash shell script with different conditions (c.g. [your namne] existed, [your name] does not existed, etc.). Necessary checking needs to be done (e.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). ---- END OF ASSIGNMENT ---- SINGAPORE LINIVERSITY OF SOCIAL SCIENCES (SUNS) Pape of 6 ICT246 Tutor-Marked Assignment 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) 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: o 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) 0 Part (b) 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.y. 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) 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 nameexisted" 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) SINGAPORE LINIVERSITY OF SOCIAL SCIENCES (SUNS) Page 16 ICT246 Tutor-Marked Assignment Part (0) A documentation (with appropriate screen-shots and explanations) needs to be produced on the execution of the bash shell script with different conditions (c.g. [your namne] existed, [your name] does not existed, etc.). Necessary checking needs to be done (e.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). ---- END OF ASSIGNMENT ---- SINGAPORE LINIVERSITY OF SOCIAL SCIENCES (SUNS) Pape of 6Step 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