Debian 使用ecryptfs挂载多个目录

Debian 使用ecryptfs挂载多个目录,debian,ecryptfs,Debian,Ecryptfs,我正在使用ecryptyfs在我的电脑中存储一些敏感数据(Debian wheezy)。数据在一个分区中,该分区在启动时使用/etc/fstab自动装入。我已使用正确的参数设置了/root/.ecryptfsrc。my.ecryptfsrc的内容如下: key=passphrase:passphrase_passwd_file=/mnt/usb/password.txt ecryptfs_sig=deadbeefdeadbeef ecryptfs_cipher=aes ecryptfs_key_

我正在使用ecryptyfs在我的电脑中存储一些敏感数据(Debian wheezy)。数据在一个分区中,该分区在启动时使用
/etc/fstab
自动装入。我已使用正确的参数设置了
/root/.ecryptfsrc
。my
.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
Passphrase File: /root/usbpasswd.txt
Passphrase File: /mnt/usb/password.txt
Passphrase File: /root/usbpasswd.txt
Passphrase File: ^C
系统重新启动后,此分区已正确装入。到目前为止还不错

我还需要将这些敏感数据传输到USB驱动器中的远程位置。所以我想用ext2fs格式化一个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
,而是提示输入
密码短语文件
,如下所示:

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
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
希望能有帮助。干杯