execute commands as su on remote server

harirammanohar159 at gmail.com harirammanohar159 at gmail.com
Wed Aug 19 03:02:06 EDT 2015


On Tuesday, 18 August 2015 08:27:33 UTC+5:30, hariramm... at gmail.com  wrote:
> execute commands as su on remote server
> 
> Postby hariram » Mon Aug 17, 2015 4:02 am
> Needed:
> I need to execute commands after doing su to other user on remote server(not sudo which doesn't require password) how i can achieve this using python?
> I googled and came to know that its not possible, so just for confirmation asking again, is it possible ?
> 
> Already Tried:
> Tried paramiko that's too not working.

Hey Julio,

i have seen that in forums speaking about fabfile... but i believe that it also supports only sudo not su...sudo rights we dont have in our env...
even fabfile implementation is up to python 2.7 only and we are using python 3.4

Tried creating channel and invoking shell and spawning it delay, that too didnt worked, just checking that any possible way is there to control the tty..



More information about the Python-list mailing list