Adapted Dustin's instructions today as I needed something more automatic.
You can copy line-by-line to the terminal or save it and call it with bash or sh:
_______________________________________ ROOT=/home/.ecryptfs/$USER TARGET=/mnt/$USER
# ROOT should be the parent of the .ecryptfs and .Private folders
sudo mkdir -p $TARGET cd $ROOT
echo Type your password: PASS=$(ecryptfs-unwrap-passphrase .ecryptfs/wrapped-passphrase | sed s/Passphrase:\ //) SIG1=$(head -n1 .ecryptfs/Private.sig) SIG2=$(tail -n1 .ecryptfs/Private.sig)
echo Passphrase: echo $PASS echo Signatures: echo $SIG1 echo $SIG2
echo Should be empty: sudo keyctl clear @u sudo keyctl list @u
echo Do not type your anything: echo $PASS | sudo ecryptfs-add-passphrase --fnek
echo Sould have signatures: sudo keyctl list @u
echo Mounting $ROOT on $TARGET... sudo mount -t ecryptfs -o key=passphrase,ecryptfs_cipher=aes,ecryptfs_key_bytes=16,ecryptfs_passthrough=no,ecryptfs_enable_filename_crypto=yes,ecryptfs_sig=$SIG1,ecryptfs_fnek_sig=$SIG2,passwd=$(echo $PASS) .Private $TARGET
ls $TARGET
Adapted Dustin's instructions today as I needed something more automatic.
You can copy line-by-line to the terminal or save it and call it with bash or sh:
_______ _______ _______ _______ _______ ____ .ecryptfs/ $USER
ROOT=/home/
TARGET=/mnt/$USER
# ROOT should be the parent of the .ecryptfs and .Private folders
sudo mkdir -p $TARGET
cd $ROOT
echo Type your password: ecryptfs- unwrap- passphrase .ecryptfs/ wrapped- passphrase | sed s/Passphrase:\ //) Private. sig) Private. sig)
PASS=$(
SIG1=$(head -n1 .ecryptfs/
SIG2=$(tail -n1 .ecryptfs/
echo Passphrase:
echo $PASS
echo Signatures:
echo $SIG1
echo $SIG2
echo Should be empty:
sudo keyctl clear @u
sudo keyctl list @u
echo Do not type your anything: add-passphrase --fnek
echo $PASS | sudo ecryptfs-
echo Sould have signatures:
sudo keyctl list @u
echo Mounting $ROOT on $TARGET... ecryptfs_ cipher= aes,ecryptfs_ key_bytes= 16,ecryptfs_ passthrough= no,ecryptfs_ enable_ filename_ crypto= yes,ecryptfs_ sig=$SIG1, ecryptfs_ fnek_sig= $SIG2,passwd= $(echo $PASS) .Private $TARGET
sudo mount -t ecryptfs -o key=passphrase,
ls $TARGET