Path: csiph.com!goblin2!goblin1!goblin.stu.neva.ru!uio.no!news.tele.dk!news.tele.dk!small.news.tele.dk!newsgate.cistron.nl!newsgate.news.xs4all.nl!nzpost1.xs4all.net!not-for-mail Return-Path: X-Original-To: python-list@python.org Delivered-To: python-list@mail.python.org X-Spam-Status: OK 0.017 X-Spam-Evidence: '*H*': 0.97; '*S*': 0.00; 'url:pypi': 0.03; 'received:134': 0.05; 'password)': 0.09; 'googled': 0.16; 'received:ac.be': 0.16; 'subject:server': 0.16; 'sudo': 0.16; 'tried:': 0.16; 'working.': 0.18; 'python?': 0.18; '2015': 0.20; 'aug': 0.20; 'tried': 0.24; 'header:In-Reply-To:1': 0.24; 'header :User-Agent:1': 0.26; "doesn't": 0.26; 'received:be': 0.30; 'url:python': 0.33; 'server': 0.34; 'possible,': 0.35; 'something': 0.35; 'asking': 0.35; 'remote': 0.35; 'but': 0.36; 'too': 0.36; 'url:org': 0.36; 'possible': 0.36; 'to:addr:python- list': 0.36; 'subject:: ': 0.37; 'doing': 0.38; 'to:addr:python.org': 0.40; 'needed:': 0.84; 'pardon': 0.84; 'schreef': 0.84; 'subject:commands': 0.84 X-IronPort-Anti-Spam-Filtered: true X-IronPort-Anti-Spam-Result: AkUFAI2e5lWGuA9G/2dsb2JhbABdg29EASSDI70LhXUKAoIOAQEBAQEBhS8BAQQjDwFFEQsaAgUPBwsCAgkDAgECAQ82EwYCAogVAxINtEWPbg1HhE0BAQgBAQEBGgSBIoVRhHuCT4FxUhcCglCBQwEElUOFB4YBgW2IaYpHhzwmhAFvgk0BAQE Date: Wed, 02 Sep 2015 09:05:30 +0200 From: Antoon Pardon User-Agent: Mozilla/5.0 (X11; Linux i686; rv:31.0) Gecko/20100101 Icedove/31.8.0 MIME-Version: 1.0 To: python-list@python.org Subject: Re: execute commands as su on remote server References: In-Reply-To: Content-Type: text/plain; charset=utf-8 Content-Transfer-Encoding: 8bit X-BeenThere: python-list@python.org X-Mailman-Version: 2.1.20+ Precedence: list List-Id: General discussion list for the Python programming language List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Newsgroups: comp.lang.python Message-ID: Lines: 19 NNTP-Posting-Host: 2001:888:2000:d::a6 X-Trace: 1441177606 news.xs4all.nl 23820 [2001:888:2000:d::a6]:48381 X-Complaints-To: abuse@xs4all.nl Xref: csiph.com comp.lang.python:95856 Op 18-08-15 om 04:57 schreef harirammanohar159@gmail.com: > 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. What about pexpect: https://pypi.python.org/pypi/pexpect/ It's been a long time since I used it, but it was for something similar. -- Antoon Pardon