I’m trying to accomplish the following but no luck, any suggestions? ⇒ My app will run a command that requires admin’s password, if you run the
import pexpect import pxssh import sys child1 = pexpect.spawn('su root -c "passwd mansingh"') print(child1.before) #creation of log file child1.logfile = open(
I am running a Python script with user1 and in this script I need to move a file in a folder for which I don't have access. The folder is owned by user2. What
I have seen numerous posts online about logging into an APC PDU over telnet using Python pexpect, PHP, etc. However, all of the examples are like this: Python