subject

Samba is a unix/linux file sharing suite of programs designed to provide Windows interoperable file and print sharing services. Much of the configuration for the Samba daemon is provided by the text file smb. conf (renamed to smb. txt for this assignment). After an update was deployed to three dozen linux servers it was discovered that a couple of configured parameters were incorrect. Unfortunately, since there are unique aspects to each server, copying the contents of a single file to each server is not a viable solution. To fix the problem, the IT department must connect to each server, edit the smb. conf file, and restart the smbd daemon. To automate this task, each server will have a Python script copied to it. Then an SSH session will be initiated to each server from which the script will be executed. Your task is to write the Python script. The invocation of the script must be as follows:
python modify. py fileSpec "from" "to"
where,
• modify. py is the name of your script
• fileSpec is the name of the file to be modified (smb. txt)
• "from" is the text to be searched for (be sure to enclose any white space in quotes.
• "to" is the text the searched text is to be replaced with.
Testing the script is your responsibility. However a good test case is:
python modify. py smb. txt "password
sync = yes" "password sync = no"

ansver
Answers: 1

Another question on Computers and Technology

question
Computers and Technology, 22.06.2019 02:30
The can be used to paste text in any order
Answers: 1
question
Computers and Technology, 22.06.2019 10:30
What can tanya do now to start preparing for the college and scholarship application process? think about her grades, activities in which she can get involved, possible part-time jobs at which she can work, and standardized tests she can take. (10 points) apex
Answers: 2
question
Computers and Technology, 23.06.2019 18:30
Janice recently received her college degree and is looking for a job. she is worried that since she just finished school, she will be required to repay her perkins and direct subsidized loans immediately. janice pulls out the paperwork she signed and reviews it again for repayment information. after reading all of the information, janice discovers that
Answers: 2
question
Computers and Technology, 24.06.2019 03:00
With editing, word automatically displays a paste options button near the pasted or moved text. a. cut-and-paste b. drag-and-drop c. inline d. copy-and-carry
Answers: 1
You know the right answer?
Samba is a unix/linux file sharing suite of programs designed to provide Windows interoperable file...
Questions
question
Mathematics, 10.07.2019 10:00