From owner-freebsd-geom@FreeBSD.ORG Tue Sep 7 08:23:12 2004 Return-Path: Delivered-To: freebsd-geom@freebsd.org Received: from mx1.FreeBSD.org (mx1.freebsd.org [216.136.204.125]) by hub.freebsd.org (Postfix) with ESMTP id 85E0716A4CE for ; Tue, 7 Sep 2004 08:23:12 +0000 (GMT) Received: from afields.ca (afields.ca [216.194.67.132]) by mx1.FreeBSD.org (Postfix) with ESMTP id 52D3543D2F for ; Tue, 7 Sep 2004 08:23:12 +0000 (GMT) (envelope-from afields@afields.ca) Received: from afields.ca (localhost.afields.ca [127.0.0.1]) by afields.ca (8.12.11/8.12.11) with ESMTP id i878NBbV013653; Tue, 7 Sep 2004 04:23:11 -0400 (EDT) (envelope-from afields@afields.ca) Received: (from afields@localhost) by afields.ca (8.12.11/8.12.11/Submit) id i878NBOI013652; Tue, 7 Sep 2004 04:23:11 -0400 (EDT) (envelope-from afields) Date: Tue, 7 Sep 2004 04:23:11 -0400 From: Allan Fields To: "R. W." Message-ID: <20040907082311.GI34157@afields.ca> References: <200409050234.13571.list-freebsd-2004@morbius.sent.com> <20040907080941.GH34157@afields.ca> Mime-Version: 1.0 Content-Type: text/plain; charset=us-ascii Content-Disposition: inline In-Reply-To: <20040907080941.GH34157@afields.ca> User-Agent: Mutt/1.4i cc: freebsd-geom@freebsd.org Subject: Re: Attaching two gbde partitions with the same password X-BeenThere: freebsd-geom@freebsd.org X-Mailman-Version: 2.1.1 Precedence: list List-Id: GEOM-specific discussions and implementations List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Tue, 07 Sep 2004 08:23:12 -0000 Add lines below to the examples (in case $pass hangs around.) On Tue, Sep 07, 2004 at 04:09:41AM -0400, Allan Fields wrote: > The only issue with reading in passwords from a shell script is to > not echo to the tty. There are ways around this problem such as: > > In bash you can use: > read -esp "Enter passphrase: " pass > gbde attach $dev -l $lck -p $pass gbde attach $dev2 -l $lck2 -p $pass pass=`head -c1024 /dev/urandom`; unset pass > > otherwise: > tmp=`stty -g`; stty -echo > read -p "Enter passphrase: " pass > echo; stty $tmp > gbde attach $dev -l $lck -p $pass gbde attach $dev2 -l $lck2 -p $pass pass=`head -c1024 /dev/urandom`; unset pass > > You could put this into your rc.early or something similarly early > in the boot sequence if it suits your needs. (For security reasons > passing the passphrase on the command line should be done before > going multiuser.) -- Allan Fields, AFRSL - http://afields.ca 2D4F 6806 D307 0889 6125 C31D F745 0D72 39B4 5541