Question: Could you please answer the following in the python script: write a python script that would serve as a tool for managing user accounts on

Could you please answer the following in the python script: write a python script that would serve as a tool for managing user accounts on a Linux System. Your script should perform the three basic user management tasks as follows. please create a function that determines if a username already exists in the system. This function accepts a given username and returns True or False depending on the existence or otherwise of the username in the system. then Implement a function that creates account details of new users: For this task, your script should create a user account for a user, given the users real name (First and Last names), the username to be assigned to the user, and a default password for the user. Your script should prompt for the real name and username for each user. Use an in-built function in python to generate the password for each user. Validate the new user account by using the function in 1 above to determine if the username already exists or not prior to adding the new user account. Implement a function that removes a user account from the system. If the user account to be deleted does not exist in the system, display an appropriate message. The home directory and all files for the user have to be deleted. Validate the user account to be deleted by using the function in 1 above to determine if the username already exists or not prior to deleting the user account. Implement a function that modifies an existing user account. Your function should give the options to Lock the account Change the real name associated with the account Validate the user account to be modified by using the function in 1 above to determine if the username already exists or not. Implement a function that provides a text-based menu system to for the user to choose any of the functionality described above. Please remember to validate options selected by the user when your script is run. Your menu function should be the first function to be called when your tool is executed. Once the menu function is called, the user will be required to select one of the options and, depending on the users choice, one of the other functions should be invoked. Thank you!

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 Databases Questions!