Re: Detect successful passphrase entry for dmcrypt +LUKS from initramfs busybox prompt

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

 



Hi Dominic,

Am 19.04.2017 um 08:39 schrieb Dominic Raferd:
> Sorry if this is off-topic for this mailing list. I am setting up a
> (Ubuntu 16.04) machine with dmcrypt+LUKS encrypted root system (standard
> Debian/Ubuntu recipe) but with added capability for remote entry of the
> passphrase (using dropbear via busybox shell). After the user has
> entered the passphrase (and it is piped into /lib/cryptsetup/passfifo) I
> would like an easy and preferably fast way for a local script (i.e.
> running under busybox ash shell) to detect whether the passphrase entry
> has been successful or not - without requiring local access or a second
> remote login. Thanks for any help.

Indeed it's slightly off-topic as initscripts and initramfs integration
are specific to the distributions that ship/package cryptsetup.

One quick idea is that you could test for existance of the
/dev/mapper/<target> device file. If it exists, then the unlocking was
successful.

I usually logout of the system after remotely unlocking it via initramfs
ssh session and monitor the ping in another terminal. If the ping stops
being answered and continues a few seconds afterwards, that indicates
that the unlock attempt was successful and I login to the booted system.

Cheers
 jonas



Attachment: signature.asc
Description: OpenPGP digital signature

_______________________________________________
dm-crypt mailing list
dm-crypt@xxxxxxxx
http://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