我正在使用 ecryptyfs 在我的 PC (Debian wheezy) 中存储一些敏感数据。数据位于分区中,并且该分区在启动时使用 /etc/fstab
自动安装,我已使用正确的参数设置了 /root/.ecryptfsrc
。我的.ecryptfsrc
内容如下:
key=passphrase:passphrase_passwd_file=/mnt/usb/password.txt
ecryptfs_sig=deadbeefdeadbeef
ecryptfs_cipher=aes
ecryptfs_key_bytes=16
ecryptfs_passthrough=n
ecryptfs_enable_filename_crypto=n
系统重新启动后,该分区已正确安装。到目前为止还好。
我还需要将这些敏感数据传输到 USB 驱动器中的远程位置。所以我想用 ext2 fs 格式化 USB 驱动器并使用 ecryptfs 挂载它。我也不想重复使用密码,并希望在安装 ecryptfs 时为每个 USB 驱动器提供一次性密码。
ext2 分区的格式化和安装按预期进行。我使用 ecryptfs 挂载新 USB 设备的命令如下。密码(临时)存储在 /root/usbpasswd.txt
中:
mount -t ecryptfs \
-o "rw,key=passphrase:passphrase_passwd_file=/root/usbpasswd.txt,\
ecryptfs_unlink_sigs,ecryptfs_cipher=aes,ecryptfs_key_bytes=16,\
ecryptfs_passthrough=n,ecryptfs_enable_filename_crypto=y" \
/mnt/usb2/ /mnt/usb2/
我没有使用文件中的密码安装新格式化的/mnt/usb2
,而是提示输入密码文件
,如下所示:
Passphrase File: /root/usbpasswd.txt
Passphrase File: /mnt/usb/password.txt
Passphrase File: /root/usbpasswd.txt
Passphrase File: ^C
这里可能出了什么问题?
感谢和问候,
最佳答案
我也遇到过同样的问题。
虽然手册中写的是使用
-o key=passphrase:passphrase_passwd_file=/root/usbpasswd.txt
工作命令有不同的选项:
-o passphrase_passwd_file=/root/usbpasswd.txt
希望有帮助。干杯。
关于debian - 使用 ecryptfs 挂载多个目录,我们在Stack Overflow上找到一个类似的问题: https://stackoverflow.com/questions/20248427/