I am following below procedure to mount my Private directory
root@pc:~# mount -t ecryptfs /testdata/ /testdata/ Passphrase: Select cipher: 1) aes: blocksize = 16; min keysize = 16; max keysize = 32 2) blowfish: blocksize = 8; min keysize = 16; max keysize = 56 3) des3_ede: blocksize = 8; min keysize = 24; max keysize = 24 4) twofish: blocksize = 16; min keysize = 16; max keysize = 32 5) cast6: blocksize = 16; min keysize = 16; max keysize = 32 6) cast5: blocksize = 8; min keysize = 5; max keysize = 16 Selection [aes]: Select key bytes: 1) 16 2) 32 3) 24 Selection : Enable plaintext passthrough (y/n) [n]: Enable filename encryption (y/n) [n]: y Filename Encryption Key (FNEK) Signature [b9fc92f854a4c85b]: Attempting to mount with the following options: ecryptfs_unlink_sigs ecryptfs_fnek_sig=b9fc92f854a4c85b ecryptfs_key_bytes=16 ecryptfs_cipher=aes ecryptfs_sig=b9fc92f854a4c85b WARNING: Based on the contents of [/root/.ecryptfs/sig-cache.txt], it looks like you have never mounted with this key before. This could mean that you have typed your passphrase wrong. Would you like to proceed with the mount (yes/no)? : yes Would you like to append sig [b9fc92f854a4c85b] to [/root/.ecryptfs/sig-cache.txt] in order to avoid this warning in the future (yes/no)? : yes Successfully appended new sig to user sig cache file Mounted eCryptfs
I want to write a script to automate the whole process. I want to pass the pass phrases, cipher, key bytes etc using a file.
I tried below mount command based on ecryptfs.7 documenetation
mount -t ecryptfs -o key=passphrase:passphrase_passwd_file=/home/testpc/key.txt,no_sig_cache,verbose,ecryptfs_cipher=aes,ecryptfs_key_bytes=32,ecryptfs_enable_filename=y,ecryptfs_passthrough=n,ecryptfs_enable_filename_crypto=y secure_folder1/ secure_folder1/
where key.txt is
root@testpc:/home/testpc# cat key.txt passphrase_passwd=1234
Once above command is executed ,it asks for FNEK.
Filename Encryption Key (FNEK) Signature [13e8b1bc6090e91d]:
Is there any way I can pass this through file to automate the whole process ? Once the PC comes up, it should not ask me for any passphrase.
Will ecryptfs-add-passphrase of any help here ?
Thanks in Advance, Murali Marimekala