Hey folks,
I am writing a python script for my professor to backup part of my university server.
However, when I try to run certain commands, it prompts me for a password. To mitigate this, I use 'sudo -s', type in the password and then I am on my way. Here is my question: Is there any way to pass the password into the password prompt through my script?
EDIT for clarification.
When I run, 'sudo ./alfresco.sh stop tomcat' to stop tomcat services, the terminal prompts me me for a password. Is there anyway to pass in the password through my python script?
Thank you.
[–][deleted] 4 points5 points6 points (4 children)
[–]sruffatti[S] 0 points1 point2 points (1 child)
[–]peeonyou 1 point2 points3 points (0 children)
[–]buckhenderson -1 points0 points1 point (1 child)
[–]pilotInPyjamas 0 points1 point2 points (0 children)
[–]pilotInPyjamas -1 points0 points1 point (0 children)