个人工具

UbuntuHelp:EncryptedPrivateDirectoryUsbKey

来自Ubuntu中文

Wikibot讨论 | 贡献2008年12月16日 (二) 18:28的版本 (新页面: {{From|https://help.ubuntu.com/community/EncryptedPrivateDirectoryUsbKey}} {{Languages|UbuntuHelp:EncryptedPrivateDirectoryUsbKey}} == How to setup the use of a USB pen drive as a key for...)

(差异) ←上一版本 | 最后版本 (差异) | 下一版本→ (差异)
跳转至: 导航, 搜索

How to setup the use of a USB pen drive as a key for an ecryptfs private directory

Partition and format the USB stick

If it's not already done, you'll want to partition and format a filesystem to be used to hold the key data from ecryptfs:

 # fdisk /dev/sdb
 # mkfs.ext3 /dev/sdb1

Copy your .ecryptfs to the USB stick

Mount the pen drive on a temporary path, then copy .ecryptfs from your home directory to the temporary mountpoint.

 # mount /dev/sdb1 /mnt
 # cp -a /home/USERNAME/.ecryptfs/* /mnt
 # umount /mnt

Obtain the device's UUID

This step is required for automatizing the mounting of the pen drive to the proper path on boot.

 # blkid /dev/sdb1

Automatize

To mount on boot

Add the following line to /etc/fstab to mount the USB pen drive to the proper directory on boot:

 UUID=<UUID from blkid> /home/<username>/.ecryptfs          xfs     relatime        0       2

To mount on connection

There has to be a way to do this...