Skip site navigation (1)Skip section navigation (2)
Date:      Tue, 7 Sep 2004 04:09:41 -0400
From:      Allan Fields <bsd@afields.ca>
To:        "R. W." <list-freebsd-2004@morbius.sent.com>
Cc:        freebsd-geom@freebsd.org
Subject:   Re: Attaching two gbde partitions with the same password
Message-ID:  <20040907080941.GH34157@afields.ca>
In-Reply-To: <200409050234.13571.list-freebsd-2004@morbius.sent.com>
References:  <200409050234.13571.list-freebsd-2004@morbius.sent.com>

next in thread | previous in thread | raw e-mail | index | archive | help

--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--



Want to link to this message? Use this URL: <https://mail-archive.FreeBSD.org/cgi/mid.cgi?20040907080941.GH34157>