Различия
Здесь показаны различия между двумя версиями данной страницы.
Предыдущая версия справа и слева Предыдущая версия Следующая версия | Предыдущая версия | ||
wiki:руководство_по_ubuntu_server:безопасность:ecryptfs [2012/06/23 19:31] [eCryptfs] |
wiki:руководство_по_ubuntu_server:безопасность:ecryptfs [2012/06/24 14:23] (текущий) |
||
---|---|---|---|
Строка 4: | Строка 4: | ||
<style float-right> | <style float-right> | ||
[[wiki:руководство_по_ubuntu_server:безопасность:certificates|<-назад]] | | [[wiki:руководство_по_ubuntu_server:безопасность:certificates|<-назад]] | | ||
- | [[wiki:руководство_по_ubuntu_server:слежение|далее->]]</style> | + | [[wiki:руководство_по_ubuntu_server:мониторинг|далее->]]</style> |
=====eCryptfs===== | =====eCryptfs===== | ||
Строка 16: | Строка 16: | ||
====Использование eCryptfs==== | ====Использование eCryptfs==== | ||
- | First, install the necessary packages. From a terminal prompt enter: | + | Сначала установим необходимые пакеты. Введите в терминале: |
- | + | <code>sudo apt-get install ecryptfs-utils</code> | |
- | sudo apt-get install ecryptfs-utils | + | Теперь монтируем раздел, который должен быть зашифрован: |
- | + | <code>sudo mount -t ecryptfs /srv /srv</code> | |
- | Now mount the partition to be encrypted: | + | У вас поинтересуются некоторыми деталями как ecryptfs будет шифровать данные. |
- | + | ||
- | sudo mount -t ecryptfs /srv /srv | + | |
- | + | ||
- | You will then be prompted for some details on how ecryptfs should encrypt the data. | + | |
- | + | ||
- | To test that files placed in /srv are indeed encrypted copy the /etc/default folder to /srv: | + | |
- | + | ||
- | sudo cp -r /etc/default /srv | + | |
- | + | ||
- | Now unmount /srv, and try to view a file: | + | |
+ | Для проверки, что файлы, помещенные в /srv действительно шифруются, скопируйте каталог /etc/default в /srv: | ||
+ | <code>sudo cp -r /etc/default /srv</code> | ||
+ | Теперь размонтируйте /srv и попробуйте посмотреть файлы: | ||
+ | <code> | ||
sudo umount /srv | sudo umount /srv | ||
cat /srv/default/cron | cat /srv/default/cron | ||
- | + | </code> | |
- | Remounting /srv using ecryptfs will make the data viewable once again. | + | Повторное монтирование /srv с использованием ecryptfs делает данные снова читаемыми. |
====Автоматическое монтирование шифрованного раздела==== | ====Автоматическое монтирование шифрованного раздела==== | ||
- | There are a couple of ways to automatically mount an ecryptfs encrypted filesystem at boot. This example will use a /root/.ecryptfsrc file containing mount options, along with a passphrase file residing on a USB key. | + | Существует пара способов автоматически монтировать файловую систему, зашифрованную ecryptfs, на этапе загрузки. Этот пример использует файл /root/.ecryptfsrc, содержащий опции монтирования, вместе с файлом кодовой фразы, расположенным на USB ключе. |
- | + | ||
- | First, create /root/.ecryptfsrc containing: | + | |
+ | Сначала создадим /root/.ecryptfsrc, содержащий: | ||
+ | <code> | ||
key=passphrase:passphrase_passwd_file=/mnt/usb/passwd_file.txt | key=passphrase:passphrase_passwd_file=/mnt/usb/passwd_file.txt | ||
ecryptfs_sig=5826dd62cf81c615 | ecryptfs_sig=5826dd62cf81c615 | ||
Строка 49: | Строка 43: | ||
ecryptfs_passthrough=n | ecryptfs_passthrough=n | ||
ecryptfs_enable_filename_crypto=n | ecryptfs_enable_filename_crypto=n | ||
- | + | </code> | |
- | Adjust the ecryptfs_sig to the signature in /root/.ecryptfs/sig-cache.txt. | + | <note>Измените параметр **ecryptfs_sig** на сигнатуру из файла /root/.ecryptfs/sig-cache.txt.</note> |
- | + | Далее создадим файл кодовой фразы /mnt/usb/passwd_file.txt: | |
- | Next, create the /mnt/usb/passwd_file.txt passphrase file: | + | <code>passphrase_passwd=[secrets]</code> |
- | + | Теперь добавим необходимые строки в /etc/fstab: | |
- | passphrase_passwd=[secrets] | + | <code> |
- | + | ||
- | Now add the necessary lines to /etc/fstab: | + | |
/dev/sdb1 /mnt/usb ext3 ro 0 0 | /dev/sdb1 /mnt/usb ext3 ro 0 0 | ||
/srv /srv ecryptfs defaults 0 0 | /srv /srv ecryptfs defaults 0 0 | ||
+ | </code> | ||
+ | Убедитесь, что USB диск монтируется до шифрованного раздела. | ||
- | Make sure the USB drive is mounted before the encrypted partition. | + | Наконец, перегрузитесь и /srv будет смонтирован с использованием eCryptfs. |
- | + | ||
- | Finally, reboot and the /srv should be mounted using eCryptfs. | + | |
====Другие утилиты==== | ====Другие утилиты==== | ||
- | The ecryptfs-utils package includes several other useful utilities: | + | Пакет **ecryptfs-utils** включает несколько других полезных утилит: |
- | + | -- **ecryptfs-setup-private**: создает каталог ~/Private для помещения шифрованной информации. Эта утилита может запускаться непривилегированными пользователями для хранения данных защищенными от других пользователей системы. | |
- | ecryptfs-setup-private: creates a ~/Private directory to contain encrypted information. This utility can be run by unprivileged users to keep data private from other users on the system. | + | -- **ecryptfs-mount-private** и **ecryptfs-umount-private**: будут соответственно монтировать и демонтировать пользовательский каталог ~/Private. |
- | + | -- **ecryptfs-add-passphrase**: добавляет новую кодовую фразу в хранилище ключей ядра. | |
- | ecryptfs-mount-private and ecryptfs-umount-private: will mount and unmount respectively, a users ~/Private directory. | + | -- **ecryptfs-manager**: управляет такими объектами eCryptfs как ключи. |
- | + | -- **ecryptfs-stat**: позволяет вам посмотреть служебную информацию ecryptfs по файлу. | |
- | ecryptfs-add-passphrase: adds a new passphrase to the kernel keyring. | + | |
- | + | ||
- | ecryptfs-manager: manages eCryptfs objects such as keys. | + | |
- | + | ||
- | ecryptfs-stat: allows you to view the ecryptfs meta information for a file. | + | |
====Ссылки==== | ====Ссылки==== | ||
- | For more information on eCryptfs see the Launchpad project page. | + | -- Для дополнительной информации по eCryptfs смотрите [[https://launchpad.net/ecryptfs|страницу проекта на Launchpad]]. |
- | + | -- Есть также татьи в [[http://www.linuxjournal.com/article/9400|Linux Journal]] посвященные eCryptfs. | |
- | There is also a Linux Journal article covering eCryptfs. | + | -- Также для дополнительных опций ecryptfs смотрите [[http://manpages.ubuntu.com/manpages/precise/en/man7/ecryptfs.7.html|страницу руководства ecryptfs]]. |
- | + | -- Страница [[https://help.ubuntu.com/community/eCryptfs|eCryptfs Ubuntu Wiki]] также содержит дополнительную информацию. | |
- | Also, for more ecryptfs options see the ecryptfs man page. | + | |
- | + | ||
- | The eCryptfs Ubuntu Wiki page also has more details. | + | |
---- | ---- | ||
Строка 94: | Строка 76: | ||
<style float-right> | <style float-right> | ||
[[wiki:руководство_по_ubuntu_server:безопасность:certificates|<-назад]] | | [[wiki:руководство_по_ubuntu_server:безопасность:certificates|<-назад]] | | ||
- | [[wiki:руководство_по_ubuntu_server:слежение|далее->]]</style> | + | [[wiki:руководство_по_ubuntu_server:мониторинг|далее->]]</style> |