Use Cryptmount to protect the file system and swap space

Source: Internet
Author: User
Tags crypt
Article Title: Use Cryptmount to protect the file system and swap space. Linux is a technology channel of the IT lab in China. Includes basic categories such as desktop applications, Linux system management, kernel research, embedded systems, and open source.

Cryptmount allows you to encrypt file systems and swap space. an encrypted file system can be stored on a block device like a normal file system-for example, use/dev/sda2-or a normal file in another file system. The latter method is especially handy when you use an encrypted file system without changing partition tables or using logical volume management (LVM.

The Cryptmount settings are completed by the Linux kernel at the device ing layer. This means that you can create any supported file system types on the encrypted device ing block file. Cryptmount processes device ing encryption and mounts the file system. You do not need to know any details about the simple usage of Cryptmount.

Cryptmount is packaged in Ubuntu Gutsy Universe, which can also be downloaded in some Slackware and Gentoo communities and can also be downloaded to the RPM package on the Cryptmount project home page (http://sourceforge.net/projects/cryptmount. By default, cryptmount-setup tends to create a directory in the/home directory to store encrypted content.

# Cryptmount-setup
********************************
* Cryptmount setup script [cryptmount configuration script]
*
* This program will allow you to setup a secure filing-system that will
* Be managed by "cryptmount". You will be able to select basic features
* Such as the location and size of the filesystem-if you want more
* Advanced features, you shoshould consult the cryptmount manual page.
* [This program allows you to set a secure file system through cryptmount. You can select the base
This feature includes location and file system size. If you want more advanced features, you should
Refer to the cryptmount help manual]
...
Please enter a target name for your filesystem
Enter a name for your file system]
[Opaque]: my-encrypted-files
Which user shoshould own the filesystem (leave blank for root)
[Which User owns the file system? leave it blank to indicate root ownership]
[]:
Please specify where "my-encrypted-files" shocould be mounted
[Point out where my-encrypted-files will be mounted]
[/Home/crypt]:
Enter the filesystem size (in MB)
[Size of the input file system]
[64]: 256
Enter a filename for your encrypted container
[Specify a file name for the encrypted container]
[/Home/crypto. fs]:
Enter a location for the keyfile
[Enter the local key file]
[/Etc/cryptmount/my-encrypted-files.key]:
...
Enter new password for target "my-encrypted-files ":
[Specify a new password for my-encrypted-files]
Confirm password:
Enter the password again]
Formatting encrypted filesystem...
Format the file system]
Enter password for target "my-encrypted-files ":
[Enter the password for my-encrypted-files]

Your new encrypted filesystem is now ready for use.
[Now your encrypted file system is ready for use]
To access, try:
[To access, try the following command]
Cryptmount my-encrypted-files
Cd/home/crypt
After you have finished using the filesystem, try:
[After using the file system, try the following command]
Cd
Cryptmount -- unmount my-encrypted-files

# Cryptmount my-encrypted-files
Enter password for target "my-encrypted-files ":
E2fsck 1.40.2 (12-Jul-2007)
/Dev/mapper/my-encrypted-files: clean, 11/65536 files, 18561/262144 blocks

# Df/home/crypt
Filesystem 1K-blocks Used Available Use % Mounted on
/Dev/mapper/my-encrypted-files
253871 10288 230476 5%/home/crypt

Note the cryptmount -- unmount message. Although the Linux kernel regards/home/crypt as another file system, you still cannot umount/home/crypt because Cryptmount still considers it to be activated, if you do this, the kernel file system cannot be detached, but Cryptmount allows you to re-mount it and send you a message "create ioctl failed: Device or resource busy ".

[1] [2] [3] [4] Next page

Related Article

Contact Us

The content source of this page is from Internet, which doesn't represent Alibaba Cloud's opinion; products and services mentioned on that page don't have any relationship with Alibaba Cloud. If the content of the page makes you feel confusing, please write us an email, we will handle the problem within 5 days after receiving your email.

If you find any instances of plagiarism from the community, please send an email to: info-contact@alibabacloud.com and provide relevant evidence. A staff member will contact you within 5 working days.

A Free Trial That Lets You Build Big!

Start building with 50+ products and up to 12 months usage for Elastic Compute Service

  • Sales Support

    1 on 1 presale consultation

  • After-Sales Support

    24/7 Technical Support 6 Free Tickets per Quarter Faster Response

  • Alibaba Cloud offers highly flexible support services tailored to meet your exact needs.