[BangPypers] Executing Commands using sudo
davidsnt at gmail.com
Thu Nov 15 18:04:11 CET 2012
>>how many does a bunch mean ?
close to 7
I tried a native linux way with ssh -t user1 at host "sudo su -l user2" to
connect to the host directly as user2 but still it fails to execute the
On Thu, Nov 15, 2012 at 10:10 PM, satyaakam goswami <satyaakam at gmail.com>wrote:
> On Thu, Nov 15, 2012 at 5:19 PM, davidsnt <davidsnt at gmail.com> wrote:
> > Hello Team,
> > I have a bunch of servers where I have to login as user1 and then sudo as
> > super user and again change to user2 and execute a bunch of commands, can
> > you guys help with any thought how can I get this done in python.
> how many does a bunch mean ?
> > 4. Logout
> > I cannot login as user2 over ssh, it is not enabled.
> this use case can be done in native python or if you do not want to take
> care of the nitty gritties you can take a look at
> http://code.google.com/p/sshpt/ , write shell scripts around it to get it
> done , this tool again is written using python , there are other tools
> depending on the complexity .
> BangPypers mailing list
> BangPypers at python.org
More information about the BangPypers