<?xml version="1.0" encoding="UTF-8"?>
<?xml-stylesheet type="text/xsl" media="screen" href="/~d/styles/rss2full.xsl"?><?xml-stylesheet type="text/css" media="screen" href="http://feeds.feedburner.com/~d/styles/itemcontent.css"?><rss 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/" xmlns:feedburner="http://rssnamespace.org/feedburner/ext/1.0" version="2.0">

<channel>
	<title>Solid State Raam</title>
	
	<link>http://solidstateraam.com</link>
	<description>Explorations (and exploitations) of the digital world by one of its many netizens.</description>
	<lastBuildDate>Sat, 07 Nov 2009 03:48:12 +0000</lastBuildDate>
	<generator>http://wordpress.org/?v=2.8.5</generator>
	<language>en</language>
	<sy:updatePeriod>hourly</sy:updatePeriod>
	<sy:updateFrequency>1</sy:updateFrequency>
			<atom10:link xmlns:atom10="http://www.w3.org/2005/Atom" rel="self" href="http://feeds.feedburner.com/TheSolidState" type="application/rss+xml" /><feedburner:emailServiceId>TheSolidState</feedburner:emailServiceId><feedburner:feedburnerHostname>http://feedburner.google.com</feedburner:feedburnerHostname><feedburner:browserFriendly></feedburner:browserFriendly><atom10:link xmlns:atom10="http://www.w3.org/2005/Atom" rel="hub" href="http://pubsubhubbub.appspot.com" /><item>
		<title>MAC Address Validation Regex with egrep</title>
		<link>http://solidstateraam.com/2009/08/mac-address-validation-regex-with-egrep/</link>
		<comments>http://solidstateraam.com/2009/08/mac-address-validation-regex-with-egrep/#comments</comments>
		<pubDate>Thu, 27 Aug 2009 00:45:08 +0000</pubDate>
		<dc:creator>Raam</dc:creator>
				<category><![CDATA[Bash]]></category>
		<category><![CDATA[Linux]]></category>
		<category><![CDATA[Regex]]></category>
		<category><![CDATA[bash regex validation script]]></category>

		<guid isPermaLink="false">http://solidstateraam.com/?p=334</guid>
		<description><![CDATA[I needed an easy way to validate a MAC address in a bash script that generated a unique hostname based on the MAC address of the system. Read about how I solved the problem using a regular expression and egrep.]]></description>
			<content:encoded><![CDATA[<p>I needed an easy way to validate a MAC address in a bash script that generated a unique hostname based on the MAC address of the system. This gem did the trick:</p>
<pre class="brush: bash;">
echo &quot;00:11:24:3e:a5:78&quot; | egrep &quot;^([0-9a-fA-F]{2}\:){5}[0-9a-fA-F]{2}$&quot;
</pre>
<p>In the event that there was a problem getting the MAC address (e.g., faulty NIC or unstable device driver), I generate a random hostname instead of basing the hostname generation on the MAC. Here&#8217;s how I validated the MAC in the script:</p>
<pre class="brush: bash;">
if [ `echo $ACTIVE_INTERFACE_MAC | egrep &quot;^([0-9a-fA-F]{2}\:){5}[0-9a-fA-F]{2}$&quot;` ]; then
	# generate unique hostname based on MAC
else
	# generate random-character hostname
fi
</pre>
]]></content:encoded>
			<wfw:commentRss>http://solidstateraam.com/2009/08/mac-address-validation-regex-with-egrep/feed/</wfw:commentRss>
		<slash:comments>0</slash:comments>
		</item>
		<item>
		<title>A Script to Install &amp; Configure ifplugd on Debian</title>
		<link>http://solidstateraam.com/2009/06/a-script-to-install-configure-ifplugd-on-debian/</link>
		<comments>http://solidstateraam.com/2009/06/a-script-to-install-configure-ifplugd-on-debian/#comments</comments>
		<pubDate>Mon, 22 Jun 2009 05:00:56 +0000</pubDate>
		<dc:creator>Raam</dc:creator>
				<category><![CDATA[Debian]]></category>
		<category><![CDATA[Linux]]></category>
		<category><![CDATA[Networking]]></category>

		<guid isPermaLink="false">http://solidstateraam.com/?p=148</guid>
		<description><![CDATA[The default configuration on some older Linux systems is to only send a DHCP request while booting up. This means if the network cable gets unplugged, or if the router is powered off, the system may lose its IP configuration. To restore the network connection, the system may need to be manually rebooted or have [...]]]></description>
			<content:encoded><![CDATA[<p>The default configuration on some older Linux systems is to only send a DHCP request while booting up. This means if the network cable gets unplugged, or if the router is powered off, the system may lose its IP configuration. To restore the network connection, the system may need to be manually rebooted or have someone at the local console run the <code>dhclient</code> command to request a DHCP lease. </p>
<p>For systems that are only accessed remotely via SSH, such a scenario can be painful. What is needed is a daemon that watches the link status of the Ethernet jack and reconfigures the network (or sends out another DHCP request) when it detects a cable is plugged in (or the power to the router is restored).</p>
<p><a href="http://0pointer.de/lennart/projects/ifplugd/#overview">ifplugd</a> does exactly that:</p>
<blockquote><p>ifplugd is a Linux daemon which will automatically configure your ethernet device when a cable is plugged in and automatically unconfigure it if the cable is pulled.</p></blockquote>
<p>On a Debian system, installing and configuring ifplugd is relatively simple using <code>apt-get install ifplugd</code>. Once its been installed, it needs to be configured by editing <code>/etc/default/ifplugd</code>. The most basic configuration is to simply set <code>INTERFACES="auto"</code> and <code>HOTPLUG_INTERFACES="all"</code>. This configuration tells ifplugd to watch all network interfaces for a new link status and automatically reconfigure them using the Debian network configuration defined in <code>/etc/network/interfaces</code>.</p>
<p>I recently needed to automate the install and configuration of ifplugd on many remote Linux systems, so I wrote this simple script.  </p>
<p>Download: <a href="http://solidstateraam.com/wp-content/uploads/2009/06/install-ifplugd.tar.gz">install-ifplugd.tar.gz</a></p>
<pre class="brush: bash;">
#!/bin/sh

#########################################
# Author: Raam Dev
#
# This script installs ifplugd and configures
# it to automatically attempt to restore any
# lost connections.
#
# Must be run as root!
#########################################

# Check if we're running this as root
if [ $EUID -ne 0 ]; then
   echo &quot;This script must be run as root&quot; 1&gt;&amp;2
   exit 1
fi

# Files used when configuring ifplugd
OUTFILE=/tmp/outfile.$$
CONFIG_FILE=/etc/default/ifplugd

# Update package list and install ifplugd, assuming yes to any questions asked
# (to insure the script runs without requiring manual intervention)
apt-get update --assume-yes ; apt-get install --assume-yes ifplugd

# Configure ifplugd to watch all interfaces and automatically attempt configuration
sed 's/INTERFACES=\&quot;\&quot;/INTERFACES=\&quot;auto\&quot;/g' &lt; $CONFIG_FILE &gt; $OUTFILE
mv $OUTFILE $CONFIG_FILE

sed 's/HOTPLUG_INTERFACES=\&quot;auto\&quot;/HOTPLUG_INTERFACES=\&quot;all\&quot;/g' &lt; $CONFIG_FILE &gt; $OUTFILE
mv $OUTFILE $CONFIG_FILE
</pre>
<p>If you&#8217;re interested in doing more with ifplugd, check out <a href="http://www.linux.com/archive/articles/114008">this article</a>.</p>
]]></content:encoded>
			<wfw:commentRss>http://solidstateraam.com/2009/06/a-script-to-install-configure-ifplugd-on-debian/feed/</wfw:commentRss>
		<slash:comments>0</slash:comments>
		</item>
		<item>
		<title>Configuring Kayako SupportSuite to Close Tickets via Email</title>
		<link>http://solidstateraam.com/2009/06/configuring-kayako-supportsuite-to-close-tickets-via-email/</link>
		<comments>http://solidstateraam.com/2009/06/configuring-kayako-supportsuite-to-close-tickets-via-email/#comments</comments>
		<pubDate>Sat, 20 Jun 2009 05:00:06 +0000</pubDate>
		<dc:creator>Raam</dc:creator>
				<category><![CDATA[Kayako SupportSuite]]></category>
		<category><![CDATA[Software]]></category>

		<guid isPermaLink="false">http://solidstateraam.com/?p=238</guid>
		<description><![CDATA[If you&#8217;re using Kayako SupportSuite to process emails and turn them into tickets, you might also be interested in being able to close tickets via email. This would allow a staff or regular users to close tickets by simply responding to the email notification with something like &#8220;close this request&#8221; in the body of the [...]]]></description>
			<content:encoded><![CDATA[<p>If you&#8217;re using <a href="http://www.kayako.com/solutions/supportsuite/">Kayako SupportSuite</a> to process emails and turn them into tickets, you might also be interested in being able to close tickets via email. This would allow a staff or regular users to close tickets by simply responding to the email notification with something like &#8220;close this request&#8221; in the body of the message. Using a mail parsing rule, this is relatively easy to set up in SupportSuite.</p>
<p>First, login to the admin section of your SupportSuite installation. Now insert a new mail parser rule by selecting <strong>Mail Parser » Manage Rules » Insert New Parser Rule</strong> in the left navigation menu. Now configure the parsing rule as follows:</p>
<p><strong>Rule Title:</strong> Close Ticket via Email<br />
<strong>Stop processing rules:</strong> No<br />
<strong>Execution Order:</strong> 1</p>
<p>Now add three criteria (press the green plus icon to add more than one criteria). </p>
<p><strong>Body » Contains »</strong> close this request<br />
<strong>Plain-text Body » Contains »</strong> close this request<br />
<strong>HTML Body » Contains »</strong> close this request</p>
<p>You can change &#8216;close this request&#8217; to whatever you like, but keep in mind it should be something that isn&#8217;t likely to occur in a ticket response (i.e., &#8216;close&#8217; would probably be too generic). </p>
<p>If you have more than one email queue and you only want this mail parser rule to apply to a specific queue, you can add a forth (optional) criteria:</p>
<p><strong>Destination E-mail Address:</strong> [mail queue address, i.e., support@mycompany.com]</p>
<p>Now finish configuring this parser rule:</p>
<p>Select <strong>Match Any Criteria</strong><br />
Set <strong>Rule Type:</strong> Post Parse<br />
<strong>Change Ticket Status:</strong> Closed</p>
<p>That&#8217;s it! Now press <strong>Insert</strong> and you&#8217;re done. </p>
]]></content:encoded>
			<wfw:commentRss>http://solidstateraam.com/2009/06/configuring-kayako-supportsuite-to-close-tickets-via-email/feed/</wfw:commentRss>
		<slash:comments>0</slash:comments>
		</item>
		<item>
		<title>Adding a Google Calendar with iPhone 3.0</title>
		<link>http://solidstateraam.com/2009/06/adding-a-google-calendar-with-iphone-3-0/</link>
		<comments>http://solidstateraam.com/2009/06/adding-a-google-calendar-with-iphone-3-0/#comments</comments>
		<pubDate>Thu, 18 Jun 2009 17:27:08 +0000</pubDate>
		<dc:creator>Raam</dc:creator>
				<category><![CDATA[iPhone]]></category>

		<guid isPermaLink="false">http://solidstateraam.com/?p=245</guid>
		<description><![CDATA[One of the nice new features of the iPhone 3.0 software is the ability to add a custom CalDAV account. Since Google Calendar supports CalDAV, this means that you can now add your Google Calendar account to your iPhone! And not only are you able to view calendar entries, but you can add, delete, and [...]]]></description>
			<content:encoded><![CDATA[<p>One of the nice new features of the iPhone 3.0 software is the ability to add a custom <a href="http://en.wikipedia.org/wiki/Caldav">CalDAV</a> account. Since <a href="http://www.google.com/support/calendar/bin/answer.py?answer=99355">Google Calendar supports CalDAV</a>, this means that you can now add your Google Calendar account to your iPhone! And not only are you able to view calendar entries, but you can add, delete, and modify them too!</p>
<p>To get started, navigate to to the following screen by choosing <strong>Settings -> Mail, Contacts, Calendars -> Add Account&#8230; -> Other</strong>:</p>
<p><a href="http://solidstateraam.com/wp-content/uploads/2009/06/iphone-gcal1.jpg"><img src="http://solidstateraam.com/wp-content/uploads/2009/06/iphone-gcal1-200x300.jpg" alt="iphone-gcal1" title="iphone-gcal1" width="200" height="300" class="alignnone size-medium wp-image-246" /></a></p>
<p>Now choose <strong>Add CalDAV Account</strong> and enter your Google Calendar account login details. The server should be set to <strong>www.google.com</strong>. When you&#8217;re done, press <strong>Next</strong> and wait for the iPhone to verify the information:</p>
<p><a href="http://solidstateraam.com/wp-content/uploads/2009/06/iphone-gcal2.jpg"><img src="http://solidstateraam.com/wp-content/uploads/2009/06/iphone-gcal2-200x300.jpg" alt="iphone-gcal2" title="iphone-gcal2" width="200" height="300" class="alignnone size-medium wp-image-247" /></a></p>
<p>When it finishes, go back to your home screen and open your calendar. Press the <strong>Calendars</strong> button at the top left to view a list of all available calendars. You will now see an <strong>All Google</strong> option listed:</p>
<p><a href="http://solidstateraam.com/wp-content/uploads/2009/06/iphone-gcal3.jpg"><img src="http://solidstateraam.com/wp-content/uploads/2009/06/iphone-gcal3-200x300.jpg" alt="iphone-gcal3" title="iphone-gcal3" width="200" height="300" class="alignnone size-medium wp-image-248" /></a></p>
<p>If you only want to view your Google calendars, you can select the <strong>All Google</strong> option. Otherwise, choose <strong>All Calendars</strong> to view all of them. Now when you add, delete, or modify an entry on any of your Google calendars from your iPhone, they will automatically be synced with Google!</p>
]]></content:encoded>
			<wfw:commentRss>http://solidstateraam.com/2009/06/adding-a-google-calendar-with-iphone-3-0/feed/</wfw:commentRss>
		<slash:comments>0</slash:comments>
		</item>
		<item>
		<title>Alert to All Mac OS X Users: Protect Yourself from CVE-2008-5353!</title>
		<link>http://solidstateraam.com/2009/05/alert-to-all-mac-os-x-users-protect-yourself-from-cve-2008-5353/</link>
		<comments>http://solidstateraam.com/2009/05/alert-to-all-mac-os-x-users-protect-yourself-from-cve-2008-5353/#comments</comments>
		<pubDate>Thu, 21 May 2009 02:51:41 +0000</pubDate>
		<dc:creator>Raam</dc:creator>
				<category><![CDATA[Exploits]]></category>
		<category><![CDATA[Firefox]]></category>
		<category><![CDATA[OS X]]></category>
		<category><![CDATA[Safari]]></category>
		<category><![CDATA[Security]]></category>

		<guid isPermaLink="false">http://solidstateraam.com/?p=203</guid>
		<description><![CDATA[Update: TidBITS writes that Apple has released a patched version of Java that fixes this issue. It is available through Software Update.
CVE-2008-5353 is a critical Java vulnerability that was discovered back in August 2008 and patched by Sun Microsystems a few months later. However, Apple has failed to release a patched version of Java, even [...]]]></description>
			<content:encoded><![CDATA[<p><strong>Update:</strong> <a href="http://db.tidbits.com/article/10352">TidBITS writes that Apple has released a patched version of Java</a> that fixes this issue. It is available through Software Update.</p>
<p><a href="http://cve.mitre.org/cgi-bin/cvename.cgi?name=CVE-2008-5353">CVE-2008-5353</a> is a critical Java vulnerability that was discovered back in August 2008 and patched by Sun Microsystems a few months later. However, Apple has failed to release a patched version of Java, even in the latest 10.5.7 update! CVE-2008-5353 is described as follows:</p>
<blockquote><p>Unspecified vulnerability in Java Runtime Environment (JRE) for Sun JDK and JRE 6 Update 10 and earlier; JDK and JRE 5.0 Update 16 and earlier; and SDK and JRE 1.4.2_18 and earlier allows untrusted applets and applications to gain privileges via unknown vectors related to &#8220;deserializing calendar objects.&#8221;</p></blockquote>
<p>Since Apple failed fix this vulnerability in the latest update to OS X (10.5.7), <a href="http://landonf.bikemonkey.org/">Landon Fuller</a>, a programmer and former Apple Engineer, released a <a href="http://landonf.bikemonkey.org/code/macosx/CVE-2008-5353.20090519.html">proof-of-concept</a> demonstrating the exploit. <a href="http://landonf.bikemonkey.org/static/moab-tests/CVE-2008-5353/hello.html">The demonstration</a> is done by launching a Java applet in your web browser and using the exploit to run the <code>/usr/bin/say</code> command on your Mac to &#8220;speak&#8221; some words through your speakers. This may not sound very dangerous, but this same exploit could be used to run malicious code on your Mac without your even knowing it!</p>
<h3>So, how can I protect myself?</h3>
<p>For now, all you can do is entirely disable Java in your browsers to ensure no Java applets are allowed to run. The good news is that chances are you probably don&#8217;t depend on Java anyway (remember, Java is <em>not</em> JavaScript). And if you find yourself needing to run something that does require Java (the browser will alert you with a message saying the Java plugin isn&#8217;t installed), you can always re-enable Java in your browser while you&#8217;re using the applet, and then disable it again when you&#8217;re done. Inconvenient, yes, but worth it. This is one nasty vulnerability, and with all the publicity it&#8217;s been getting lately, there&#8217;s bound to be more malicious code in the wild just waiting to hijack your system.</p>
<h3>Disabling Java in Firefox</h3>
<p>In Firefox, choose from the menu, <code>Firefox -> Preferences</code>. Then select the <code>Content</code> tab and un-check the <code>Use Java</code> option:</p>
<p><img src="http://solidstateraam.com/wp-content/uploads/2009/05/firefox_content_preferences.png" alt="Firefox Content Preferences, Use Java option" /></p>
<h3>Disabling Java in Safari</h3>
<p> (applies to both Safari 3 and Safari 4 Beta)</p>
<p>In Safari, choose from the menu, <code>Safari -> Preferences</code>. Then select the <code>Security</code> tab and un-check the <code>Enable Java</code> option:</p>
<p><img src="http://solidstateraam.com/wp-content/uploads/2009/05/safari_4_security_preferences.png" alt="Safari 4 Beta Security Preferences, Enable Java option" /></p>
<p><strong>Update:</strong> <a href="http://db.tidbits.com/article/10352">TidBITS writes that Apple has released a patched version of Java</a> that fixes this issue. It is available through Software Update.</p>
]]></content:encoded>
			<wfw:commentRss>http://solidstateraam.com/2009/05/alert-to-all-mac-os-x-users-protect-yourself-from-cve-2008-5353/feed/</wfw:commentRss>
		<slash:comments>4</slash:comments>
		</item>
		<item>
		<title>Saving Files as root From Inside VIM</title>
		<link>http://solidstateraam.com/2009/05/saving-files-as-root-from-inside-vim/</link>
		<comments>http://solidstateraam.com/2009/05/saving-files-as-root-from-inside-vim/#comments</comments>
		<pubDate>Sat, 09 May 2009 02:53:36 +0000</pubDate>
		<dc:creator>Raam</dc:creator>
				<category><![CDATA[Linux]]></category>
		<category><![CDATA[VIM]]></category>

		<guid isPermaLink="false">http://solidstateraam.com/?p=187</guid>
		<description><![CDATA[Oftentimes I will be editing a Linux configuration file using vim only to discover that I cannot save it because the file requires root permission to write to it. See how I solved this problem using the linux <code>tee</code> utility.]]></description>
			<content:encoded><![CDATA[<p>Oftentimes I will be editing a Linux configuration file using vim only to discover that I cannot save it because the file requires root permission to write to it. This ends up looking something like this:</p>
<pre class="brush: bash;">
vi /path/to/some/file.conf
[make some edits]
:w
VIM Message: E45: 'readonly' option is set (add ! to override)
:q!
$ sudo vi /path/to/some/file.conf
[make all my edits AGAIN]
:w
</pre>
<p>I have gone through this process <em>so many times</em> that I knew there must be an easy fix for it. (I know about <code>sudo !!</code> for running the previous command, but I only recently started developing the habit of using it.) After forgetting to use sudo while editing a configuration file yet again this morning, I finally decided to search Google and find a solution. Here it is:</p>
<pre class="brush: bash;">
vi /path/to/some/file.conf
[make some edits]
:w
VIM Message: E45: 'readonly' option is set (add ! to override)
:w !sudo tee %
</pre>
<p>The <code>:w !sudo tee %</code> command tells VIM to write the file (<code>w</code>) but run the sudo command first (<code>!sudo</code>) and read the writing of the file from standard input to standard output (<code>tee</code>) using the same filename as the one we&#8217;re editing (<code>%</code>).</p>
<p>After saving the file as root, you&#8217;ll get this message: &#8220;W12: Warning: File &#8220;/private/etc/smb.conf&#8221; has changed and the buffer was changed in Vim as well&#8221;. You&#8217;ll be given the option to reload it, but since you were already looking at the new version it doesn&#8217;t much matter which option you choose (OK or Reload).</p>
<p>And last but not least, if you don&#8217;t want to remember the syntax for this command, you can map the command in your ~/.vimrc file:</p>
<pre class="brush: bash;">
cmap w!! w !sudo tee % &gt;/dev/null
</pre>
<p>Now, if you forget to edit a file with sudo, you can simply type <code>:w!!</code> to fix the problem!</p>
]]></content:encoded>
			<wfw:commentRss>http://solidstateraam.com/2009/05/saving-files-as-root-from-inside-vim/feed/</wfw:commentRss>
		<slash:comments>2</slash:comments>
		</item>
		<item>
		<title>Internet Explorer: Incorrect Password During Certificate Import</title>
		<link>http://solidstateraam.com/2009/05/internet-explorer-incorrect-password-during-certificate-import/</link>
		<comments>http://solidstateraam.com/2009/05/internet-explorer-incorrect-password-during-certificate-import/#comments</comments>
		<pubDate>Sat, 02 May 2009 03:56:47 +0000</pubDate>
		<dc:creator>Raam</dc:creator>
				<category><![CDATA[Internet Explorer]]></category>
		<category><![CDATA[Windows]]></category>

		<guid isPermaLink="false">http://solidstateraam.com/?p=165</guid>
		<description><![CDATA[While importing a P12 certificate into Internet Explorer today, I got a message saying &#8220;The password you entered is incorrect.&#8221;:

However, I successfully imported this same certificate, using the same password, on Firefox and Safari. But Internet Explorer (both IE7 and IE8) continued to tell me I was using the wrong password. After checking, double-checking, and [...]]]></description>
			<content:encoded><![CDATA[<p>While importing a P12 certificate into Internet Explorer today, I got a message saying &#8220;The password you entered is incorrect.&#8221;:</p>
<p><img src="http://solidstateraam.com/wp-content/uploads/2009/05/ie_incorrect_certificate_password.png" alt="Internet Explorer - Incorrect certificate password" /></p>
<p>However, I successfully imported this same certificate, using the same password, on Firefox and Safari. But Internet Explorer (both IE7 and IE8) continued to tell me I was using the wrong password. After checking, double-checking, and quadruple-checking the password, I was 1000% sure the private key password that I was using was correct and that Internet Explorer itself was to blame.</p>
<p>After much trial and error, I discovered the problem: <strong>Internet Explorer has a maximum private key password length!</strong> The password I was using (modified for security purposes, but identical in length) was as follows:</p>
<blockquote><p><code>603979ba15c2097f8f7fy35ec0ucfbeb</code></p></blockquote>
<p>That&#8217;s 32 characters, the same length as an MD5. However, Internet Explorer appears to have a problem with that! I changed the password to the following 26 character password and the certificate imported with no complaints from IE!</p>
<blockquote><p><code>ae869d263e267593286188b638</code></p></blockquote>
<p>If you&#8217;re having the same problem, you may be wondering how to change the password on your P12 file. To do this, you&#8217;ll need access to OpenSSL. If you have a Mac, you might be able to find OpenSSL in <code>/opt/local/bin/openssl</code>. But more likely you&#8217;re on Windows and you will need to download and install the <a href="http://www.openssl.org/related/binaries.html">OpenSSL binary for Windows</a>. </p>
<p>You can use the OpenSSL program to convert the P12 file to PEM format, and then convert the PEM certificate back into a P12 file, using a shorter 26-character password when prompted. Here&#8217;s how:</p>
<p>First, convert the original P12 file to PEM format:</p>
<pre class="brush: bash;">
openssl pkcs12 -in my-original.p12 -out certkey.pem -nodes -clcerts
</pre>
<p>This should give you a file called <code>certkey.pem</code>. This file contains both the certificate and the private key. However, the next command requires that the key be contained in a separate <code>key.pem</code> file, so you&#8217;ll want to edit <code>certkey.pem</code> with a text editor and extract the private key portion (it should be the bottom half of the file). The <code>key.pem</code> file should look somewhat like this:</p>
<pre class="brush: bash;">
Bag Attributes
    localKeyID: EE 35 CB 41 81 23 4C 89 FF 43 42 E0 3C 3B FF 93 9E 0E B7 AA
Key Attributes: &lt;No Attributes&gt;
-----BEGIN RSA PRIVATE KEY-----
MIIoOwLBAAJBANSdWgmhySZsCD/koC6nST/JzH/Uqjm6NXsQwtTwx493rhM/90BB
JyfdkfDQCHR/XP0szI1LqS/AXfSx1q25/3MCAwEAAQJBAM0Iu+Mm7zJTT7nqDgfv
VW+4RaRVp05JHaWQdeerpBnWJI+2NDsiKrovyrvYjglJcdpXHhoM95T5qm8x65XP
MhkCIQD5vQ2dNGoFGn0yL0ELDU39PrVvfZyJV3wXedjrQm9utwIhAN0FRk/qIWzz
p9ZP9DjIpIRj6BdWLRrZmLqxdnUXifSlAiBy6fb1u0RJjK7HBM9dPK7+NHiQEJCS
8dp7wZl5d1xnCSIhANLoF6pmnyLil4QwgVlOTv9ufqjSZ+w5GD7a3Vj678RpAiAV
6rTJ3mAZAeQiaRHhgRP7SuvQS6EDWDPxbMBMwYklfA==
-----END RSA PRIVATE KEY-----
</pre>
<p>With these files in place, you can run the following command to convert the PEM certificate back into a P12 format, providing a new password (maximum 26 characters) when prompted for the Export Password:</p>
<pre class="brush: bash;">
$ openssl pkcs12 -export -in certkey.pem -inkey key.pem -out my-new-certificate.p12 -rand /dev/random
2048 semi-random bytes loaded
Enter Export Password:
Verifying - Enter Export Password:
</pre>
<p>That&#8217;s it! Now you should be able to install the certificate in Internet Explorer without any &#8220;incorrect password&#8221; complaints.</p>
]]></content:encoded>
			<wfw:commentRss>http://solidstateraam.com/2009/05/internet-explorer-incorrect-password-during-certificate-import/feed/</wfw:commentRss>
		<slash:comments>0</slash:comments>
		</item>
		<item>
		<title>Forcing fsck to Run on the Next Reboot</title>
		<link>http://solidstateraam.com/2009/04/forcing-fsck-to-run-on-the-next-reboot/</link>
		<comments>http://solidstateraam.com/2009/04/forcing-fsck-to-run-on-the-next-reboot/#comments</comments>
		<pubDate>Fri, 17 Apr 2009 04:38:29 +0000</pubDate>
		<dc:creator>Raam</dc:creator>
				<category><![CDATA[Linux]]></category>

		<guid isPermaLink="false">http://solidstateraam.com/?p=134</guid>
		<description><![CDATA[The system utility fsck is a tool for checking the consistency of a file system in Unix/Linux. Forcing <code>fsck</code> to run on next reboot is very simple.]]></description>
			<content:encoded><![CDATA[<p>If you need to make sure fsck runs on the next reboot, here&#8217;s a really simple way to do it:</p>
<pre class="brush: bash;">
$ sudo touch /forcefsck
</pre>
<p>Alternatively (and depending on your version of Linux) you may also be able to pass an option to the shutdown command:</p>
<pre class="brush: bash;">
$ shutdown -rF now
</pre>
]]></content:encoded>
			<wfw:commentRss>http://solidstateraam.com/2009/04/forcing-fsck-to-run-on-the-next-reboot/feed/</wfw:commentRss>
		<slash:comments>0</slash:comments>
		</item>
		<item>
		<title>Configuring Static DNS with DHCP on Debian/Ubuntu</title>
		<link>http://solidstateraam.com/2009/02/configuring-static-dns-with-dhcp-on-debianubuntu/</link>
		<comments>http://solidstateraam.com/2009/02/configuring-static-dns-with-dhcp-on-debianubuntu/#comments</comments>
		<pubDate>Tue, 24 Feb 2009 04:53:22 +0000</pubDate>
		<dc:creator>Raam</dc:creator>
				<category><![CDATA[Debian]]></category>
		<category><![CDATA[Linux]]></category>
		<category><![CDATA[Networking]]></category>
		<category><![CDATA[Ubuntu]]></category>

		<guid isPermaLink="false">http://solidstateraam.com/?p=74</guid>
		<description><![CDATA[Dynamic Host Configuration Protocol (DHCP) is a commonly used method of obtaining IP and DNS information automatically from the network. In some cases, you may wish to statically define the DNS servers instead of using the ones provided by the DHCP server. For example if your ISP commonly experiences DNS outages, you might want to [...]]]></description>
			<content:encoded><![CDATA[<p>Dynamic Host Configuration Protocol (<a title="Wikipedia entry on DHCP" href="http://en.wikipedia.org/wiki/Dynamic_Host_Configuration_Protocol">DHCP</a>) is a commonly used method of obtaining IP and DNS information automatically from the network. In some cases, you may wish to statically define the DNS servers instead of using the ones provided by the DHCP server. For example if your ISP commonly experiences DNS outages, you might want to use the DNS servers provided by <a title="OpenDNS" href="http://opendns.com">OpenDNS</a> instead of the ones provided by your ISP.</p>
<p>When using a static IP configuration on Linux, you normally add the DNS servers to the <code>/etc/resolv.conf</code>. However, if you try to add a DNS server to <code>/etc/resolv.conf</code> under a DHCP configuration, you&#8217;ll notice that your static entry disappears as soon as the DHCP client runs (usually on boot). To prevent this, you need to tell the DHCP client to prepend the static DNS server(s) to <code>/etc/resolv.conf</code> before adding the ones provided from the DHCP server (if any).</p>
<p>The configuration file you&#8217;ll need to edit is the same on both Debian and Ubuntu, however depending on your setup the location of the file may vary. Here are the two common places I&#8217;ve found the file:</p>
<p><strong>Debian:</strong> <code>/etc/dhclient.conf</code><br />
<strong>Ubuntu:</strong> <code>/etc/dhcp3/dhclient.conf</code></p>
<p>Open the file in your favorite editor and add one of two lines at the top, separating multiple DNS servers with a comma and ending the entry with a semi-colon:</p>
<p>If you simply want to add static DNS servers to be used in addition to the ones provided by DHCP, use a prepend entry:</p>
<pre class="brush: bash;">prepend domain-name-servers 208.67.222.222, 208.67.220.220;</pre>
<p>If you want to override the DNS servers provided by DHCP entirely and force the system to use the ones you provide, use the supersede entry:</p>
<pre class="brush: bash;">supersede domain-name-servers 208.67.222.222, 208.67.220.220;</pre>
<p>Before these static DNS servers will to be appended to your <code>/etc/resolv.conf</code> file, you&#8217;ll need to re-run the DHCP client. The easiest way to do this is by running <code>/etc/init.d/networking restart</code> (sudo required) or you can try running the <code>dhclient</code> command. </p>
<p>After re-running the DHCP client, check your <code>/etc/resolv.conf</code> file to confirm the static DNS servers have been added.</p>
]]></content:encoded>
			<wfw:commentRss>http://solidstateraam.com/2009/02/configuring-static-dns-with-dhcp-on-debianubuntu/feed/</wfw:commentRss>
		<slash:comments>0</slash:comments>
		</item>
		<item>
		<title>Ripping and Converting DVDs to MPEG-4 on Mac OS X</title>
		<link>http://solidstateraam.com/2009/02/ripping-and-converting-dvds-to-mpeg-4-on-mac-os-x/</link>
		<comments>http://solidstateraam.com/2009/02/ripping-and-converting-dvds-to-mpeg-4-on-mac-os-x/#comments</comments>
		<pubDate>Sun, 01 Feb 2009 23:59:33 +0000</pubDate>
		<dc:creator>Raam</dc:creator>
				<category><![CDATA[OS X]]></category>

		<guid isPermaLink="false">http://solidstateraam.com/?p=5</guid>
		<description><![CDATA[I&#8217;ve been converting a lot of my DVDs to MPEG-4 recently. The process is much easier than I always imagined, so I decided to explain the procedures I use here. All of this is done on my Mac, so the directions are somewhat Mac-specific. That said, HandBrake (the main application used in this process) is [...]]]></description>
			<content:encoded><![CDATA[<p>I&#8217;ve been converting a lot of my DVDs to MPEG-4 recently. The process is much easier than I always imagined, so I decided to explain the procedures I use here. All of this is done on my Mac, so the directions are somewhat Mac-specific. That said, <a href="http://handbrake.fr/">HandBrake</a> (the main application used in this process) is open-source and available on Windows and Linux. You should be able to find MacTheRipper-equivalents for Windows and Linux (and if you know of some, please mention them in the comments!). </p>
<p><strong>Download &#038; Install Software</strong></p>
<ol>
<li><a href="http://www.mactheripper.org/">Download MacTheRipper</a> (v2.6.6 is listed on that site but I&#8217;m using v3.0. Search BitTorrent for the newer version if you&#8217;re interested.)</li>
<li><a href="http://handbrake.fr/">Download HandBrake</a> (I&#8217;m using v0.9.3)</li>
<li>Install the above applications</li>
</ol>
<p><strong>Rip the DVD Using MacTheRipper</strong> (what an awesome name!)</p>
<ol>
<li>Insert the DVD</li>
<li>OS X will automatically start playing the DVD. Press CMD+Q to quit the application.</li>
<li>Launch MacTheRipper (and be careful he doesn&#8217;t hurt you)</li>
<p><a href="http://solidstateraam.com/wp-content/uploads/2009/02/mactheripper_outerlimits.png"><img src="http://solidstateraam.com/wp-content/uploads/2009/02/mactheripper_outerlimits.png" alt="MacTheRipper" /></a></p>
<li>Leave the default options and select File -> Save To&#8230;</li>
<li>Create a new directory to temporarily store the raw contents of the DVD and select it</li>
<li>Click Open. MacTheRipper will automatically start ripping the raw contents of the DVD to the directory you selected</li>
<li>When the ripping finishes, quit MacTheRipper</li>
</ol>
<p><strong>Convert the Raw DVD Data to MPEG-4 Using HandBrake</strong></p>
<ol>
<li>Launch HandBrake (don&#8217;t break your hand)</li>
<li>Upon launching, you should be presented with the Open dialog. You want to select the directory to which you ripped the DVD using MacTheRipper. <em>Note: Select the directory that contains the VIDEO_TS directory, but not VIDEO_TS directory itself! The other directories contain important data, such as AUDIO_TS for audio data.</em></li>
<li>Click Open and HandBrake will scan the various titles in the raw data. When finished, you&#8217;ll be left with the main HandBrake screen</li>
<p><a href="http://solidstateraam.com/wp-content/uploads/2009/02/handbrake_main_screen.png"><img src="http://solidstateraam.com/wp-content/uploads/2009/02/handbrake_main_screen.png" alt="HandBrake Main Screen" /></a></p>
<li>The correct title should already be selected and it should be the longest one in the list. If it&#8217;s a 2-hour DVD, you don&#8217;t want to select the title that says 1 minute. There may be lots of short titles mixed in and these may be extras on the DVD or previews. </li>
<li>After you&#8217;ve selected the correct title, choose browse and select a location where you want to save the converted video. After selecting the location, you can change the filename or leave the default. I like to store various bits of information in the video filename, such as the year the video was released, whether it&#8217;s widescreen or full screen, and the codec and audio formats. For example:
<p>Gattaca.1997.WS.DVDRip.XviD.AC3.avi</li>
<li>Now select the format. I usually choose AVI for the best compatibility.</li>
<li>For video codec, choose &#8220;MPEG-4 (XviD)&#8221;</li>
<li>Next to &#8220;Quality:&#8221;, select &#8220;Target size (MB)&#8221; and use the following guidelines. I like to retain as much of the quality as possible, so I follow these rules. Remember, the higher the file size, the better the quality. If you don&#8217;t care so much about quality or don&#8217;t have lots of free space, you can just use 700MB for DVDs. I use 1400MB for DVDs, and smaller sizes for TV/Documentary or episodic movies.
<p>Here are the sizes I use depending on the length of the movie or episode:</p>
<p>175MB (20-30 mins)<br />
350MB (40-55 mins)<br />
1400MB (90 min+), also known as 2CD quality</li>
<li>Click the &#8220;Audio &#038; Subtitles&#8221; tab</li>
<li>Choose the best audio source quality available. Sometimes the DVD will contain 6-Channel 5.1 audio, but it won&#8217;t be selected by default.</li>
<li>If it&#8217;s available, select &#8220;AC3 Passthru&#8221; under &#8220;Audio Codec&#8221;.</li>
<p><a href="http://solidstateraam.com/wp-content/uploads/2009/02/handbrake_audio_settings.png"><img src="http://solidstateraam.com/wp-content/uploads/2009/02/handbrake_audio_settings.png" alt="HandBrake Audio Settings" /></a></p>
<li>With everything configured, click Start. If you&#8217;re converting a DVD that is a collection of shorter movies (like the Outer Limits DVD I&#8217;m ripping in the example), you can simply click &#8220;Add to Queue&#8221;, repeat the above process for each of the titles, and then click Start when everything is queued up. If you plan to do this though, you should definitely convert at least one episode first to make sure it comes out correct.</li>
</ol>
<p>Depending on the speed of your computer, the quality, and the length of the movie you&#8217;re converting, this process could take anywhere from 30 minutes to 3 hours.</p>
<p>When HandBrake finishes, try watching the resulting AVI and make sure it plays correctly (with sound and all). If you&#8217;re not happy, delete it and repeat the process again. Once you&#8217;re happy with the AVI, you can delete the raw data that you ripped earlier with MacTheRipper (it takes up 6-7GB of space!).</p>
]]></content:encoded>
			<wfw:commentRss>http://solidstateraam.com/2009/02/ripping-and-converting-dvds-to-mpeg-4-on-mac-os-x/feed/</wfw:commentRss>
		<slash:comments>3</slash:comments>
		</item>
	</channel>
</rss>
