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 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 minutes to log in access system files and take
notes for each computer a total of about hours to assess all computers As a new technician, it will take you twice as long about hours to complete the task. Your boss wants you to write two scripts.
Write script named ProjectWriteData.py
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 proccpuinfo:
Vendorid
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 Projectjson.
This file will be read by your second script.
Write script named ProjectPrintData.py
Make sure script reads the Projectjson file correctly and writes the output to the screen.
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 speechdispatcher: n audio n student:n studentn admn 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
Question Has Been Solved by an Expert!
Get step-by-step solutions from verified subject matter experts
Step: 2 Unlock
Step: 3 Unlock
