<?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>Christoffer Kjølbæk &#187; Security</title>
	<atom:link href="http://ostehamster.dk/blog/index.php/category/security/feed/" rel="self" type="application/rss+xml" />
	<link>http://ostehamster.dk/blog</link>
	<description>I have a blog, therefore I am…</description>
	<lastBuildDate>Tue, 03 Jan 2012 22:37:34 +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>OpenWrt &#8211; tips &amp; tricks</title>
		<link>http://ostehamster.dk/blog/index.php/2007/04/17/openwrt-tips-tricks/</link>
		<comments>http://ostehamster.dk/blog/index.php/2007/04/17/openwrt-tips-tricks/#comments</comments>
		<pubDate>Tue, 17 Apr 2007 20:19:31 +0000</pubDate>
		<dc:creator>Christoffer Kjølbæk</dc:creator>
				<category><![CDATA[English]]></category>
		<category><![CDATA[Linux]]></category>
		<category><![CDATA[Security]]></category>
		<category><![CDATA[OpenWrt]]></category>

		<guid isPermaLink="false">http://ostehamster.dk/wordpress/?p=24</guid>
		<description><![CDATA[Change SSH port from 22 to e.g. 2222 Change the last line of the file /etc/init.d/S50dropbear to: /usr/sbin/dropbear -p 2222]]></description>
			<content:encoded><![CDATA[<p><strong>Change SSH port from 22 to e.g. 2222</strong><br />
Change the last line of the file /etc/init.d/S50dropbear to:</p>
<blockquote><p>/usr/sbin/dropbear -p 2222</p></blockquote>
]]></content:encoded>
			<wfw:commentRss>http://ostehamster.dk/blog/index.php/2007/04/17/openwrt-tips-tricks/feed/</wfw:commentRss>
		<slash:comments>0</slash:comments>
		</item>
		<item>
		<title>Encrypted home partition, using LUKS in Ubuntu Feisty Fawn</title>
		<link>http://ostehamster.dk/blog/index.php/2007/04/13/encrypted-home-partition-using-luks-in-ubunt-feisty-fawn/</link>
		<comments>http://ostehamster.dk/blog/index.php/2007/04/13/encrypted-home-partition-using-luks-in-ubunt-feisty-fawn/#comments</comments>
		<pubDate>Thu, 12 Apr 2007 23:24:41 +0000</pubDate>
		<dc:creator>Christoffer Kjølbæk</dc:creator>
				<category><![CDATA[English]]></category>
		<category><![CDATA[Feisty Fawn]]></category>
		<category><![CDATA[Linux]]></category>
		<category><![CDATA[Paranoia]]></category>
		<category><![CDATA[Security]]></category>
		<category><![CDATA[Ubuntu]]></category>

		<guid isPermaLink="false">http://ostehamster.dk/wordpress/?p=22</guid>
		<description><![CDATA[This guide will very briefly describe how to setup an encrypted LUKS partition and mount it on log in. Preparation Start by installing the software needed: sudo apt-get install libpam-mount cryptsetup Add these line to /etc/initramfs-tools/modules dm_mod dm_crypt sha256 aes_i586 and update the initrd-image with sudo update-initramfs -u all Making the encrypted partition Remember to [...]]]></description>
			<content:encoded><![CDATA[<p>This guide will very briefly describe how to setup an encrypted LUKS partition and mount it on log in.</p>
<p><strong>Preparation</strong><br />
Start by installing the software needed:</p>
<blockquote><p>sudo apt-get install libpam-mount cryptsetup</p></blockquote>
<p>Add these line to /etc/initramfs-tools/modules</p>
<blockquote><p>dm_mod<br />
dm_crypt<br />
sha256<br />
aes_i586</p></blockquote>
<p>and update the initrd-image with</p>
<blockquote><p>sudo update-initramfs -u all</p></blockquote>
<p><strong>Making the encrypted partition</strong><br />
<em>Remember to take BACKUP, because all data at /dev/sda6 will be lost!!!</em></p>
<p>Now we have to make the encrypted partition, in this example the devices name is /dev/sda6. First we load the needed modules</p>
<blockquote><p>sudo modprobe dm_crypt<br />
sudo modprobe sha256<br />
sudo modprobe aes_i586</p></blockquote>
<p>and the make the LUKS-partiton (use your log-in password):</p>
<blockquote><p>sudo cryptsetup luksFormat /dev/sda6</p></blockquote>
<p>Now /dev/sda6 has the LUKS format, and can be attached to /dev/mapper:</p>
<blockquote><p>sudo cryptsetup luksOpen /dev/sda6 encrypted_home</p></blockquote>
<p>And then we can make a file system on it, here ext3</p>
<blockquote><p>sudo mkfs.ext3 -j -O dir_index -m 0 -v /dev/mapper/encrypted_home</p></blockquote>
<p>Finally we can mount the partition, to see if it works</p>
<blockquote><p>sudo mount /dev/mapper/encrypted_home /mnt</p></blockquote>
<p>Unmount and close the LUKS partition:</p>
<blockquote><p>sudo umount /mnt<br />
sudo cryptsetup luksClose encrypted_home</p></blockquote>
<p><strong>Setting up pam_mount</strong><br />
Insert</p>
<blockquote><p>auth optional /lib/security/pam_mount.so use_first_pass</p></blockquote>
<p>into /etc/pam.d/common-auth</p>
<p>and</p>
<blockquote><p>session     optional      /lib/security/pam_mount.so</p></blockquote>
<p>into /etc/pam.d/common-session</p>
<p>Now create a mount point for the LUKS partition</p>
<blockquote><p>sudo mkdir /encrypted_home<br />
sudo chmod 777 /encrypted_home</p></blockquote>
<p>And add</p>
<blockquote><p>volume foo crypt - /dev/sda6 /encrypted_home cipher=aes - -</p></blockquote>
<p>into /etc/security/pam_mount.conf </p>
<p>This means that every time the user <em>foo</em> logs in, the LUKS partition will be mounted on /encrypted_home, using the password foo entered. Therefor the LUKS password has to be the same as the log in password.</p>
<p>Log out, log in and see if it works :)</p>
<p><em>This is inspirited by:<br />
<a href="http://thomasdamgaard.dk/blog/article/krypteret-swap-og-root-filsystem-med-luks-og-ubuntu">http://thomasdamgaard.dk/blog/article/krypteret-swap-og-root-filsystem-med-luks-og-ubuntu</a></em></p>
]]></content:encoded>
			<wfw:commentRss>http://ostehamster.dk/blog/index.php/2007/04/13/encrypted-home-partition-using-luks-in-ubunt-feisty-fawn/feed/</wfw:commentRss>
		<slash:comments>2</slash:comments>
		</item>
	</channel>
</rss>

