Path: csiph.com!usenet.pasdenom.info!aioe.org!news.mixmin.net!feeds.phibee-telecom.net!newsfeed.xs4all.nl!newsfeed2a.news.xs4all.nl!xs4all!post.news.xs4all.nl!not-for-mail Return-Path: X-Original-To: python-list@python.org Delivered-To: python-list@mail.python.org X-Spam-Status: OK 0.005 X-Spam-Evidence: '*H*': 0.99; '*S*': 0.00; 'say,': 0.05; 'string': 0.09; 'pgp': 0.09; 'url:software': 0.09; 'cc:addr:python-list': 0.11; 'wrote': 0.14; 'argument.': 0.16; 'knock': 0.16; 'merely': 0.16; 'password,': 0.16; 'positive,': 0.16; 'program?': 0.16; 'reasonable.': 0.16; 'rough': 0.16; 'sudo': 0.16; 'wrote:': 0.18; 'trying': 0.19; 'thu,': 0.19; 'written': 0.21; 'memory': 0.22; 'cc:addr:python.org': 0.22; 'header:User-Agent:1': 0.23; 'cc:2**0': 0.24; 'header:In-Reply-To:1': 0.27; 'chris': 0.29; 'am,': 0.29; 'tim': 0.29; '(like': 0.30; "i'm": 0.30; 'serve': 0.31; 'breaking': 0.31; 'bunch': 0.31; 'servers.': 0.31; 'quite': 0.32; 'could': 0.34; 'problem': 0.35; 'anywhere': 0.35; 'but': 0.35; 'there': 0.35; 'false': 0.36; 'done': 0.36; 'so,': 0.37; 'two': 0.37; 'nov': 0.38; 'bad': 0.39; 'commands': 0.60; 'solve': 0.60; 'such': 0.63; 'more': 0.64; 'to:addr:gmail.com': 0.65; 'p.s.': 0.66; 'centers': 0.74; 'taught': 0.96 Date: Wed, 26 Nov 2014 09:55:30 -0600 From: Tim Daneliuk User-Agent: Mozilla/5.0 (X11; Linux x86_64; rv:31.0) Gecko/20100101 Thunderbird/31.2.0 MIME-Version: 1.0 Newsgroups: comp.lang.python To: Chris Angelico Subject: Re: Quotation Ugliness References: <54756D5F.4040806@tundraware.com> <20141126082606.281ff681@bigbox.christie.dr> <5475F38F.5010501@tundraware.com> In-Reply-To: Content-Type: text/plain; charset=utf-8; format=flowed Content-Transfer-Encoding: 7bit X-Greylist: Sender succeeded SMTP AUTH, not delayed by milter-greylist-4.4.3 (ozzie.tundraware.com [75.145.138.73]); Wed, 26 Nov 2014 09:55:30 -0600 (CST) X-TundraWare-MailScanner-Information: Please contact the ISP for more information X-TundraWare-MailScanner-ID: sAQFtUaF039404 X-TundraWare-MailScanner: Found to be clean X-TundraWare-MailScanner-From: tundra@tundraware.com X-Spam-Status: No Cc: "python-list@python.org" X-BeenThere: python-list@python.org X-Mailman-Version: 2.1.15 Precedence: list List-Id: General discussion list for the Python programming language List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Message-ID: Lines: 37 NNTP-Posting-Host: 2001:888:2000:d::a6 X-Trace: 1417017343 news.xs4all.nl 2927 [2001:888:2000:d::a6]:53519 X-Complaints-To: abuse@xs4all.nl Xref: csiph.com comp.lang.python:81591 On 11/26/2014 09:48 AM, Chris Angelico wrote: > On Thu, Nov 27, 2014 at 2:36 AM, Tim Daneliuk wrote: >> The more I think about this, the more I think I am just going to look for >> the >> string 'sudo' anywhere in the argument. This merely will force the user to >> enter their sudo password if detected. If it turns out to be a false >> positive, >> no harm will be done and the password will just go unused. > > That sounds reasonable; imperfect, but reasonable. But what happens if > the password "goes unused"? Will it be provided on stdin to the > program? That could be VERY bad in two ways (revealing the password, > and breaking the program's expectations). > > ChrisA Nope. Password only exist in memory locally. If you want to see the whole program in action as it currently exists: http://www.tundraware.com/Software/tsshbatch I do a lot of work in very large data centers where I need to execute a bunch of commands across, say, a thousand servers. tsshbatch has solved the problem neatly for some years. I'm just trying to knock some of the rough edges off it :) P.S. There are other such programs like 'capistrano' that are spiritually quite similar. I wrote tsshbatch before I found out about the others, which are all written in other lanugages (like Ruby). So, not only did this serve to solve my problem, it also taught me paramiko :) -- ---------------------------------------------------------------------------- Tim Daneliuk tundra@tundraware.com PGP Key: http://www.tundraware.com/PGP/