On Monday 2010-05-17 11:14, Stefan G. Weichinger wrote:
>Am 16.05.2010 14:36, schrieb Jan Engelhardt:
>> [Replying to 
>> http://thread.gmane.org/gmane.linux.gentoo.user/229533/focus=229542 
>> ]
>> 
>> Second, it's using echo without the -n parameter, thus implicitly 
>> inserting a newline into the key -- which is the cause for yoru 
>> observed mounting problems.
>> 
>> Third, because you are passing the key via stdin into cryptsetup, it 
>> only uses the first line of whatever you pipe into it; whereas 
>> pam_mount uses the entire keyfile as it is supposed to be.
>>[...]
>Jan, thanks for your suggestions.
>
>I created a new LUKS-volume and tried to avoid all the mentioned
>pitfalls (I used "echo -n", avoided stdin etc.), but this didn't help here.

To be sure, use

        openssl -d ... | hexdump -C

to detect newlines in the key. The shell has far too many occasions
where \n gets stripped or added.

Reply via email to