Project #27159 - python script

Write a python program to do some file system checks as indicated below.  Submit your commented program and a sample output.

1) Do checks related to the PATH variable.

(a) Check to see if the PATH variable contains . (current directory) and give an error message if it does.

(b) Check the executable programs that exist in each of the directories specified by PATH. You should check to see which programs have the setuid bit turned on and which have write permission for anyone other than the owner. The output should be three listings of the full path names of problem files: (1) those with the setuid bit on and writable by non-owner first, (2) those with the setuid bit on but only writable by the owner second, and (3) those with the setuid bit off and writable by non-owner last. Each group of file names should be sorted alphabetically.

2) Do checks related to the contents of the /etc directory and its subdirectories:

(a) Check for any files in /etc that have write access by anyone other than root. Display these files with their name, owner name and permissions, alphabetically ordered by file name. 

(b) Check if any files in /etc have been modified in the past 24 hours (look at the time module for useful functions). List these by file name and time modified, sorted by modify time. 

(c) Check if any files in /etc have had their properties changed in the past 24 hours. List these by file name, permissions and time changed, sorted by change time.

Subject Computer
Due By (Pacific Time) 04/11/2014 12:00 am
Report DMCA
TutorRating
pallavi

Chat Now!

out of 1971 reviews
More..
amosmm

Chat Now!

out of 766 reviews
More..
PhyzKyd

Chat Now!

out of 1164 reviews
More..
rajdeep77

Chat Now!

out of 721 reviews
More..
sctys

Chat Now!

out of 1600 reviews
More..
sharadgreen

Chat Now!

out of 770 reviews
More..
topnotcher

Chat Now!

out of 766 reviews
More..
XXXIAO

Chat Now!

out of 680 reviews
More..
All Rights Reserved. Copyright by AceMyHW.com - Copyright Policy