From: Moji <lordmoji@gmail.com>
To: dm-crypt@saout.de
Subject: Re: [dm-crypt] type one password, get many
Date: Sat, 15 Aug 2009 14:39:09 +0300 [thread overview]
Message-ID: <4A869E5D.8030904@gmail.com> (raw)
In-Reply-To: <1250270393.19325.21.camel@corn.betterworld.us>
My apologizes to Christophe for sending this to the bounce address, I
have recently changed my email client and I am still getting my settings
how I want them.
Ross,
I have a setup like that where my root partition contains a /etc/crypt
file where I keep keys.
After my root partition is decrypted I use the keys in my /etc/crypt
folder to decrypt my home partition. Although you could have it do as
many partitions as you wanted.
I do this in the same part of the init processes that I activate my swap.
I do this mainly because I like having my home directory separate from
my root partition and I don't want to have to enter two passwords in at
once.
The key I use is 1MB generated from /dev/random, it takes awhile to
generate the key but if you want I can send you the really simple script
I use to generate them.
As I use luks I have my password on my home directory in the second
slot, in case my root partition ever became corrupted and I didn't have
access to the key.
Here is the relevant part of my /etc/init.d/localmount, I kept the swap
activation part in just for reference of where I placed the code:
ebegin "Activating encrypted swap"
#added to enable encrypted swap
unset open_loop_dev
open_loop_dev="$(/sbin/losetup -f)"
/sbin/losetup "${open_loop_dev}" /swap.lpb &> /dev/null
/sbin/cryptsetup -c aes-xts-essiv:sha256 -s 512 -h sha512 -d dev/urandom
create swap "${open_loop_dev}" &> /dev/null
/sbin/mkswap /dev/mapper/swap &> /dev/null
/sbin/swapon -a &> /dev/null
unset open_loop_dev
eend $?
#added to enable encrypted home
ebegin "Mounting encrypted home directory"
/sbin/cryptsetup luksOpen /dev/sda4 home --key-file /etc/crypt/home.key
&> /dev/null
/bin/mount /dev/mapper/home /home &> /dev/null
#added to make sure if there is a crash jfs will recover
if [ -z "$(/bin/mount | grep /dev/mapper/home 2> /dev/null )" ]; then
/sbin/fsck.jfs /dev/mapper/home
/bin/mount /dev/mapper/home /home &> /dev/null
fi
if [ -z "$(/bin/mount | grep /dev/mapper/home 2> /dev/null )" ]; then
/sbin/fsck.jfs -afv /dev/mapper/home
/bin/mount /dev/mapper/home /home &> /dev/null
fi
eend $?
Ross Boylan wrote:
> > Someone referred recently to a scenario in which a human would type in
> > the password for the root partition, and then the passwords for the
> > other partitions would come from a file in /etc.
> >
> > Could anyone provide some more details about how that would work, and
> > whether it is advisable? Clearly someone with access to the live system
> > could get the passwords for all but root, and someone who, e.g., stole
> > the disk, would only need to crach one password. I think those limits
> > would be acceptable to me; are there others?
> >
> > It is useful for me to have quite a few partitions (I've just discovered
> > I need more so I can control mount options better), and typing in a
> > whole bunch of passwords on boot is pretty tedious.
> >
> > Thanks.
> > Ross Boylan
> >
> > _______________________________________________
> > dm-crypt mailing list
> > dm-crypt@saout.de
> > http://www.saout.de/mailman/listinfo/dm-crypt
> >
Ross Boylan wrote:
> Someone referred recently to a scenario in which a human would type in
> the password for the root partition, and then the passwords for the
> other partitions would come from a file in /etc.
>
> Could anyone provide some more details about how that would work, and
> whether it is advisable? Clearly someone with access to the live system
> could get the passwords for all but root, and someone who, e.g., stole
> the disk, would only need to crach one password. I think those limits
> would be acceptable to me; are there others?
>
> It is useful for me to have quite a few partitions (I've just discovered
> I need more so I can control mount options better), and typing in a
> whole bunch of passwords on boot is pretty tedious.
>
> Thanks.
> Ross Boylan
>
> _______________________________________________
> dm-crypt mailing list
> dm-crypt@saout.de
> http://www.saout.de/mailman/listinfo/dm-crypt
>
prev parent reply other threads:[~2009-08-15 11:39 UTC|newest]
Thread overview: 8+ messages / expand[flat|nested] mbox.gz Atom feed top
2009-08-14 17:19 [dm-crypt] type one password, get many Ross Boylan
2009-08-14 19:09 ` Ross Boylan
2009-08-14 20:41 ` Ross Boylan
2009-08-16 19:44 ` Jonas Meurer
2009-08-16 21:08 ` Ross Boylan
2009-08-16 23:14 ` Moji
2009-08-17 14:42 ` Jonas Meurer
2009-08-15 11:39 ` Moji [this message]
Reply instructions:
You may reply publicly to this message via plain-text email
using any one of the following methods:
* Save the following mbox file, import it into your mail client,
and reply-to-all from there: mbox
Avoid top-posting and favor interleaved quoting:
https://en.wikipedia.org/wiki/Posting_style#Interleaved_style
* Reply using the --to, --cc, and --in-reply-to
switches of git-send-email(1):
git send-email \
--in-reply-to=4A869E5D.8030904@gmail.com \
--to=lordmoji@gmail.com \
--cc=dm-crypt@saout.de \
/path/to/YOUR_REPLY
https://kernel.org/pub/software/scm/git/docs/git-send-email.html
* If your mail client supports setting the In-Reply-To header
via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line
before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox