Category "pexpect"

Python: communication between an app and terminal which is asking for Admins password

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

Python password reset Pexpect script execution have no effects afterword's, it throws no errors during execution

import pexpect import pxssh import sys child1 = pexpect.spawn('su root -c "passwd mansingh"') print(child1.before) #creation of log file child1.logfile = open(

Change user (su) via Python script (pexpect, popen...)

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

APC PDU CLI automation over telnet

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