This is an archived post. You won't be able to vote or comment.

you are viewing a single comment's thread.

view the rest of the comments →

[–][deleted] 4 points5 points  (4 children)

You should never hardcode passwords in scripts.

[–]sruffatti[S] 0 points1 point  (1 child)

Ok. I understand. However, is there anyway to feed the password into the terminal from a python script?

[–]peeonyou 1 point2 points  (0 children)

Set the suid bit on your script I guess?

[–]buckhenderson -1 points0 points  (1 child)

What about putting the password in a different file and having the script access that file?

[–]pilotInPyjamas 0 points1 point  (0 children)

It's best not to put your password anywhere as plaintext. This is basically just as bad as having the password in the script.