<?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/"
	xmlns:creativeCommons="http://backend.userland.com/creativeCommonsRssModule"
>

<channel>
	<title>My pain, your gain.</title>
	<atom:link href="http://blogs.law.harvard.edu/mypain/feed/" rel="self" type="application/rss+xml" />
	<link>http://blogs.law.harvard.edu/mypain</link>
	<description>Troubleshooting myself in the foot.</description>
	<lastBuildDate>Wed, 13 Jun 2012 20:38:12 +0000</lastBuildDate>
	<language>en-US</language>
	<sy:updatePeriod>hourly</sy:updatePeriod>
	<sy:updateFrequency>1</sy:updateFrequency>
	<generator>http://wordpress.org/?v=3.4.1</generator>
<creativeCommons:license>http://creativecommons.org/licenses/by-sa/3.0/</creativeCommons:license>
		<item>
		<title>os x lion (10.7.4) filevault</title>
		<link>http://blogs.law.harvard.edu/mypain/2012/06/13/os-x-lion-10-7-4-filevault/</link>
		<comments>http://blogs.law.harvard.edu/mypain/2012/06/13/os-x-lion-10-7-4-filevault/#comments</comments>
		<pubDate>Wed, 13 Jun 2012 20:38:12 +0000</pubDate>
		<dc:creator>jsdiaz</dc:creator>
				<category><![CDATA[filevault]]></category>
		<category><![CDATA[os x]]></category>
		<category><![CDATA[passwords]]></category>

		<guid isPermaLink="false">http://blogs.law.harvard.edu/mypain/?p=59</guid>
		<description><![CDATA[Filevault and you So we probably wanted to use filevault (FV) a little differently than most users would. Most users would have one account on their mac and login once at the FV login screen &#8211; then they would be done with the login process. This is not what we wanted. We wanted the device [...]]]></description>
			<content:encoded><![CDATA[<h2>Filevault and you</h2>
<p>So we probably wanted to use filevault (FV) a little differently than most users would. Most users would have one account on their mac and login once at the FV login screen &#8211; then they would be done with the login process. This is not what we wanted. We wanted the device to have a global unlock password which would then dump you into the OS login screen. After all, not all passwords are created equal.</p>
<p>We started off simply, create the accounts, start FV full disk encryption (FDE) and then only authorize the account that was being used as the global unlock for the FDE. Then we started getting tricky, to make sure that the global account would not log in, we deleted the account once it was in the FV bios screen. This allows an account to unlock the FDE then drop you into the OS login screen. The issue here is, you cant add any more accounts to the machine because the FV login credentials are automatically updated when you create a new account (not the ideal, but an understandable workflow).</p>
<p>The solution we ended up using is a hybrid of <a href="http://www.tuaw.com/2011/12/12/prevent-certain-accounts-from-unlocking-filevault-2/">TJ Luoma&#8217;s</a> and ours.</p>
<h2>If you dont have FV FDE already enabled</h2>
<ol>
<li>Add all the accounts that you think you will need, plus a global admin account that you will use as the FV login account.</li>
<li>Log into the global admin account and enable FV. Do not enable any of the other users to unlock the disk. You will be prompted to restart.</li>
<li>Once restarted and on the FV login window, log in with the global admin account.</li>
<li>Once logged in, log out of the global admin account and into your normal admin account.</li>
<li>Delete your global admin account, let the FDE process complete and you should be all set.</li>
</ol>
<p>Your mac should now boot and prompt you at the FV login for the global admin account password and then dump you into the standard OS login screen.  Here you can log in with any of the accounts you created in step 1.</p>
<h2>If you have FV FDE already enabled</h2>
<p>If you have FV FDE already enabled and you want to use the login method that this post is describing, the next steps are for you.  If you have FV FDE already enabled, are already using the login method that this post is describing and want to add more user accounts, the next steps are for you too.  Again, much of these steps are similar to similar to <a href="http://www.tuaw.com/2011/12/12/prevent-certain-accounts-from-unlocking-filevault-2/">TJ Luoma&#8217;s</a>, so if my instructions are confusing, consider checking out his.</p>
<p>The first step is some account administration.</p>
<ol>
<li>Add all the accounts that you think you will need, plus a global admin account that you will use as the FV login account.</li>
<li>Log into the global admin account and open the terminal app (type terminal into the spotlight window).</li>
<li>This is where it gets a bit technical.  For all user accounts on your mac there exists a short name, you will need to find out the short names for all the accounts you want to remove from the FV login screen.  If the account name is John Smith, there is probably a short name of johnsmith or jsmith.  A quick cheat to find out all the usernames on your system is to type <code>ls -1 /Users</code> (that is a numeral one) followed by enter.  This will list all of the home directories (you can ignore the one name Shared) on your mac which normally correspond to the usernames.</li>
<li>For every account that you want to remove from the FV login screen you will have to reset the password.  Take all the short names you gathered in step 3 and repeat steps 5-7 with each.</li>
<li>Type <code>sudo -u shortname -s</code> subbing shortname for the actual username</li>
<li>Type <code>passwd</code> and where prompted, enter in the current &#8216;old&#8217; password and then just enter for the new password (ie leave them blank).</li>
<li>Type <code>exit</code></li>
<li>When you are done resetting all of the passwords to blank, type <code>exit</code> and quit terminal.</li>
</ol>
<p>The second step is some FV administration.</p>
<ol>
<li>Go to System Preferences &gt; Security &amp; Privacy &gt; FileVault and click on the Enable Users button on the bottom right.</li>
<li>Set the password of each user to something other than blank, but do not click on Enable User</li>
<li>When all the users&#8217; passwords are set, hit Cancel (counter-intuitive, yes.  Done is also greyed out)</li>
</ol>
<p>The third and last step is a bit-o-cleanup.</p>
<ol>
<li>Log out of the global admin account and into your normal admin account.</li>
<li>Delete your global admin account</li>
</ol>
<p>Your mac should now boot and prompt you at the FV login for the global admin account password and then dump you into the standard OS login screen.  Here you can log in with any of the accounts you created in step 1.</p>
<p>Hope this is helpful to someone.</p>
]]></content:encoded>
			<wfw:commentRss>http://blogs.law.harvard.edu/mypain/2012/06/13/os-x-lion-10-7-4-filevault/feed/</wfw:commentRss>
		<slash:comments>0</slash:comments>
	<creativeCommons:license>http://creativecommons.org/licenses/by-sa/3.0/</creativeCommons:license>
	</item>
		<item>
		<title>fios blocks outbound smtp. gah!  danger, danger &#8211; port 25</title>
		<link>http://blogs.law.harvard.edu/mypain/2011/12/22/fios-blocks-outbound-smtp-gah-danger-danger-port-25/</link>
		<comments>http://blogs.law.harvard.edu/mypain/2011/12/22/fios-blocks-outbound-smtp-gah-danger-danger-port-25/#comments</comments>
		<pubDate>Thu, 22 Dec 2011 16:50:03 +0000</pubDate>
		<dc:creator>jsdiaz</dc:creator>
				<category><![CDATA[configs]]></category>
		<category><![CDATA[email]]></category>
		<category><![CDATA[exim]]></category>
		<category><![CDATA[linux]]></category>
		<category><![CDATA[postfix]]></category>

		<guid isPermaLink="false">http://blogs.law.harvard.edu/mypain/?p=47</guid>
		<description><![CDATA[FIOS blocks outbound SMTP, and I&#8217;m fairly comfortable saying every household ISP should. However, you can use their outbound SMTP servers as a relay to get around this. I had to configure this last night with postfix and I have to say it was trivial to set up. I ended up inserting this to my [...]]]></description>
			<content:encoded><![CDATA[<p>FIOS blocks outbound SMTP, and I&#8217;m fairly comfortable saying <strong>every</strong> household ISP should. However, you can use their outbound SMTP servers as a relay to get around this. I had to configure this last night with postfix and I have to say it was trivial to set up.</p>
<p>I ended up inserting this to my postfix main.cf:</p>
<pre style="border: 1px solid #DADADA; background: none repeat scroll 0 0 #F0F0F0; font-family: Consolas,Monaco,;">relayhost = &#91;outgoing&#46;verizon&#46;net&#93;
smtp_connection_cache_destinations = outgoing&#46;verizon&#46;net
smtp_sasl_auth_enable = yes
smtp_sasl_password_maps = static:username@verizon.net:password
smtp_sasl_security_options = noanonymous
default_destination_concurrency_limit = 4
soft_bounce = yes
</pre>
<p>Thanks to <a title="Jason Haruska" href="http://haruska.com/2009/01/30/ubuntu-postfix-setup-on-verizon-fios/">Jason Haruska</a> for the pointers.</p>
<p>Restart postfix, test (man postfix| mail root -s &#8220;some light reading for you&#8221;) and requeue all the borked messages (postsuper -r ALL) and you are on your way.</p>
<p>I mentioned this to some of my geeky counterparts and they looked at me and said &#8220;Oh, yeah, that rocks, I did that a ways back with Exim.&#8221;  It seems its even easier with exim, you just need to add your username and password to /etc/exim4/passwd.client.  For full instructions on how to do this, check out the <a title="gmail/exim" href="http://wiki.debian.org/GmailAndExim4">gmail/exim</a> page.</p>
<p>My pain your sent mail (I lie, this was not so much of a pain, rather fun).</p>
]]></content:encoded>
			<wfw:commentRss>http://blogs.law.harvard.edu/mypain/2011/12/22/fios-blocks-outbound-smtp-gah-danger-danger-port-25/feed/</wfw:commentRss>
		<slash:comments>0</slash:comments>
	<creativeCommons:license>http://creativecommons.org/licenses/by-sa/3.0/</creativeCommons:license>
	</item>
		<item>
		<title>all temps are not the same</title>
		<link>http://blogs.law.harvard.edu/mypain/2011/06/10/all-temps-are-not-the-same/</link>
		<comments>http://blogs.law.harvard.edu/mypain/2011/06/10/all-temps-are-not-the-same/#comments</comments>
		<pubDate>Fri, 10 Jun 2011 19:29:32 +0000</pubDate>
		<dc:creator>jsdiaz</dc:creator>
				<category><![CDATA[linux]]></category>
		<category><![CDATA[ubuntu]]></category>

		<guid isPermaLink="false">http://blogs.law.harvard.edu/mypain/?p=44</guid>
		<description><![CDATA[I had an interesting problem &#8211; we try to build our VMs as lean as possible so occasionally we will have machines that dont have that much disk or RAM. When RAM is minimal, our /tmp partition, which is a RAMFS device, gets small. Why does this matter, well lots of the processes that run [...]]]></description>
			<content:encoded><![CDATA[<p>I had an interesting problem &#8211; we try to build our VMs as lean as possible so occasionally we will have machines that dont have that much disk or RAM.  When RAM is minimal, our /tmp partition, which is a RAMFS device, gets small.</p>
<p>Why does this matter, well lots of the processes that run like to use tmp space for, well, tmp space.  If this tmp space fills, then the processes that was running, usually fails.</p>
<p>Have you ever seen an error like this?  This was after doing an apt-get dist-upgrade on one of smaller VMs.</p>
<p><code>tar: ./lib/foo/bar/file.bin: Cannot write: No space left on device<br />
tar: Skipping to next header<br />
tar: Error exit delayed from previous errors<br />
dpkg-deb: subprocess tar returned error exit status 2<br />
debsums: can't unpack /var/cache/apt/archives/foo_i386.deb<br />
E: Problem executing scripts DPkg::Post-Invoke 'if [ -x /usr/bin/debsums ]; then /usr/bin/debsums --generate=nocheck -sp /var/cache/apt/archives; fi'<br />
E: Sub-process returned an error code<br />
</code></p>
<p>apt-get does not like to run out of space, and the /tmp partition is pretty small on this machine.  Smaller than the amount of space this package was taking to compile.  This is an easy fix however.  First you have to completely remove this package.  More than likely its got something missing or corrupted.  You can do this easily by entering in the following on a console (substituting &#8220;foo&#8221; for whatever package gave you the error):</p>
<p><code># dpkg --purge foo</code></p>
<p>Once you have the package removed, just run apt-get with &#8220;env TMPDIR=/var/tmp&#8221; prepended to it.  The tmp dir does not have to be /var/tmp, it can be any directory that the user you are running as has write access to.</p>
<p><code># env TMPDIR=/var/tmp apt-get install foo</p>
<p>On a slight aside, we sometimes also get stuck with these errors.</p>
<p><code>dpkg: error processing linux-image-1.2.3-4-server (--purge):<br />
 cannot remove `/boot/System.map-1.2.3-4-server': Read-only file system<br />
</code></p>
<p>This one is easy to fix and we've been doing this one for a while.  On a console, before you run the command that gave you this error, you need to remount the partition (in this case /boot) in RW.</p>
<p><code># mount -oremount,rw /boot</code></p>
]]></content:encoded>
			<wfw:commentRss>http://blogs.law.harvard.edu/mypain/2011/06/10/all-temps-are-not-the-same/feed/</wfw:commentRss>
		<slash:comments>0</slash:comments>
	<creativeCommons:license>http://creativecommons.org/licenses/by-sa/3.0/</creativeCommons:license>
	</item>
		<item>
		<title>autofs annoyances with ubuntu lucid (10.04)</title>
		<link>http://blogs.law.harvard.edu/mypain/2011/02/23/autofs-annoyances-with-ubuntu-lucid-10-04/</link>
		<comments>http://blogs.law.harvard.edu/mypain/2011/02/23/autofs-annoyances-with-ubuntu-lucid-10-04/#comments</comments>
		<pubDate>Wed, 23 Feb 2011 18:53:06 +0000</pubDate>
		<dc:creator>jsdiaz</dc:creator>
				<category><![CDATA[autofs]]></category>
		<category><![CDATA[configs]]></category>
		<category><![CDATA[linux]]></category>
		<category><![CDATA[ubuntu]]></category>

		<guid isPermaLink="false">http://blogs.law.harvard.edu/mypain/?p=36</guid>
		<description><![CDATA[Like a lot of admins that run ubuntu, we decided to update many of our machines to ubuntu&#8217;s next LTS release, lucid lynx, aka ubuntu 10.04.  We dont run a huge shop here, we have under 100 machines, a significant percentage of which are VMs, but repeatedly fixing bugs does still annoy me.  One of [...]]]></description>
			<content:encoded><![CDATA[<p>Like a lot of admins that run ubuntu, we decided to update many of our machines to ubuntu&#8217;s next LTS release, lucid lynx, aka ubuntu 10.04.  We dont run a huge shop here, we have under 100 machines, a significant percentage of which are VMs, but repeatedly fixing bugs does still annoy me.  One of the bugs present in lucid is particularly annoying because it affects how autofs starts at boot.  Services have dependencies, and its complicated to sort them out &#8211; I get that &#8211; but come on ubuntu, dependencies are not a new development and sorting them out should be easy enough for a bunch of smart developers.</p>
<p>The specifics are this:</p>
<p>1. Lucid switched to upstart.  To put it succinctly: &#8220;upstart is a replacement for the /sbin/init daemon which handles starting of tasks and services during boot, stopping them during shutdown and supervising them while the system is running.&#8221;</p>
<p>2. Upstart does not like autofs.</p>
<p>Not to rant too much, but if you are going to replace init, please do it with something that does not require that every person installing various packages has to do the hacks I am about to point out.</p>
<p>Thankfully, there are a bunch of smart, technical people that run ubuntu systems.  On top of that, when things go wrong they complain and post <a title="autofs bug at ubuntu support" href="https://bugs.launchpad.net/ubuntu/+source/autofs/+bug/573919" target="_blank">bug reports</a>.  After some quick searching I thought I had fixed the bug.  That was until upstart was updated a couple of weeks back and the boot problems started again with autofs.</p>
<p>The solution is similar to the one I originally implemented, per the suggestion of <a title="autofs bug at ubuntu support" href="https://bugs.launchpad.net/ubuntu/+source/autofs/+bug/573919/comments/15" target="_blank">comment #15</a>, but it works past the update that had broken autofs again.  In the /etc/init directory edit the autofs.conf file and add the following stanza directly after the pre-start script line.</p>
<p><code>statd_status=`status statd| cut -d, -f1`<br />
while [ "$statd_status" != "statd start/running" ]; do<br />
sleep 5<br />
start statd<br />
let i++; statd_status=`status statd| cut -d, -f1`<br />
if [ $i -gt 10 ]; then<br />
echo "statd startup failed"<br />
fi<br />
done</code></p>
<p>Once this is in you should be able to (re)start autofs.  Next time the machine is rebooted, autofs will have been started automatically.  Essentially this is the same hack as the one in the aforementioned comment, with the exception that the while loop causes the script to <em>wait</em> until it sees statd has successfully started.</p>
<p>Ok, back to finding more annoying things.</p>
]]></content:encoded>
			<wfw:commentRss>http://blogs.law.harvard.edu/mypain/2011/02/23/autofs-annoyances-with-ubuntu-lucid-10-04/feed/</wfw:commentRss>
		<slash:comments>0</slash:comments>
	<creativeCommons:license>http://creativecommons.org/licenses/by-sa/3.0/</creativeCommons:license>
	</item>
		<item>
		<title>WordPress author list with gravatars &#8211; but for WPMU</title>
		<link>http://blogs.law.harvard.edu/mypain/2010/09/09/wordpress-author-list-with-gravatars-but-for-wpmu/</link>
		<comments>http://blogs.law.harvard.edu/mypain/2010/09/09/wordpress-author-list-with-gravatars-but-for-wpmu/#comments</comments>
		<pubDate>Thu, 09 Sep 2010 22:35:31 +0000</pubDate>
		<dc:creator>jsdiaz</dc:creator>
				<category><![CDATA[code]]></category>
		<category><![CDATA[php]]></category>
		<category><![CDATA[wpmu]]></category>

		<guid isPermaLink="false">http://blogs.law.harvard.edu/mypain/?p=14</guid>
		<description><![CDATA[So this seemed really easy, but apparently it was not, or I guess I would not be writing about it here.  Ok, here is the deal, I wanted a full list of all the authors on one particular blog.  I wanted them all on one page and listed out with links to their blog posts.  [...]]]></description>
			<content:encoded><![CDATA[<p>So this seemed really easy, but apparently it was not, or I guess I would not be writing about it here.  Ok, here is the deal, I wanted a full list of all the authors on one particular blog.  I wanted them all on one page and listed out with links to their blog posts.  I wanted them all to have images next to their names.  The standard way to do this seems to be to list out all the user names on your blog, since hey, no harm here, we are only running one blog.</p>
<p>Enter WPMU.  We are not running just one blog, we are running hundreds and have thousands of users.  Listing out all the users via a SQL query would be a huge list, not to mention not at all representative of who is an author on this particular blog.  I did some looking around on the <a title="Wordpress Codex" href="http://codex.wordpress.org" target="_blank">wordpress codex</a> and found a couple of functions that I thought could be helpful.  The first one that came up was <a title="Wordpress function wp_list_authors" href="http://codex.wordpress.org/Function_Reference/wp_list_authors" target="_blank">wp_list_authors</a>.  This function just lists out all the authors for a particular blog &#8211; particularly helpful for WPMU sites.</p>
<p>Now the problem with wp_list_authors is that it just outputs the list of authors as a chunk of links, so you have to chop it up somehow since its not in the loop &#8211; yeah, we are doing all this outside of the loop.  The second issue is that this is all that it puts out &#8211; links to the author archive page.  No ids, no emails, nothing &#8211; its not like <a title="Wordpress function the_author_meta" href="http://codex.wordpress.org/Function_Reference/the_author_meta" target="_blank">the_author_meta</a> which gives you all kinds of nice stuff.</p>
<p>Ok, but at least we have something we can hack up, so I started in on it and this is what I came up with.</p>
<pre style="border: 1px solid #DADADA; background: none repeat scroll 0 0 #F0F0F0; font-family: Consolas,Monaco,;">&lt;?php
$allAuthorNames = explode(',',wp_list_authors('style=0&amp;show_fullname=1&amp;hide_empty=0&amp;echo=0'));
foreach ( $allAuthorNames as $oneAuthorName ) { ?&gt;
  &lt;li&gt;
  &lt;?php
  $oneAuthorArray = explode(" ",$oneAuthorName);
  if (count($oneAuthorArray) &gt; 1) {
    $oneAuthorLink = explode("/",$oneAuthorArray[2]);
    end($oneAuthorLink);
    $userData = get_userdatabylogin(prev($oneAuthorLink));
  } else {
    $userData = array("user_email" =&gt; "None");
  }
echo get_avatar($userData-&gt;user_email,$size='96',$default='');
?&gt;
&lt;?php echo ($oneAuthorName); ?&gt;
&lt;/li&gt;
&lt;?php } ?&gt;</pre>
<p>Pardon my PHP, it sucks, but in any case it gets it done here at least.</p>
<p>Notice the nice function that gets it done?  Oddly, there is not much documentation to the <a title="Wordpress function get_userdatabylogin" href="http://codex.wordpress.org/Function_Reference/get_userdatabylogin" target="_blank">get_userdatabylogin</a> function, but its a nice one.  Tie together wp_list_authors with get_userdatabylogin and you can get even more info than you can get from the_author_meta.</p>
<p>Now this code is by no means the finished product, but it does work and it is a nice way to get a full list of everything that the author has in their profile in the DB.  At the moment I just used it to get the email address of the author I was iterating over, but the function dumps out the entire user DB row object.  A bit dangerous I suspect, but useful.</p>
<p>Happy coding,  hope this saves you a bit of time.</p>
]]></content:encoded>
			<wfw:commentRss>http://blogs.law.harvard.edu/mypain/2010/09/09/wordpress-author-list-with-gravatars-but-for-wpmu/feed/</wfw:commentRss>
		<slash:comments>0</slash:comments>
	<creativeCommons:license>http://creativecommons.org/licenses/by-sa/3.0/</creativeCommons:license>
	</item>
		<item>
		<title>SLAPd</title>
		<link>http://blogs.law.harvard.edu/mypain/2010/08/27/slapd/</link>
		<comments>http://blogs.law.harvard.edu/mypain/2010/08/27/slapd/#comments</comments>
		<pubDate>Fri, 27 Aug 2010 20:08:45 +0000</pubDate>
		<dc:creator>jsdiaz</dc:creator>
				<category><![CDATA[LDAP]]></category>

		<guid isPermaLink="false">http://blogs.law.harvard.edu/mypain/?p=12</guid>
		<description><![CDATA[SLAPd: if you need a daemon to to do it for you, you&#8217;re doing it too often. Hmm.  No.  Wait, its for LDAP?  Damn.]]></description>
			<content:encoded><![CDATA[<p>SLAPd: if you need a daemon to to do it for you, you&#8217;re doing it too often.</p>
<p>Hmm.  No.  Wait, its for LDAP?  Damn.</p>
]]></content:encoded>
			<wfw:commentRss>http://blogs.law.harvard.edu/mypain/2010/08/27/slapd/feed/</wfw:commentRss>
		<slash:comments>0</slash:comments>
	<creativeCommons:license>http://creativecommons.org/licenses/by-sa/3.0/</creativeCommons:license>
	</item>
		<item>
		<title>Changing your password</title>
		<link>http://blogs.law.harvard.edu/mypain/2010/06/08/changing-your-password/</link>
		<comments>http://blogs.law.harvard.edu/mypain/2010/06/08/changing-your-password/#comments</comments>
		<pubDate>Tue, 08 Jun 2010 13:37:38 +0000</pubDate>
		<dc:creator>jsdiaz</dc:creator>
				<category><![CDATA[linux]]></category>
		<category><![CDATA[passwords]]></category>
		<category><![CDATA[ssh]]></category>
		<category><![CDATA[ubuntu]]></category>

		<guid isPermaLink="false">http://blogs.law.harvard.edu/mypain/?p=7</guid>
		<description><![CDATA[A lot of times people think changing passwords is such a pain. I always look at it in terms of security &#8211; how many times has possible malfeasance had the chance to take place in the time that you have been using your password. Its also nice to look at it in terms of a [...]]]></description>
			<content:encoded><![CDATA[<p>A lot of times people think changing passwords is such a pain.  I always look at it in terms of security &#8211; how many times has possible malfeasance had the chance to take place in the time that you have been using your password.  Its also nice to look at it in terms of a review of where your password is stored.  Change you password, everything that has it stored in some cache breaks.  Its an A-ha! moment; too few of those in our daily lives.  To make a game of it, think of it as a learning activity &#8211; how long does it take you to remember it without having to read it back, how long until you are not looking at the keyboard, how long until you have to actually think about your password because your muscles have retained it in memory.  Compare to the last time &#8211; are you getting better or worse?</p>
<p>With that in mind, following are the instructions on changing a password where your password probably has not been changed in a while.</p>
<p><strong>Changing your ssh key password with ssh-keygen</strong></p>
<p>The <strong>-p</strong> option requests changing the passphrase of a private key file instead of creating a new private key. The program will prompt for the file containing the private key, for the old passphrase, and twice for the new passphrase.  Use <strong>-f {filename}</strong> option to specifies the filename of the key file. For example, change directory to .ssh:</p>
<p>$ cd .ssh</p>
<p>To change your ssh-key passphrase, enter:</p>
<p>$  ssh-keygen -f id_{rsa or dsa} -p</p>
]]></content:encoded>
			<wfw:commentRss>http://blogs.law.harvard.edu/mypain/2010/06/08/changing-your-password/feed/</wfw:commentRss>
		<slash:comments>0</slash:comments>
	<creativeCommons:license>http://creativecommons.org/licenses/by-sa/3.0/</creativeCommons:license>
	</item>
		<item>
		<title>PAM configurations</title>
		<link>http://blogs.law.harvard.edu/mypain/2007/08/08/pam-configurations/</link>
		<comments>http://blogs.law.harvard.edu/mypain/2007/08/08/pam-configurations/#comments</comments>
		<pubDate>Wed, 08 Aug 2007 22:15:41 +0000</pubDate>
		<dc:creator>jsdiaz</dc:creator>
				<category><![CDATA[configs]]></category>
		<category><![CDATA[LDAP]]></category>
		<category><![CDATA[PAM]]></category>

		<guid isPermaLink="false">http://blogs.law.harvard.edu/mypain/2007/08/08/pam-configurations/</guid>
		<description><![CDATA[PAM is good stuff.  It abstracts the authentication for applications from the backend that will ultimately verify accounts and settings.  But what are those pesky brackets doing in that config file.  I thought that only required, sufficient and optional were required.]]></description>
			<content:encoded><![CDATA[<p>Ok, so this one did not take me hours, but I did have to go read a manual because no one seems to explain these settings &#8211; everyone just says &#8220;hey!  these settings worked for me, plug em in.&#8221;  That was my cue to try and understand it better.</p>
<p>Turns out that the <a href="http://www.kernel.org/pub/linux/libs/pam/Linux-PAM-html/Linux-PAM_SAG.html">Linux PAM system administrators guide</a> was not really that bad and had some very useful explanations of how things work.</p>
<p>One thing I was looking to find out what the new bracket &#8220;[]&#8221; syntax for PAM config files works.  Most admins will probably have seen this example somewhere:</p>
<p><code>auth [success=1 default=ignore] pam_ldap.so<br />
auth required pam_unix.so try_first_pass<br />
auth required pam_permit.so </code></p>
<p>What is up with those brackets?  Turns out its pretty simple.  According to the docs, the <code>value=action</code> control values are just a way of telling PAM what to do with the result of the rule (In this case, the rule is go check <code>pam_unix.so</code> and tell me what it said).</p>
<p>The value for the control can be set to any of the return values of the rule &#8211; success being rather obvious, default meaning anything that I didnt explicitly write.  The action for the control can be ignore, bad, die, ok, done, reset or a number &#8211; the number just means skip the next N rules (the <a href="http://www.kernel.org/pub/linux/libs/pam/Linux-PAM-html/sag-configuration-file.html">PAM SAG</a> explains the config syntax fully).</p>
<p>In the above case, PAM is being instructed, in the <code>common-auth</code> config file to check LDAP first, ignore its failure if it cant find a username:password pair in the directory, or skip the next rule if it does find the pair.  If it fails, it falls back to local accounts, if it succeeds iit jumps to the <code>pam_permit.so</code> rule which just permits anything it gets (keep in mind that if any <code>required</code> rule fails, the whole block fails, so thats why <code>pam_permit.so</code> cant permit something that <code>pam_unix.so</code> fails).</p>
<p>Thats it &#8211; pretty thought out by those clever PAM people.  I hope I&#8217;ve explained it well enough here to help out.  For a more in depth read, check out the <a href="http://www.kernel.org/pub/linux/libs/pam/Linux-PAM-html/Linux-PAM_SAG.html">Linux PAM system administrators guide</a>.</p>
<p>My &#8211; aww man, do I really have to read this manual &#8211; pain, your gain.</p>
]]></content:encoded>
			<wfw:commentRss>http://blogs.law.harvard.edu/mypain/2007/08/08/pam-configurations/feed/</wfw:commentRss>
		<slash:comments>0</slash:comments>
	<creativeCommons:license>http://creativecommons.org/licenses/by-sa/3.0/</creativeCommons:license>
	</item>
		<item>
		<title>postfix bug! no, cyrus bug! no, bdb bug! yay!</title>
		<link>http://blogs.law.harvard.edu/mypain/2007/08/02/postfix-bug-no-cyrus-bug-no-bdb-bug-yay/</link>
		<comments>http://blogs.law.harvard.edu/mypain/2007/08/02/postfix-bug-no-cyrus-bug-no-bdb-bug-yay/#comments</comments>
		<pubDate>Thu, 02 Aug 2007 18:43:18 +0000</pubDate>
		<dc:creator>jsdiaz</dc:creator>
				<category><![CDATA[cyrus]]></category>
		<category><![CDATA[email]]></category>
		<category><![CDATA[postfix]]></category>
		<category><![CDATA[ubuntu]]></category>

		<guid isPermaLink="false">http://blogs.law.harvard.edu/mypain/2007/08/02/postfix-bug-no-cyrus-bug-no-bdb-bug-ya</guid>
		<description><![CDATA[When installing cyrus and postfix on ubuntu dapper 6.06 LTS, there can be a problem with LMTP delivery when duplicate suppression is enabled and when berkeley db 4.2 which is included in the os distribution and required by the cyrus package is installed.]]></description>
			<content:encoded><![CDATA[<p>So this is what you get for my efforts &#8211; a discription of something it took me more than a couple of hours to fix and that, in my opinion, were not that easy to find a solution to.</p>
<p>I&#8217;ve been installing a new mail server, the usual suspects involved, postfix + cyrus.  In the past they have always played well together, and they continue to do so today.  Both, I think, are excellent choices when going for mail processing and end user delivery.</p>
<p>However, in this installation instance, which, as we hit the brass tax, did not work quite right.</p>
<p>&#8211;</p>
<p>The installation was done on a normal intel server running ubuntu 6.06.1 LTS release, with nothing special installed &#8211; pretty much vanilla.  One this that was being done out of the ordinary was using an LDAP backend for the whole thing to authenticate off of.  However, that didnt, as things end up, causing any issues.</p>
<p>After everything was installed and tested by the truly faithful who volunteered to move their mail spools over to the new server; it did have new features, was a more powerful server, have updated code, so it was an upgrade from the aging existing server.  The problems started showing up after the server was put under some load.  Postfix started reporting odd bounced messages, with a most peculiar error.</p>
<p><code>Jul 18 14:52:48 HOST postfix/lmtp[6763]: 9E7451008B: to=&lt;...&gt;, orig_to=&lt;...&gt;,<br />
relay=/var/run/cyrus/socket/lmtp[/var/run/cyrus/socket/lmtp], delay=1, status=bounced<br />
(host /var/run/cyrus/socket/lmtp[/var/run/cyrus/socket/lmtp] said: 250 2.1.5 ok (in reply to DATA command))</code></p>
<p>Hey postfix, cyrus said OK and you bounced the email.  Are you guys listening to each other?</p>
<p>So I went to google and searched the error and came up with two interesting theories, by other admins who were also having issues with the same thing.  I must admit that I would be defensive too, but Wietse and Viktor got a little crabby.  Anyway,  one says this is the fault of postfix pipelining and the other says this is the fault of cyrus duplicate suppression.  One of them was partially right in my opinion.</p>
<p><a href="http://www.irbs.net/internet/info-cyrus/0609/0435.html">http://www.irbs.net/internet/info-cyrus/0609/0435.html</a></p>
<p><a href="http://archives.neohapsis.com/archives/postfix/2007-02/0940.html">http://archives.neohapsis.com/archives/postfix/2007-02/0940.html</a></p>
<p>So rather than disable pipelining, which would affect performance for almost everything dealing with postfix (although I think I understand now that you can just limit it for one particular place withing postfix and let other clients use it) I went and messed with duplicate suppression.</p>
<p>In <code>imapd.conf</code> I set, per the docs, <code>duplicatesuppression: 0</code>.  Restarted cyrus, postfix for good measure and yay it seemed to be fixed.  However while under load, the problem came back.  Boo.  I went ahead and reenabled duplicate suppression in cyrus, it was something that I wanted to keep anyway, however I knew that it had something to do with it so I kept digging in that general vicinity.</p>
<p>Turns out that Jon was right (in the above neohapsis post) and was duplicate suppression causing the problem, but not as he thought.  The error that cyrus reported back in debug was the key &#8211; cyrus kept reporting how many lockers there were on the duplicate db, and that was causing postfix to abort.  Lockers it turns out, related more to the db than to cyrus duplicate delivery.</p>
<p>In this case, the default setting, cyrus was using berkeley db as the backend for the duplicate database.  I switched this setting (<code>duplicate_db: skiplist</code>) over to skiplist in <code>imapd.conf</code> and putting the server under load while watching the logs: the errors did not reappear.</p>
<p>Doing some more research on this, I found out that BDB 4.2 has a bug in it (which dapper is running and which cyrus is compiled with).  Recompiling cyrus with BDB 4.3 or switching the duplicate suppression to use something that does not involve BDB 4.2 fixed the issue, even under load.  Yay!</p>
<p>My pain, your gain.</p>
]]></content:encoded>
			<wfw:commentRss>http://blogs.law.harvard.edu/mypain/2007/08/02/postfix-bug-no-cyrus-bug-no-bdb-bug-yay/feed/</wfw:commentRss>
		<slash:comments>0</slash:comments>
	<creativeCommons:license>http://creativecommons.org/licenses/by-sa/3.0/</creativeCommons:license>
	</item>
		<item>
		<title>About</title>
		<link>http://blogs.law.harvard.edu/mypain/2007/08/02/about/</link>
		<comments>http://blogs.law.harvard.edu/mypain/2007/08/02/about/#comments</comments>
		<pubDate>Thu, 02 Aug 2007 17:42:06 +0000</pubDate>
		<dc:creator>jsdiaz</dc:creator>
				<category><![CDATA[Uncategorized]]></category>

		<guid isPermaLink="false"></guid>
		<description><![CDATA[I decided to stop just searching for info and elevate myself from leech status by blogging on problems that it took me more than a couple of hours to fix. My pain in fixing the issues, your gain in benefiting from my fixorating stuff (your pain possibly in having to read my writing however).]]></description>
			<content:encoded><![CDATA[<p>I decided to stop just searching for info and elevate myself from leech status by blogging on problems that it took me more than a couple of hours to fix.  My pain in fixing the issues, your gain in benefiting from my fixorating stuff (your pain possibly in having to read my writing however).</p>
]]></content:encoded>
			<wfw:commentRss>http://blogs.law.harvard.edu/mypain/2007/08/02/about/feed/</wfw:commentRss>
		<slash:comments>0</slash:comments>
	<creativeCommons:license>http://creativecommons.org/licenses/by-sa/3.0/</creativeCommons:license>
	</item>
	</channel>
</rss>
