Password query for script

while running a script, if during a line run terminal asked for password, then do we have to give password from script or you will type the password?

The script should take care of that ideally.

Won’t the test server have a different password than our server? In which case the Authorization might fail?

Good question. You should make the password one of the input parameters.

1 Like

Thanks for clarifying. So, I’m assuming the test server will put the password alongside the vsftpd version and the QBox_benchmark arguments to my script. Right?

Yes, we can run it that way.

1 Like

why do we need password as input parameter,
can’t we use os.chown and get sudo uid and gid?
i am new to python, i think it should work.right?

The only problem is if you have hardcoded the password in your script.

sir, i don’t understand the authentication part,how to provide password if it needs during process, and it will needed as in the process we need to change some permissions and make some file as well,
how is my script supposed to handle it?
and why can’t i just hard code my credentials, will I not be the root user during assessment?
please provide some clarity on it.

This milestone is optional in Module 4. Please proceed to finish up the other modules and you can come back to this later.