Question: Write a script to conduct a system check. Your boss has just acquired a new client that needs a security audit done on all 5

Write a script to conduct a system check. Your boss has just acquired a new client that needs a security audit done on all 50 of their Linux desktop computers. The client doesnt 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.
Write script 1(named Project_2_WriteData.py)
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:
Vendor_id
Model
Model name
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.
Write script 2(named Project_2_PrintData.py)
1. Make sure script 2 reads the Project_2.json file correctly and writes the output to the screen.
2. The output should be formatted properly with headings for each section. The headings need to be easily readable.
Example of screen output for name, followed by all groups:
saned: /n saned /n scanner /n speech-dispatcher: /n audio /n student:/n student/n adm/n cdrom /n sudo /n dip /n plugdev /n lpadmin /n sambashare /n Mayuser /n

Step by Step Solution

There are 3 Steps involved in it

1 Expert Approved Answer
Step: 1 Unlock blur-text-image
Question Has Been Solved by an Expert!

Get step-by-step solutions from verified subject matter experts

Step: 2 Unlock
Step: 3 Unlock

Students Have Also Explored These Related Programming Questions!