[CentOS-docs] Contribute to Centos wiki

Thu Jan 22 22:08:39 UTC 2009
jedcred <jedcred at gmail.com>

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.