<?xml version="1.0" encoding="UTF-8"?>
<?xml-stylesheet type="text/css" href="/stylesheets/rss.css"?>
<rss version="2.0" xmlns:dc="http://purl.org/dc/elements/1.1/">
  <channel>
    <title>5Valleys Blog</title>
    <link>http://5Valleys.com/tags/#{params[:tag_id]/posts</link>
    <language>en-us</language>
    <ttl>40</ttl>
    <description>Rails, Software Development, Western Montana, and other incoherent ramblings.</description>
    <item>
      <title>Encrypting and Auto Mounting Ubuntu Partition</title>
      <description>If you've got a laptop computer, it's not a bad idea to encrypt a data partition and keep all your personal data there. That way if your laptop gets lost or stolen, then the thief may have your computer, but they won't be able to steal your identity, too. And, doing so in linux is absurdly easy.  Here's how I did it on Ubuntu. Also note that, if you've been here before and already have the encrypted partition, but are trying to access it from a new install of Ubuntu, you should *skip* steps 2, 4 &amp; 6

Step 1) Use Synaptic to install the 'cryptsetup' and 'pam-mount' packages.
Step 2) Create a new primary partition that will be your encrypted partition (I recommend using gparted to do this).
Step 3) Restart your computer. This is a step I frequently forget, but is absolutely necessary for the right encryption modules to be loaded into your kernel.
Step 4) Run 'sudo cryptsetup luksFormat /dev/sdXX' where 'sdXX' is the name of the new partition you created in step 2 (eg, sda4). When asked for a passphrase, use the exact same password you use to login to the computer (you'll see why in step 9). Notice and heed the warning &quot;This will overwrite data on /dev/sdXX irrevocably.&quot;
Step 5) Run 'sudo cryptsetup luksOpen /dev/sdXX sdXX'
Step 6) Run 'sudo mkfs.ext3 /dev/mapper/sdXX'
Step 7) Create a folder to mount your partition to. I like to use /mnt/sdXX, but you could just as easily put it right in your home directory, such as '~/encrypted'. Note the all instructions below assume you chose '/mnt/sdXX', so adjust accordingly.
Step 8) Run 'sudo mount /dev/mapper/sdXX /mnt/sdXX'
Ok, now your partition is created and mounted. But, next time (and every time) you restart your computer you'll need to run step 8 again. If you forget, you'll find that /mnt/sdXX is empty, and panic. Wouldn't it be nice if you could just mount that partition automatically whenever you log in?  Well, as long as you used the same passphrase for the for the partition as your password when you log in, you can.
Step 9) As root, open /etc/security/pam_mount.conf.xml and add or uncomment the line that says '&lt;luserconf name=&quot;.pam_mount.conf.xml&quot; /&gt;'
Step 10) Create a file named .pam_mount.conf.xml in your home directory and fill it with the following...

&lt;?xml version=&quot;1.0&quot; encoding=&quot;utf-8&quot; ?&gt;

&lt;pam_mount&gt;

&lt;volume fstype=&quot;crypt&quot; path=&quot;/dev/sdXX&quot; mountpoint=&quot;/mnt/sdXX&quot; /&gt;

&lt;/pam_mount&gt;

Step 11) As root, edit /etc/pam.d/gdm and add '@include common-pammount' to the end of the list.
Step 12) Reboot and you should find that the encrypted partition gets mounted for you.

One final word of warning. If an UNencrypted partition fails or gets corrupted, there are still some very crude methods to *try* and recover anything that wasn't properly backed up. When an ENcrypted partition fails like this, you can probably throw most or all of those tools and techniques out the window. So, keep your encrypted partition frequently backed up to a different *physical* drive, probably external, probably also encrypted.
 &lt;a href='http://www.5valleys.com/posts/59-Encrypting-and-Auto-Mounting-Ubuntu-Partition'&gt;continue...&lt;/a&gt;</description>
      <pubDate>Fri, 02 Jan 2009 20:01:00 -0700</pubDate>
      <link>http://www.5valleys.com/posts/59-Encrypting-and-Auto-Mounting-Ubuntu-Partition</link>
      <author>jsgarvin</author>
      <category>Ubnutu,</category>
      <category>Security</category>
    </item>
    <item>
      <title>GateKeeper + attachment_fu</title>
      <description>I recently added attachment_fu to a personal Rails project that was already using GateKeeper and ran into some stumbling blocks. It took me some time to dig into attachment_fu's inner workings and some experimentation to figure out the best way to get to the two plugins to play nice together, so here's some tips for anyone else who might try this themselves someday. &lt;a href='http://www.5valleys.com/posts/56-GateKeeper-attachment-fu'&gt;continue...&lt;/a&gt;</description>
      <pubDate>Sat, 03 May 2008 00:20:00 -0600</pubDate>
      <link>http://www.5valleys.com/posts/56-GateKeeper-attachment-fu</link>
      <author>jsgarvin</author>
      <category>Rails</category>
      <category>GateKeeper</category>
      <category>Security</category>
    </item>
    <item>
      <title>Getting Started with GateKeeper</title>
      <description>I've noticed in my site logs people are searching the Interweb Tubes for &quot;GateKeeper&quot; combined with other keywords that suggest they're looking for some better examples on how to use it, so I figured maybe I'd write something up to try to help. &lt;a href='http://www.5valleys.com/posts/53-Getting-Started-with-GateKeeper'&gt;continue...&lt;/a&gt;</description>
      <pubDate>Sat, 19 Apr 2008 07:41:00 -0600</pubDate>
      <link>http://www.5valleys.com/posts/53-Getting-Started-with-GateKeeper</link>
      <author>jsgarvin</author>
      <category>Security</category>
      <category>GateKeeper</category>
      <category>Rails</category>
    </item>
    <item>
      <title>Cross Site Sniper 0.3.1</title>
      <description>I've just release version 0.3.1 of Cross Site Sniper.  This is a minor bug fix update. &lt;a href='http://www.5valleys.com/posts/50-Cross-Site-Sniper-0-3-1'&gt;continue...&lt;/a&gt;</description>
      <pubDate>Fri, 11 Apr 2008 10:43:00 -0600</pubDate>
      <link>http://www.5valleys.com/posts/50-Cross-Site-Sniper-0-3-1</link>
      <author>jsgarvin</author>
      <category>Rails</category>
      <category>XSS</category>
      <category>Security</category>
    </item>
    <item>
      <title>Announcing GateKeeper 0.2</title>
      <description>GateKeeper 0.2 is now available. This version traverses eagerly loaded associations and checks read permissions on each loaded object for the current user. &lt;a href='http://www.5valleys.com/posts/42-Announcing-GateKeeper-0-2'&gt;continue...&lt;/a&gt;</description>
      <pubDate>Tue, 18 Mar 2008 22:14:00 -0600</pubDate>
      <link>http://www.5valleys.com/posts/42-Announcing-GateKeeper-0-2</link>
      <author>jsgarvin</author>
      <category>Rails</category>
      <category>GateKeeper</category>
      <category>Security</category>
    </item>
    <item>
      <title>Announcing GateKeeper -- Model Level Security &amp;amp; Permissions Management</title>
      <description>I'm pleased to announce the official release of my latest Rails plugin &quot;GateKeeper&quot;. GateKeeper started life as a library in one of my big personal Rails projects where I've been experimenting with multiple methods of setting, managing and enforcing access and security permissions for specific models. This project has lots of users with different security access levels to other user's data based on their roles and relationships to each other. I think this latest experiment was a huge success, so I immediately decided to give it away to you ('cause you're all that and more). &lt;a href='http://www.5valleys.com/posts/34-Announcing-GateKeeper-Model-Level-Security-amp-Permissions-Management'&gt;continue...&lt;/a&gt;</description>
      <pubDate>Thu, 06 Mar 2008 09:09:00 -0700</pubDate>
      <link>http://www.5valleys.com/posts/34-Announcing-GateKeeper-Model-Level-Security-amp-Permissions-Management</link>
      <author>jsgarvin</author>
      <category>Rails</category>
      <category>GateKeeper</category>
      <category>Security</category>
    </item>
    <item>
      <title>Cross Site Sniper 0.3</title>
      <description>I released CrossSiteSniper version 0.3 today with one small enhancement. &lt;a href='http://www.5valleys.com/posts/36-Cross-Site-Sniper-0-3'&gt;continue...&lt;/a&gt;</description>
      <pubDate>Wed, 05 Mar 2008 20:04:21 -0700</pubDate>
      <link>http://www.5valleys.com/posts/36-Cross-Site-Sniper-0-3</link>
      <author>jsgarvin</author>
      <category>XSS</category>
      <category>Rails</category>
      <category>Security</category>
    </item>
    <item>
      <title>Cross Site Sniper, A Rails XSS Defense Plugin</title>
      <description>Cross Site Scripting aka (XSS) is a common concern for web developers. In fact, anybody developing an interactive website, small or large, should be concerned about and guard against it.

What exactly is XSS? &lt;a href='http://www.5valleys.com/posts/33-Cross-Site-Sniper-A-Rails-XSS-Defense-Plugin'&gt;continue...&lt;/a&gt;</description>
      <pubDate>Wed, 30 Jan 2008 23:17:00 -0700</pubDate>
      <link>http://www.5valleys.com/posts/33-Cross-Site-Sniper-A-Rails-XSS-Defense-Plugin</link>
      <author>jsgarvin</author>
      <category>Rails</category>
      <category>XSS</category>
      <category>Security</category>
    </item>
  </channel>
</rss>
