On Fri, May 14, 2021 at 15:41:31 CEST, Milan Broz wrote: > On 14/05/2021 13:51, Volker Dormeyer wrote: > > Hello, > > > > today I have another question regading the key-file option. I am > > scripting something where the passphare is given by STDIN, with the > > following options: > > > > cryptsetup luksOpen /dev/sde hdd --header header.img --key-file - > > > > If I enter this line on a command line it prompts me with "Enter > > passphrase for /dev/sde", I was suspecting nothing. How can I make sure > > that the passphrase is being read form STDIN? > > Cryptsetup checks if there is input from a real terminal (then displays this message) > or from a pipe. echo pwd | cryptsetup ... works. > > But if the input is a binary file, it will stop on the first EOL (then you must use --keyfile-size). > Please read "NOTES ON PASSPHRASE PROCESSING FOR LUKS" in the man page. > > Milan Was just about to point out the same thing. "NOTES ON PASSPHRASE PROCESSING FOR LUKS" is towards the end of the man-page. Regards, Arno -- Arno Wagner, Dr. sc. techn., Dipl. Inform., Email: arno@xxxxxxxxxxx GnuPG: ID: CB5D9718 FP: 12D6 C03B 1B30 33BB 13CF B774 E35C 5FA1 CB5D 9718 ---- A good decision is based on knowledge and not on numbers. -- Plato If it's in the news, don't worry about it. The very definition of "news" is "something that hardly ever happens." -- Bruce Schneier _______________________________________________ dm-crypt mailing list -- dm-crypt@xxxxxxxx To unsubscribe send an email to dm-crypt-leave@xxxxxxxx