[dm-crypt] Detect successful passphrase entry for dmcrypt +LUKS from initramfs busybox prompt
dominic at timedicer.co.uk
Wed Apr 19 08:39:52 CEST 2017
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.
Here's my very simple local script which I put at
/etc/initramfs-tools/scripts and is then found upon boot at /scripts:
read -sp"Enter passphrase, then press ENTER/RETURN: "
printf "$REPLY" >/lib/cryptsetup/passfifo
# but did it work??? how to tell without local access or logging in a
-------------- next part --------------
An HTML attachment was scrubbed...
More information about the dm-crypt