Answered step by step
Verified Expert Solution
Link Copied!

Question

1 Approved Answer

Your boss has just acquired a new client that needs a security audit done on all their desktop machines. They don't want a script to

Your boss has just acquired a new client that needs a security audit done on all their desktop machines. They don't want a script to run on the server. They want someone to manually go to each desktop and assess the security on it. 

They have 50 Linux desktops. To log in, access system files, and take notes, takes about 5 minutes for an experienced technician. For this technician doing this process you are looking at about 4 hours. For a new technician you are looking at least double that, close to 7 hours. 

Your boss wants you to write two scripts.

Instructions 

SCRIPT 1 (named Project_2_WriteData.py):

-design the first script that retrieves the following 

• 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!)

• From /proc/cpuinfo get the following of Processor 

  • Vendor_id
  • Model
  • Model name
  • Cache

 • All services on machine and their current status 

• This data needs to be collected and written as a JSON file named Project_2.json 

 SCRIPT 2 (named Project_2_PrintData.py):

-This second script reads the Project_2.json file created above and does the following:

  • Reads the Project_2.json file correctly and writes the output to the screen
  • The output should be formatted properly with headings for each section (needs to be easily readable).

 The demo needs to identify that the Project_2.json file has been created properly by opening this file after running Project_2_WriteData.py.  The demo also needs to run the script Project_2_PrintData.py 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:

image.png 

saned: saned scanner speech-dispatcher: audio student: student adm cdrom sudo dip plugdev lpadmin sambashare MayUser

Step by Step Solution

3.47 Rating (150 Votes )

There are 3 Steps involved in it

Step: 1

Script 1 Project2WriteDatapy import json import pwd import grp import os Initialize data dictionary ... blur-text-image

Get Instant Access to Expert-Tailored Solutions

See step-by-step solutions with expert insights and AI powered tools for academic success

Step: 2

blur-text-image

Step: 3

blur-text-image

Ace Your Homework with AI

Get the answers you need in no time with our AI-driven, step-by-step assistance

Get Started

Recommended Textbook for

Organizational Behaviour Concepts Controversies Applications

Authors: Nancy Langton, Stephen P. Robbins, Timothy A. Judge, Katherine Breward

6th Canadian Edition

132310317, 978-0132310314

More Books

Students also viewed these Programming questions

Question

How can an outsider assess an organizations culture?

Answered: 1 week ago

Question

What is conflict?

Answered: 1 week ago