I'd like to edit the HowTo/EncryptedFilesystem page the note on how to create a valid keyfile. This is not a trivial action. Creating a plaintext file in vim does not qualify as a valid password. Instead, a valid keyfile is created by doing the following: echo -n "password" > keyfile.key which explicitly creates the file with password on the first line with an explicit newline at the end of the file. This is because cryptsetup needs a newline at the end of the keyfile. Just using a text editor like vim does not create a valid keyfile that cryptsetup can equate with a key for an encrypted volume. This addition is (at least) worth six hours of my time, so hence may be worth about that much to anyone who may read this valuable addition. This limitation on cryptsetup and crypttab is not mentioned in the crypttab nor cryptsetup manuals at all. UserName is VaheOughourlian.
On 01/23/2009 12:08 AM, jedcred wrote:> [...] > This is because cryptsetup needs a newline at the end of the keyfile. > Just using a text editor like vim does not create a valid keyfile that > cryptsetup can equate with a key for an encrypted volume.yes, it does. if you ask it to.> This > addition is (at least) worth six hours of my time,I am so much in love with undocumented limitations... I share your pain here, I know the feelings> so hence may be > worth about that much to anyone who may read this valuable addition. > This limitation on cryptsetup and crypttab is not mentioned in the > crypttab nor cryptsetup manuals at all. > >any editor can add a newline. and simply adding to the current instructions "make sure each line ends with a newline character (which can be created by pressing <enter> at the end of the line" should be enough my .02 euros