<?xml version="1.0"?>
<?xml-stylesheet type="text/css" href="http://wiki.umbo.fr/skins/common/feed.css?301"?>
<feed xmlns="http://www.w3.org/2005/Atom" xml:lang="fr">
		<id>http://wiki.umbo.fr/index.php?action=history&amp;feed=atom&amp;title=Dm-crypt</id>
		<title>Dm-crypt - Historique des versions</title>
		<link rel="self" type="application/atom+xml" href="http://wiki.umbo.fr/index.php?action=history&amp;feed=atom&amp;title=Dm-crypt"/>
		<link rel="alternate" type="text/html" href="http://wiki.umbo.fr/index.php?title=Dm-crypt&amp;action=history"/>
		<updated>2026-06-19T05:23:23Z</updated>
		<subtitle>Historique pour cette page sur le wiki</subtitle>
		<generator>MediaWiki 1.17.0</generator>

	<entry>
		<id>http://wiki.umbo.fr/index.php?title=Dm-crypt&amp;diff=1775&amp;oldid=prev</id>
		<title>193.252.149.222 : /* DM-CRYPT */</title>
		<link rel="alternate" type="text/html" href="http://wiki.umbo.fr/index.php?title=Dm-crypt&amp;diff=1775&amp;oldid=prev"/>
				<updated>2010-05-28T15:26:35Z</updated>
		
		<summary type="html">&lt;p&gt;&lt;span class=&quot;autocomment&quot;&gt;DM-CRYPT&lt;/span&gt;&lt;/p&gt;
&lt;table style=&quot;background-color: white; color:black;&quot;&gt;
			&lt;col class='diff-marker' /&gt;
			&lt;col class='diff-content' /&gt;
			&lt;col class='diff-marker' /&gt;
			&lt;col class='diff-content' /&gt;
		&lt;tr valign='top'&gt;
		&lt;td colspan='2' style=&quot;background-color: white; color:black;&quot;&gt;← Version précédente&lt;/td&gt;
		&lt;td colspan='2' style=&quot;background-color: white; color:black;&quot;&gt;Version du 28 mai 2010 à 15:26&lt;/td&gt;
		&lt;/tr&gt;&lt;tr&gt;&lt;td colspan=&quot;2&quot; class=&quot;diff-lineno&quot;&gt;Ligne 73 :&lt;/td&gt;
&lt;td colspan=&quot;2&quot; class=&quot;diff-lineno&quot;&gt;Ligne 73 :&lt;/td&gt;&lt;/tr&gt;
&lt;tr&gt;&lt;td class='diff-marker'&gt;&amp;#160;&lt;/td&gt;&lt;td style=&quot;background: #eee; color:black; font-size: smaller;&quot;&gt;&lt;div&gt;== PAM MOUNT + SUDO ==&lt;/div&gt;&lt;/td&gt;&lt;td class='diff-marker'&gt;&amp;#160;&lt;/td&gt;&lt;td style=&quot;background: #eee; color:black; font-size: smaller;&quot;&gt;&lt;div&gt;== PAM MOUNT + SUDO ==&lt;/div&gt;&lt;/td&gt;&lt;/tr&gt;
&lt;tr&gt;&lt;td class='diff-marker'&gt;&amp;#160;&lt;/td&gt;&lt;td style=&quot;background: #eee; color:black; font-size: smaller;&quot;&gt;&lt;/td&gt;&lt;td class='diff-marker'&gt;&amp;#160;&lt;/td&gt;&lt;td style=&quot;background: #eee; color:black; font-size: smaller;&quot;&gt;&lt;/td&gt;&lt;/tr&gt;
&lt;tr&gt;&lt;td colspan=&quot;2&quot;&gt;&amp;#160;&lt;/td&gt;&lt;td class='diff-marker'&gt;+&lt;/td&gt;&lt;td style=&quot;background: #cfc; color:black; font-size: smaller;&quot;&gt;&lt;div&gt;&lt;ins style=&quot;color: red; font-weight: bold; text-decoration: none;&quot;&gt;http://bugs.gentoo.org/273785&lt;/ins&gt;&lt;/div&gt;&lt;/td&gt;&lt;/tr&gt;
&lt;tr&gt;&lt;td class='diff-marker'&gt;&amp;#160;&lt;/td&gt;&lt;td style=&quot;background: #eee; color:black; font-size: smaller;&quot;&gt;&lt;div&gt;&amp;#160; dams@linux4ever:~$ sudo su&lt;/div&gt;&lt;/td&gt;&lt;td class='diff-marker'&gt;&amp;#160;&lt;/td&gt;&lt;td style=&quot;background: #eee; color:black; font-size: smaller;&quot;&gt;&lt;div&gt;&amp;#160; dams@linux4ever:~$ sudo su&lt;/div&gt;&lt;/td&gt;&lt;/tr&gt;
&lt;tr&gt;&lt;td class='diff-marker'&gt;&amp;#160;&lt;/td&gt;&lt;td style=&quot;background: #eee; color:black; font-size: smaller;&quot;&gt;&lt;div&gt;&amp;#160; Segmentation fault&lt;/div&gt;&lt;/td&gt;&lt;td class='diff-marker'&gt;&amp;#160;&lt;/td&gt;&lt;td style=&quot;background: #eee; color:black; font-size: smaller;&quot;&gt;&lt;div&gt;&amp;#160; Segmentation fault&lt;/div&gt;&lt;/td&gt;&lt;/tr&gt;
&lt;/table&gt;</summary>
		<author><name>193.252.149.222</name></author>	</entry>

	<entry>
		<id>http://wiki.umbo.fr/index.php?title=Dm-crypt&amp;diff=1774&amp;oldid=prev</id>
		<title>193.252.149.222 : /* DM-CRYPT */</title>
		<link rel="alternate" type="text/html" href="http://wiki.umbo.fr/index.php?title=Dm-crypt&amp;diff=1774&amp;oldid=prev"/>
				<updated>2010-05-28T15:26:16Z</updated>
		
		<summary type="html">&lt;p&gt;&lt;span class=&quot;autocomment&quot;&gt;DM-CRYPT&lt;/span&gt;&lt;/p&gt;
&lt;table style=&quot;background-color: white; color:black;&quot;&gt;
			&lt;col class='diff-marker' /&gt;
			&lt;col class='diff-content' /&gt;
			&lt;col class='diff-marker' /&gt;
			&lt;col class='diff-content' /&gt;
		&lt;tr valign='top'&gt;
		&lt;td colspan='2' style=&quot;background-color: white; color:black;&quot;&gt;← Version précédente&lt;/td&gt;
		&lt;td colspan='2' style=&quot;background-color: white; color:black;&quot;&gt;Version du 28 mai 2010 à 15:26&lt;/td&gt;
		&lt;/tr&gt;&lt;tr&gt;&lt;td colspan=&quot;2&quot; class=&quot;diff-lineno&quot;&gt;Ligne 69 :&lt;/td&gt;
&lt;td colspan=&quot;2&quot; class=&quot;diff-lineno&quot;&gt;Ligne 69 :&lt;/td&gt;&lt;/tr&gt;
&lt;tr&gt;&lt;td class='diff-marker'&gt;&amp;#160;&lt;/td&gt;&lt;td style=&quot;background: #eee; color:black; font-size: smaller;&quot;&gt;&lt;div&gt;&amp;#160;&amp;#160; &amp;#160; session optional pam_permit.so&lt;/div&gt;&lt;/td&gt;&lt;td class='diff-marker'&gt;&amp;#160;&lt;/td&gt;&lt;td style=&quot;background: #eee; color:black; font-size: smaller;&quot;&gt;&lt;div&gt;&amp;#160;&amp;#160; &amp;#160; session optional pam_permit.so&lt;/div&gt;&lt;/td&gt;&lt;/tr&gt;
&lt;tr&gt;&lt;td class='diff-marker'&gt;&amp;#160;&lt;/td&gt;&lt;td style=&quot;background: #eee; color:black; font-size: smaller;&quot;&gt;&lt;div&gt;&amp;#160;&amp;#160; &amp;#160; session optional pam_mount.so&lt;/div&gt;&lt;/td&gt;&lt;td class='diff-marker'&gt;&amp;#160;&lt;/td&gt;&lt;td style=&quot;background: #eee; color:black; font-size: smaller;&quot;&gt;&lt;div&gt;&amp;#160;&amp;#160; &amp;#160; session optional pam_mount.so&lt;/div&gt;&lt;/td&gt;&lt;/tr&gt;
&lt;tr&gt;&lt;td colspan=&quot;2&quot;&gt;&amp;#160;&lt;/td&gt;&lt;td class='diff-marker'&gt;+&lt;/td&gt;&lt;td style=&quot;background: #cfc; color:black; font-size: smaller;&quot;&gt;&lt;div&gt;&lt;ins style=&quot;color: red; font-weight: bold; text-decoration: none;&quot;&gt;&lt;/ins&gt;&lt;/div&gt;&lt;/td&gt;&lt;/tr&gt;
&lt;tr&gt;&lt;td colspan=&quot;2&quot;&gt;&amp;#160;&lt;/td&gt;&lt;td class='diff-marker'&gt;+&lt;/td&gt;&lt;td style=&quot;background: #cfc; color:black; font-size: smaller;&quot;&gt;&lt;div&gt;&lt;ins style=&quot;color: red; font-weight: bold; text-decoration: none;&quot;&gt;&lt;/ins&gt;&lt;/div&gt;&lt;/td&gt;&lt;/tr&gt;
&lt;tr&gt;&lt;td colspan=&quot;2&quot;&gt;&amp;#160;&lt;/td&gt;&lt;td class='diff-marker'&gt;+&lt;/td&gt;&lt;td style=&quot;background: #cfc; color:black; font-size: smaller;&quot;&gt;&lt;div&gt;&lt;ins style=&quot;color: red; font-weight: bold; text-decoration: none;&quot;&gt;== PAM MOUNT + SUDO ==&lt;/ins&gt;&lt;/div&gt;&lt;/td&gt;&lt;/tr&gt;
&lt;tr&gt;&lt;td colspan=&quot;2&quot;&gt;&amp;#160;&lt;/td&gt;&lt;td class='diff-marker'&gt;+&lt;/td&gt;&lt;td style=&quot;background: #cfc; color:black; font-size: smaller;&quot;&gt;&lt;div&gt;&lt;ins style=&quot;color: red; font-weight: bold; text-decoration: none;&quot;&gt;&lt;/ins&gt;&lt;/div&gt;&lt;/td&gt;&lt;/tr&gt;
&lt;tr&gt;&lt;td colspan=&quot;2&quot;&gt;&amp;#160;&lt;/td&gt;&lt;td class='diff-marker'&gt;+&lt;/td&gt;&lt;td style=&quot;background: #cfc; color:black; font-size: smaller;&quot;&gt;&lt;div&gt;&lt;ins style=&quot;color: red; font-weight: bold; text-decoration: none;&quot;&gt; dams@linux4ever:~$ sudo su&lt;/ins&gt;&lt;/div&gt;&lt;/td&gt;&lt;/tr&gt;
&lt;tr&gt;&lt;td colspan=&quot;2&quot;&gt;&amp;#160;&lt;/td&gt;&lt;td class='diff-marker'&gt;+&lt;/td&gt;&lt;td style=&quot;background: #cfc; color:black; font-size: smaller;&quot;&gt;&lt;div&gt;&lt;ins style=&quot;color: red; font-weight: bold; text-decoration: none;&quot;&gt; Segmentation fault&lt;/ins&gt;&lt;/div&gt;&lt;/td&gt;&lt;/tr&gt;
&lt;tr&gt;&lt;td colspan=&quot;2&quot;&gt;&amp;#160;&lt;/td&gt;&lt;td class='diff-marker'&gt;+&lt;/td&gt;&lt;td style=&quot;background: #cfc; color:black; font-size: smaller;&quot;&gt;&lt;div&gt;&lt;ins style=&quot;color: red; font-weight: bold; text-decoration: none;&quot;&gt;&lt;/ins&gt;&lt;/div&gt;&lt;/td&gt;&lt;/tr&gt;
&lt;tr&gt;&lt;td colspan=&quot;2&quot;&gt;&amp;#160;&lt;/td&gt;&lt;td class='diff-marker'&gt;+&lt;/td&gt;&lt;td style=&quot;background: #cfc; color:black; font-size: smaller;&quot;&gt;&lt;div&gt;&lt;ins style=&quot;color: red; font-weight: bold; text-decoration: none;&quot;&gt;A workaround would be to copy the contents of /etc/pam.d/system-auth to&lt;/ins&gt;&lt;/div&gt;&lt;/td&gt;&lt;/tr&gt;
&lt;tr&gt;&lt;td colspan=&quot;2&quot;&gt;&amp;#160;&lt;/td&gt;&lt;td class='diff-marker'&gt;+&lt;/td&gt;&lt;td style=&quot;background: #cfc; color:black; font-size: smaller;&quot;&gt;&lt;div&gt;&lt;ins style=&quot;color: red; font-weight: bold; text-decoration: none;&quot;&gt;/etc/pam.d/sudo without the pam_mount session line. The default pam&lt;/ins&gt;&lt;/div&gt;&lt;/td&gt;&lt;/tr&gt;
&lt;tr&gt;&lt;td colspan=&quot;2&quot;&gt;&amp;#160;&lt;/td&gt;&lt;td class='diff-marker'&gt;+&lt;/td&gt;&lt;td style=&quot;background: #cfc; color:black; font-size: smaller;&quot;&gt;&lt;div&gt;&lt;ins style=&quot;color: red; font-weight: bold; text-decoration: none;&quot;&gt;configuration for sudo just includes system-auth.&lt;/ins&gt;&lt;/div&gt;&lt;/td&gt;&lt;/tr&gt;
&lt;tr&gt;&lt;td colspan=&quot;2&quot;&gt;&amp;#160;&lt;/td&gt;&lt;td class='diff-marker'&gt;+&lt;/td&gt;&lt;td style=&quot;background: #cfc; color:black; font-size: smaller;&quot;&gt;&lt;div&gt;&lt;ins style=&quot;color: red; font-weight: bold; text-decoration: none;&quot;&gt;&lt;/ins&gt;&lt;/div&gt;&lt;/td&gt;&lt;/tr&gt;
&lt;tr&gt;&lt;td class='diff-marker'&gt;&amp;#160;&lt;/td&gt;&lt;td style=&quot;background: #eee; color:black; font-size: smaller;&quot;&gt;&lt;/td&gt;&lt;td class='diff-marker'&gt;&amp;#160;&lt;/td&gt;&lt;td style=&quot;background: #eee; color:black; font-size: smaller;&quot;&gt;&lt;/td&gt;&lt;/tr&gt;
&lt;tr&gt;&lt;td class='diff-marker'&gt;&amp;#160;&lt;/td&gt;&lt;td style=&quot;background: #eee; color:black; font-size: smaller;&quot;&gt;&lt;div&gt;References:&lt;/div&gt;&lt;/td&gt;&lt;td class='diff-marker'&gt;&amp;#160;&lt;/td&gt;&lt;td style=&quot;background: #eee; color:black; font-size: smaller;&quot;&gt;&lt;div&gt;References:&lt;/div&gt;&lt;/td&gt;&lt;/tr&gt;
&lt;/table&gt;</summary>
		<author><name>193.252.149.222</name></author>	</entry>

	<entry>
		<id>http://wiki.umbo.fr/index.php?title=Dm-crypt&amp;diff=1773&amp;oldid=prev</id>
		<title>193.252.149.222 le 28 mai 2010 à 13:44</title>
		<link rel="alternate" type="text/html" href="http://wiki.umbo.fr/index.php?title=Dm-crypt&amp;diff=1773&amp;oldid=prev"/>
				<updated>2010-05-28T13:44:37Z</updated>
		
		<summary type="html">&lt;p&gt;&lt;/p&gt;
&lt;p&gt;&lt;b&gt;Nouvelle page&lt;/b&gt;&lt;/p&gt;&lt;div&gt;&lt;br /&gt;
= DM-CRYPT =&lt;br /&gt;
&lt;br /&gt;
http://home.coming.dk/index.php/2009/05/20/encrypted_home_partition_using_luks_pam_&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
In preparation for yet another cross continent travel plan I finally decided to encrypt my home partition on myX61s laptop. I had to mess a bit with the pam_mount configuration file to make it work so I thought I would share my notes. In the following I will briefly describe how I'm going to use a password protected key stored on an external media to encrypt my home partition. I'll use the same password used for Xorg login to protect the key. So when you get asked to type in a password in the following examples use your normal user password and we'll use pam_mount to pass the password to LUKS once you log in.&lt;br /&gt;
&lt;br /&gt;
First start out by preparing a key:&lt;br /&gt;
&lt;br /&gt;
    KEY=`tr -cd [:graph:] &amp;lt; /dev/urandom | head -c 79`&lt;br /&gt;
    echo $KEY | openssl aes-256-ecb &amp;gt; verysekrit.key&lt;br /&gt;
&lt;br /&gt;
Then create an LVM volume for the home directory and subsitute home with what you like to name the logical volume:&lt;br /&gt;
&lt;br /&gt;
    lvcreate -L30G -nhome vg&lt;br /&gt;
&lt;br /&gt;
Then we initialize the volume with our secret key and LUKS:&lt;br /&gt;
&lt;br /&gt;
    openssl aes-256-ecb -d -in verysekrit.key | cryptsetup -v --cipher aes-cbc-plain --key-size 256 luksFormat /dev/vg/home&lt;br /&gt;
&lt;br /&gt;
Now lets test that we can open the encrypted volume and format it:&lt;br /&gt;
&lt;br /&gt;
    openssl aes-256-ecb -d -in verysekrit.key | cryptsetup luksOpen /dev/vg/home myh_crypt&lt;br /&gt;
    mkfs.ext3 /dev/mapper/myh_crypt&lt;br /&gt;
&lt;br /&gt;
You can not mount it and sync over your old home like this:&lt;br /&gt;
&lt;br /&gt;
    mount /dev/mapper/myh_crypt /mnt/gentoo&lt;br /&gt;
    rsync -va /home/username/* /mnt/gentoo/&lt;br /&gt;
&lt;br /&gt;
Once everything is synced over we'll close the LUKS volume again:&lt;br /&gt;
&lt;br /&gt;
    cryptsetup luksClose myh_crypt&lt;br /&gt;
&lt;br /&gt;
Now unmask and emerge pam_mount:&lt;br /&gt;
&lt;br /&gt;
    echo &amp;quot;sys-auth/pam_mount&amp;quot; &amp;gt;&amp;gt; /etc/portage/package.keywords&lt;br /&gt;
    emerge -v pam_mount&lt;br /&gt;
&lt;br /&gt;
Now configure pam_mount to first mount the SD card (/dev/mmcblo0p1) and then use the key to unlock the home partition by editing /etc/security/pam_mount.conf.xml. Note that if you store your secret key somewhere else the first volume statement may be omitted.&lt;br /&gt;
&lt;br /&gt;
    &amp;lt;volume user=&amp;quot;username&amp;quot;&lt;br /&gt;
    path=&amp;quot;/dev/mmcblk0p1&amp;quot;&lt;br /&gt;
    mountpoint=&amp;quot;/mnt/mmc&amp;quot;&lt;br /&gt;
    fstype=&amp;quot;auto&amp;quot; /&amp;gt;&lt;br /&gt;
&lt;br /&gt;
    &amp;lt;volume user=&amp;quot;username&amp;quot;&lt;br /&gt;
    path=&amp;quot;/dev/mapper/vg-username&amp;quot;&lt;br /&gt;
    mountpoint=&amp;quot;/home/username&amp;quot;&lt;br /&gt;
    fstype=&amp;quot;crypt&amp;quot;&lt;br /&gt;
    options=&amp;quot;data=journal,commit=15&amp;quot;&lt;br /&gt;
    cipher=&amp;quot;aes-cbc-plain&amp;quot;&lt;br /&gt;
    fskeypath=&amp;quot;/mnt/mmc/verysekrit.key&amp;quot;&lt;br /&gt;
    fskeycipher=&amp;quot;aes-256-ecb&amp;quot;&lt;br /&gt;
    fskeyhash=&amp;quot;md5&amp;quot; /&amp;gt;&lt;br /&gt;
&lt;br /&gt;
Then configure PAM to use pam_mount by editing /etc/pam.d/system-auth. Add pam_mount to the auth section like this:&lt;br /&gt;
&lt;br /&gt;
    auth required pam_env.so&lt;br /&gt;
    auth optional pam_mount.so&lt;br /&gt;
    auth required pam_unix.so try_first_pass likeauth nullok&lt;br /&gt;
&lt;br /&gt;
And to the sessions section like this:&lt;br /&gt;
&lt;br /&gt;
    session required pam_limits.so&lt;br /&gt;
    session required pam_env.so&lt;br /&gt;
    session required pam_unix.so&lt;br /&gt;
    session optional pam_permit.so&lt;br /&gt;
    session optional pam_mount.so&lt;br /&gt;
&lt;br /&gt;
References:&lt;br /&gt;
&lt;br /&gt;
http://en.gentoo-wiki.com/wiki/Booting_encrypted_system_from_USB_stick&lt;br /&gt;
http://en.gentoo-wiki.com/wiki/DM-Crypt_with_LUKS&lt;br /&gt;
http://en.gentoo-wiki.com/wiki/Root_on_LVM_or_EVMS_over_dm-crypt/LUKS&lt;br /&gt;
http://blog.infion.de/archives/2007/05/15/Full-disk-encryption-with-LUKS-on-new-notebook/&lt;/div&gt;</summary>
		<author><name>193.252.149.222</name></author>	</entry>

	</feed>