Linux - Software This forum is for Software issues.
Having a problem installing a new program? Want to know which application is best for the job? Post your question in this forum. |
Notices |
Welcome to LinuxQuestions.org, a friendly and active Linux Community.
You are currently viewing LQ as a guest. By joining our community you will have the ability to post topics, receive our newsletter, use the advanced search, subscribe to threads and access many other special features. Registration is quick, simple and absolutely free. Join our community today!
Note that registered members see fewer ads, and ContentLink is completely disabled once you log in.
Are you new to LinuxQuestions.org? Visit the following links:
Site Howto |
Site FAQ |
Sitemap |
Register Now
If you have any problems with the registration process or your account login, please contact us. If you need to reset your password, click here.
Having a problem logging in? Please visit this page to clear all LQ-related cookies.
Get a virtual cloud desktop with the Linux distro that you want in less than five minutes with Shells! With over 10 pre-installed distros to choose from, the worry-free installation life is here! Whether you are a digital nomad or just looking for flexibility, Shells can put your Linux machine on the device that you want to use.
Exclusive for LQ members, get up to 45% off per month. Click here for more info.
|
 |
10-25-2008, 11:42 PM
|
#1
|
Member
Registered: Oct 2004
Location: India
Distribution: FC 12
Posts: 233
Rep:
|
How does go about creating encrypted files systems
Hello folks,
How does one go about creating encrypted file system, so that when it is accessed it asks for a password. I under stand this is possible to create an encrypted VFAT ( windows) file system .
I will elaborate. I have a laptop and also one portable USB hard disk. The data is sensitive, and if the laptop or the portable hard disk is lost, others may have access to all my personal information, business information etc. Therefore the encrypted hard disk.
Thanks in advance.
Prabhat Soni
|
|
|
10-26-2008, 02:04 AM
|
#2
|
HCL Maintainer
Registered: Jun 2003
Location: McCalla, AL, USA
Distribution: Gentoo on headless; Arch on everything that requires a GUI
Posts: 6,941
Rep: 
|
My Linux filesystems are encrypted with LUKS - Linux Unified Key Setup
|
|
|
10-27-2008, 12:55 AM
|
#3
|
Member
Registered: Oct 2004
Location: India
Distribution: FC 12
Posts: 233
Original Poster
Rep:
|
Thanks a lot sir,
I created a encrypted ext3 file system on my USB flash disk, and it worked perfectly.
To help others I am listing the steps:
(1) Step -1
# dd if=/dev/urandom of=/dev/sdc
This fills up the pen drive with the random data. Not necessary. But it enables good security.
(2) Step -2
# fdisk /dev/sdc
Create file system. I created a single partition on the pen drive.
(3) Step -3
# cryptsetup -v -y luksFormat /dev/sdc1
To format a luks (encrypted) device. It will ask for the password.
(4) Step -4
# cryptset luksOpen /dev/sdc1 sdc1
This will again ask for the same luks password. It will map the physical (encrypted) partition (/dev/sdc1) to the logical (unencrypted) device sdc1. After this the mapped device ( logical device) will be available as /dev/mapper/sdc1. Now a file system is made on this logical device. In fact now it is like any ordinary partition over which file system can be made and later mounted.
(5) Step -5
# mkfs.ext3 -j -L usbdisk -m 1 -O dir_index,filetype,sparse_super /dev/mapper/sdc1
This will create a journaling file system, with volume lebel as "usbdisk".
(6) Step -6
# mount /dev/mapper/sdc1 /mnt/sdc1
In future:
for mounting:
# cryptset luksOpen /dev/sdc1 sdc1
# mount /dev/mapper/sdc1 /mnt/sdc1
and for unmounting:
# umount /mnt/sdc1
# cryptsetup luksClose sdc1
But surprisingly this explicit mounting and unmounting is not required in future. When you insert the drive it automatically asks for a password. With the correct password the drive is automatically mounted (not at /mnt/sdc1 but at /media/usbdisk). Same is the case while umnounting.
prabhat Soni
|
|
|
10-27-2008, 01:05 AM
|
#4
|
HCL Maintainer
Registered: Jun 2003
Location: McCalla, AL, USA
Distribution: Gentoo on headless; Arch on everything that requires a GUI
Posts: 6,941
Rep: 
|
prabhat Soni,
Thanks for posting your HOW-TO. I didn't mention anything
about setting it up, because I use Slackware and am not
familiar with FC.
Maybe you should write it and post in the Linux Tutorials section.
|
|
|
All times are GMT -5. The time now is 11:13 AM.
|
LinuxQuestions.org is looking for people interested in writing
Editorials, Articles, Reviews, and more. If you'd like to contribute
content, let us know.
|
Latest Threads
LQ News
|
|