LinuxQuestions.org
Download your favorite Linux distribution at LQ ISO.
Go Back   LinuxQuestions.org > Forums > Linux Forums > Linux - Newbie
User Name
Password
Linux - Newbie This Linux forum is for members that are new to Linux.
Just starting out and have a question? If it is not in the man pages or the how-to's this is the place!

Notices


Reply
  Search this Thread
Old 05-30-2010, 10:38 PM   #1
mike11
Member
 
Registered: Apr 2009
Posts: 222

Rep: Reputation: 17
Auto-mounting an ecryptfs partition which is on a usb drive


I have an ecryptfs partition on a usb drive, system runs Debian squeeze.

What I'd like to have is that when I connect the drive it will be auto. mounted and I'll either have to enter the passphrase or it will already be in the keyring (even better).

It seems ecryptfs can auto-mount a directory but I want to auto-mount an entire encrypted partition. Is this possible?.

Also, can I have another encrypted directory, say ~/Private, at the same time or can ecryptfs handle only one at a time?.

Thanks,
Mike.
 
Old 05-30-2010, 11:21 PM   #2
Simon Bridge
LQ Guru
 
Registered: Oct 2003
Location: Waiheke NZ
Distribution: Ubuntu
Posts: 9,211

Rep: Reputation: 198Reputation: 198
You do not mount directories. Directories are files.

eCryptfs has to work as a layer on top of another filesystem.
When you mount eCryptfs over a directory, it decrypts the files in it... allowing plain-text access.
overview of concepts including dicussions of the sorts of security issues that ecryptfs is supposed to solve.

You can get ecryptfs "partitions" to mount at boot easily enough:
https://help.ubuntu.com/9.04/serverg.../ecryptfs.html
... the approach is to mount the partition fs first, then mount ecryptfs over the top of that.

presumably you can do something similar for hotpluggable devices in the udev rules.

Cannot see any reason you cannot have more than one ecryptfs encrypted directory. Easy to check. Try it and see.
 
Old 06-01-2010, 06:53 AM   #3
mike11
Member
 
Registered: Apr 2009
Posts: 222

Original Poster
Rep: Reputation: 17
Thanks Simon.

I think I've got it working. Two partitions on the USB stick, encrypted and unecrypted.
The encrypted gets mounted auto. via fstab, first with UUID (for example mounting /dev/sdc1 to /media/usb1) and then another entry for ecryptfs. Default ecryptfs mount options in ~/.ecryptfsrc

Cheers.
 
Old 06-01-2010, 11:44 AM   #4
Simon Bridge
LQ Guru
 
Registered: Oct 2003
Location: Waiheke NZ
Distribution: Ubuntu
Posts: 9,211

Rep: Reputation: 198Reputation: 198
Well done. Knew you'd do it.
 
  


Reply


Thread Tools Search this Thread
Search this Thread:

Advanced Search

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is Off
HTML code is Off



Similar Threads
Thread Thread Starter Forum Replies Last Post
Auto-mounting external NTFS USB hard drive. Cotobear Slackware 5 02-07-2010 03:46 AM
Auto-Mounting USB Flash Drive plehman Linux - Newbie 12 01-05-2009 10:41 AM
auto mounting usb flash drive lumak Slackware 4 12-01-2008 12:37 AM
auto-mounting USB drive slzckboy Linux - General 4 01-12-2006 04:56 PM

LinuxQuestions.org > Forums > Linux Forums > Linux - Newbie

All times are GMT -5. The time now is 11:43 PM.

Main Menu
Advertisement
My LQ
Write for LQ
LinuxQuestions.org is looking for people interested in writing Editorials, Articles, Reviews, and more. If you'd like to contribute content, let us know.
Main Menu
Syndicate
RSS1  Latest Threads
RSS1  LQ News
Twitter: @linuxquestions
Facebook: linuxquestions Google+: linuxquestions
Open Source Consulting | Domain Registration