From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: (qmail 1416 invoked by alias); 1 Feb 2011 22:40:32 -0000 Mailing-List: contact zsh-users-help@zsh.org; run by ezmlm Precedence: bulk X-No-Archive: yes List-Id: Zsh Users List List-Post: List-Help: X-Seq: 15754 Received: (qmail 13974 invoked from network); 1 Feb 2011 22:40:30 -0000 X-Spam-Checker-Version: SpamAssassin 3.3.1 (2010-03-16) on f.primenet.com.au X-Spam-Level: X-Spam-Status: No, score=-1.9 required=5.0 tests=BAYES_00 autolearn=ham version=3.3.1 Received-SPF: pass (ns1.primenet.com.au: SPF record at benizi.com designates 64.130.10.15 as permitted sender) Date: Tue, 1 Feb 2011 17:40:01 -0500 (EST) From: "Benjamin R. Haskell" To: Julien Nicoulaud cc: Mikael Magnusson , zsh-users Subject: Re: Commands with passwords as options In-Reply-To: Message-ID: References: User-Agent: Alpine 2.01 (LNX 1266 2009-07-14) MIME-Version: 1.0 Content-Type: TEXT/PLAIN; charset=US-ASCII; format=flowed On Tue, 1 Feb 2011, Julien Nicoulaud wrote: > OK, but at least it is hidden from the shell "UI". Take it as > "man-looking-over-your shoulder" protection :-) For example you show > something to someone, you do a backward history search and a command > with a clear text password you forgot to exclude from history pops > out... In general, just avoid ever using such options. But, if you get lazy, two ways around it that I use: # method 1, use a var: $ read DBPASSWORD *password*here* $ to clear screen $ mysql -u username -p$DBPASSWORD [...etc...] # method 2, use a file: $ cat > passfile *password*here* $ to clear screen (or just have the file from a past session) $ mysql -u username -p$(