Re: Unattended generation/opening.

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

 



On 8 Aug 2020 19:05 -0700, from saout.boxy@xxxxxxxx (Diagon):
> Could someone let me know what I'm doing wrong here?  I'm trying to do this in a script, but it doesn't work on the command line, either:
> 
> $ echo "lukssecpwd" | sudo cryptsetup -c twofish-xts-plain64 -s 512 luksFormat /dev/loop5 -
> $ echo "lukssecpwd" | sudo cryptsetup open /dev/loop5 crypt.secret
> No key available with this passphrase.

Norepro on up-to-date Debian Buster with cryptsetup 2.1.0 (package
version 2:2.1.0-5+deb10u2) with kernel 4.19.0-10-amd64 (package
version 4.19.132-1) reporting build date 2020-07-24.

# truncate -s 100M /root/lukstest
# losetup -f /root/lukstest
# losetup -l
NAME       SIZELIMIT OFFSET AUTOCLEAR RO BACK-FILE      DIO LOG-SEC
/dev/loop0         0      0         0  0 /root/lukstest   0     512
# echo "lukssecpwd" | cryptsetup luksFormat /dev/loop0
# echo "lukssecpwd" | cryptsetup open /dev/loop0 lukstest.loop0
# ls -l /dev/mapper/lukstest.loop0
lrwxrwxrwx 1 root root 7 Aug  9 09:37 /dev/mapper/lukstest.loop0 -> ../dm-9
# cryptsetup close lukstest.loop0
# ls -l /dev/mapper/lukstest.loop0
ls: cannot access '/dev/mapper/lukstest.loop0': No such file or directory
#

Seems to work just fine all the way through.

Using echo to pipe the passphrase into luksFormat and then entering it
manually into the later cryptsetup open invocation also works fine for
me.

That said, maybe adding "--key-file -" and dropping the "-" from the
luksFormat command might help? If not, please try it again with
--debug and show us the output of that.

-- 
Michael Kjörling • https://michael.kjorling.se • michael@xxxxxxxxxxx
 “Remember when, on the Internet, nobody cared that you were a dog?”

_______________________________________________
dm-crypt mailing list
dm-crypt@xxxxxxxx
https://www.saout.de/mailman/listinfo/dm-crypt




[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