<?xml version="1.0" encoding="UTF-8"?>
<rss version="2.0"
	xmlns:content="http://purl.org/rss/1.0/modules/content/"
	xmlns:wfw="http://wellformedweb.org/CommentAPI/"
	xmlns:dc="http://purl.org/dc/elements/1.1/"
	xmlns:atom="http://www.w3.org/2005/Atom"
	xmlns:sy="http://purl.org/rss/1.0/modules/syndication/"
	xmlns:slash="http://purl.org/rss/1.0/modules/slash/"
	>

<channel>
	<title>Elfstone &#187; Sysadmin</title>
	<atom:link href="http://elfstone.nl/category/sysadmin/feed/" rel="self" type="application/rss+xml" />
	<link>http://elfstone.nl</link>
	<description>Don't believe the hype</description>
	<lastBuildDate>Sun, 04 Dec 2011 20:54:47 +0000</lastBuildDate>
	<language>en</language>
	<sy:updatePeriod>hourly</sy:updatePeriod>
	<sy:updateFrequency>1</sy:updateFrequency>
	<generator>http://wordpress.org/?v=3.3</generator>
		<item>
		<title>Debian packages: debugging postinst</title>
		<link>http://elfstone.nl/2010/06/02/debian-packages-debugging-postinst/</link>
		<comments>http://elfstone.nl/2010/06/02/debian-packages-debugging-postinst/#comments</comments>
		<pubDate>Wed, 02 Jun 2010 12:37:16 +0000</pubDate>
		<dc:creator>michiel</dc:creator>
				<category><![CDATA[Programming]]></category>
		<category><![CDATA[Sysadmin]]></category>

		<guid isPermaLink="false">http://elfstone.nl/?p=348</guid>
		<description><![CDATA[When writing debian packages, sometimes things go wrong in the postinst stage. An error like &#8220;the postinstallation script returned an error code of 1&#8243; will occur. This is not very informative. If you want to debug postinst scripts, you can easily do this on the machine where you (half) installed the package. Normally you can [...]]]></description>
			<content:encoded><![CDATA[<p>When writing debian packages, sometimes things go wrong in the postinst stage. An error like &#8220;the postinstallation script returned an error code of 1&#8243; will occur. This is not very informative.</p>
<p>If you want to debug postinst scripts, you can easily do this on the machine where you (half) installed the package. Normally you can execute /var/lib/dpkg/info/foo.postinst like this:<br />
<code><br />
sh -x /var/lib/dpkg/info/foo.postinst configure<br />
</code></p>
<p>However, if you use debconf, the output will be like this:<br />
<code>+ . /usr/share/debconf/confmodule<br />
+ [ !  ]<br />
+ PERL_DL_NONLAZY=1<br />
+ export PERL_DL_NONLAZY<br />
+ [  ]<br />
+ exec /usr/share/debconf/frontend /var/lib/dpkg/info/foo.postinst<br />
</code></p>
<p>Which is not helpful either. However, you can add &#8220;set -x&#8221; in /var/lib/dpkg/info/foo.postinst and then just execute it, it will give you the full output.</p>
<p><code><br />
sh /var/lib/dpkg/info/foo.postinst configure<br />
</code></p>
<p>Now the debugging process can begin!</p>
]]></content:encoded>
			<wfw:commentRss>http://elfstone.nl/2010/06/02/debian-packages-debugging-postinst/feed/</wfw:commentRss>
		<slash:comments>0</slash:comments>
		</item>
		<item>
		<title>Debian packaging: multiple packages</title>
		<link>http://elfstone.nl/2009/11/25/debian-packaging-multiple-packages/</link>
		<comments>http://elfstone.nl/2009/11/25/debian-packaging-multiple-packages/#comments</comments>
		<pubDate>Wed, 25 Nov 2009 12:08:52 +0000</pubDate>
		<dc:creator>michiel</dc:creator>
				<category><![CDATA[Programming]]></category>
		<category><![CDATA[Sysadmin]]></category>

		<guid isPermaLink="false">http://elfstone.nl/?p=224</guid>
		<description><![CDATA[For different projects, I&#8217;ve made debian packages before, but I&#8217;ve never had a project where multiple packages were created from one control file. Today, I had to work on a project where I had to do this. Everything went as normal, except that I could not find out where to install the files so dh_builddeb [...]]]></description>
			<content:encoded><![CDATA[<p>For different projects, I&#8217;ve made debian packages before, but I&#8217;ve never had a project where multiple packages were created from one control file. Today, I had to work on a project where I had to do this. Everything went as normal, except that I could not find out where to install the files so dh_builddeb could include them in their respective packages.</p>
<p>When only one package is made, this is easy: just install the files in debian/tmp as you would when installing on the system. For multiple packages, each package has its own directory: debian/&lt;package-name&gt;. How does dh_builddeb figure out which directory to use?</p>
<p><strong>Apparently, the default behaviour is to let the first package use the debian/tmp dir, and the other packages use the debian/&lt;package-name&gt; directory.<br />
</strong></p>
<p>I would rather have them all using the debian/&lt;package-name&gt; directory, but I could not find an option to do this.</p>
<p><em>Update:</em><br />
It seems that setting the compatibility level to 7 fixes this behaviour (echo &#8220;7&#8243; &gt; debian/compat), see man debhelper (section &#8220;Compatibility levels&#8221; for more info.</p>
]]></content:encoded>
			<wfw:commentRss>http://elfstone.nl/2009/11/25/debian-packaging-multiple-packages/feed/</wfw:commentRss>
		<slash:comments>0</slash:comments>
		</item>
		<item>
		<title>Munin plugin bind9</title>
		<link>http://elfstone.nl/2009/11/01/munin-plugin-bind9/</link>
		<comments>http://elfstone.nl/2009/11/01/munin-plugin-bind9/#comments</comments>
		<pubDate>Sun, 01 Nov 2009 14:42:38 +0000</pubDate>
		<dc:creator>michiel</dc:creator>
				<category><![CDATA[Sysadmin]]></category>

		<guid isPermaLink="false">http://elfstone.nl/?p=219</guid>
		<description><![CDATA[Today, I was trying to get the &#8216;bind9&#8242; plugin to work, but it didn&#8217;t work out-of-the-box. So I debugged and I found out that the standard bind9 plugin does not consider &#8216;views&#8217;. My bind9 setup has an &#8216;internal&#8217; as well as an &#8216;external&#8217; view. In the bind9 query log, this adds a &#8216;view internal: &#8216; [...]]]></description>
			<content:encoded><![CDATA[<p>Today, I was trying to get the &#8216;bind9&#8242; plugin to work, but it didn&#8217;t work out-of-the-box. So I debugged and I found out that the standard bind9 plugin does not consider &#8216;views&#8217;. My bind9 setup has an &#8216;internal&#8217; as well as an &#8216;external&#8217; view. In the bind9 query log, this adds a &#8216;view internal: &#8216; for each line, so the plugin didn&#8217;t see it as a valid query line:</p>
<pre>
client 192.168.1.1#37242: view internal: query: www.apple.com IN A +
</pre>
<p>I changed the regexp and I archive it here in case anyone else (or future-me) wants to use this:</p>
<pre>
--- bind9.orig	2009-11-01 15:06:16.000000000 +0100
+++ bind9.new	2009-11-01 15:06:07.000000000 +0100
@@ -73,9 +73,9 @@
     open(Q,"< $QUERYLOG") or die "$!";
     while (&lt;Q&gt;) {
 	chomp;
-	if (/client \d+\.\d+.\d+.\d+\#\d+: query\: \S+ (\w+) (\w+)/) {
-	    if ($1 eq 'IN' and $2 !~ /^TYPE/) {
-		$IN{$2}++;
+	if (/client \d+\.\d+.\d+.\d+\#\d+: (view \w+: )?query\: \S+ (\w+) (\w+)/) {
+	    if ($2 eq 'IN' and $3 !~ /^TYPE/) {
+		$IN{$3}++;
 	    } else {
 		$OTHER++;
 	    }
</pre>
<p>By the way, I also found out that there is a program called 'munin-run' which can be used to run the plugin as munin would, this saves a lot of hassle with sudo and environment settings!</p>
]]></content:encoded>
			<wfw:commentRss>http://elfstone.nl/2009/11/01/munin-plugin-bind9/feed/</wfw:commentRss>
		<slash:comments>0</slash:comments>
		</item>
		<item>
		<title>kjoradsatn. omtitra  eod</title>
		<link>http://elfstone.nl/2009/10/08/kjoradsatn-omtitra-eod/</link>
		<comments>http://elfstone.nl/2009/10/08/kjoradsatn-omtitra-eod/#comments</comments>
		<pubDate>Thu, 08 Oct 2009 07:35:58 +0000</pubDate>
		<dc:creator>michiel</dc:creator>
				<category><![CDATA[Sysadmin]]></category>

		<guid isPermaLink="false">http://elfstone.nl/?p=208</guid>
		<description><![CDATA[Today, I found this in the mail. I&#8217;m not sure if I should keep this kernel (it&#8217;s a stock Debian kernel: linux-image-2.6.26-2-vserver-amd64, 2.6.26-15). Google does not give any results, seems like a corruption of log messages. Oct 8 03:32:08 hoshi kernel: [145430.434977]kjoradsatn. omtitra eod edit: Oct 9 Today, I got this one, this is getting [...]]]></description>
			<content:encoded><![CDATA[<p>Today, I found this in the mail. I&#8217;m not sure if I should keep this kernel (it&#8217;s a stock Debian kernel: linux-image-2.6.26-2-vserver-amd64, 2.6.26-15). Google does not give any results, seems like a corruption of log messages.</p>
<pre>
Oct  8 03:32:08 hoshi kernel: [145430.434977]kjoradsatn. omtitra  eod</pre>
<p><em>edit: Oct 9</em><br />
Today, I got this one, this is getting scary:</p>
<pre>
Oct  9 03:32:08 hoshi kernel: >99873]koradsatn. omtitra  eod
</pre>
<p>The only link I could find was this one: http://forums.gentoo.org/viewtopic-t-245137-start-0.html But it does not help me a lot.</p>
<p>When comparing the output of dmesg to the one in /var/log/kern.log (which is the source of the garbled messages), the only thing that is missing in the kern.log is this:</p>
<pre>
[236989.877537] kjournald starting.  Commit interval 5 seconds
</pre>
<p>It looks like this is the source from the garbled message: If you start from &#8216;k&#8217; and take only every other character, you&#8217;ll see. So apparently, this is not a kernel problem (because the message appears ungarbled in dmesg) but rather a problem with syslogd.</p>
<p>Now things get really strange, as I have an rsyslogd daemon running, but I could not find the binary on the disk. It seems that I accidentally started a syslog daemon in a chroot (I did play around with that certain chroot, because I was fixing a computer that was booting via nfs-root from this machine).</p>
<p>The funny thing is that the rsyslogd that was running, was actually a 32-bit executable (the nfsroot is a 32-bits install), while the host is a 64-bit system. So I&#8217;ve been running a 32-bit syslogd on a 64-bit for two days :)</p>
<p>I&#8217;ll see if I get another garbled message tomorrow, but I think the problem is solved now :)</p>
]]></content:encoded>
			<wfw:commentRss>http://elfstone.nl/2009/10/08/kjoradsatn-omtitra-eod/feed/</wfw:commentRss>
		<slash:comments>0</slash:comments>
		</item>
		<item>
		<title>New iPhone/iPod touch wireless profile (RuG-FN2)</title>
		<link>http://elfstone.nl/2009/07/08/new-iphoneipod-touch-wireless-profile-rug-fn2/</link>
		<comments>http://elfstone.nl/2009/07/08/new-iphoneipod-touch-wireless-profile-rug-fn2/#comments</comments>
		<pubDate>Wed, 08 Jul 2009 13:37:01 +0000</pubDate>
		<dc:creator>michiel</dc:creator>
				<category><![CDATA[Mac]]></category>
		<category><![CDATA[Sysadmin]]></category>

		<guid isPermaLink="false">http://elfstone.nl/?p=186</guid>
		<description><![CDATA[A few weeks ago, my profile stopped working. It seems that mark has found a solution. I changed the profile and it can be downloaded here.]]></description>
			<content:encoded><![CDATA[<p>A few weeks ago, my <a href="http://elfstone.nl/2009/06/10/wireless-profile-for-ipodiphone-for-university-of-groningen/">profile</a> stopped working. It seems that <a href="http://mark.weblog.tudelft.nl/">mark</a> has found a solution. I changed the profile and it can be downloaded <a href="http://supermind.nl/rug.mobileconfig">here</a>.</p>
]]></content:encoded>
			<wfw:commentRss>http://elfstone.nl/2009/07/08/new-iphoneipod-touch-wireless-profile-rug-fn2/feed/</wfw:commentRss>
		<slash:comments>0</slash:comments>
		</item>
		<item>
		<title>Weird characters in bash</title>
		<link>http://elfstone.nl/2009/06/29/weird-characters-in-bash/</link>
		<comments>http://elfstone.nl/2009/06/29/weird-characters-in-bash/#comments</comments>
		<pubDate>Mon, 29 Jun 2009 17:16:48 +0000</pubDate>
		<dc:creator>michiel</dc:creator>
				<category><![CDATA[Sysadmin]]></category>

		<guid isPermaLink="false">http://elfstone.nl/?p=177</guid>
		<description><![CDATA[A friend of mine had a problem with his terminal today. Most people will encounter this one day or another. He asked me how to fix it. I told him to do &#8216;cat /bin/bash&#8217; and press ^C at one point and repeat this until it worked. He was surprised that worked and asked me why. [...]]]></description>
			<content:encoded><![CDATA[<div id="attachment_178" class="wp-caption alignright" style="width: 391px"><img src="http://elfstone.nl/uploads/2009/06/picture-187.png" alt="Scrambled character set" title="Scrambled character set" width="381" height="77" class="size-full wp-image-178" /><p class="wp-caption-text">Scrambled character set</p></div>
<p>A friend of mine had a problem with his terminal today. Most people will encounter this one day or another. He asked me how to fix it. I told him to do &#8216;cat /bin/bash&#8217; and press ^C at one point and repeat this until it worked. He was surprised that worked and asked me why. I told him I didn&#8217;t know exactly, but that it had to do with control characters that are often found in binary files but I was curious myself to so I did some research.</p>
<p>Apparently there is an ANSI escape sequence to select character sets. To select one of these character sets, the ANSI code &#8216;ESC(0&#8242; is used. Because terminals will catch the escape character, we have to do some extra to get a literal ESC: type ^V ESC. The character will be displayed as: &#8216;^[&#8216;. Typing this will result in a terminal that looks like the image above:</p>
<p><code><br />
bash$ echo '^[(0'<br />
</code></p>
<p>You can get the correct character set back by typing &#8216;ESC(B&#8217;, but maybe a better idea is to reset the terminal (the program &#8216;reset&#8217; will not always reset the character set) with the following ANSI code: &#8216;ESCc&#8217;. For this command we don&#8217;t have to use single quotes to avoid the parenthesis from being interpreted, so this easier to remember:</p>
<p><code><br />
bash$ echo ^[c<br />
</code></p>
<p>So whenever you get this problem, remember to press these 4 keys (ok, I count a control character as one key): ^V ESC c ENTER</p>
]]></content:encoded>
			<wfw:commentRss>http://elfstone.nl/2009/06/29/weird-characters-in-bash/feed/</wfw:commentRss>
		<slash:comments>0</slash:comments>
		</item>
		<item>
		<title>Wireless profile for iPod/iPhone for University of Groningen</title>
		<link>http://elfstone.nl/2009/06/10/wireless-profile-for-ipodiphone-for-university-of-groningen/</link>
		<comments>http://elfstone.nl/2009/06/10/wireless-profile-for-ipodiphone-for-university-of-groningen/#comments</comments>
		<pubDate>Wed, 10 Jun 2009 13:42:27 +0000</pubDate>
		<dc:creator>michiel</dc:creator>
				<category><![CDATA[Mac]]></category>
		<category><![CDATA[Sysadmin]]></category>

		<guid isPermaLink="false">http://elfstone.nl/?p=170</guid>
		<description><![CDATA[The University of Groningen is connected to eduroam, but it also has it&#8217;s own similar wireless network, RuG-FN2. Connecting an iPods touch or iPhone is therefore also similar. Connecting with Eduroam can be done by following the instructions on this site, and for RuG-FN2, there is also this website, but the latter profile will always [...]]]></description>
			<content:encoded><![CDATA[<p>The <a href="http://www.rug.nl/">University of Groningen</a> is connected to <a href="http://www.eduroam.org">eduroam</a>, but it also has it&#8217;s own similar wireless network, RuG-FN2. Connecting an iPods touch or iPhone is therefore also similar.</p>
<p>Connecting with Eduroam can be done by following the instructions on <a href="http://mark.weblog.tudelft.nl/2009/02/05/eduroam-on-the-iphone">this site</a>, and for RuG-FN2, there is also <a href="http://www.van-rijn.org/Misc/iPhoneRuG/">this website</a>, but the latter profile will always ask for a password and this is tedious to type in everytime, especially if people can see what you type.</p>
<p>Therefore I made my own profile, which can be downloaded <a href="http://supermind.nl/RuG-FN2.mobileconfig">here</a>. Just surf to that page on your iPhone/iPod touch and accept the configuration. Fill in your username and password and you&#8217;re good to go. Of course, you need internet access to do that, so you can do this in advance (for example at home).</p>
<p><strong>update</strong>: the network changed, find your new profile <a href="http://elfstone.nl/2009/07/08/new-iphoneipod-touch-wireless-profile-rug-fn2/">here</a></p>
]]></content:encoded>
			<wfw:commentRss>http://elfstone.nl/2009/06/10/wireless-profile-for-ipodiphone-for-university-of-groningen/feed/</wfw:commentRss>
		<slash:comments>0</slash:comments>
		</item>
		<item>
		<title>Removing that sync menu bar item</title>
		<link>http://elfstone.nl/2009/06/09/removing-that-sync-menu-bar-item/</link>
		<comments>http://elfstone.nl/2009/06/09/removing-that-sync-menu-bar-item/#comments</comments>
		<pubDate>Tue, 09 Jun 2009 12:50:07 +0000</pubDate>
		<dc:creator>michiel</dc:creator>
				<category><![CDATA[Sysadmin]]></category>

		<guid isPermaLink="false">http://elfstone.nl/?p=164</guid>
		<description><![CDATA[This is a post about Apple&#8217;s sync menu bar item. Apparently it&#8217;s used for syncing mobile devices as well as for Apple&#8217;s MobileMe account (if you have one). It&#8217;s not really in the way, but it takes up space and I sometimes confuse it for a different menu bar item, so I wanted to delete [...]]]></description>
			<content:encoded><![CDATA[<p><img src="http://elfstone.nl/uploads/2009/06/picture-183.png" alt="Sync menu bar item" title="Sync menu bar item" width="377" height="100" class="alignright size-full wp-image-166" /><br />
This is a post about Apple&#8217;s sync menu bar item. Apparently it&#8217;s used for syncing mobile devices as well as for Apple&#8217;s MobileMe account (if you have one). It&#8217;s not really in the way, but it takes up space and I sometimes confuse it for a different menu bar item, so I wanted to delete it.</p>
<p>If you have no idea what I&#8217;m talking about, this post is not for you :)</p>
<p>Apparently, you can disable it in the preferences of MobileMe, but only when you have signed up for an account (if you search in System Preferences, the option shows up, but if you select it, you get a dialog that says you have to sign up first).</p>
<p>After some searching, I found this thread: <a href="http://discussions.apple.com/thread.jspa?threadID=1633095&#038;tstart=0">http://discussions.apple.com/thread.jspa?threadID=1633095&#038;tstart=0</a>, that explains that you can ALSO disable it through preferences of the program iSync (I don&#8217;t know if it&#8217;s pre-installed, but it was on my computer).</p>
<p>A third option was to remove it by CMD+dragging it out of the menu bar, but it seems that is only temporary.</p>
<p>Yeah, more space in my menu bar for things that I actually use :)</p>
]]></content:encoded>
			<wfw:commentRss>http://elfstone.nl/2009/06/09/removing-that-sync-menu-bar-item/feed/</wfw:commentRss>
		<slash:comments>0</slash:comments>
		</item>
		<item>
		<title>Authprogs</title>
		<link>http://elfstone.nl/2009/05/21/authprogs/</link>
		<comments>http://elfstone.nl/2009/05/21/authprogs/#comments</comments>
		<pubDate>Thu, 21 May 2009 15:48:48 +0000</pubDate>
		<dc:creator>michiel</dc:creator>
				<category><![CDATA[Sysadmin]]></category>

		<guid isPermaLink="false">http://elfstone.nl/?p=158</guid>
		<description><![CDATA[During my migration (see previous post) I was faced with setting up backups again (I could have implemented it like the previous server, but I wanted to review the process and decided to change it). This time I wanted to use a program to restrict ssh-access, because I want automated copying with rsync, so I [...]]]></description>
			<content:encoded><![CDATA[<p>During my migration (see previous post) I was faced with setting up backups again (I could have implemented it like the previous server, but I wanted to review the process and decided to change it). This time I wanted to use a program to restrict ssh-access, because I want automated copying with rsync, so I needed a passphrase-less ssh-key. This is what I did with the previous setup, but no further restrictions. I wanted to change this because I don&#8217;t have a seperate account for backups this time.</p>
<p>From before I remembered a program that could restrict commands, but I forgot the name, so fo r future reference I write this post. The program is called &#8216;authprogs&#8217; and can be found <a href="http://www.hackinglinuxexposed.com/tools/authprogs/">here</a>.</p>
<p>I like this program, because you can specify (with a config file) which hosts are able to do which commands, and it logs (and outputs to the user) commands that are rejected, so you can try your command and copy-paste it into the configuration.</p>
]]></content:encoded>
			<wfw:commentRss>http://elfstone.nl/2009/05/21/authprogs/feed/</wfw:commentRss>
		<slash:comments>0</slash:comments>
		</item>
		<item>
		<title>Migratie</title>
		<link>http://elfstone.nl/2009/05/19/migratie/</link>
		<comments>http://elfstone.nl/2009/05/19/migratie/#comments</comments>
		<pubDate>Tue, 19 May 2009 15:40:27 +0000</pubDate>
		<dc:creator>michiel</dc:creator>
				<category><![CDATA[Sysadmin]]></category>

		<guid isPermaLink="false">http://elfstone.nl/?p=155</guid>
		<description><![CDATA[Afgelopen week heb ik mijn websites gemigreerd naar een andere computer. Dit kostte wat tijd en moeite maar het is bijna allemaal gelukt. Omdat ik het naar een andere computer moest overzetten, heb ik ook gelijk maar nieuwe versies van de software geïnstalleerd en nieuwe &#8216;themes&#8217; gekozen. Vandaar dat de website er nu ook anders [...]]]></description>
			<content:encoded><![CDATA[<p>Afgelopen week heb ik mijn websites gemigreerd naar een andere computer. Dit kostte wat tijd en moeite maar het is bijna allemaal gelukt. Omdat ik het naar een andere computer moest overzetten, heb ik ook gelijk maar nieuwe versies van de software geïnstalleerd en nieuwe &#8216;themes&#8217; gekozen. Vandaar dat de website er nu ook anders uit ziet. Als het goed is moet nu alles weer werken, zo niet, dan hoor ik dat graag :)</p>
]]></content:encoded>
			<wfw:commentRss>http://elfstone.nl/2009/05/19/migratie/feed/</wfw:commentRss>
		<slash:comments>0</slash:comments>
		</item>
	</channel>
</rss>

