Script to Conduct a System Check

Assignment: Write a Script to Conduct a System Check Read the scenario below and complete the instructions that follow. Scenario Your boss has just acquired a new client that needs a security audit done on all 50 of their Linux desktop computers. The client doesn’t want a script to run on the server. Instead, they want someone to manually assess the security on each individual laptop. For an experienced technician, it would take 5 minutes to log in, access system files and take notes for each computer (a total of about 4 hours to assess all 50 computers). As a new technician, it will take you twice as long (about 8 hours) to complete the task. Your boss wants you to write two scripts. Instructions Part 1 – Write script 1 (named 1. Write a single script that retrieves the following information for each desktop computer: • Machine name • List of all users and the group they are associated with, sorted in alphabetical order by name. Hint: the pwd and grp modules will help • The following processor information from /proc/cpuinfo: o Vendor_id o Model o Model name o Cache • The current status of all services being run on the machine. Note: These data need to be collected and written as a JSON file named Project_2.json. This file will be read by your second script. Part 2 – Write script 2 (named 1. Make sure script 2 reads the Project_2.json file correctly and writes the output to the screen. © 2022, Southern Alberta Institute of Technology 2 2. The output should be formatted properly with headings for each section. The headings need to be easily readable. 3. In your demo, show that the Project_2.json file has been created properly. a. Open this file after running The demo also needs to run the script, proving that the Project_2.json was correctly parsed and that the output format is correct. Example of screen output for name, followed by all groups: Figure 1: Example of Screen Output