Answered step by step
Verified Expert Solution
Link Copied!

Question

1 Approved Answer

For this lab you will be accessing a file in your linux OS File = /etc/passwd *Create snapshot of your linux distro, so that you

For this lab you will be accessing a file in your linux OS

File = /etc/passwd

*Create snapshot of your linux distro, so that you can go back if you make a mistake.

*This a scenario you are given, how you accomplish it with Python is up to you. Your challenge will be to logically troubleshoot through it.

Requirements (not given to you in the order they need to happen):

  • Extract from each line of the file only the user name user id group id and user shell.
  • Create a function that opens the file and creates 4 separate lists, incorporate error handling for your file handling.
  • Create a while loop that stays open until the user types exit
  • While the while loop is running the user will see on the screen all the available users on the system. The user can select a specific user and will be prompted which value they want to see (user id, group id, user shell)

Step by Step Solution

There are 3 Steps involved in it

Step: 1

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

Database Processing

Authors: David J. Auer David M. Kroenke

13th Edition

B01366W6DS, 978-0133058352

More Books

Students also viewed these Databases questions

Question

How do Excel Pivot Tables handle data from non OLAP databases?

Answered: 1 week ago