[dm-crypt] cryptsetup not accepting plain passwd with -d option
nikhilalayil at gmail.com
Tue Jan 31 15:49:27 CET 2012
I have created an encrypted ISO image of a directory named data using the
# mkisofa -r data | aespipe -p3 -e aes256 3<./passphrase > data.iso
In order to mount encrypted disk using dm-crypt, I followed below steps:
1) creating the loop device
# losetup /dev/loop0 data.iso
2) creating device mapper device for this loop device
# cryptsetup -c aes -s 256 -h sha512 -d./passphrase create aesdev /dev/loop0
3) mount dm device on an empty folder to access iso contents
# mount /dev/mapper/aesdev /mnt
The mount command gives me the below error:
# mount: you must specify the filesystem type
After lot of trial and error iterations, I figured out that cryptsetup is
the culprit. Because issue surfaces only when -d option of cryptsetup is
used. If I'm giving the password manually when cryptsetup prompts,
everything works fine. Also a wrongly entered passphrase is not also
reported until the mount step is attempted.
[root at dhcp210-115 ~]# cat passphrase
Is there a way to provide cryptsetup its password in a file when it is used
in this manner?
Thanks in advance.
-------------- next part --------------
An HTML attachment was scrubbed...
More information about the dm-crypt