[BangPypers] Executing Commands using sudo
satyaakam goswami
satyaakam at gmail.com
Thu Nov 15 17:40:00 CET 2012
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 .
-Satya
fossevents.in
More information about the BangPypers
mailing list