Shell scripting and cryptsetup

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

 



Hello 

I'm reading tutorials for cryptsetup and I don't succeed to give passphrase
through a shell variable. A sort of:

#! /bin/bash
echo -n your password
read PWD
(...some stuff I do with PWD...)
cryptsetup create $PWD crypted_sda1 /dev/sda1 
(no keyboard confirmation or whatever)

I really need to do something like that. Is there a way?

It's for mounting through initramfs the crypted partition.

I could do something like:
read PWD
echo $PWD > $PWD
cryptsetup create -d $PWD crypted_sda1 /dev/sda1 
but I find this really ugly. Is there a better way?

thanks.

Eurolines : Voyagez au meilleur prix : http://www.alinto.com/pub/

---------------------------------------------------------------------
dm-crypt mailing list - http://www.saout.de/misc/dm-crypt/
To unsubscribe, e-mail: dm-crypt-unsubscribe@xxxxxxxx
For additional commands, e-mail: dm-crypt-help@xxxxxxxx


[Index of Archives]     [Device Mapper Devel]     [Fedora Desktop]     [ATA RAID]     [Fedora Marketing]     [Fedora Packaging]     [Fedora SELinux]     [Yosemite News]     [KDE Users]     [Fedora Tools]     [Fedora Docs]

  Powered by Linux