<?xml version="1.0" encoding="UTF-8"?>
<rss version="2.0"
	xmlns:content="http://purl.org/rss/1.0/modules/content/"
	xmlns:wfw="http://wellformedweb.org/CommentAPI/"
	xmlns:dc="http://purl.org/dc/elements/1.1/"
	xmlns:atom="http://www.w3.org/2005/Atom"
	xmlns:sy="http://purl.org/rss/1.0/modules/syndication/"
	xmlns:slash="http://purl.org/rss/1.0/modules/slash/"
	>

<channel>
	<title>KennyNet &#187; intrepid</title>
	<atom:link href="http://www.kennynet.co.uk/tag/intrepid/feed/" rel="self" type="application/rss+xml" />
	<link>http://www.kennynet.co.uk</link>
	<description>Ramblings of a PHP developer</description>
	<lastBuildDate>Fri, 02 Dec 2011 14:05:13 +0000</lastBuildDate>
	<language>en</language>
	<sy:updatePeriod>hourly</sy:updatePeriod>
	<sy:updateFrequency>1</sy:updateFrequency>
	<generator>http://wordpress.org/?v=3.2.1</generator>
		<item>
		<title>Ubuntu jaunty upgrade: Encrypted home not mounting</title>
		<link>http://www.kennynet.co.uk/2009/04/27/ubuntu-jaunty-upgrade-encrypted-home-not-mounting/</link>
		<comments>http://www.kennynet.co.uk/2009/04/27/ubuntu-jaunty-upgrade-encrypted-home-not-mounting/#comments</comments>
		<pubDate>Mon, 27 Apr 2009 08:34:35 +0000</pubDate>
		<dc:creator>Kenny Millington</dc:creator>
				<category><![CDATA[Linux]]></category>
		<category><![CDATA[encrypted]]></category>
		<category><![CDATA[intrepid]]></category>
		<category><![CDATA[jaunty]]></category>
		<category><![CDATA[libpam-mount]]></category>
		<category><![CDATA[ubuntu]]></category>

		<guid isPermaLink="false">http://www.kennynet.co.uk/?p=98</guid>
		<description><![CDATA[The Problem I took the plunge to upgrade my laptop to Jaunty yesterday and upon reboot the first thing I noticed was that my encrypted home partition was no longer being mounted. After enabling pam_mount&#8217;s debug option and tracing through the problem it turned out to be that mount.crypt was now unable to mount my [...]]]></description>
			<content:encoded><![CDATA[<p><strong>The Problem</strong><br />
I took the plunge to upgrade my laptop to Jaunty yesterday and upon reboot the first thing I noticed was that my encrypted home partition was no longer being mounted. After enabling pam_mount&#8217;s debug option and tracing through the problem it turned out to be that mount.crypt was now unable to mount my encrypted partition.</p>
<p>mount.crypt fails to mount the partition because when it calls cryptsetup it fails to pass the keysize parameter so cryptsetup uses the default (256), which is fine if you used a 256 bit encryption key, but unfortunately I&#8217;d used a 128-bit encryption key so therefore cryptsetup fails to setup the encrypted volume correctly thus causing the subsequent call to mount to fail.</p>
<p><strong>The Solution</strong><br />
Fortunately I don&#8217;t let little things like that stop me from getting things working. Firstly I created a <a href="https://launchpad.net/~kmdm/+archive/ppa">patched libpam-mount package</a>  (LP: <a href="https://bugs.launchpad.net/bugs/367577">#367577</a>) that does pass the -s option through to cryptsetup, this then allows mount.crypt to successfully mount the encrypted volume.</p>
<p>However, pam_mount was still not able to mount the volume when I logged in, thankfully it only required a config tweak to match the new options that are now passed to mount.crypt, so my new pam_mount.conf.xml <volume...> config block now looks like this:-</p>
<pre>
&lt;volume
    user="kenny"
    fstype="crypt"
    path="/dev/sda3"
    mountpoint="/home/kenny"
    options="cipher=aes,hash=ripemd160,fsk_cipher=aes-128-ecb,fsk_hash=md5,
keyfile=/home/kenny.key"
/&gt;
</pre>
<p>(Annoyingly hash=ripemd160 has to be passed because cryptsetup defaults to that but mount.crypt defaults to and passes through &#8220;plain&#8221; unless told otherwise.)</p>
<p>Once this change was made (and the fixed packages installed), pam_mount was once again able to mount my encrypted home directory when I log in.</p>
]]></content:encoded>
			<wfw:commentRss>http://www.kennynet.co.uk/2009/04/27/ubuntu-jaunty-upgrade-encrypted-home-not-mounting/feed/</wfw:commentRss>
		<slash:comments>0</slash:comments>
		</item>
	</channel>
</rss>

