From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: from mout.web.de (mout.web.de [212.227.15.3]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) key-exchange ECDHE (P-256) server-signature RSA-PSS (2048 bits) server-digest SHA256) (No client certificate requested) by mail.server123.net (Postfix) with ESMTPS for ; Tue, 10 Nov 2020 10:04:04 +0100 (CET) Received: from march.localnet ([80.90.158.117]) by smtp.web.de (mrweb005 [213.165.67.108]) with ESMTPSA (Nemesis) id 1MVaYi-1kmGxT21tU-00RgDI for ; Tue, 10 Nov 2020 10:04:03 +0100 From: "chiasa.men" Date: Tue, 10 Nov 2020 10:04:02 +0100 Message-ID: <10785019.O7vmMJN3CY@march> MIME-Version: 1.0 Content-Transfer-Encoding: quoted-printable Content-Type: text/plain; charset="utf-8" Subject: [dm-crypt] unlock via password and device List-Id: List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , To: dm-crypt@saout.de For the purpose of full disc encryption the tutorials usually suggest to decrypt luks via usbkey. The keyscript then often waits the key to appear for several seconds, afte= r that they fall back to the password prompt. If the key appears after the waiting time it is ignored. Is there a way to "step back" after the password prompt appeared? The current workaround is another process that loops for the key in the background, decrypts the disk and kills "askpass" several times (resulting= in "wrong password" in the main process) What would be a clean way to implement the wanted behavior? As I understood, the keyscript has to print the key to stdout. I would expect the following keyscript construct to work as well: =2D-- while luksNotOpened if [ -e key ] dd if=3Dkey sleep 1 done & askpass =2D-- The background process should still print to stdout and I guess askpass wo= uld do the same when enter is pressed? However that does not work