Search Perform an advanced search query SOFTPEDIA
 
SOFTPEDIA
Updated one minute ago
HomeSubmit a program for being reviewedAdvertise on our websiteGet help on surfing our websitesSend us your feedbackGet information about our XML/RSS backend and how to use itBrowse the news archiveVisit our discussion forumVizitati forumul in limba romana



KLIP
  1. HOME
  2. SCIENCE
  3. TECHNOLOGY
  4. WEBMASTER
  5. SECURITY
  6. MICROSOFT
  7. LINUX
  8. APPLE
  9. GAMES
  10. TELECOMS
  11. REVIEWS
  12. LIFE & STYLE
  13. EDITORIALS
  14. INTERVIEWS
  15. RSS
Welcome!
Hello, Guest

Login if you have a Softpedia.com account.

Otherwise, register for one.

OTHER TIPS, TRICKS AND TUTORIALS

How to Setup an Encrypted Filesystem

- Create an encrypted partition for your sensitive files.

By: Mihai Marinof, Linux Editor

People think about encrypting some or all their files for several reasons. Whether they can't depend on physical security to keep their files safe or they're carrying around a portable laptop with sensitive files and they're afraid of it being stolen or who knows for what other reasons. The encryption process will obscure certain information, making it unreadable without a special password or passcode.

This article will explain how to setup an encrypted filesystem under Fedora Core Linux, using only Fedora tools. No external tools will require compiling and installing. After following this guide, your Linux system will have a new partition where you can move your sensitive files. This new partition will be encrypted at all times and reading the files in it won't be possible unless the proper password is used. Your current filesystem will be kept intact so don't worry about the possibility of damaging any files on your hard drive. It's not possible.

- First, load the loop blockdevice adaptor by executing the following command:

CODE

modprobe cryptoloop && lsmod | grep cryptoloop


If everything goes well, this command will list cryptoloop as a loaded kernel module.

- Next, you'll need to choose which algorithm to be used for encrypting the filesystem. To take a look at which algorithms are available on your system, run the command:

CODE

modinfo /lib/modules/2.6.18-1/kernel/crypto/*


Note that 2.6.18-1 is my current running kernel, which should differ from yours. If you don't know what's the current version of your kernel, you can find it out by running uname -r.

- Now you need to create a file block as your filesystem. Its size can vary depending on your needs but it shouldn't overtake the size of the current disk's free space. For this tutorial, I've created a 650MB file block so it could easily be burned onto a CDR. To create the 650MB file block, run the command:

CODE

dd if=/dev/zero bs=1k count=665600 of=/root/secure


- The next step consists of associating this file block with the encrypt type and setting a password for making it readable and finally creating the ext3 filesystem:
(The last character from /dev/loop0 is a zero, not a big o).

NOTE: The first command will ask you for a password. This password will be used for mounting the encrypted filesystem at a later time so don't lose it!

CODE

losetup -e serpent /dev/loop0 /root/secure
mkfs.ext3 /dev/loop0


- It's now time to check the encrypted filesystem setup by mounting the partition:

CODE

mkdir /mnt/secure
mount -t ext3 /dev/loop0 /mnt/secure


If everything worked out fine, all files stored in "/mnt/secure" directory will be encrypted. After you've moved all the sensitive files to that partition, you should umount and disable it by using the commands:

CODE

umount /mnt/secure
losetup -d /dev/loop0
sync


In order to mount the encrypted filesystem at a later time, run the following commands:

CODE

losetup -e serpent /dev/loop0 /root/secure
(you will be asked for the encrypt password you've set earlier)
mount -t ext3 /dev/loop0 /mnt/secure


NOTE: If you enter the wrong encrypt password, the mount will fail and you will have to detach the file using losetup -d /dev/loop0 and start over.

To make things easier, you can make a couple of bash aliases in order to make mounting and unmounting the encrypted filesystem easier by adding these to the /root/.bashrc file:

CODE

alias mountsecure='losetup -e serpent /dev/loop0 /root/secure; mount -t ext3 /dev/loop0 /mnt/secure'
alias umountsecure='umount /dev/loop0; losetup -d /dev/loop0; sync'


To use your encrypted filesystem after adding the aliases, you'll only have to run the commands:

CODE

To mount it:
# mountsecure
(enter the encrypt password)

To umount and disable it:
# umountsecure



MORE RELATED ARTICLES: FreeNX Installation Guide for Fedora 6 Installing TorrentFlux and XAAMP Grant Root Privileges to Regular Users Installing NTFS Write Support on Fedora/Ubuntu Setting Up a SHOUTcast Server DSP Plug-In Apache VirtualHosting Guide Resetting a Forgotten Root Password
 
Comments | Link here | Subscribe
Print | Send to friend
Today's News | Yesterday's News

Search:

13th December 2006, 09:53 GMT | Copyright (c) 2006 Softpedia | Contact:
Read by 6,101 user(s) | Rating: | 12 vote(s) so far | Cast your vote:
How to Setup an Encrypted Filesystem - USER OPINIONS

Comment #1 by sergon on 2007-11-22, 23:18 GMT reply to this comment 
I did an spanish translation of this article.

Hice una traducción al español de este artículo, chécalo aqui:

linuxtotal.com.mx

Reply #1.1 by sergon on 2007-11-22, 23:19 GMT
http://www.linuxtotal.com.mx/index.php?cont=info_seyre_007

Reply #1.2 by marius.nestor on 2007-11-22, 23:54 GMT
Thank you!


go to top


SHARE YOUR OPINION ABOUT How to Setup an Encrypted Filesystem

Since you are not logged on, your comments will have to be approved before being displayed.
Click here to login, or register.
Your Name:
Your Email:
Type in the result:
Your Opinion:
 


DO YOU WANT TO CONTACT US?  

If you have some comments or you want to send us some information you can send us an email directly to .
You can use the form below for the same purpose.
Your full name: (at least 3 characters)
Your email address: (at least 5 characters)
Message subject: (at least 5 characters)
Message text:
(at least 10 characters)
Type in the result:
 
 



© 2001 - 2008 Softpedia. All rights reserved.
Softpedia™ and Softpedia™ logo are registered trademarks of SoftNews NET SRL.
Copyright Information | Privacy Policy | Terms of Use | Contact Softpedia | Update your software | Archive