Attaching two gbde partitions with the same password
Allan Fields
bsd at afields.ca
Tue Sep 7 01:23:12 PDT 2004
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
More information about the freebsd-geom
mailing list