<?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>Screenage &#187; ccm</title>
	<atom:link href="http://www.screenage.de/blog/author/ccm/feed/" rel="self" type="application/rss+xml" />
	<link>http://www.screenage.de/blog</link>
	<description></description>
	<lastBuildDate>Sun, 13 Nov 2011 10:33:53 +0000</lastBuildDate>
	<language>en</language>
	<sy:updatePeriod>hourly</sy:updatePeriod>
	<sy:updateFrequency>1</sy:updateFrequency>
	<generator>http://wordpress.org/?v=3.2.1</generator>
		<item>
		<title>Recovering Linux file permissions</title>
		<link>http://www.screenage.de/blog/2011/11/13/recovering-file-permissions/?utm_source=rss&#038;utm_medium=rss&#038;utm_campaign=recovering-file-permissions</link>
		<comments>http://www.screenage.de/blog/2011/11/13/recovering-file-permissions/#comments</comments>
		<pubDate>Sun, 13 Nov 2011 10:28:23 +0000</pubDate>
		<dc:creator>ccm</dc:creator>
				<category><![CDATA[Allgemein]]></category>
		<category><![CDATA[Bash]]></category>
		<category><![CDATA[Linux]]></category>
		<category><![CDATA[Script]]></category>
		<category><![CDATA[Ubuntu]]></category>

		<guid isPermaLink="false">http://www.screenage.de/blog/?p=337</guid>
		<description><![CDATA[I recently ran into a server, where somebody accidently issued a &#8220;chown -R www-data:www-data /var&#8221;. So all files and directories within /var where chowned to the www-data which actually means a complete system fuckup as everything from logging over mail &#8230; <a href="http://www.screenage.de/blog/2011/11/13/recovering-file-permissions/">Continue reading <span class="meta-nav">&#8594;</span></a>]]></description>
			<content:encoded><![CDATA[<p>I recently ran into a server, where somebody accidently issued a &#8220;chown -R www-data:www-data /var&#8221;. So all files and directories within /var where chowned to the www-data which actually means a complete system fuckup as everything from logging over mail and caching to databases relies on a correct setup there. Sadfully this was a remote production server so I had to find a quick solution to get a least a state good enough for the next days. </p>
<p>I started peaking around a possibity to reset file permissions based on .deb package details. There are at least <a href="http://serverfault.com/questions/221447/how-to-repair-restore-ubuntu-10-04-after-sudo-chmod-777/221454#221454">approaches</a> (the method there misses a pre-download of all installed .deb packages) to do this (and I remember running a program years ago that checked file permissions based on .deb files &#8211; just did not find it via apt-get). Nonetheless this approach lacks the possibility of handling application created files. Files in /var/log for instance don&#8217;t have to be declared in a .deb file but urgently need the right file permissions.</p>
<p>So I came to a different approach: cloning permissions. By chance we had a quite similar server running meaning same Linux distribution and nearly the same services installed. I wrote a one liner to save the file permissions on the healthy server:</p>
<pre>$ find /var -printf "%p;%u;%g;%m\n" > permissions.txt</pre>
<p>The command writes a text file with the following format:</p>
<p>dir/filename;user;group;mode</p>
<p>Please note, I started using &#8220;:&#8221; as a separator but noted that at least some Perl related files have a double colon in there name.  </p>
<p>Now I only needed a simple shell script that sets the file permissions on the broken server based on the text file we just generated. It came down to this:</p>
<pre>#!/bin/bash

ENTRIES=$(cat permissions.txt)

for ENTRY in ${ENTRIES}
do
	echo ${ENTRY} | sed "s/;/ /g" | {
		read FILE USER GROUP MODE
		chown ${USER}:${GROUP} "${FILE}"
		chmod ${MODE} "${FILE}"
	}
done</pre>
<p>The script reads every line of the text file, splits it&#8217;s content into variables and sets the user and group via &#8220;chown&#8221; as well as the mode via &#8220;chmod&#8221;. It doesn&#8217;t check if a directory/file exists before chowning/chmodding it, as it actually doesn&#8217;t matter. If it&#8217;s not there, it just won&#8217;t do something harmfull.</p>
<p>After you&#8217;ve run this, it&#8217;s a good idea to restart all services and start watching log files. You have to take care of all services that rely on fast changing files in /var. For instance a mail daemon puts a lot of unique file names into /var/spool and the script above won&#8217;t be able to take care of that. You have to double check database directories like /var/lib/mysql, hosted repositories and so on. But the script will provide with a state where most services are at least running and you get an idea of how to switch back the remaining directories. It might be helpfull to search for suspicious files, like </p>
<pre>$ find /var -user www-data</pre>
]]></content:encoded>
			<wfw:commentRss>http://www.screenage.de/blog/2011/11/13/recovering-file-permissions/feed/</wfw:commentRss>
		<slash:comments>4</slash:comments>
		</item>
		<item>
		<title>RubyGems 9.9.9 packaged &#8211; Fake install RubyGems on Debian/Ubuntu</title>
		<link>http://www.screenage.de/blog/2011/07/02/rubygems-9-9-9-packaged-fake-install-rubygems-on-debianubuntu/?utm_source=rss&#038;utm_medium=rss&#038;utm_campaign=rubygems-9-9-9-packaged-fake-install-rubygems-on-debianubuntu</link>
		<comments>http://www.screenage.de/blog/2011/07/02/rubygems-9-9-9-packaged-fake-install-rubygems-on-debianubuntu/#comments</comments>
		<pubDate>Sat, 02 Jul 2011 20:27:10 +0000</pubDate>
		<dc:creator>ccm</dc:creator>
				<category><![CDATA[Allgemein]]></category>
		<category><![CDATA[Debian]]></category>
		<category><![CDATA[Packaging]]></category>
		<category><![CDATA[Puppet]]></category>
		<category><![CDATA[Ruby]]></category>
		<category><![CDATA[Script]]></category>
		<category><![CDATA[Ubuntu]]></category>

		<guid isPermaLink="false">http://www.screenage.de/blog/?p=322</guid>
		<description><![CDATA[For a lot of reasons I often rely on a mixture of a Debian/Ubuntu pre packaged Ruby with a self compiled RubyGems. It helps you in situations where you don&#8217;t care that much about the Ruby interpreter itself but need &#8230; <a href="http://www.screenage.de/blog/2011/07/02/rubygems-9-9-9-packaged-fake-install-rubygems-on-debianubuntu/">Continue reading <span class="meta-nav">&#8594;</span></a>]]></description>
			<content:encoded><![CDATA[<p>For a lot of reasons I often rely on a mixture of a Debian/Ubuntu pre packaged Ruby with a self compiled RubyGems. It helps you in situations where you don&#8217;t care that much about the Ruby interpreter itself but need an up to date RubyGems. While this is easy to install, you might run into trouble when installing packages that depend on Ruby and RubyGems, namely packages like &#8220;rubygems&#8221;, &#8220;rubygems1.8&#8243; and &#8220;rubygems1.9&#8243;.</p>
<p>After unsuccessfully playing around with dpkg for a while (you can put packages on &#8220;hold&#8221; which prevents them from being installed automatically, I came to the conclusion, the best way is to install a fake package that is empty but satisfies depencies.</p>
<p><a title="RubyGems 9.9.9 Fake Package" href="http://www.screenage.de/blog/files/rubygems_9.9.9_all.deb">So, here it is: The shiny new RubyGems 9.9.9</a> which delivers rubygems, rubygems1.8 and rubygems1.9 right away. Just install it (e.g. with dpkg) and you&#8217;ll be able installing packages that rely on a rubygems package.</p>
<p>In case you want to play around with the package and customize it to your needs, e.g. only deliver rubygems1.8 or rubygems1.9, take</p>
<p><strong>1. Install equivs</strong></p>

<div class="wp_syntax"><div class="code"><pre class="bash" style="font-family:monospace;">$ <span style="color: #c20cb9; font-weight: bold;">sudo</span> <span style="color: #c20cb9; font-weight: bold;">apt-get</span> <span style="color: #c20cb9; font-weight: bold;">install</span> equivs</pre></div></div>

<p><strong>2. create a control file</strong></p>

<div class="wp_syntax"><div class="code"><pre class="bash" style="font-family:monospace;">$ equivs-control rubygems</pre></div></div>

<p><strong>3. edit the control file</strong></p>

<div class="wp_syntax"><div class="code"><pre class="bash" style="font-family:monospace;">$ <span style="color: #c20cb9; font-weight: bold;">vim</span> rubygems</pre></div></div>

<p>You can compare the default settings in the control file with the output of e.g. &#8220;apt-cache show rubygems&#8221;. The crucial field is &#8220;Provides:&#8221; where you can put a comma separated list of packages you want to fake install. Choose a high version for  there &#8220;Version: &#8221; field as this will mark the package newer as the distribution&#8217;s own package. This prevents the packager from replacing it.</p>

<div class="wp_syntax"><div class="code"><pre class="" style="font-family:monospace;">Section: universe/interpreters
Priority: optional
Homepage: http://www.screenage.de/blog/
Standards-Version: 3.6.2
&nbsp;
Package: rubygems
Version: 9.9.9
Maintainer: Caspar Clemens Mierau &lt;ccm@screenage.de&gt;
Provides: rubygems1.8,rubygems1.9,rubygems
Architecture: all
Description: Fake RubyGems replacement
 This is a fake meta package satisfying rubygems dependencies.
 .
 This package can be used when you installed a packaged ruby but want
 to use rubygems from source and still rely on software that depends
 on ruby and rubygems</pre></div></div>

<p>4. build the package</p>

<div class="wp_syntax"><div class="code"><pre class="" style="font-family:monospace;">$ equivs-build rubygems</pre></div></div>

<p>p.s.: You can also use equivs for easily building meta packages containing a list of packages you want to install at a glance, e.g. for semi automated server bootstrapping.</p>
]]></content:encoded>
			<wfw:commentRss>http://www.screenage.de/blog/2011/07/02/rubygems-9-9-9-packaged-fake-install-rubygems-on-debianubuntu/feed/</wfw:commentRss>
		<slash:comments>0</slash:comments>
		</item>
		<item>
		<title>Bootstrapping a Puppet agent/master on Ubuntu</title>
		<link>http://www.screenage.de/blog/2011/06/06/boostrapping-a-puppet-agentmaster-on-ubuntu/?utm_source=rss&#038;utm_medium=rss&#038;utm_campaign=boostrapping-a-puppet-agentmaster-on-ubuntu</link>
		<comments>http://www.screenage.de/blog/2011/06/06/boostrapping-a-puppet-agentmaster-on-ubuntu/#comments</comments>
		<pubDate>Mon, 06 Jun 2011 09:37:29 +0000</pubDate>
		<dc:creator>ccm</dc:creator>
				<category><![CDATA[Allgemein]]></category>
		<category><![CDATA[Automation]]></category>
		<category><![CDATA[Debian]]></category>
		<category><![CDATA[Puppet]]></category>
		<category><![CDATA[Ubuntu]]></category>

		<guid isPermaLink="false">http://www.screenage.de/blog/?p=314</guid>
		<description><![CDATA[Though it&#8217;s really great that Puppet made it into Ubuntu&#8217;s main repository, the provided version is rather outdated which prevents you from using advanced language features when writing your manifests. So sooner or later you end up installing Puppet manually. &#8230; <a href="http://www.screenage.de/blog/2011/06/06/boostrapping-a-puppet-agentmaster-on-ubuntu/">Continue reading <span class="meta-nav">&#8594;</span></a>]]></description>
			<content:encoded><![CDATA[<p>Though it&#8217;s really great that Puppet made it into Ubuntu&#8217;s main repository, the provided version is rather outdated which prevents you from using advanced language features when writing your manifests. So sooner or later you end up installing Puppet manually. In order to speed up installation I stripped it down to the following:</p>
<p>install agent:</p>

<div class="wp_syntax"><div class="code"><pre class="bash" style="font-family:monospace;">$ <span style="color: #c20cb9; font-weight: bold;">bash</span> <span style="color: #000000; font-weight: bold;">&amp;</span>lt; <span style="color: #000000; font-weight: bold;">&amp;</span>lt;<span style="color: #7a0874; font-weight: bold;">&#40;</span><span style="color: #c20cb9; font-weight: bold;">wget</span> <span style="color: #660033;">-qO</span> - https:<span style="color: #000000; font-weight: bold;">//</span>bit.ly<span style="color: #000000; font-weight: bold;">/</span>install-puppet-agent<span style="color: #7a0874; font-weight: bold;">&#41;</span></pre></div></div>

<p>install master:</p>

<div class="wp_syntax"><div class="code"><pre class="bash" style="font-family:monospace;">$ <span style="color: #c20cb9; font-weight: bold;">bash</span> <span style="color: #000000; font-weight: bold;">&amp;</span>lt; <span style="color: #000000; font-weight: bold;">&amp;</span>lt;<span style="color: #7a0874; font-weight: bold;">&#40;</span><span style="color: #c20cb9; font-weight: bold;">wget</span> <span style="color: #660033;">-qO</span> - https:<span style="color: #000000; font-weight: bold;">//</span>bit.ly<span style="color: #000000; font-weight: bold;">/</span>install-puppet-master<span style="color: #7a0874; font-weight: bold;">&#41;</span></pre></div></div>

<p>The call fetches the most recent version of the install script from github, installs Ubuntu&#8217;s Ruby (which is good enough for running Puppet), fetches an upstream version of gem itself and updates it to the most recent version and finally installs the Puppet gem.</p>
<p>You can, of course, also download, review and run the scripts manually. Just have a look at <a href="https://github.com/moviepilot/puppet/tree/master/tools">https://github.com/moviepilot/puppet/tree/master/tools</a></p>
]]></content:encoded>
			<wfw:commentRss>http://www.screenage.de/blog/2011/06/06/boostrapping-a-puppet-agentmaster-on-ubuntu/feed/</wfw:commentRss>
		<slash:comments>2</slash:comments>
		</item>
		<item>
		<title>slides from the &#8216;From MySQL to MariaDB&#8217; presentation</title>
		<link>http://www.screenage.de/blog/2011/05/14/slides-from-the-from-mysql-to-mariadb-presentation/?utm_source=rss&#038;utm_medium=rss&#038;utm_campaign=slides-from-the-from-mysql-to-mariadb-presentation</link>
		<comments>http://www.screenage.de/blog/2011/05/14/slides-from-the-from-mysql-to-mariadb-presentation/#comments</comments>
		<pubDate>Sat, 14 May 2011 19:09:44 +0000</pubDate>
		<dc:creator>ccm</dc:creator>
				<category><![CDATA[Allgemein]]></category>
		<category><![CDATA[Debian]]></category>
		<category><![CDATA[MySQL]]></category>
		<category><![CDATA[Ubuntu]]></category>

		<guid isPermaLink="false">http://www.screenage.de/blog/?p=304</guid>
		<description><![CDATA[As announced, I held a short talk on switching from MySQL community edition (especially 5.1) to MariaDB (currently 5.2.6) at this years LinuxTag in Berlin. Here are the (German) slides for reference: (In case you cannot see the embedded presentation, &#8230; <a href="http://www.screenage.de/blog/2011/05/14/slides-from-the-from-mysql-to-mariadb-presentation/">Continue reading <span class="meta-nav">&#8594;</span></a>]]></description>
			<content:encoded><![CDATA[<p>As announced, I held a <a href="http://www.linuxtag.org/2011/de/program/freies-vortragsprogramm/popup/vortragsdetails.html?no_cache=1&#038;talkid=390">short talk on switching from MySQL community edition (especially 5.1) to MariaDB (currently 5.2.6)</a> at this years LinuxTag in Berlin.</p>
<p>Here are the (German) slides for reference:</p>
<p><iframe src="https://docs.google.com/present/embed?id=dc7c88tp_77dxchh4c7&#038;interval=5&#038;size=m" frameborder="0" width="555" height="451"></iframe></p>
<p>(In case you cannot see the embedded presentation, you can also <a href="https://docs.google.com/present/view?id=dc7c88tp_77dxchh4c7&#038;interval=5">click here</a>)</p>
<p>Please note: There are a lot of good English slides around. If you want give a talk on MariaDB, the &#8220;Beginner&#8217;s Guide&#8221; might be a good start:</p>
<p><a title="View A Beginner's Guide to MariaDB Presentation on Scribd" href="http://www.scribd.com/doc/53200698/A-Beginner-s-Guide-to-MariaDB-Presentation" style="margin: 12px auto 6px auto; font-family: Helvetica,Arial,Sans-serif; font-style: normal; font-variant: normal; font-weight: normal; font-size: 14px; line-height: normal; font-size-adjust: none; font-stretch: normal; -x-system-font: none; display: block; text-decoration: underline;">A Beginner&#8217;s Guide to MariaDB Presentation</a><iframe class="scribd_iframe_embed" src="http://www.scribd.com/embeds/53200698/content?start_page=1&#038;view_mode=slideshow&#038;access_key=key-23nny9uco9ufyu2i9l08" data-auto-height="true" data-aspect-ratio="1.33333333333333" scrolling="no" id="doc_22767" width="100%" height="600" frameborder="0"></iframe><script type="text/javascript">(function() { var scribd = document.createElement("script"); scribd.type = "text/javascript"; scribd.async = true; scribd.src = "http://www.scribd.com/javascripts/embed_code/inject.js"; var s = document.getElementsByTagName("script")[0]; s.parentNode.insertBefore(scribd, s); })();</script></p>
]]></content:encoded>
			<wfw:commentRss>http://www.screenage.de/blog/2011/05/14/slides-from-the-from-mysql-to-mariadb-presentation/feed/</wfw:commentRss>
		<slash:comments>0</slash:comments>
		</item>
		<item>
		<title>Short talk on MariaDB at Linuxtag 2011</title>
		<link>http://www.screenage.de/blog/2011/05/12/short-talk-on-mariadb-at-linuxtag-2011/?utm_source=rss&#038;utm_medium=rss&#038;utm_campaign=short-talk-on-mariadb-at-linuxtag-2011</link>
		<comments>http://www.screenage.de/blog/2011/05/12/short-talk-on-mariadb-at-linuxtag-2011/#comments</comments>
		<pubDate>Thu, 12 May 2011 07:04:46 +0000</pubDate>
		<dc:creator>ccm</dc:creator>
				<category><![CDATA[Berlin]]></category>
		<category><![CDATA[Debian]]></category>
		<category><![CDATA[Event]]></category>
		<category><![CDATA[Linux]]></category>
		<category><![CDATA[MySQL]]></category>
		<category><![CDATA[Ubuntu]]></category>

		<guid isPermaLink="false">http://www.screenage.de/blog/?p=302</guid>
		<description><![CDATA[If you happen to be around at this years LinuxTag 2011 in Berlin/Germany, you are invited to attend my short talk on MariaDB as a drop-in replacement for MySQL. The talk focusses on differences between MySQL Community Edition and MariaDB &#8230; <a href="http://www.screenage.de/blog/2011/05/12/short-talk-on-mariadb-at-linuxtag-2011/">Continue reading <span class="meta-nav">&#8594;</span></a>]]></description>
			<content:encoded><![CDATA[<p>If you happen to be around at this years <a href="http://www.linuxtag.org/2011/en.html">LinuxTag 2011</a> in Berlin/Germany, you are invited to attend my short talk on MariaDB as a drop-in replacement for MySQL. The talk focusses on differences between MySQL Community Edition and MariaDB (e.g. XtraDB, Aria, userstats), shows some features live and explains how to switch. I&#8217;ll probably post the slides here afterwards.</p>
<p>The talk will be held in German and is scheduled for Friday, the 13th of May, 16:30. The official announcement can be found <a href="http://www.linuxtag.org/2011/de/program/freies-vortragsprogramm/popup/vortragsdetails.html?no_cache=1&amp;talkid=390">here</a>.</p>
]]></content:encoded>
			<wfw:commentRss>http://www.screenage.de/blog/2011/05/12/short-talk-on-mariadb-at-linuxtag-2011/feed/</wfw:commentRss>
		<slash:comments>1</slash:comments>
		</item>
		<item>
		<title>Using backuppc as a dirty distributed shell</title>
		<link>http://www.screenage.de/blog/2011/05/09/using-backuppc-as-a-dirty-distributed-shell/?utm_source=rss&#038;utm_medium=rss&#038;utm_campaign=using-backuppc-as-a-dirty-distributed-shell</link>
		<comments>http://www.screenage.de/blog/2011/05/09/using-backuppc-as-a-dirty-distributed-shell/#comments</comments>
		<pubDate>Mon, 09 May 2011 14:00:12 +0000</pubDate>
		<dc:creator>ccm</dc:creator>
				<category><![CDATA[Allgemein]]></category>
		<category><![CDATA[Backup]]></category>
		<category><![CDATA[CommandLine]]></category>
		<category><![CDATA[Debian]]></category>
		<category><![CDATA[Shell]]></category>
		<category><![CDATA[SSH]]></category>
		<category><![CDATA[Ubuntu]]></category>

		<guid isPermaLink="false">http://www.screenage.de/blog/?p=281</guid>
		<description><![CDATA[Backuppc is a neat server-based backup solution. In Linux envorinments it is often used in combination with rsync over ssh &#8211; and, let&#8217;s be hontest &#8211; often fairly lazy sudo or root rights for the rsync over ssh connection. This &#8230; <a href="http://www.screenage.de/blog/2011/05/09/using-backuppc-as-a-dirty-distributed-shell/">Continue reading <span class="meta-nav">&#8594;</span></a>]]></description>
			<content:encoded><![CDATA[<p><a href="http://backuppc.sourceforge.net/">Backuppc</a> is a neat server-based backup solution. In Linux envorinments it is often used in combination with rsync over ssh &#8211; and, let&#8217;s be hontest &#8211; often fairly lazy sudo or root rights for the rsync over ssh connection. This has a lot of disadvantages, but at least, you can use this setup as a cheap distributed shell, as a good maintained backuppc server might have access to a lot of your servers.</p>
<p>I wrote a small wrapper, that reads the (especially Debian/Ubuntu packaged) backuppc configuration and iterates through the hosts, allowing you to issue commands on every valid connection. I used it so far for listing used ssh keys, os patch levels and even small system manipulations.</p>

<div class="wp_syntax"><table><tr><td class="line_numbers"><pre>1
2
3
4
5
6
7
8
9
10
11
12
13
14
</pre></td><td class="code"><pre class="bash" style="font-family:monospace;"><span style="color: #666666; font-style: italic;">#!/bin/bash</span>
<span style="color: #007800;">SSH_KEY</span>=<span style="color: #ff0000;">&quot;-i /var/lib/backuppc/.ssh/id_rsa&quot;</span>
<span style="color: #007800;">SSH_LOGINS</span>=<span style="color: #7a0874; font-weight: bold;">&#40;</span> <span style="color: #000000; font-weight: bold;">`</span><span style="color: #c20cb9; font-weight: bold;">grep</span> <span style="color: #ff0000;">&quot;root&quot;</span> <span style="color: #000000; font-weight: bold;">/</span>etc<span style="color: #000000; font-weight: bold;">/</span>backuppc<span style="color: #000000; font-weight: bold;">/</span>hosts <span style="color: #000000; font-weight: bold;">|</span> \
 <span style="color: #c20cb9; font-weight: bold;">awk</span> <span style="color: #ff0000;">'{print &quot;root@&quot;$1&quot; &quot;}'</span> <span style="color: #000000; font-weight: bold;">|</span> \
 <span style="color: #c20cb9; font-weight: bold;">sed</span> <span style="color: #ff0000;">':a;N;$!ba;s/\n//g'</span><span style="color: #000000; font-weight: bold;">`</span> <span style="color: #7a0874; font-weight: bold;">&#41;</span>
&nbsp;
<span style="color: #000000; font-weight: bold;">for</span> SSH_LOGIN <span style="color: #000000; font-weight: bold;">in</span> <span style="color: #ff0000;">&quot;<span style="color: #007800;">${SSH_LOGINS[@]}</span>&quot;</span>
<span style="color: #000000; font-weight: bold;">do</span>
 <span style="color: #007800;">HOST</span>=<span style="color: #000000; font-weight: bold;">`</span><span style="color: #7a0874; font-weight: bold;">echo</span> <span style="color: #ff0000;">&quot;<span style="color: #007800;">${SSH_LOGIN}</span>&quot;</span> <span style="color: #000000; font-weight: bold;">|</span> <span style="color: #c20cb9; font-weight: bold;">awk</span> <span style="color: #660033;">-F</span><span style="color: #ff0000;">&quot;@&quot;</span> <span style="color: #ff0000;">'{print $2'</span><span style="color: #7a0874; font-weight: bold;">&#125;</span><span style="color: #000000; font-weight: bold;">`</span>
 <span style="color: #7a0874; font-weight: bold;">echo</span> <span style="color: #ff0000;">&quot;--------------------------------------------&quot;</span>
 <span style="color: #7a0874; font-weight: bold;">echo</span> <span style="color: #ff0000;">&quot;checking host: <span style="color: #007800;">${HOST}</span>&quot;</span>
 <span style="color: #c20cb9; font-weight: bold;">ssh</span> <span style="color: #660033;">-C</span> <span style="color: #660033;">-qq</span> <span style="color: #660033;">-o</span> <span style="color: #ff0000;">&quot;NumberOfPasswordPrompts=0&quot;</span> \
 <span style="color: #660033;">-o</span> <span style="color: #ff0000;">&quot;PasswordAuthentication=no&quot;</span> <span style="color: #800000;">${SSH_KEY}</span> <span style="color: #800000;">${SSH_LOGIN}</span> <span style="color: #ff0000;">&quot;$1&quot;</span>
<span style="color: #000000; font-weight: bold;">done</span></pre></td></tr></table></div>

<p>You can easily change this to your needs (e.g. changing login user, adding sudo and so on).  </p>
<pre>
$ ./exec_remote_command.sh "date"
--------------------------------------------
checking host: a.b.com
Mo 9. Mai 15:40:26 CEST 2011
--------------------------------------------
checking host: b.b.com
[...]
</pre>
<p>Make sure to quote your command, especially when using commands with options, so the script can handle the command line as one argument.</p>
<p>A younger sister of the script is the following ssh key checker that lists and sorts the ssh keys used on systems by their key comment (feel free to include the key itself):</p>

<div class="wp_syntax"><table><tr><td class="line_numbers"><pre>1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
</pre></td><td class="code"><pre class="bash" style="font-family:monospace;"><span style="color: #666666; font-style: italic;">#!/bin/bash</span>
&nbsp;
<span style="color: #007800;">SSH_KEY</span>=<span style="color: #ff0000;">&quot;-i /var/lib/backuppc/.ssh/id_rsa&quot;</span>
<span style="color: #007800;">SSH_LOGINS</span>=<span style="color: #7a0874; font-weight: bold;">&#40;</span> <span style="color: #000000; font-weight: bold;">`</span><span style="color: #c20cb9; font-weight: bold;">grep</span> <span style="color: #ff0000;">&quot;root&quot;</span> <span style="color: #000000; font-weight: bold;">/</span>etc<span style="color: #000000; font-weight: bold;">/</span>backuppc<span style="color: #000000; font-weight: bold;">/</span>hosts <span style="color: #000000; font-weight: bold;">|</span> \
 <span style="color: #c20cb9; font-weight: bold;">awk</span> <span style="color: #ff0000;">'{print &quot;root@&quot;$1&quot; &quot;}'</span> <span style="color: #000000; font-weight: bold;">|</span> \
 <span style="color: #c20cb9; font-weight: bold;">sed</span> <span style="color: #ff0000;">':a;N;$!ba;s/\n//g'</span><span style="color: #000000; font-weight: bold;">`</span> <span style="color: #7a0874; font-weight: bold;">&#41;</span>
&nbsp;
<span style="color: #000000; font-weight: bold;">for</span> SSH_LOGIN <span style="color: #000000; font-weight: bold;">in</span> <span style="color: #ff0000;">&quot;<span style="color: #007800;">${SSH_LOGINS[@]}</span>&quot;</span>
<span style="color: #000000; font-weight: bold;">do</span>
 <span style="color: #007800;">HOST</span>=<span style="color: #000000; font-weight: bold;">`</span><span style="color: #7a0874; font-weight: bold;">echo</span> <span style="color: #ff0000;">&quot;<span style="color: #007800;">${SSH_LOGIN}</span>&quot;</span> <span style="color: #000000; font-weight: bold;">|</span> <span style="color: #c20cb9; font-weight: bold;">awk</span> <span style="color: #660033;">-F</span><span style="color: #ff0000;">&quot;@&quot;</span> <span style="color: #ff0000;">'{print $2'</span><span style="color: #7a0874; font-weight: bold;">&#125;</span><span style="color: #000000; font-weight: bold;">`</span>
 <span style="color: #7a0874; font-weight: bold;">echo</span> <span style="color: #ff0000;">&quot;--------------------------------------------&quot;</span>
 <span style="color: #7a0874; font-weight: bold;">echo</span> <span style="color: #ff0000;">&quot;checking host: <span style="color: #007800;">${HOST}</span>&quot;</span>
 <span style="color: #c20cb9; font-weight: bold;">ssh</span> <span style="color: #660033;">-C</span> <span style="color: #660033;">-qq</span> <span style="color: #660033;">-o</span> <span style="color: #ff0000;">&quot;NumberOfPasswordPrompts=0&quot;</span> \
 <span style="color: #660033;">-o</span> <span style="color: #ff0000;">&quot;PasswordAuthentication=no&quot;</span> <span style="color: #800000;">${SSH_KEY}</span> <span style="color: #800000;">${SSH_LOGIN}</span> \
 <span style="color: #ff0000;">&quot;cut -d: -f6 /etc/passwd | xargs -i{} egrep -s <span style="color: #000099; font-weight: bold;">\
</span> '^ssh-' {}/.ssh/authorized_keys {}/.ssh/authorized_keys2&quot;</span> <span style="color: #000000; font-weight: bold;">|</span> \
 <span style="color: #c20cb9; font-weight: bold;">cut</span> <span style="color: #660033;">-f</span> <span style="color: #000000;">3</span>- <span style="color: #660033;">-d</span> <span style="color: #ff0000;">&quot; &quot;</span> <span style="color: #000000; font-weight: bold;">|</span> <span style="color: #c20cb9; font-weight: bold;">sort</span>
 <span style="color: #c20cb9; font-weight: bold;">ssh</span> <span style="color: #660033;">-C</span> <span style="color: #660033;">-qq</span> <span style="color: #660033;">-o</span> <span style="color: #ff0000;">&quot;NumberOfPasswordPrompts=0&quot;</span> \
 <span style="color: #660033;">-o</span> <span style="color: #ff0000;">&quot;PasswordAuthentication=no&quot;</span> <span style="color: #800000;">${SSH_KEY}</span> <span style="color: #800000;">${SSH_LOGIN}</span> \
 <span style="color: #ff0000;">&quot;egrep -s '^ssh-' /etc/skel/.ssh/authorized_keys <span style="color: #000099; font-weight: bold;">\
</span> /etc/skel/.ssh/authorized_keys2&quot;</span> <span style="color: #000000; font-weight: bold;">|</span> <span style="color: #c20cb9; font-weight: bold;">cut</span> <span style="color: #660033;">-f</span> <span style="color: #000000;">3</span>- <span style="color: #660033;">-d</span> <span style="color: #ff0000;">&quot; &quot;</span> <span style="color: #000000; font-weight: bold;">|</span> <span style="color: #c20cb9; font-weight: bold;">sort</span>
<span style="color: #000000; font-weight: bold;">done</span></pre></td></tr></table></div>

<p>A sample output of the script:</p>
<pre>
$ ./check_keys.sh 2>/dev/null
--------------------------------------------
checking host: a.b.com
ccm@host1.key
backuppc@localhost
some random key comment
--------------------------------------------
checking host: b.b.com
[...]
</pre>
<p>That&#8217;s all for now. Don&#8217;t blame me for doing it this way &#8211; I am only the messenger <img src='http://www.screenage.de/blog/wp-includes/images/smilies/icon_smile.gif' alt=':)' class='wp-smiley' /> </p>
]]></content:encoded>
			<wfw:commentRss>http://www.screenage.de/blog/2011/05/09/using-backuppc-as-a-dirty-distributed-shell/feed/</wfw:commentRss>
		<slash:comments>0</slash:comments>
		</item>
		<item>
		<title>Ubuntu (Berlin) Global Jam at c-base and Daniel Holbach&#8217;s notebook</title>
		<link>http://www.screenage.de/blog/2010/08/30/ubuntu-berlin-global-jam-at-c-base-aand-daniel-holbachs-notebook/?utm_source=rss&#038;utm_medium=rss&#038;utm_campaign=ubuntu-berlin-global-jam-at-c-base-aand-daniel-holbachs-notebook</link>
		<comments>http://www.screenage.de/blog/2010/08/30/ubuntu-berlin-global-jam-at-c-base-aand-daniel-holbachs-notebook/#comments</comments>
		<pubDate>Mon, 30 Aug 2010 08:32:31 +0000</pubDate>
		<dc:creator>ccm</dc:creator>
				<category><![CDATA[Allgemein]]></category>
		<category><![CDATA[Berlin]]></category>
		<category><![CDATA[Event]]></category>
		<category><![CDATA[GlobalJam]]></category>
		<category><![CDATA[Ubuntu]]></category>

		<guid isPermaLink="false">http://www.screenage.de/blog/?p=256</guid>
		<description><![CDATA[Members of &#8220;Ubuntu Berlin&#8221; met yesterday at c-base within the Ubuntu Global Jam. While it was nice seeing new and international faces showing up and introducing newcomers to advanced Launchpad usage, my main attraction of the day was Daniel Holbach&#8217;s &#8230; <a href="http://www.screenage.de/blog/2010/08/30/ubuntu-berlin-global-jam-at-c-base-aand-daniel-holbachs-notebook/">Continue reading <span class="meta-nav">&#8594;</span></a>]]></description>
			<content:encoded><![CDATA[<p>Members of &#8220;Ubuntu Berlin&#8221; met yesterday at c-base within the Ubuntu Global Jam. While it was nice seeing new and international faces showing up and introducing newcomers to advanced Launchpad usage, my main attraction of the day was Daniel Holbach&#8217;s notebook. He asserted it runs Maverick and starts up within five seconds, which made me laugh at first as my netbook&#8217;s startup time tripled from Lucid to Maverick to round about 45 seconds (which will at least change back until release I assume).</p>
<div id="attachment_259" class="wp-caption alignnone" style="width: 650px"><a href="http://www.screenage.de/blog/uploads/globajam-2010-081.jpg"><img class="size-full wp-image-259" title="Ubuntu Berlin at Ubuntu Global Jam (c-base) - August 2010" src="http://www.screenage.de/blog/uploads/globajam-2010-081.jpg" alt="Ubuntu Berlin at Ubuntu Global Jam (c-base) - August 2010" width="640" height="192" /></a><p class="wp-caption-text">Ubuntu (Berlin) Global Jam at c-base </p></div>
<p>To make it short: Between bug triaging and patching Daniel showed the startup procedure two or three times on his X61s (with an solid state disk, one has to add) and as promised it started up in five seconds after Grub. Actually this isn&#8217;t more than a fast booting notebook, but it shows the results of focussed efforts from the last one and a half year. Remember the initial &#8220;10s&#8221; <a href="https://lists.ubuntu.com/archives/ubuntu-devel/2009-June/028308.html">posting</a> and the bunch of changes it took.</p>
<p>So I am happy looking forward to improvements for Maverick on my netbook. And yes: I am happy with 10 seconds, too.</p>
<p>[update]</p>
<p>Daniel noted, that it&#8217;s a X61s, not a T61. Changed.</p>
]]></content:encoded>
			<wfw:commentRss>http://www.screenage.de/blog/2010/08/30/ubuntu-berlin-global-jam-at-c-base-aand-daniel-holbachs-notebook/feed/</wfw:commentRss>
		<slash:comments>3</slash:comments>
		</item>
		<item>
		<title>Desktop Summit 2011 in Berlin</title>
		<link>http://www.screenage.de/blog/2010/07/30/desktop-summit-2011-in-berlin/?utm_source=rss&#038;utm_medium=rss&#038;utm_campaign=desktop-summit-2011-in-berlin</link>
		<comments>http://www.screenage.de/blog/2010/07/30/desktop-summit-2011-in-berlin/#comments</comments>
		<pubDate>Fri, 30 Jul 2010 19:15:07 +0000</pubDate>
		<dc:creator>ccm</dc:creator>
				<category><![CDATA[Berlin]]></category>
		<category><![CDATA[c-base]]></category>
		<category><![CDATA[Event]]></category>
		<category><![CDATA[Ubuntu]]></category>

		<guid isPermaLink="false">http://www.screenage.de/blog/?p=252</guid>
		<description><![CDATA[I am happy to announce that Berlin has been chosen as location for the Desktop Summit 2011. If you don&#8217;t know so far: Desktop Summit is a 1000+ developer conference co-hosting KDE&#8217;s &#8220;Akademy&#8221; and GNOME&#8217;s &#8220;GUADEC&#8221; at the same time: &#8230; <a href="http://www.screenage.de/blog/2010/07/30/desktop-summit-2011-in-berlin/">Continue reading <span class="meta-nav">&#8594;</span></a>]]></description>
			<content:encoded><![CDATA[<p>I am happy to announce that Berlin has been chosen as location for the Desktop Summit 2011. If you don&#8217;t know so far: Desktop Summit is a 1000+ developer conference co-hosting KDE&#8217;s &#8220;<a href="http://akademy.kde.org/">Akademy</a>&#8221; and GNOME&#8217;s &#8220;<a href="http://www.guadec.org">GUADEC</a>&#8221; at the same time:</p>
<p>Read the press release: <a href="http://dot.kde.org/2010/07/30/desktop-summit-2011-announced">Desktop Summit 2011 Announced</a></p>
<p>As Ubuntu member and head member of <a href="http://c-base.org">c-base e.V.</a> I am part of the Berlin team, together with Claudia Rauch from KDE e.V. and Mirko Boehm of KDE. Let me quote Mirko:</p>
<blockquote><p>&#8220;We are honored and proud that our proposal was selected. What we look forward to the most is the inspiration our communities will draw from having the Desktop Summit together again, but also from visiting our bustling, welcoming city. We would like to thank all the supporters of the proposal, and will work hard to make the conference a big success.&#8221;</p></blockquote>
<p>I am sure this event will become a success. And it&#8217;s a great opportunity to meet and greet across the letters before the &#8220;U&#8221; in &#8220;Ubuntu&#8221;.</p>
]]></content:encoded>
			<wfw:commentRss>http://www.screenage.de/blog/2010/07/30/desktop-summit-2011-in-berlin/feed/</wfw:commentRss>
		<slash:comments>0</slash:comments>
		</item>
		<item>
		<title>Ubuntu Berlin @ LinuxTag 2010 &#8211; pickings</title>
		<link>http://www.screenage.de/blog/2010/06/16/ubuntu-berlin-linuxtag-2010-pickings/?utm_source=rss&#038;utm_medium=rss&#038;utm_campaign=ubuntu-berlin-linuxtag-2010-pickings</link>
		<comments>http://www.screenage.de/blog/2010/06/16/ubuntu-berlin-linuxtag-2010-pickings/#comments</comments>
		<pubDate>Wed, 16 Jun 2010 04:16:26 +0000</pubDate>
		<dc:creator>ccm</dc:creator>
				<category><![CDATA[Allgemein]]></category>
		<category><![CDATA[BBQ]]></category>
		<category><![CDATA[Berlin]]></category>
		<category><![CDATA[c-base]]></category>
		<category><![CDATA[Community]]></category>
		<category><![CDATA[Event]]></category>
		<category><![CDATA[Ubuntu]]></category>

		<guid isPermaLink="false">http://www.screenage.de/blog/?p=237</guid>
		<description><![CDATA[Saturday evening this years LinuxTag, Europes largest open source fair, closed its doors. As LinuxTag is presented at Berlin, the &#8220;Ubuntu Berlin&#8221; was happy to support it in different activities. Let me sum up some of them: 1) Ubuntu Community &#8230; <a href="http://www.screenage.de/blog/2010/06/16/ubuntu-berlin-linuxtag-2010-pickings/">Continue reading <span class="meta-nav">&#8594;</span></a>]]></description>
			<content:encoded><![CDATA[<p>Saturday evening this years LinuxTag, Europes largest open source fair, closed its doors. As LinuxTag is presented at Berlin, the &#8220;Ubuntu Berlin&#8221; was happy to support it in different activities. Let me sum up some of them:</p>
<p><strong>1) Ubuntu Community booth</strong></p>
<p>The &#8220;ubuntu Deutschland e.V.&#8221;, Ubuntu and Kubuntu community presented their work at a community hosted booth. A bunch of Ubuntu Berlin members supported the booth, answered hundreds of questions and helped with the proceedings.</p>
<p><strong>2) Talks</strong></p>
<p>Saturday Featured a lot of Ubuntu focussed talks. For the first time &#8220;Ubuntu Berlin&#8221; and its members hosted a remarkable amount of them, e.g.:</p>
<ul>
<li><a href="http://mnemonikk.org/">Anselm Helbig</a> &#8211; Ubuntu Berlin Lightning Talks (tmux)</li>
<li><a href="http://overbenny.wordpress.com/">Benjamin Drung</a> &#8211; Ubuntu in 50 minutes, Packaging for Debian and Ubuntu</li>
<li>Caspar Clemens Mierau &#8211; Ubuntu Berlin Lightning Talks (Vimperator), Gnome-Do, Ubuntu in 50 minutes</li>
<li><a href="http://daniel.holba.ch/blog/">Daniel Holbach</a> &#8211; Fixing Bugs in Ubuntu (<a href="http://people.canonical.com/~dholbach/talks/">see slides</a>), Ubuntu in 50 minutes, Ubuntu Berlin Lightning Talks (liblaunchpad)</li>
<li><a href="http://www.marceleichner.de/">Marcel Eichner</a> &#8211; Ubuntu Berlin Lightning Talks (Franklin)</li>
<li><a href="http://toddy-franz.de/">Torsten Franz</a> &#8211; Supporting Ubuntu</li>
</ul>
<p style="text-align: center;"><img class="alignnone size-full wp-image-238" title="Ubuntu in 50 minutes talk at LinuxTag 2010" src="http://www.screenage.de/blog/uploads/IMAG0155.jpg" alt="Ubuntu in 50 minutes talk at LinuxTag 2010" width="448" height="263" /><br />
minutes before the &#8220;Ubuntu in 50 minutes&#8221; talk</p>
<p><strong>3) Interviews for Radio Tux</strong></p>
<p>Several members of Ubuntu Berlin gave interviews to the well known German Podcast &#8220;<a href="http://blog.radiotux.de/">Radio Tux</a>&#8220;. Daniel&#8217;s <a href="http://archiv.radiotux.de/interviews/2010-06-12.RadioTux.Daniel.Holbach.bugjam.Linuxtag.mp3">talk on bugjamming has been released</a> already. Be sure to <a href="http://archiv.radiotux.de/interviews/">check the archive</a> for other releases within the next days.</p>
<p><strong>4) LinuxTag BBQ</strong></p>
<p>Last but not least: The  &#8221;End of LinuxTag BBQ&#8221; at <a href="http://c-base.org">c-base</a>, sponsored by Canonical, has been a great success again. Three barbacues and about ten &#8220;Grillmeister&#8221; (you cannot translate this) provided more than hundred visitors with tasty food. Members of various types of open source communities had interesting chats while relaxing at the banks of the Spree.</p>
<p>As Ubuntu Berlin&#8217;s support for the LinuxTag continuously increased within the last years, I am sure next year will even better. We&#8217;ll see.</p>
]]></content:encoded>
			<wfw:commentRss>http://www.screenage.de/blog/2010/06/16/ubuntu-berlin-linuxtag-2010-pickings/feed/</wfw:commentRss>
		<slash:comments>2</slash:comments>
<enclosure url="http://archiv.radiotux.de/interviews/2010-06-12.RadioTux.Daniel.Holbach.bugjam.Linuxtag.mp3" length="16325530" type="audio/mpeg" />
		</item>
		<item>
		<title>Ubuntu Berlin LinuxTag BBQ today</title>
		<link>http://www.screenage.de/blog/2010/06/12/ubuntu-berlin-linuxtag-bbq-today/?utm_source=rss&#038;utm_medium=rss&#038;utm_campaign=ubuntu-berlin-linuxtag-bbq-today</link>
		<comments>http://www.screenage.de/blog/2010/06/12/ubuntu-berlin-linuxtag-bbq-today/#comments</comments>
		<pubDate>Sat, 12 Jun 2010 08:12:29 +0000</pubDate>
		<dc:creator>ccm</dc:creator>
				<category><![CDATA[Berlin]]></category>
		<category><![CDATA[Community]]></category>
		<category><![CDATA[Event]]></category>
		<category><![CDATA[Ubuntu]]></category>

		<guid isPermaLink="false">http://www.screenage.de/blog/?p=233</guid>
		<description><![CDATA[For those of you currently staying in Berlin for the LinuxTag 2010: I know where you are going today evening after the fair closes. For the third time Ubuntu Berlin hosts a LinuxTag BBQ at c-base, the sunken starbase in &#8230; <a href="http://www.screenage.de/blog/2010/06/12/ubuntu-berlin-linuxtag-bbq-today/">Continue reading <span class="meta-nav">&#8594;</span></a>]]></description>
			<content:encoded><![CDATA[<p>For those of you currently staying in Berlin for the LinuxTag 2010: I know where you are going today evening after the fair closes. For the third time Ubuntu Berlin hosts a LinuxTag BBQ at c-base, the sunken starbase in the heart of Berlin. Be sure to grab free food there &#8211; friendly sponsored by Canonical (thank you!) and a refreshing botte of beer or the beloved Club Mate at the bar for reasonable prices.</p>
<p>The BBQ opens around 6pm. If you don&#8217;t know how to get to c-base from the LinuxTag area, a friendly team will guide you &#8211; just have a look at the <a href="http://www.ubuntu-berlin.de/LinuxTag10-BBQ-english">official announcement</a>. The last two your showed, the LinuxTag BBQ is a perfect ending as a large crowd of open source developers and community members of all free project types take the possibility to chat and relax directly at the riverside of the Spree. Don&#8217;t miss that <img src='http://www.screenage.de/blog/wp-includes/images/smilies/icon_smile.gif' alt=':)' class='wp-smiley' />  See you there.</p>
]]></content:encoded>
			<wfw:commentRss>http://www.screenage.de/blog/2010/06/12/ubuntu-berlin-linuxtag-bbq-today/feed/</wfw:commentRss>
		<slash:comments>1</slash:comments>
		</item>
	</channel>
</rss>

