Question
You are an administrator of a windows system and are always required to create user accounts and passwords automatically. There are rules for you to
You are an administrator of a windows system and are always required to create user accounts and passwords automatically. There are rules for you to create a user name and a password for a user account.
The rules for creating a user name for an account are: the first character of a person's first name + the person' last name + the order number for the person.
The rules for creating a password are: The password must have a minimum of eight characters The password must have at least one lowercase character. The password must have at least one uppercase character. The password must have at least one numeric character. The password may contain one or more special characters. The only special characters that are accepted are: Underscore (_) Exclamation point (!) Dollar sign ($) At sign (@) Pound sign (#) Percent sign (%)
The length of the username and password is also limited by windows 10. The password should be created randomly.
Task: Write down a piece of Python script to create 50 persons' user accounts in widows 10 (the 50 persons' information is stored in "person.txt"). Each person has his/her own account and each account has its own password. Please save the created user accounts' user names and passwords in one file so that you can use it in the future. Submit the scripts and the output file (where the accounts' usernames and passwords are stored in a file with the following format: order number, first name, last name, user name, password. See the sample output file: user_sample.txt ) . The work needs to be done in Windows 10 environment. (Notes: you can use "net user username password /Add" to create a user account and use os.system() command to call the external command, you also need to make CMD"Run as administrator"when you run the script) . use net user command to check whether you are successful and get the screen shots and insert into this file after the problems.
Step by Step Solution
There are 3 Steps involved in it
Step: 1
Get Instant Access to Expert-Tailored Solutions
See step-by-step solutions with expert insights and AI powered tools for academic success
Step: 2
Step: 3
Ace Your Homework with AI
Get the answers you need in no time with our AI-driven, step-by-step assistance
Get Started