From owner-freebsd-geom@FreeBSD.ORG Tue Sep 7 08:09:42 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 9B83A16A4CE for ; Tue, 7 Sep 2004 08:09:42 +0000 (GMT) Received: from afields.ca (afields.ca [216.194.67.132]) by mx1.FreeBSD.org (Postfix) with ESMTP id 663D243D31 for ; Tue, 7 Sep 2004 08:09:42 +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 i8789fct013580; Tue, 7 Sep 2004 04:09:41 -0400 (EDT) (envelope-from afields@afields.ca) Received: (from afields@localhost) by afields.ca (8.12.11/8.12.11/Submit) id i8789fCI013579; Tue, 7 Sep 2004 04:09:41 -0400 (EDT) (envelope-from afields) Date: Tue, 7 Sep 2004 04:09:41 -0400 From: Allan Fields To: "R. W." Message-ID: <20040907080941.GH34157@afields.ca> References: <200409050234.13571.list-freebsd-2004@morbius.sent.com> Mime-Version: 1.0 Content-Type: multipart/signed; micalg=pgp-sha1; protocol="application/pgp-signature"; boundary="2B/JsCI69OhZNC5r" Content-Disposition: inline In-Reply-To: <200409050234.13571.list-freebsd-2004@morbius.sent.com> 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:09:42 -0000 --2B/JsCI69OhZNC5r Content-Type: text/plain; charset=us-ascii Content-Disposition: inline Content-Transfer-Encoding: quoted-printable On Sun, Sep 05, 2004 at 02:34:13AM +0100, R. W. wrote: > I've created two gbde partitions, both have the same password, and I'd=20 > like to be able to attach them without typing it twice. Looking at man=20 > gbde it doesn't seem to be possible to mount them simultaneously. >=20 > Is there a good workaround? Yes, it's possible to read in the passphrase once and then feed it on the command line using -p, it's also possible to feed it on stdin w/ a patch I've posted previously. 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 otherwise: tmp=3D`stty -g`; stty -echo read -p "Enter passphrase: " pass echo; stty $tmp gbde attach $dev -l $lck -p $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.) Hope this helps, --=20 Allan Fields, AFRSL - http://afields.ca 2D4F 6806 D307 0889 6125 C31D F745 0D72 39B4 5541 --2B/JsCI69OhZNC5r Content-Type: application/pgp-signature Content-Disposition: inline -----BEGIN PGP SIGNATURE----- Version: GnuPG v1.2.1 (FreeBSD) iD8DBQFBPWzE90UNcjm0VUERAnqYAKCwoOXO5EQNeR/1ZC//Y1eXyy5sUwCgnMBu y4/KHFXtdtJ+ODz3cEFgx+4= =bCR5 -----END PGP SIGNATURE----- --2B/JsCI69OhZNC5r--