My sister requested for a help on her coding assignment. She is a slow learner. PS. I don't know anything about coding. She asks my help if I have any friends that can help out.By using Bash shell script, you have to write ONE (1) script that would perform the following tasks:
a) [2 marks] Display a list of available tasks on the screen. After selection of choice, the script will prompt if results to be displayed on the screen or stored in user home directory.The tasks cover:
b) [10 marks] Check all the status of services you have installed and configured in Part 1 - Task 2.
i. Administrator will get a detail and a summary notification on the installed services, folders, block, storage, ports and URL/IP address etcs that are successful running.
ii. The script will perform a check by sending test data to the server and wait for response. For e.g. check specific configuration keywords in DNS configuration file, successfully load website from the server, get response of query from the database, success attempt to login to NFS/Samba/Block storage, successful remote access to server etc.
c) [2 marks] Analyse the disk usage of the server
i. if the disk space is more than 90%; an email is sent to the administrator
d) [2 marks] Monitor high CPU usage that hit 75% and above.
e) [2 marks] Identify processes that has been running for more than 1 hour.
f) [2 marks] Add a new user to the system with his/her username default password (you define the default password pattern)
g) [2 marks] Add users from a name list (e.g. text file) with default password set
h) [2 marks] Disable (not delete) user. User will be prompted for confirmation.
i) [2 marks] Display users who login as root (sudo) for the past 7 days, their login (as root) date and time, and the commands that the privilege escalated user runs
j) [2 marks] Produce a report that records of Tasks 4b to 4e in ONE (1) click.
Your script MUST include ONE (1) text-based user interface to facilitate the process.