How to автомобиль - mount в copied encrypted home

How хан I автомобиль - mount and использовал my encrypted home that I copied to another partition on the same hard disk?

гm running Ubuntu 11.10. My encrypted home is on sda1. There гve 2 users: userA and userB. Another partition is sda3 on which I have some other Восходит. BTW, sda1 is formatted эксперт EXT4, sda3 is formatted эксперт EXT3.

I did the following:

I logged out from GUI (Gnome) and changed (using Ctrl+Alt+F1) to the shell. From there I logged in, changed to вспотел (using я потею-s). After then I

created в new mountpoint (tmp) under /mnt (mkdir /mnt/tmp) mounted /dev/sda3 on that mountpoint /mnt/tmp (mount /dev/sda3 /mnt/tmp) copied my encrypted /home to /mnt/tmp using rsync (rsync --acvxASXH --progress --stats /home/ /mnt/tmp/).

After the “copy-procedure” I looked to my “new home” in /mnt/tmp and there I found the following 3 folders:

userA, 
userB,  
.ecryptfs

My structure for /dev/sda3 mounted on /mnt/tmp looks like the following (userB in ecryptfs гve not listed):

┬userA
│
├userB
│   
├.ecryptfs
    │
    ├userA
    │      ├ auto-mount
    │      ├ auto-umount            
    │      ├ Private.mnt
        │      ├ Private.sig
    │      ├  wrapped-passphrase
    │      ├ .wrapped-passphrase.recorded
    │   
    ├ .Private  
             ├ (encrypted file_1)
             ├ (encrypted file_2)
             ├ (encrypted file_n)

Now I would like that this copy of the оригинал home-directory should act with the same behavior эксперт the первоначальный home-directory means, that it should be автомобиль - mounted at reboot and give я access to my unencrypted поля and after logout all my поля should be encrypted again. Any suggestions?

7
задан 19 December 2012 в 09:08

1 ответ

Глядя на то, что вы хотите сделать, я бы сказал, используйте символические ссылки.

Автоматическое монтирование я бы сделал с fstab.

Вот как я это сделаю: -

запустите sudo blkid, чтобы получить UUID раздела

sudo cp / etc / fstab /etc/fstab.backup Затем отредактируйте fstab (например, с помощью sudo nano или gksu gedit) и добавьте эту строку:

UUID = / media / Media ntfs по умолчанию 0 0 Прежде чем делать это, убедитесь, что место монтирования / media / Media существует, затем перезагрузка.

Удалите все существующие символические ссылки (предварительно выполнив резервное копирование всех файлов).

rm -rf ~ / Videos & amp; & amp; ln -s / media / Media / your-folder / Videos ~ / Videos Повторите для всех папок, которые вы хотите отобразить в вашем домашнем каталоге.

Если это затруднительно, вы можете использовать настройку Ubuntu, так как это дает вам графический интерфейс для управления местоположением папок. Я бы сначала позаботился об автоматической установке si.

Надеюсь, это поможет.

0
ответ дан 19 December 2012 в 09:08

Другие вопросы по тегам:

Похожие вопросы: