IT运维管理,创造商业价值!
中国IT运维网首页 | 资讯中心 | 运维管理 | 信息安全 | CIO视界 | 云计算 | 最佳案例 | 运维资源 | 专题策划 | 知识库 | 论坛

用Cryptmount保护文件系统和交换空间(1)

2008年03月27日
/

Cryptmount允许你加密文件系统和交换空间,一个加密的文件系统能象一个正常的文件系统一样存储在一个块设备上—例如,使用/dev/sda2—或者在另一个文件系统中的一个正常文件。后一种方法在你使用一个加密文件系统工作而不改变分区表或使用逻辑卷管理(LVM)时显得特别顺手。

Cryptmount设置是Linux内核在设备映射层完成的,这就意味着你可以在加密设备映射块文件上创建任意受支持的文件系统类型。Cryptmount处理设备映射加密并挂载文件系统,Cryptmount的简单用法不需要你知道任何细节。

Cryptmount打包在Ubuntu Gutsy Universe中,在一些Slackware和Gentoo社区中也可下载,在Cryptmount的项目主页(http://sourceforge.net/projects/cryptmount/)上也可以下载到RPM包。默认情况下,cryptmount-setup倾向于在/home目录下创建一个目录用于存放加密内容。

# cryptmount-setup
********************************
* cryptmount setup 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 should consult the cryptmount manual page.
*
...
  Please enter a target name for your filesystem
  
  [opaque]: my-encrypted-files
  Which user should own the filesystem (leave blank for root)
  
  []: 
  Please specify where "my-encrypted-files" should be mounted
  
  [/home/crypt]:       
  Enter the filesystem size (in MB)
  
  [64]: 256
  Enter a filename for your encrypted container
  
  [/home/crypto.fs]: 
  Enter a location for the keyfile
  
  [/etc/cryptmount/my-encrypted-files.key]: 
...
enter new password for target "my-encrypted-files": 

confirm password: 

Formatting encrypted filesystem...

enter password for target "my-encrypted-files": 


Your new encrypted filesystem is now ready for use.

To access, try:

    cryptmount my-encrypted-files
    cd /home/crypt
After you have finished using the filesystem, try:

    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

注意cryptmount --unmount消息,尽管Linux内核会把/home/crypt看做另外一个文件系统,但你仍然不能umount /home/crypt,因为Cryptmount仍然认为它是激活的,如果你那样做了,内核文件系统将不能卸载,但是Cryptmount可以让你重新挂载它,并给你一个消息“create ioctl failed: Device or resource busy”。


共4页: 1 [2] [3] [4] 下一页
 第 1 页:  第 2 页:文件卸载
 第 3 页:加密文件系统  第 4 页:交换空间
发表评论请到:http://bbs.cnitom.com

相关阅读

图文热点

详细剖析:企业采用Linux系统注意事项
详细剖析:企业采用Linux系统注意事项你是否已经厌烦了整日为Windows Sever打补丁,是否已经开始怀疑Windows Sever 服...
揭穿零日漏洞的七大误区
揭穿零日漏洞的七大误区又过了一个月,又有一个零日漏洞被报告,而恶意攻击者借助恶意软件,发动了钻这个...

本类热点