From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: (qmail 18258 invoked by alias); 1 Feb 2011 22:57:48 -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: 15755 Received: (qmail 1098 invoked from network); 1 Feb 2011 22:57:46 -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=-2.7 required=5.0 tests=BAYES_00,DKIM_SIGNED, DKIM_VALID,DKIM_VALID_AU,FREEMAIL_FROM,RCVD_IN_DNSWL_LOW autolearn=ham version=3.3.1 Received-SPF: pass (ns1.primenet.com.au: SPF record at _spf.google.com designates 209.85.216.171 as permitted sender) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=gamma; h=domainkey-signature:mime-version:in-reply-to:references:date :message-id:subject:from:to:cc:content-type; bh=qZtZtPPdScBqrK8YmFgjH9JyFHKL/dIbb4mdMp4oUdk=; b=MsobPpx5LgV7agHyDCpjr8Pw7k5IAAOdRQa+j3mx4WblGWOoDIYaO+XECKHEFi1844 pdKS+i0x7fAt7Rlly/ykNHAOrjL3De/yGnK1Z6Lr06JqY/uMmXlrqQOxDVVU8sb9ksZz zg6BfSCzu/CiaRiQH2An0PdbsObHh3YM8YQ5I= DomainKey-Signature: a=rsa-sha1; c=nofws; d=gmail.com; s=gamma; h=mime-version:in-reply-to:references:date:message-id:subject:from:to :cc:content-type; b=AK6ZiJRj7kK7b5cki48OC8ZhfiPo2Wqs6CtHRXmPzvxFXymw9RTwUnecv78HVPp+RU hY408cXSyhtrggBBI5TdQyj1Auw+QuiqIropYzUOh1lPCsDBpBRuPNwpxYJoheQUHxU+ Bi7XdcO61di3n1MnRnTVofLgYaTGNdwO96Snk= MIME-Version: 1.0 In-Reply-To: References: Date: Tue, 1 Feb 2011 23:57:41 +0100 Message-ID: Subject: Re: Commands with passwords as options From: Mikael Magnusson To: "Benjamin R. Haskell" Cc: Julien Nicoulaud , zsh-users Content-Type: text/plain; charset=UTF-8 On 1 February 2011 23:40, Benjamin R. Haskell wrote: > 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 You can use read -s here and the password will not be echoed to the screen as you type it. For cat you can use "STTY=-echo cat" -- Mikael Magnusson