<?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/"
	>

<channel>
	<title>Pastacode computer science blog</title>
	<atom:link href="http://www.pastacode.de/feed/en+de/" rel="self" type="application/rss+xml" />
	<link>http://www.pastacode.de</link>
	<description>Blog from a computer science student: programming, web, algorithms, computers and apples </description>
	<pubDate>Tue, 28 Jul 2009 11:14:29 +0000</pubDate>
	<generator>http://wordpress.org/?v=2.7</generator>
	<language>en</language>
	<sy:updatePeriod>hourly</sy:updatePeriod>
	<sy:updateFrequency>1</sy:updateFrequency>
			<item>
		<title>Spamassasin: Pyzor: check failed: internal error unter Debian Lenny</title>
		<link>http://www.pastacode.de/spamassasin-pyzor-check-failed-internal-error-unter-debian-lenny/de/</link>
		<comments>http://www.pastacode.de/spamassasin-pyzor-check-failed-internal-error-unter-debian-lenny/de/#comments</comments>
		<pubDate>Tue, 28 Jul 2009 11:11:17 +0000</pubDate>
		<dc:creator>Benjamin Milde</dc:creator>
		
		<category><![CDATA[Uncategorized]]></category>

		<guid isPermaLink="false">http://www.pastacode.de/?p=380</guid>
		<description><![CDATA[Ich benutze serverseitig Spamassasin um der Spamflut des Alltags Herr zu werden. Dieses Programm leistete bisher ausgezeichnete dienste, aber seit dem Umsteig auf Debian Lenny hat die Spamflut bei mir massiv zugenommen.  Also schaute ich mir das Maillog mal an:
Und siehe da, bei jeder Email meldete spamd:

Jul 28 12:40:59 hera spamd[10391]: pyzor: check failed: [...]]]></description>
			<content:encoded><![CDATA[<p>Ich benutze serverseitig <a href="http://spamassassin.apache.org/">Spamassasin</a> um der Spamflut des Alltags Herr zu werden. Dieses Programm leistete bisher ausgezeichnete dienste, aber seit dem Umsteig auf Debian Lenny hat die Spamflut bei mir massiv zugenommen.  Also schaute ich mir das Maillog mal an:</p>
<p>Und siehe da, bei jeder Email meldete spamd:<br />
<code><br />
Jul 28 12:40:59 hera spamd[10391]: pyzor: check failed: internal error<br />
</code></p>
<p><a href="http://sourceforge.net/apps/trac/pyzor/"> Pyzor</a> (ein nützliches Spamassasinplugin) schien jedoch ansich zu gehen:</p>
<p><code><br />
root@hera:~/pyzor-0.5.0# pyzor discover<br />
downloading servers from http://pyzor.sourceforge.net/cgi-bin/inform-servers-0-3-x<br />
root@hera:~/pyzor-0.5.0# pyzor ping<br />
public.pyzor.org:24441	(200, 'OK')<br />
</code></p>
<p>Des Rätsels Lösung ist, das spamd und damit pyzor nicht als root laufen:</p>
<p><code><br />
ps -aux<br />
vmail    10390  1.0  3.1 136424 65192 ?        SN   12:34   0:07 spamd child<br />
</code></p>
<p>Das bedeutet natürlich, das man es unter dem Benutzer vmail testen muss:</p>
<p><code><br />
root@hera:/etc/mail/spamassassin# su vmail<br />
sh-3.2$ pyzor dicover<br />
Traceback (most recent call last):<br />
  File "/usr/bin/pyzor", line 8, in <module><br />
    pyzor.client.run()<br />
  File &#8220;/usr/lib/python2.5/site-packages/pyzor/client.py&#8221;, line 1022, in run<br />
    ExecCall().run()<br />
  File &#8220;/usr/lib/python2.5/site-packages/pyzor/client.py&#8221;, line 180, in run<br />
    os.mkdir(homedir)<br />
OSError: [Errno 2] No such file or directory: &#8216;/home/vmail/.pyzor&#8217;<br />
sh-3.2$ pyzor discover<br />
Traceback (most recent call last):<br />
  File &#8220;/usr/bin/pyzor&#8221;, line 8, in <module><br />
    pyzor.client.run()<br />
  File &#8220;/usr/lib/python2.5/site-packages/pyzor/client.py&#8221;, line 1022, in run<br />
    ExecCall().run()<br />
  File &#8220;/usr/lib/python2.5/site-packages/pyzor/client.py&#8221;, line 180, in run<br />
    os.mkdir(homedir)<br />
OSError: [Errno 2] No such file or directory: &#8216;/home/vmail/.pyzor&#8217;<br />
sh-3.2$ exit<br />
exit<br />
</code></p>
<p>Pyzor kann nicht nach /home/vmail schreiben, da es dieses Verzeichnis einfach nicht gibt:</p>
<p>Nach:</p>
<p><code><br />
root@hera:/etc/mail/spamassassin# mkdir /home/vmail<br />
root@hera:/etc/mail/spamassassin# chown vmail:vmail /home/vmail<br />
</code></p>
<p>rennt nun alles wieder:</p>
<p><code><br />
root@hera:/etc/mail/spamassassin# su vmail<br />
sh-3.2$ pyzor discover<br />
downloading servers from http://pyzor.sourceforge.net/cgi-bin/inform-servers-0-3-x<br />
sh-3.2$ pyzor ping<br />
public.pyzor.org:24441	(200, 'OK')<br />
sh-3.2$ exit<br />
</code></p>
<p>Auch im Log ist wieder ein PYZOR_CHECK zu finden:</p>
<p><code><br />
Jul 28 12:49:54 hera spamd[11117]: spamd: result: Y 21 - DIGEST_MULTIPLE,FH_HELO_EQ_D_D_D_D, HELO_DYNAMIC_DHCP, HELO_DYNAMIC_IPADDR, HTML_MESSAGE, MIME_HTML_ONLY, PYZOR_CHECK, RAZOR2_CF_RANGE_51_100, RAZOR2_CF_RANGE_E8_51_100, RAZOR2_CHECK, RCVD_IN_PBL,RDNS_NONE, SARE_UNI, SPF_FAIL, TW_LX,TW_QO, URIBL_BLACK,URI_HEX scantime=4.5, size=4597, user=xxx, uid=2000, required_score=5.0, rhost=localhost.localdomain, raddr=127.0.0.1, rport=33550,mid=<BLMSAZL64282.DECD8B8@static196-165-245-217-196.adsl196-16.iam.net.ma>, autolearn=spam<br />
</code></p>
]]></content:encoded>
			<wfw:commentRss>http://www.pastacode.de/spamassasin-pyzor-check-failed-internal-error-unter-debian-lenny/de/feed/de/</wfw:commentRss>
		</item>
		<item>
		<title>Debian Lenny - public key is not available (Kurztipp)</title>
		<link>http://www.pastacode.de/debian-lenny-public-key-is-not-available-kurztipp/de/</link>
		<comments>http://www.pastacode.de/debian-lenny-public-key-is-not-available-kurztipp/de/#comments</comments>
		<pubDate>Mon, 15 Jun 2009 16:01:57 +0000</pubDate>
		<dc:creator>Benjamin Milde</dc:creator>
		
		<category><![CDATA[Uncategorized]]></category>

		<guid isPermaLink="false">http://www.pastacode.de/?p=375</guid>
		<description><![CDATA[Für folgendes nervige Problem:
Get:1 http://ftp2.de.debian.org lenny Release.gpg [1032B]
Get:2 http://ftp2.de.debian.org lenny/updates Release.gpg [1032B]
Get:3 http://ftp2.de.debian.org lenny Release [73.6kB]
Get:4 http://ftp2.de.debian.org lenny/updates Release [40.8kB]
Ign http://ftp2.de.debian.org lenny Release
Get:5 http://ftp2.de.debian.org lenny/main Packages [6853kB]
Get:6 http://ftp2.de.debian.org lenny/contrib Packages [87.2kB]
Get:7 http://ftp2.de.debian.org lenny/non-free Packages [108kB]
Get:8 http://ftp2.de.debian.org lenny/updates/main Packages [154kB]
Get:9 http://ftp2.de.debian.org lenny/updates/contrib Packages [20B]
Get:10 http://ftp2.de.debian.org lenny/updates/non-free Packages [20B]
Fetched 7318kB in 4s (1521kB/s)
Reading package lists&#8230; Done
W: GPG [...]]]></description>
			<content:encoded><![CDATA[<p>Für folgendes nervige Problem:</p>
<p>Get:1 http://ftp2.de.debian.org lenny Release.gpg [1032B]<br />
Get:2 http://ftp2.de.debian.org lenny/updates Release.gpg [1032B]<br />
Get:3 http://ftp2.de.debian.org lenny Release [73.6kB]<br />
Get:4 http://ftp2.de.debian.org lenny/updates Release [40.8kB]<br />
Ign http://ftp2.de.debian.org lenny Release<br />
Get:5 http://ftp2.de.debian.org lenny/main Packages [6853kB]<br />
Get:6 http://ftp2.de.debian.org lenny/contrib Packages [87.2kB]<br />
Get:7 http://ftp2.de.debian.org lenny/non-free Packages [108kB]<br />
Get:8 http://ftp2.de.debian.org lenny/updates/main Packages [154kB]<br />
Get:9 http://ftp2.de.debian.org lenny/updates/contrib Packages [20B]<br />
Get:10 http://ftp2.de.debian.org lenny/updates/non-free Packages [20B]<br />
Fetched 7318kB in 4s (1521kB/s)<br />
Reading package lists&#8230; Done<br />
W: GPG error: http://ftp2.de.debian.org lenny Release: The following signatures couldn&#8217;t be verified because the public key is not available: NO_PUBKEY 9AA38DCD55BE302B<br />
W: There is no public key available for the following key IDs:<br />
9AA38DCD55BE302B<br />
W: You may want to run apt-get update to correct these problems</p>
<p>gibt es eine sehr einfache Lösung:</p>
<p>apt-get install debian-archive-keyring</p>
<p>Und damit beschwert sich apt-get nicht mehr über die Keys, da alle fehlenden Keys nun importiert wurden. <img src='http://www.pastacode.de/wp-includes/images/smilies/icon_smile.gif' alt=':)' class='wp-smiley' /> </p>
]]></content:encoded>
			<wfw:commentRss>http://www.pastacode.de/debian-lenny-public-key-is-not-available-kurztipp/de/feed/de/</wfw:commentRss>
		</item>
		<item>
		<title>CUDA und Ubuntu 8.10: __builtin_va_arg_pack is undefined und andere Errors</title>
		<link>http://www.pastacode.de/cuda-und-ubuntu-810-__builtin_va_arg_pack-is-undefined-und-andere-errors/de/</link>
		<comments>http://www.pastacode.de/cuda-und-ubuntu-810-__builtin_va_arg_pack-is-undefined-und-andere-errors/de/#comments</comments>
		<pubDate>Fri, 24 Apr 2009 10:04:18 +0000</pubDate>
		<dc:creator>Benjamin Milde</dc:creator>
		
		<category><![CDATA[CUDA]]></category>

		<category><![CDATA[Howto]]></category>

		<category><![CDATA[Probleme]]></category>

		<category><![CDATA[Programming]]></category>

		<guid isPermaLink="false">http://www.pastacode.de/?p=355</guid>
		<description><![CDATA[Da ich mir nun bald das CUDA-Framework näher anschauen werde, hier ein paar Tipps um das SDK mit den Codebeispielen compiliert zu bekommen:
Um generell unter Ubuntu kompilieren zu können, sollte das Paket build-essential installiert sein. Nach der Installation der Ubuntu-Nvidia-Grafiktreiber (sind bereits aktuell) und des CUDA-Toolkits und SDK&#8217;s von der CUDA-Seite, gab es bei mir [...]]]></description>
			<content:encoded><![CDATA[<p>Da ich mir nun bald das <a href="http://de.wikipedia.org/wiki/Compute_Unified_Device_Architecture">CUDA-Framework</a> näher anschauen werde, hier ein paar Tipps um das SDK mit den Codebeispielen compiliert zu bekommen:</p>
<p>Um generell unter Ubuntu kompilieren zu können, sollte das Paket build-essential installiert sein. Nach der Installation der Ubuntu-Nvidia-Grafiktreiber (sind bereits aktuell) und des CUDA-Toolkits und SDK&#8217;s von der CUDA-Seite, gab es bei mir ein paar Probleme beim kompilieren der SDK-Beispiele:<br />
<span id="more-355"></span><br />
1.<br />
<code><br />
In file included from ./../common/inc/paramgl.h:13,<br />
                 from src/paramgl.cpp:8:<br />
./../common/inc/GL/glut.h:59:19: error: GL/gl.h: No such file or directory<br />
./../common/inc/GL/glut.h:60:20: error: GL/glu.h: No such file or directory<br />
In file included from ./../common/inc/paramgl.h:13,<br />
                 from src/paramgl.cpp:8:<br />
./../common/inc/GL/glut.h:433: warning: ‘glutUseLayer’ initialized and declared ‘extern’<br />
./../common/inc/GL/glut.h:433: error: variable or field ‘glutUseLayer’ declared void<br />
./../common/inc/GL/glut.h:433: error: ‘GLenum’ was not declared in this scope<br />
./../common/inc/GL/glut.h:491: error: ‘GLfloat’ has not been declared<br />
./../common/inc/GL/glut.h:491: error: ‘GLfloat’ has not been declared<br />
./../common/inc/GL/glut.h:491: error: ‘GLfloat’ has not been declared<br />
./../common/inc/GL/glut.h:492: error: ‘GLfloat’ does not name a type<br />
./../common/inc/GL/glut.h:496: warning: ‘glutGet’ initialized and declared ‘extern’<br />
</code><br />
Das Problem wird gelöst, in dem die Opengl-devel Pakete installiert werden: apt-get install libglut3-dev</p>
<p>2.<br />
<code><br />
make[1]: Entering directory `/home/ich/NVIDIA_CUDA_SDK/projects/dxtc&#8217;<br />
/usr/include/bits/stdio2.h(35): error: identifier &#8220;__builtin_va_arg_pack&#8221; is undefined<br />
/usr/include/bits/stdio2.h(66): error: identifier &#8220;__builtin_va_arg_pack&#8221; is undefined<br />
/usr/include/bits/stdio2.h(99): error: identifier &#8220;__builtin_va_arg_pack&#8221; is undefined<br />
/usr/include/bits/stdio2.h(105): error: identifier &#8220;__builtin_va_arg_pack&#8221; is undefined<br />
/usr/include/bits/stdio2.h(159): error: identifier &#8220;__builtin_va_arg_pack&#8221; is undefined<br />
/usr/include/bits/stdio2.h(167): error: identifier &#8220;__builtin_va_arg_pack&#8221; is undefined<br />
/usr/include/bits/stdio2.h(174): error: identifier &#8220;__builtin_va_arg_pack&#8221; is undefined<br />
/usr/include/bits/stdio2.h(182): error: identifier &#8220;__builtin_va_arg_pack&#8221; is undefined<br />
</code></p>
<p>Diese Fehler hängen damit zusammen das Ubuntu 8.10 nicht offiziel unterstützt wird, bzw. genauer gesagt die gcc-version Probleme bereitet.</p>
<p>Ein Workaround der bei mir funktionierte:</p>
<p><code><br />
sudo apt-get install gcc-4.2 g++-4.2<br />
sudo update-alternatives --install /usr/bin/gcc gcc /usr/bin/gcc-4.2 60 --slave /usr/bin/g++ g++ /usr/bin/g++-4.2<br />
</code></p>
<p>3. /usr/bin/ld: cannot find -lXmu</p>
<p>Lösung: xmu muss installiert werden</p>
<p><code><br />
sudo apt-get install libxmu-dev libxmu6<br />
</code></p>
<p>4.<br />
<code><br />
make[1]: Entering directory `/home/ich/NVIDIA_CUDA_SDK/projects/simpleTextureDrv&#8217;<br />
In file included from /usr/include/features.h:354,<br />
                 from /usr/cuda/bin/../include/host_config.h:53,<br />
                 from /usr/cuda/bin/../include/cuda_runtime.h:45,<br />
                 from <command-line>:0:<br />
/usr/include/gnu/stubs.h:7:27: error: gnu/stubs-32.h: No such file or directory<br />
make[1]: *** [data/simpleTexture_kernel.cubin] Error 255<br />
make[1]: Leaving directory `/home/ich/NVIDIA_CUDA_SDK/projects/simpleTextureDrv&#8217;<br />
make: *** [projects/simpleTextureDrv/Makefile.ph_build] Error 2<br />
</code><br />
Die Glibc-Pakete für 32-bit Anwendungen unter 64-bit fehlen (Der Fehler betrifft nur 64bit-Installationen)<br />
<code><br />
sudo apt-get install libc6-dev-i386 libc6-i386<br />
</code></p>
<hr/>
<br/><br />
<br/></p>
<p>Nach diesen Korrekturen kompilierten alle Beispiele durch und die die ich bisher probierte starteten auch ohne Probleme auf meiner Geforce 260. Das Mandelbrot-Beispiel ließ meinen ganzen PC abstürzen und die Grafikkarte nur noch Fiebgeräusche von sich geben (!), hier vermute ich Compiz als übeltäter, den man wohl besser bei Cuda-Experimenten abschaltet.</p>
]]></content:encoded>
			<wfw:commentRss>http://www.pastacode.de/cuda-und-ubuntu-810-__builtin_va_arg_pack-is-undefined-und-andere-errors/de/feed/de/</wfw:commentRss>
		</item>
		<item>
		<title>Linux Software Raid1: Was tun bei einem Disk-ausfall?</title>
		<link>http://www.pastacode.de/linux-software-raid1-was-tun-bei-einem-disk-ausfall/de/</link>
		<comments>http://www.pastacode.de/linux-software-raid1-was-tun-bei-einem-disk-ausfall/de/#comments</comments>
		<pubDate>Tue, 21 Apr 2009 09:03:18 +0000</pubDate>
		<dc:creator>Benjamin Milde</dc:creator>
		
		<category><![CDATA[Howto]]></category>

		<category><![CDATA[Linux]]></category>

		<category><![CDATA[Ausfall]]></category>

		<category><![CDATA[Raid]]></category>

		<guid isPermaLink="false">http://www.pastacode.de/?p=348</guid>
		<description><![CDATA[Dieser Blog dient mir auch dazu, mir Sachen zu dokumentieren die ich schnell vergess.
 Z.b. so etwas triviales wie ein Raid1-Array nach einem Ausfall (z.B. eine defekte Platte) wieder lauffähig bekommen:

Mit cat /proc/mdstat überprüft man den Zustand seines Raid-Arrays:
für den Fall, dass das RAID Array nur mit halber Kraft läuft z.B.: [U_] 
rausfinden welche Platte [...]]]></description>
			<content:encoded><![CDATA[<p>Dieser Blog dient mir auch dazu, mir Sachen zu dokumentieren die ich schnell vergess.<br />
 Z.b. so etwas triviales wie ein Raid1-Array nach einem Ausfall (z.B. eine defekte Platte) wieder lauffähig bekommen:<br />
<span id="more-348"></span><br />
Mit cat /proc/mdstat überprüft man den Zustand seines Raid-Arrays:<br />
für den Fall, dass das RAID Array nur mit halber Kraft läuft z.B.: [U_] </p>
<p>rausfinden welche Platte betroffen ist:<br />
<code><br />
mdadm -D /dev/mdX<br />
</code></p>
<p>Zu den betroffenen Partitionen wieder die zweite Platte einhängen:</p>
<p><code><br />
mdadm /dev/md1 -a /dev/sdx1<br />
mdadm /dev/md2 -a /dev/sdx2<br />
...<br />
</code></p>
<p>Dann mit<br />
<code><br />
cat /proc/mdstat<br />
</code></p>
<p>den Fortschritt überprüfen:</p>
<p><code><br />
Personalities : [raid1]<br />
md1 : active raid1 sdb1[1] sda1[0]<br />
      1959808 blocks [2/2] [UU]<br/><br />
md2 : active raid1 sdb2[2] sda2[0]<br />
      14659200 blocks [2/1] [U_]<br />
      	resync=DELAYED<br/><br />
md3 : active raid1 sdb3[2] sda3[0]<br />
      471764672 blocks [2/1] [U_]<br />
      [>....................]  recovery =  0.4% (2007104/471764672) finish=97.5min speed=80284K/sec<br/><br />
unused devices: <none><br />
</code></p>
]]></content:encoded>
			<wfw:commentRss>http://www.pastacode.de/linux-software-raid1-was-tun-bei-einem-disk-ausfall/de/feed/de/</wfw:commentRss>
		</item>
		<item>
		<title>Howto: Virtualising with Xen under Debian Lenny (Linux Kernel 2.6.26)</title>
		<link>http://www.pastacode.de/howto-virtualising-with-xen-under-debian-lenny-linux-kernel-2626/en/</link>
		<comments>http://www.pastacode.de/howto-virtualising-with-xen-under-debian-lenny-linux-kernel-2626/en/#comments</comments>
		<pubDate>Sun, 22 Mar 2009 12:08:13 +0000</pubDate>
		<dc:creator>Benjamin Milde</dc:creator>
		
		<category><![CDATA[Howto]]></category>

		<category><![CDATA[Linux]]></category>

		<category><![CDATA[Virtualisierung]]></category>

		<category><![CDATA[Xen]]></category>

		<guid isPermaLink="false">http://www.pastacode.de/?p=337</guid>
		<description><![CDATA[This howto is about installing and configuring Xen under the Linux distribution Debian Lenny. It also shows some simple steps to create and manage Xen-images.
Xen belongs to the group of paravirtualization, there an hypervisor (which runs on the host system) distributes cpu-cycles and other resources to virtual guest systems. The guest system will be directly [...]]]></description>
			<content:encoded><![CDATA[<p>This howto is about installing and configuring Xen under the Linux distribution Debian Lenny. It also shows some simple steps to create and manage Xen-images.<br />
Xen belongs to the group of paravirtualization, there an hypervisor (which runs on the host system) distributes cpu-cycles and other resources to virtual guest systems. The guest system will be directly executed on the CPU, with the exception of system calls, which are forwarded to the hypervisor. This works without special hardware extensions at an amazing performance, closely to native speed. The only drawback is that the host system must be patched in order to use the hypervisor instead of real syscalls. Special kernel-patches for Linux, FreeBSD, Solaris, and other free operating systems are already available. If you like to run Windows, which can&#8217;t be patched, you must stick with hardware-virtualization, a feature that Xen now also offers.<br />
<span id="more-337"></span></p>
<p>But now to the installation: I show it with the 64bit version of Debian Lenny.</p>
<p>After the installation of Lenny, install the custom Xen kernel and Xen-Tools:</p>
<p><code>apt-get install xen-linux-system-2.6.26-1-xen-amd64 xen-utils-3.2-1 lvm2 python-xml xen-tools</code></p>
<p>In order to bridge the virtual network devices of your guests to the host system, you need to edit the configuration file /etc/xen/xend-config.sxp</p>
<p>This part is relevant:</p>
<p><code><br />
##<br />
# To bridge network traffic, like this:<br />
#<br />
# dom0: ----------------- bridge -> real eth0 -> the network<br />
#                            |<br />
# domU: fake eth0 -> vifN.0 -+<br />
#<br />
# use<br />
#<br />
(network-script network-bridge)<br />
#<br />
# Your default ethernet device is used as the outgoing interface, by default.<br />
# To use a different one (e.g. eth1) use<br />
#<br />
# (network-script 'network-bridge netdev=eth1')<br />
#<br />
# The bridge is named xenbr0, by default.  To rename the bridge, use<br />
#<br />
# (network-script 'network-bridge bridge=<name>&#8216;)<br />
#<br />
# It is possible to use the network-bridge script in more complicated<br />
# scenarios, such as having two outgoing interfaces, with two bridges, and<br />
# two fake interfaces per guest domain.  To do things like this, write<br />
# yourself a wrapper script, and call network-bridge from it, as appropriate.<br />
#<br />
#(network-script network-dummy)<br />
</code></p>
<p>You must comment &#8220;(network-script network-dummy)&#8221; out as seen in the listing and remove the comment before &#8220;(network-script network-bridge)&#8221;</p>
<p>Now you can boot into your freshly installed Xen-Linux:<br />
<code>shutdown -r now</code></p>
<p>To check that everything works as expected run:</p>
<p><code>xm list</code> Xm stands for Xen-management, a tool to manage your guest machines.</p>
<p>Is should say something like this:</p>
<p><code><br />
olymp:~# xm list<br />
Name                                        ID   Mem VCPUs      State   Time(s)<br />
Domain-0                                     0  3242     4     r-----    266.8<br />
</code></p>
<p>Domain-0 is your host system and you haven&#8217;t created any guests yet.</p>
<p>You can do that very easily with the xen-tools, that you&#8217;ve already installed. You can set your default preferences for it very easily in the file /etc/xen-tools/xen-tools.conf. To use Debian Lenny 64bit as default guest, use the following configuration:</p>
<link rel="stylesheet" href="http://www.pastacode.de/wp-content/plugins/codeviewer/codeviewer.css" type="text/css" media="all" />
<ol class="codelist">
<li value="1" class="tab0 odd"><code><span style="color: #666666; font-style: italic;">##</span></code></li>
<li value="2" class="tab0 even"><code><span style="color: #666666; font-style: italic;"># &nbsp;/etc/xen-tools/xen-tools.conf</span></code></li>
<li value="3" class="tab0 odd"><code><span style="color: #666666; font-style: italic;">##</span></code></li>
<li value="4" class="tab0 even"><code><span style="color: #666666; font-style: italic;">#</span></code></li>
<li value="5" class="tab0 odd"><code><span style="color: #666666; font-style: italic;"># &nbsp;This is the global configuration file for the scripts included</span></code></li>
<li value="6" class="tab0 even"><code><span style="color: #666666; font-style: italic;"># within the xen-tools package.</span></code></li>
<li value="7" class="tab0 odd"><code><span style="color: #666666; font-style: italic;">#</span></code></li>
<li value="8" class="tab0 even"><code><span style="color: #666666; font-style: italic;"># &nbsp;For more details please see:</span></code></li>
<li value="9" class="tab0 odd"><code><span style="color: #666666; font-style: italic;">#</span></code></li>
<li value="10" class="tab0 even"><code><span style="color: #666666; font-style: italic;"># &nbsp; &nbsp; &nbsp; &nbsp;http://xen-tools.org/</span></code></li>
<li value="11" class="tab0 odd"><code><span style="color: #666666; font-style: italic;">#</span></code></li>
<li value="12" class="tab0 even"><code><span style="color: #666666; font-style: italic;">##</span></code></li>
<li value="13" class="odd">&nbsp;</li>
<li value="14" class="even">&nbsp;</li>
<li value="15" class="tab0 odd"><code><span style="color: #666666; font-style: italic;">##</span></code></li>
<li value="16" class="tab0 even"><code><span style="color: #666666; font-style: italic;">#</span></code></li>
<li value="17" class="tab0 odd"><code><span style="color: #666666; font-style: italic;"># File Format</span></code></li>
<li value="18" class="tab0 even"><code><span style="color: #666666; font-style: italic;"># &#8212;&#8212;&#8212;&#8211;</span></code></li>
<li value="19" class="tab0 odd"><code><span style="color: #666666; font-style: italic;">#</span></code></li>
<li value="20" class="tab0 even"><code><span style="color: #666666; font-style: italic;"># &nbsp;Anything following a &#8216;#&#8217; character is ignored as a comment.</span></code></li>
<li value="21" class="tab0 odd"><code><span style="color: #666666; font-style: italic;">#</span></code></li>
<li value="22" class="tab0 even"><code><span style="color: #666666; font-style: italic;"># &nbsp;Otherwise the format of this file &quot;key = value&quot;. &nbsp;The value of</span></code></li>
<li value="23" class="tab0 odd"><code><span style="color: #666666; font-style: italic;"># any keys in this file may be constructed via the output of a command.</span></code></li>
<li value="24" class="tab0 even"><code><span style="color: #666666; font-style: italic;">#</span></code></li>
<li value="25" class="tab0 odd"><code><span style="color: #666666; font-style: italic;"># &nbsp;For example:</span></code></li>
<li value="26" class="tab0 even"><code><span style="color: #666666; font-style: italic;">#</span></code></li>
<li value="27" class="tab0 odd"><code><span style="color: #666666; font-style: italic;"># &nbsp; &nbsp; &nbsp; &nbsp; kernel = /boot/vmlinuz-`uname -r`</span></code></li>
<li value="28" class="tab0 even"><code><span style="color: #666666; font-style: italic;">#</span></code></li>
<li value="29" class="tab0 odd"><code><span style="color: #666666; font-style: italic;">##</span></code></li>
<li value="30" class="even">&nbsp;</li>
<li value="31" class="odd">&nbsp;</li>
<li value="32" class="even">&nbsp;</li>
<li value="33" class="tab0 odd"><code><span style="color: #666666; font-style: italic;">#</span></code></li>
<li value="34" class="tab0 even"><code><span style="color: #666666; font-style: italic;">##</span></code></li>
<li value="35" class="tab0 odd"><code><span style="color: #666666; font-style: italic;"># &nbsp;Output directory for storing loopback images.</span></code></li>
<li value="36" class="tab0 even"><code><span style="color: #666666; font-style: italic;">#</span></code></li>
<li value="37" class="tab0 odd"><code><span style="color: #666666; font-style: italic;"># &nbsp;If you choose to use loopback images, which are simple to manage but</span></code></li>
<li value="38" class="tab0 even"><code><span style="color: #666666; font-style: italic;"># slower than LVM partitions, then specify a directory here and uncomment</span></code></li>
<li value="39" class="tab0 odd"><code><span style="color: #666666; font-style: italic;"># the line.</span></code></li>
<li value="40" class="tab0 even"><code><span style="color: #666666; font-style: italic;">#</span></code></li>
<li value="41" class="tab0 odd"><code><span style="color: #666666; font-style: italic;"># &nbsp;New instances will be stored in subdirectories named after their</span></code></li>
<li value="42" class="tab0 even"><code><span style="color: #666666; font-style: italic;"># hostnames.</span></code></li>
<li value="43" class="tab0 odd"><code><span style="color: #666666; font-style: italic;">#</span></code></li>
<li value="44" class="tab0 even"><code><span style="color: #666666; font-style: italic;">##</span></code></li>
<li value="45" class="tab0 odd"><code><span style="color: #c20cb9; font-weight: bold;">dir</span> = <span style="color: #000000; font-weight: bold;">/</span>home<span style="color: #000000; font-weight: bold;">/</span>xen</code></li>
<li value="46" class="tab0 even"><code><span style="color: #666666; font-style: italic;">#</span></code></li>
<li value="47" class="odd">&nbsp;</li>
<li value="48" class="tab0 even"><code><span style="color: #666666; font-style: italic;">#</span></code></li>
<li value="49" class="tab0 odd"><code><span style="color: #666666; font-style: italic;">##</span></code></li>
<li value="50" class="tab0 even"><code><span style="color: #666666; font-style: italic;">#</span></code></li>
<li value="51" class="tab0 odd"><code><span style="color: #666666; font-style: italic;"># If you don&#8217;t wish to use loopback images then you may specify an</span></code></li>
<li value="52" class="tab0 even"><code><span style="color: #666666; font-style: italic;"># LVM volume group here instead</span></code></li>
<li value="53" class="tab0 odd"><code><span style="color: #666666; font-style: italic;">#</span></code></li>
<li value="54" class="tab0 even"><code><span style="color: #666666; font-style: italic;">##</span></code></li>
<li value="55" class="tab0 odd"><code><span style="color: #666666; font-style: italic;"># lvm = skx-vg</span></code></li>
<li value="56" class="even">&nbsp;</li>
<li value="57" class="odd">&nbsp;</li>
<li value="58" class="tab0 even"><code><span style="color: #666666; font-style: italic;">#</span></code></li>
<li value="59" class="tab0 odd"><code><span style="color: #666666; font-style: italic;">##</span></code></li>
<li value="60" class="tab0 even"><code><span style="color: #666666; font-style: italic;">#</span></code></li>
<li value="61" class="tab0 odd"><code><span style="color: #666666; font-style: italic;"># &nbsp;Installation method.</span></code></li>
<li value="62" class="tab0 even"><code><span style="color: #666666; font-style: italic;">#</span></code></li>
<li value="63" class="tab0 odd"><code><span style="color: #666666; font-style: italic;"># &nbsp;There are four distinct methods which you may to install a new copy</span></code></li>
<li value="64" class="tab0 even"><code><span style="color: #666666; font-style: italic;"># of Linux to use in your Xen guest domain:</span></code></li>
<li value="65" class="tab0 odd"><code><span style="color: #666666; font-style: italic;">#</span></code></li>
<li value="66" class="tab0 even"><code><span style="color: #666666; font-style: italic;"># &nbsp; - Installation via the debootstrap command.</span></code></li>
<li value="67" class="tab0 odd"><code><span style="color: #666666; font-style: italic;"># &nbsp; - Installation via the rpmstrap command.</span></code></li>
<li value="68" class="tab0 even"><code><span style="color: #666666; font-style: italic;"># &nbsp; - Installation via the rinse command.</span></code></li>
<li value="69" class="tab0 odd"><code><span style="color: #666666; font-style: italic;"># &nbsp; - Installation by copying a directory containing a previous installation.</span></code></li>
<li value="70" class="tab0 even"><code><span style="color: #666666; font-style: italic;"># &nbsp; - Installation by untarring a previously archived image.</span></code></li>
<li value="71" class="tab0 odd"><code><span style="color: #666666; font-style: italic;">#</span></code></li>
<li value="72" class="tab0 even"><code><span style="color: #666666; font-style: italic;"># &nbsp;NOTE That if you use the &quot;untar&quot;, or &quot;copy&quot; options you should ensure</span></code></li>
<li value="73" class="tab0 odd"><code><span style="color: #666666; font-style: italic;"># that the image you&#8217;re left with matches the &#8216;dist&#8217; setting later in</span></code></li>
<li value="74" class="tab0 even"><code><span style="color: #666666; font-style: italic;"># this file.</span></code></li>
<li value="75" class="tab0 odd"><code><span style="color: #666666; font-style: italic;">#</span></code></li>
<li value="76" class="tab0 even"><code><span style="color: #666666; font-style: italic;">#</span></code></li>
<li value="77" class="tab0 odd"><code><span style="color: #666666; font-style: italic;">##</span></code></li>
<li value="78" class="tab0 even"><code><span style="color: #666666; font-style: italic;">#</span></code></li>
<li value="79" class="tab0 odd"><code><span style="color: #666666; font-style: italic;">#</span></code></li>
<li value="80" class="tab0 even"><code><span style="color: #666666; font-style: italic;"># install-method = [ debootstrap | rinse | rpmstrap | copy | tar ]</span></code></li>
<li value="81" class="tab0 odd"><code><span style="color: #666666; font-style: italic;">#</span></code></li>
<li value="82" class="tab0 even"><code><span style="color: #666666; font-style: italic;">#</span></code></li>
<li value="83" class="tab0 odd"><code>install-method = debootstrap</code></li>
<li value="84" class="even">&nbsp;</li>
<li value="85" class="tab0 odd"><code><span style="color: #666666; font-style: italic;">#</span></code></li>
<li value="86" class="tab0 even"><code><span style="color: #666666; font-style: italic;"># If you&#8217;re using the &quot;copy&quot;, or &quot;tar&quot; installation methods you must</span></code></li>
<li value="87" class="tab0 odd"><code><span style="color: #666666; font-style: italic;"># need to specify the source location to copy from, or the source</span></code></li>
<li value="88" class="tab0 even"><code><span style="color: #666666; font-style: italic;"># .tar file to unpack.</span></code></li>
<li value="89" class="tab0 odd"><code><span style="color: #666666; font-style: italic;">#</span></code></li>
<li value="90" class="tab0 even"><code><span style="color: #666666; font-style: italic;"># You may specify that with a line such as:</span></code></li>
<li value="91" class="tab0 odd"><code><span style="color: #666666; font-style: italic;">#</span></code></li>
<li value="92" class="tab0 even"><code><span style="color: #666666; font-style: italic;"># install-source = /path/to/copy</span></code></li>
<li value="93" class="tab0 odd"><code><span style="color: #666666; font-style: italic;"># install-source = /some/path/img.tar</span></code></li>
<li value="94" class="tab0 even"><code><span style="color: #666666; font-style: italic;">#</span></code></li>
<li value="95" class="tab0 odd"><code><span style="color: #666666; font-style: italic;">#</span></code></li>
<li value="96" class="even">&nbsp;</li>
<li value="97" class="tab0 odd"><code><span style="color: #666666; font-style: italic;">#</span></code></li>
<li value="98" class="tab0 even"><code><span style="color: #666666; font-style: italic;">##</span></code></li>
<li value="99" class="tab0 odd"><code><span style="color: #666666; font-style: italic;"># &nbsp;Command definitions.</span></code></li>
<li value="100" class="tab0 even"><code><span style="color: #666666; font-style: italic;">##</span></code></li>
<li value="101" class="tab0 odd"><code><span style="color: #666666; font-style: italic;">#</span></code></li>
<li value="102" class="tab0 even"><code><span style="color: #666666; font-style: italic;"># The &quot;rinse&quot;, and &quot;rpmstrap&quot; commands are hardwired into</span></code></li>
<li value="103" class="tab0 odd"><code><span style="color: #666666; font-style: italic;"># the script, but if you wish to modify the commands which are executed</span></code></li>
<li value="104" class="tab0 even"><code><span style="color: #666666; font-style: italic;"># when installing new systems by a &quot;copy&quot;, &quot;debootstrap&quot;, or &quot;tar&quot; method</span></code></li>
<li value="105" class="tab0 odd"><code><span style="color: #666666; font-style: italic;"># you can do so here:</span></code></li>
<li value="106" class="tab0 even"><code><span style="color: #666666; font-style: italic;">#</span></code></li>
<li value="107" class="tab0 odd"><code><span style="color: #666666; font-style: italic;"># (This allows you to install from a .tar.bz file, rather than a plain</span></code></li>
<li value="108" class="tab0 even"><code><span style="color: #666666; font-style: italic;"># tar file, use cdebootstrap, etc.)</span></code></li>
<li value="109" class="tab0 odd"><code><span style="color: #666666; font-style: italic;">#</span></code></li>
<li value="110" class="tab0 even"><code><span style="color: #666666; font-style: italic;"># install-method=copy:</span></code></li>
<li value="111" class="tab0 odd"><code><span style="color: #666666; font-style: italic;"># copy-cmd = /bin/cp -a $src/* $dest</span></code></li>
<li value="112" class="tab0 even"><code><span style="color: #666666; font-style: italic;">##</span></code></li>
<li value="113" class="tab0 odd"><code><span style="color: #666666; font-style: italic;">#install-method=debootstrap:</span></code></li>
<li value="114" class="tab0 even"><code>debootstrap-cmd=<span style="color: #000000; font-weight: bold;">/</span>usr<span style="color: #000000; font-weight: bold;">/</span>sbin<span style="color: #000000; font-weight: bold;">/</span>debootstrap</code></li>
<li value="115" class="tab0 odd"><code><span style="color: #666666; font-style: italic;">#</span></code></li>
<li value="116" class="tab0 even"><code><span style="color: #666666; font-style: italic;"># install-method=tar:</span></code></li>
<li value="117" class="tab0 odd"><code><span style="color: #666666; font-style: italic;"># tar-cmd &nbsp;= /bin/tar &#8211;numeric-owner -xvf $src</span></code></li>
<li value="118" class="tab0 even"><code><span style="color: #666666; font-style: italic;">#</span></code></li>
<li value="119" class="tab0 odd"><code><span style="color: #666666; font-style: italic;">#</span></code></li>
<li value="120" class="even">&nbsp;</li>
<li value="121" class="odd">&nbsp;</li>
<li value="122" class="even">&nbsp;</li>
<li value="123" class="tab0 odd"><code><span style="color: #666666; font-style: italic;">#</span></code></li>
<li value="124" class="tab0 even"><code><span style="color: #666666; font-style: italic;">##</span></code></li>
<li value="125" class="tab0 odd"><code><span style="color: #666666; font-style: italic;"># &nbsp;Disk and Sizing options.</span></code></li>
<li value="126" class="tab0 even"><code><span style="color: #666666; font-style: italic;">##</span></code></li>
<li value="127" class="tab0 odd"><code><span style="color: #666666; font-style: italic;">#</span></code></li>
<li value="128" class="tab0 even"><code><span style="color: #c20cb9; font-weight: bold;">size</span> &nbsp; = 4Gb &nbsp; &nbsp; &nbsp;<span style="color: #666666; font-style: italic;"># Disk image size.</span></code></li>
<li value="129" class="tab0 odd"><code>memory = 256Mb &nbsp; &nbsp;<span style="color: #666666; font-style: italic;"># Memory size</span></code></li>
<li value="130" class="tab0 even"><code>swap &nbsp; = 256Mb &nbsp; &nbsp;<span style="color: #666666; font-style: italic;"># Swap size</span></code></li>
<li value="131" class="tab0 odd"><code><span style="color: #666666; font-style: italic;"># noswap = 1 &nbsp; &nbsp; &nbsp;# Don&#8217;t use swap at all for the new system.</span></code></li>
<li value="132" class="tab0 even"><code>fs &nbsp; &nbsp; = ext3 &nbsp; &nbsp; <span style="color: #666666; font-style: italic;"># use the EXT3 filesystem for the disk image.</span></code></li>
<li value="133" class="tab0 odd"><code>dist &nbsp; = lenny &nbsp; &nbsp; <span style="color: #666666; font-style: italic;"># Default distribution to install.</span></code></li>
<li value="134" class="tab0 even"><code>image &nbsp;= sparse &nbsp; <span style="color: #666666; font-style: italic;"># Specify sparse vs. full disk images.</span></code></li>
<li value="135" class="odd">&nbsp;</li>
<li value="136" class="tab0 even"><code><span style="color: #666666; font-style: italic;">#</span></code></li>
<li value="137" class="tab0 odd"><code><span style="color: #666666; font-style: italic;"># &nbsp;Currently supported and tested distributions include:</span></code></li>
<li value="138" class="tab0 even"><code><span style="color: #666666; font-style: italic;">#</span></code></li>
<li value="139" class="tab0 odd"><code><span style="color: #666666; font-style: italic;"># via Debootstrap:</span></code></li>
<li value="140" class="tab0 even"><code><span style="color: #666666; font-style: italic;">#</span></code></li>
<li value="141" class="tab0 odd"><code><span style="color: #666666; font-style: italic;"># &nbsp;Debian:</span></code></li>
<li value="142" class="tab0 even"><code><span style="color: #666666; font-style: italic;"># &nbsp; sid, sarge, etch, lenny.</span></code></li>
<li value="143" class="tab0 odd"><code><span style="color: #666666; font-style: italic;">#</span></code></li>
<li value="144" class="tab0 even"><code><span style="color: #666666; font-style: italic;"># &nbsp;Ubuntu:</span></code></li>
<li value="145" class="tab0 odd"><code><span style="color: #666666; font-style: italic;"># &nbsp; edgy, feisty, dapper.</span></code></li>
<li value="146" class="tab0 even"><code><span style="color: #666666; font-style: italic;">#</span></code></li>
<li value="147" class="tab0 odd"><code><span style="color: #666666; font-style: italic;"># via Rinse:</span></code></li>
<li value="148" class="tab0 even"><code><span style="color: #666666; font-style: italic;"># &nbsp; centos-4, centos-5.</span></code></li>
<li value="149" class="tab0 odd"><code><span style="color: #666666; font-style: italic;"># &nbsp; fedora-core-4, fedora-core-5, fedora-core-6, fedora-core-7</span></code></li>
<li value="150" class="tab0 even"><code><span style="color: #666666; font-style: italic;">#</span></code></li>
<li value="151" class="tab0 odd"><code><span style="color: #666666; font-style: italic;">#</span></code></li>
<li value="152" class="even">&nbsp;</li>
<li value="153" class="odd">&nbsp;</li>
<li value="154" class="even">&nbsp;</li>
<li value="155" class="tab0 odd"><code><span style="color: #666666; font-style: italic;">##</span></code></li>
<li value="156" class="tab0 even"><code><span style="color: #666666; font-style: italic;"># Networking setup values.</span></code></li>
<li value="157" class="tab0 odd"><code><span style="color: #666666; font-style: italic;">##</span></code></li>
<li value="158" class="even">&nbsp;</li>
<li value="159" class="tab0 odd"><code><span style="color: #666666; font-style: italic;">#</span></code></li>
<li value="160" class="tab0 even"><code><span style="color: #666666; font-style: italic;"># Uncomment and adjust these network settings if you wish to give your</span></code></li>
<li value="161" class="tab0 odd"><code><span style="color: #666666; font-style: italic;"># new instances static IP addresses.</span></code></li>
<li value="162" class="tab0 even"><code><span style="color: #666666; font-style: italic;">#</span></code></li>
<li value="163" class="tab0 odd"><code><span style="color: #666666; font-style: italic;"># gateway &nbsp; = 192.168.1.1</span></code></li>
<li value="164" class="tab0 even"><code><span style="color: #666666; font-style: italic;"># netmask &nbsp; = 255.255.255.0</span></code></li>
<li value="165" class="tab0 odd"><code><span style="color: #666666; font-style: italic;"># broadcast = 192.168.1.255</span></code></li>
<li value="166" class="tab0 even"><code><span style="color: #666666; font-style: italic;">#</span></code></li>
<li value="167" class="tab0 odd"><code><span style="color: #666666; font-style: italic;"># Uncomment this if you wish the images to use DHCP</span></code></li>
<li value="168" class="tab0 even"><code><span style="color: #666666; font-style: italic;">#</span></code></li>
<li value="169" class="tab0 odd"><code>dhcp = <span style="color: #000000;">1</span></code></li>
<li value="170" class="even">&nbsp;</li>
<li value="171" class="odd">&nbsp;</li>
<li value="172" class="tab0 even"><code><span style="color: #666666; font-style: italic;">##</span></code></li>
<li value="173" class="tab0 odd"><code><span style="color: #666666; font-style: italic;"># Misc options</span></code></li>
<li value="174" class="tab0 even"><code><span style="color: #666666; font-style: italic;">##</span></code></li>
<li value="175" class="odd">&nbsp;</li>
<li value="176" class="tab0 even"><code><span style="color: #666666; font-style: italic;">#</span></code></li>
<li value="177" class="tab0 odd"><code><span style="color: #666666; font-style: italic;"># Uncomment the following line if you wish to disable the caching</span></code></li>
<li value="178" class="tab0 even"><code><span style="color: #666666; font-style: italic;"># of downloaded .deb files when using debootstrap to install images.</span></code></li>
<li value="179" class="tab0 odd"><code><span style="color: #666666; font-style: italic;">#</span></code></li>
<li value="180" class="tab0 even"><code><span style="color: #666666; font-style: italic;"># cache = no</span></code></li>
<li value="181" class="tab0 odd"><code><span style="color: #666666; font-style: italic;">#</span></code></li>
<li value="182" class="even">&nbsp;</li>
<li value="183" class="tab0 odd"><code><span style="color: #666666; font-style: italic;">#</span></code></li>
<li value="184" class="tab0 even"><code><span style="color: #666666; font-style: italic;"># Uncomment the following line if you wish to interactively setup</span></code></li>
<li value="185" class="tab0 odd"><code><span style="color: #666666; font-style: italic;"># a new root password for images.</span></code></li>
<li value="186" class="tab0 even"><code><span style="color: #666666; font-style: italic;">#</span></code></li>
<li value="187" class="tab0 odd"><code><span style="color: #c20cb9; font-weight: bold;">passwd</span> = <span style="color: #000000;">1</span></code></li>
<li value="188" class="even">&nbsp;</li>
<li value="189" class="tab0 odd"><code><span style="color: #666666; font-style: italic;">#</span></code></li>
<li value="190" class="tab0 even"><code><span style="color: #666666; font-style: italic;"># If you&#8217;d like all accounts on your host system which are not present</span></code></li>
<li value="191" class="tab0 odd"><code><span style="color: #666666; font-style: italic;"># on the guest system to be copied over then uncomment the following line.</span></code></li>
<li value="192" class="tab0 even"><code><span style="color: #666666; font-style: italic;">#</span></code></li>
<li value="193" class="tab0 odd"><code><span style="color: #666666; font-style: italic;"># accounts = 1</span></code></li>
<li value="194" class="tab0 even"><code><span style="color: #666666; font-style: italic;">#</span></code></li>
<li value="195" class="odd">&nbsp;</li>
<li value="196" class="tab0 even"><code><span style="color: #666666; font-style: italic;">#</span></code></li>
<li value="197" class="tab0 odd"><code><span style="color: #666666; font-style: italic;"># Default kernel and ramdisk to use for the virtual servers</span></code></li>
<li value="198" class="tab0 even"><code><span style="color: #666666; font-style: italic;">#</span></code></li>
<li value="199" class="tab0 odd"><code>kernel &nbsp; &nbsp; &nbsp;= <span style="color: #000000; font-weight: bold;">/</span>boot<span style="color: #000000; font-weight: bold;">/</span>vmlinuz-<span style="color: #000000; font-weight: bold;">`</span><span style="color: #c20cb9; font-weight: bold;">uname</span> -r<span style="color: #000000; font-weight: bold;">`</span></code></li>
<li value="200" class="tab0 even"><code>initrd &nbsp; &nbsp; &nbsp;= <span style="color: #000000; font-weight: bold;">/</span>boot<span style="color: #000000; font-weight: bold;">/</span>initrd.img-<span style="color: #000000; font-weight: bold;">`</span><span style="color: #c20cb9; font-weight: bold;">uname</span> -r<span style="color: #000000; font-weight: bold;">`</span></code></li>
<li value="201" class="odd">&nbsp;</li>
<li value="202" class="tab0 even"><code><span style="color: #666666; font-style: italic;">#</span></code></li>
<li value="203" class="tab0 odd"><code><span style="color: #666666; font-style: italic;"># &nbsp;The architecture to use when using debootstrap, rinse, or rpmstrap.</span></code></li>
<li value="204" class="tab0 even"><code><span style="color: #666666; font-style: italic;">#</span></code></li>
<li value="205" class="tab0 odd"><code><span style="color: #666666; font-style: italic;"># &nbsp;This is most useful on 64 bit host machines, for other systems it</span></code></li>
<li value="206" class="tab0 even"><code><span style="color: #666666; font-style: italic;"># doesn&#8217;t need to be used.</span></code></li>
<li value="207" class="tab0 odd"><code><span style="color: #666666; font-style: italic;">#</span></code></li>
<li value="208" class="tab0 even"><code><span style="color: #007800;"><span style="color: #c20cb9; font-weight: bold;">arch</span></span>=amd64</code></li>
<li value="209" class="tab0 odd"><code><span style="color: #666666; font-style: italic;">#</span></code></li>
<li value="210" class="even">&nbsp;</li>
<li value="211" class="tab0 odd"><code><span style="color: #666666; font-style: italic;">#</span></code></li>
<li value="212" class="tab0 even"><code><span style="color: #666666; font-style: italic;"># The default mirror for debootstrap to install Debian-derived distributions</span></code></li>
<li value="213" class="tab0 odd"><code><span style="color: #666666; font-style: italic;">#</span></code></li>
<li value="214" class="tab0 even"><code>mirror = http:<span style="color: #000000; font-weight: bold;">//</span>ftp.de.debian.org<span style="color: #000000; font-weight: bold;">/</span>debian<span style="color: #000000; font-weight: bold;">/</span></code></li>
<li value="215" class="odd">&nbsp;</li>
<li value="216" class="tab0 even"><code><span style="color: #666666; font-style: italic;">#</span></code></li>
<li value="217" class="tab0 odd"><code><span style="color: #666666; font-style: italic;"># A mirror suitable for use when installing the Dapper release of Ubuntu.</span></code></li>
<li value="218" class="tab0 even"><code><span style="color: #666666; font-style: italic;">#</span></code></li>
<li value="219" class="tab0 odd"><code><span style="color: #666666; font-style: italic;"># mirror = http://gb.archive.ubuntu.com/ubuntu/</span></code></li>
<li value="220" class="even">&nbsp;</li>
<li value="221" class="tab0 odd"><code><span style="color: #666666; font-style: italic;">#</span></code></li>
<li value="222" class="tab0 even"><code><span style="color: #666666; font-style: italic;"># &nbsp;If you like you could use per-distribution mirrors, which will</span></code></li>
<li value="223" class="tab0 odd"><code><span style="color: #666666; font-style: italic;"># be more useful if you&#8217;re working in an environment where you want</span></code></li>
<li value="224" class="tab0 even"><code><span style="color: #666666; font-style: italic;"># to regularly use multiple distributions:</span></code></li>
<li value="225" class="tab0 odd"><code><span style="color: #666666; font-style: italic;">#</span></code></li>
<li value="226" class="tab0 even"><code><span style="color: #666666; font-style: italic;"># mirror_sid=http://ftp.us.debian.org/debian</span></code></li>
<li value="227" class="tab0 odd"><code><span style="color: #666666; font-style: italic;"># mirror_sarge=http://ftp.us.debian.org/debian</span></code></li>
<li value="228" class="tab0 even"><code><span style="color: #666666; font-style: italic;"># mirror_etch=http://ftp.us.debian.org/debian</span></code></li>
<li value="229" class="tab0 odd"><code><span style="color: #666666; font-style: italic;"># mirror_dapper=http://archive.ubuntu.com/ubuntu</span></code></li>
<li value="230" class="tab0 even"><code><span style="color: #666666; font-style: italic;"># mirror_edgy=http://archive.ubuntu.com/ubuntu</span></code></li>
<li value="231" class="tab0 odd"><code><span style="color: #666666; font-style: italic;"># mirror_feisty=http://archive.ubuntu.com/ubuntu</span></code></li>
<li value="232" class="tab0 even"><code><span style="color: #666666; font-style: italic;"># mirror_gutsy=http://archive.ubuntu.com/ubuntu</span></code></li>
<li value="233" class="odd">&nbsp;</li>
<li value="234" class="even">&nbsp;</li>
<li value="235" class="tab0 odd"><code><span style="color: #666666; font-style: italic;">#</span></code></li>
<li value="236" class="tab0 even"><code><span style="color: #666666; font-style: italic;"># &nbsp;Filesystem options for the different filesystems we support.</span></code></li>
<li value="237" class="tab0 odd"><code><span style="color: #666666; font-style: italic;">#</span></code></li>
<li value="238" class="tab0 even"><code>ext3_options &nbsp; = noatime,nodiratime,<span style="color: #007800;">errors</span>=remount-ro</code></li>
<li value="239" class="tab0 odd"><code>ext2_options &nbsp; = noatime,nodiratime,<span style="color: #007800;">errors</span>=remount-ro</code></li>
<li value="240" class="tab0 even"><code>xfs_options &nbsp; &nbsp;= defaults</code></li>
<li value="241" class="tab0 odd"><code>reiser_options = defaults</code></li>
<li value="242" class="even">&nbsp;</li>
<li value="243" class="tab0 odd"><code><span style="color: #666666; font-style: italic;">#</span></code></li>
<li value="244" class="tab0 even"><code><span style="color: #666666; font-style: italic;"># &nbsp;Uncomment if you wish newly created images to boot once they&#8217;ve been</span></code></li>
<li value="245" class="tab0 odd"><code><span style="color: #666666; font-style: italic;"># created.</span></code></li>
<li value="246" class="tab0 even"><code><span style="color: #666666; font-style: italic;">#</span></code></li>
<li value="247" class="tab0 odd"><code>boot = <span style="color: #000000;">1</span></code></li>
<li value="248" class="even">&nbsp;</li>
<li value="249" class="odd">&nbsp;</li>
<li value="250" class="tab0 even"><code><span style="color: #666666; font-style: italic;">#</span></code></li>
<li value="251" class="tab0 odd"><code><span style="color: #666666; font-style: italic;"># &nbsp;If you&#8217;re using the lenny or later version of the Xen guest kernel you will</span></code></li>
<li value="252" class="tab0 even"><code><span style="color: #666666; font-style: italic;"># need to make sure that you use &#8216;hvc0&#8242; for the guest serial device,</span></code></li>
<li value="253" class="tab0 odd"><code><span style="color: #666666; font-style: italic;"># and &#8216;xvdX&#8217; instead of &#8217;sdX&#8217; for serial devices.</span></code></li>
<li value="254" class="tab0 even"><code><span style="color: #666666; font-style: italic;">#</span></code></li>
<li value="255" class="tab0 odd"><code><span style="color: #666666; font-style: italic;"># &nbsp;You may specify the things to use here:</span></code></li>
<li value="256" class="tab0 even"><code><span style="color: #666666; font-style: italic;">#</span></code></li>
<li value="257" class="tab0 odd"><code>serial_device = hvc0 <span style="color: #666666; font-style: italic;">#default</span></code></li>
<li value="258" class="tab0 even"><code><span style="color: #666666; font-style: italic;"># serial_device = tty1</span></code></li>
<li value="259" class="tab0 odd"><code><span style="color: #666666; font-style: italic;">#</span></code></li>
<li value="260" class="tab0 even"><code>disk_device = xvda <span style="color: #666666; font-style: italic;">#default</span></code></li>
<li value="261" class="tab0 odd"><code><span style="color: #666666; font-style: italic;"># disk_device = sda</span></code></li>
<li value="262" class="tab0 even"><code><span style="color: #666666; font-style: italic;">#</span></code></li>
<li value="263" class="odd">&nbsp;</li>
<li value="264" class="even">&nbsp;</li>
<li value="265" class="tab0 odd"><code><span style="color: #666666; font-style: italic;">#</span></code></li>
<li value="266" class="tab0 even"><code><span style="color: #666666; font-style: italic;"># &nbsp;Here we specify the output directory which the Xen configuration</span></code></li>
<li value="267" class="tab0 odd"><code><span style="color: #666666; font-style: italic;"># files will be written to, and the suffix to give them.</span></code></li>
<li value="268" class="tab0 even"><code><span style="color: #666666; font-style: italic;">#</span></code></li>
<li value="269" class="tab0 odd"><code><span style="color: #666666; font-style: italic;"># &nbsp;Historically xen-tools have created configuration files in /etc/xen,</span></code></li>
<li value="270" class="tab0 even"><code><span style="color: #666666; font-style: italic;"># and given each file the name $hostname.cfg. &nbsp;If you want to change</span></code></li>
<li value="271" class="tab0 odd"><code><span style="color: #666666; font-style: italic;"># that behaviour you may do so here.</span></code></li>
<li value="272" class="tab0 even"><code><span style="color: #666666; font-style: italic;">#</span></code></li>
<li value="273" class="tab0 odd"><code><span style="color: #666666; font-style: italic;">#</span></code></li>
<li value="274" class="tab0 even"><code><span style="color: #666666; font-style: italic;"># output &nbsp; &nbsp;= /etc/xen</span></code></li>
<li value="275" class="tab0 odd"><code><span style="color: #666666; font-style: italic;"># extension = .cfg</span></code></li>
<li value="276" class="tab0 even"><code><span style="color: #666666; font-style: italic;">#</span></code></li>
<li class="sourcelink"><strong>Download this code:</strong> <a href="http://www.pastacode.de/code/xen-tools.conf">xen-tools.conf</a></li>
</ol>
<p>Now you can use:<br />
<code><br />
xen-create-image --hostname test1 --role=udev<br />
</code><br />
to install a new Debian Lenny as guest system. If everything went as it should, you should see your new client after that in &#8220;xm list&#8221;. Otherwise it doesn&#8217;t show up and you can try to manuelly create it with &#8220;xm create <Path to config file>&#8221; to see the error.</p>
<p>By the way &#8220;&#8211;role=udev&#8221; is needed, to install the package udev automatically in the guest. Without it, you can&#8217;t use ssh with your new guest and get the following error if you try to log in:</p>
<p><code><br />
PTY allocation request failed on channel 0<br />
stdin: is not a tty<br />
</code></p>
<p>If you use images for your guest (like shown here) you get very fast to the standard loopback limit of Debian Lenny. With that limit you can&#8217;t create more than 3 or 4 guests. It&#8217;s recommended to edit the file /etc/modprobe.d/local-loop (or create it) to adjust that limit:</p>
<p><code><br />
options loop max_loop=64<br />
</code></p>
<p>Some more basics besides &#8220;xm list&#8221;: You can use &#8220;xm top&#8221; to monitor the activity of your guests (like top for processes). You can start, reboot and shutdown a guest with &#8220;xm start <guest>&#8220;, &#8220;xm reboot <guest>&#8221; and &#8220;xm shutdown <guest>&#8220;.<br />
You can enter a guest system directly with &#8220;xm console <guest>&#8220;. To exit the guest and go back to Dom0 use ctrl+]</p>
<p>For more commands you should read &#8220;xm help&#8221; <img src='http://www.pastacode.de/wp-includes/images/smilies/icon_smile.gif' alt=':)' class='wp-smiley' /> </p>
]]></content:encoded>
			<wfw:commentRss>http://www.pastacode.de/howto-virtualising-with-xen-under-debian-lenny-linux-kernel-2626/en/feed/en/</wfw:commentRss>
		</item>
		<item>
		<title>Null-pointer dereference Lücke in Flash lässt Browser crashen</title>
		<link>http://www.pastacode.de/null-pointer-dereference-lucke-in-flash-laesst-browser-crashen/de/</link>
		<comments>http://www.pastacode.de/null-pointer-dereference-lucke-in-flash-laesst-browser-crashen/de/#comments</comments>
		<pubDate>Sat, 21 Mar 2009 14:22:25 +0000</pubDate>
		<dc:creator>Benjamin Milde</dc:creator>
		
		<category><![CDATA[Security]]></category>

		<category><![CDATA[Browser]]></category>

		<category><![CDATA[Crash]]></category>

		<category><![CDATA[Flash]]></category>

		<category><![CDATA[Sicherheit]]></category>

		<guid isPermaLink="false">http://www.pastacode.de/?p=327</guid>
		<description><![CDATA[Das wohl am weitesten verbreitete Browserplugin &#8220;Flash&#8221; kämpft immer mal wieder mit Sicherheitslücken. Eine relativ neue führt dabei zu einem Absturz des Browsers - ich vermute mal es betrifft fast alle Browser auf allen Betriebsystemen - die Lücke lässt sich jedoch nicht dazu ausnutzen, Code einzuschleusen.
Das Problem ist folgendes (Text aus diesem  bugtraq post):

 [...]]]></description>
			<content:encoded><![CDATA[<p>Das wohl am weitesten verbreitete Browserplugin &#8220;Flash&#8221; kämpft immer mal wieder mit Sicherheitslücken. Eine relativ neue führt dabei zu einem Absturz des Browsers - ich vermute mal es betrifft fast alle Browser auf allen Betriebsystemen - die Lücke lässt sich jedoch nicht dazu ausnutzen, Code einzuschleusen.</p>
<p>Das Problem ist folgendes (Text aus diesem <a href="http://seclists.org/bugtraq/2009/Mar/0117.html"> bugtraq post</a>):<br />
<code><br />
 If a Flash 9 SWF loads two SWF files with different SWF version<br />
numbers from two distinct HTTP requests to the exact same URL<br />
(including query string arguments), then Adobe's Flash Player plug-in<br />
will try to dereference a null pointer<br />
</code></p>
<p>Die Lücke betrifft auch Version 10 (also die neuste) und man kann es hier selber testen:</p>
<p><a href="http://flashcrash.dempsky.org/">http://flashcrash.dempsky.org/</a></p>
<p>Bei mir crashte Safari auch nach paar Sekunden unter Mac Os X, wenn es auch bei euch geht, postet euere System/Browser Kombination in den Kommentaren.</p>
]]></content:encoded>
			<wfw:commentRss>http://www.pastacode.de/null-pointer-dereference-lucke-in-flash-laesst-browser-crashen/de/feed/de/</wfw:commentRss>
		</item>
		<item>
		<title>Howto: Virtualisierung mit OpenVZ unter Debian Lenny (Linux Kernel 2.6.26)</title>
		<link>http://www.pastacode.de/howto-virtualisierung-mit-openvz-unter-debian-lenny-linux-kernel-2626/de/</link>
		<comments>http://www.pastacode.de/howto-virtualisierung-mit-openvz-unter-debian-lenny-linux-kernel-2626/de/#comments</comments>
		<pubDate>Wed, 18 Mar 2009 23:08:10 +0000</pubDate>
		<dc:creator>Benjamin Milde</dc:creator>
		
		<category><![CDATA[Howto]]></category>

		<category><![CDATA[Linux]]></category>

		<category><![CDATA[Virtualisierung]]></category>

		<guid isPermaLink="false">http://www.pastacode.de/?p=296</guid>
		<description><![CDATA[OpenVZ ist einer der eher unbekannteren Virtualisierungslösungen. Vom Ansatz her arbeitet es ähnlich wie Linux-Vserver: Ein Kernel wird in virtuelle &#8220;Zonen&#8221; eigeteilt, die sich fast wie eigenständige Server verhalten. Durch diese Art der Virtualisierung kann nur Linux unter Linux virtualisiert werden, jedoch fast jede Distribution.
 Da es sich um keine volle Virtualisierung handelt, wird der [...]]]></description>
			<content:encoded><![CDATA[<p><a href="http://www.openvz.org">OpenVZ</a> ist einer der eher unbekannteren Virtualisierungslösungen. Vom Ansatz her arbeitet es ähnlich wie Linux-Vserver: Ein Kernel wird in virtuelle &#8220;Zonen&#8221; eigeteilt, die sich fast wie eigenständige Server verhalten. Durch diese Art der Virtualisierung kann nur Linux unter Linux virtualisiert werden, jedoch fast jede Distribution.<br />
 Da es sich um keine volle Virtualisierung handelt, wird der Speicher des Hostsystems optimal genutzt und die allgemeine Performance ist sehr gut, der Overhead kann praktisch vernachlässigt werden.<br />
 Für OpenVZ und gegen Linux-Vserver spricht aufjedenfall die einfache Handhabung und die schnelle Installation. Auch wenn ich Linux-Vserver nur kurz gesehen habe, scheint es mir wesentlich komplizierter. Außerdem hat OpenVZ ein sehr interessantes Feature: Der Netzwerkverkehr wird vollständig virtualisiert, eigene Firewallregeln (Iptables) sind möglich.</p>
<p>Hier ein kleines Howto um OpenVZ unter Debian Lenny einzurichten:<br />
<span id="more-296"></span><br />
1. Installation:<br />
<code><br />
apt-get install iproute libatm1 linux-image-2.6.26-1-openvz-amd64 linux-image-openvz-amd64 rsync vzctl vzquota<br />
</code></p>
<p>2. Anpassen der Datei /etc/sysctl.conf, dieser Abschnitt muss angefügt werden:<br />
<code><br />
# On Hardware Node we generally need<br />
# packet forwarding enabled and proxy arp disabled<br />
net.ipv4.conf.default.forwarding=1<br />
net.ipv4.conf.default.proxy_arp = 0<br />
net.ipv4.ip_forward=1<br />
# Enables source route verification<br />
net.ipv4.conf.all.rp_filter = 1<br />
# Enables the magic-sysrq key<br />
kernel.sysrq = 1<br />
# TCP Explict Congestion Notification<br />
#net.ipv4.tcp_ecn = 0<br />
# we do not want all our interfaces to send redirects<br />
net.ipv4.conf.default.send_redirects = 1<br />
net.ipv4.conf.all.send_redirects = 0<br />
net.ipv4.conf.eth0.proxy_arp = 1<br />
</code></p>
<p>3. Diese neuen Regeln laden<br />
<code>sysctl -p</code></p>
<p>4. Nun kann man OpenVZ symbolisches nach /vz linken (Optional, aber hilfreich)<br />
<code>ln -s /var/lib/vz /vz</code></p>
<p>Am schnellsten hat man seine virtuelle Maschiene eingerichtet, wenn man sich ein Template aus diesem <a href="http://download.openvz.org/contrib/template/precreated/">OpenVZ Template Repository</a> aussucht. Diese Templates sind vorgefertigte Images der beliebtesten Distributionen, die ein sekundenschnelles Einrichten ermöglichen.</p>
<p>5. Nun ist es an der Zeit in das frische OpenVZ-System zu booten. Falls lilo verwendet wird, muss der Befehl lilo noch ausgeführt werden (Bei grub muss nichts gemacht werden)</p>
<p><code>shutdown -r now</code></p>
<p>6. z.b.  das Debian Lenny Template:<br />
<code><br />
cd /vz/template/cache und wget http://download.openvz.org/contrib/template/precreated/debian-5.0-amd64-minimal.tar.gz<br />
</code></p>
<p>Falls apt-get es nicht automatisch gemacht hat, kann man jetzt OpenVz starten und in den default runlevel legen:</p>
<p>7. <code>/etc/init.d/vz start</code></p>
<p>8. <code>update-rc.d vz defaults 98</code></p>
<p>9. Anlegen einer virtuellen Maschiene, a.b.c.d sind durch IP-Adressen zu ersetzten:</p>
<p><code><br />
vzctl create 101 --ostemplate debian-5.0-amd64-minimal<br />
vzctl set 101 --ipadd a.b.c.d --save<br />
vzctl set 101 --nameserver a.b.c.d --save<br />
vzctl start 101<br />
</code></p>
<p>Nun kann man in sein frisch installiertes System &#8220;herabsteigen&#8221; und ein Passwort festlegen:<br />
<code><br />
vzctl enter 101<br />
passwd<br />
(Zum beenden der Sitzung dann strg+d drücken)<br />
</code></p>
<p>Und so schnell hat man seine virtuelle Linux-Maschiene lauffähig. Mit vzlist behält man den Überblick über die Maschienen, vzctl stop 101 würde die eben erstelle Maschiene stoppen.<br />
 Für weitergehende Konfigurationen kann ich das englisch-sprachige Wiki auf openvz.org empfehlen, vorallem den Teil über user_beancounter sollte man sich gut angucken.</p>
<p> Das wars fürs erste! To be continued!</p>
]]></content:encoded>
			<wfw:commentRss>http://www.pastacode.de/howto-virtualisierung-mit-openvz-unter-debian-lenny-linux-kernel-2626/de/feed/de/</wfw:commentRss>
		</item>
		<item>
		<title>Eine Liste (beliebter?) Usernames: das Grundrauschen der Ssh-Bruteforce-Attacken</title>
		<link>http://www.pastacode.de/eine-liste-beliebter-usernames-das-grundrauschen-der-ssh-bruteforce-attacken/de/</link>
		<comments>http://www.pastacode.de/eine-liste-beliebter-usernames-das-grundrauschen-der-ssh-bruteforce-attacken/de/#comments</comments>
		<pubDate>Wed, 18 Mar 2009 22:39:50 +0000</pubDate>
		<dc:creator>Benjamin Milde</dc:creator>
		
		<category><![CDATA[Fun]]></category>

		<category><![CDATA[Linux]]></category>

		<category><![CDATA[Server]]></category>

		<category><![CDATA[Bruteforce]]></category>

		<category><![CDATA[Ssh]]></category>

		<guid isPermaLink="false">http://www.pastacode.de/?p=301</guid>
		<description><![CDATA[Kaum ist ein Ssh-Server mit Port 22 am Netz, wird dieser bombardiert vom Grundrauschen des Internets. Verseuchte Rechner probieren scheinbar wahllos Benutzer und Passwort-Kombinationen zufälliger IP&#8217;s, um weitere &#8220;Zombies&#8221; zu rekrutieren. Auch wenn ein Login wohl selten gelingt, scheint die gefühlt gestiegene Anzahl fehlerhafter Login&#8217;s in den Logs des Servers, auf dem diese Seite hier [...]]]></description>
			<content:encoded><![CDATA[<p>Kaum ist ein Ssh-Server mit Port 22 am Netz, wird dieser bombardiert vom Grundrauschen des Internets. Verseuchte Rechner probieren scheinbar wahllos Benutzer und Passwort-Kombinationen zufälliger IP&#8217;s, um weitere &#8220;Zombies&#8221; zu rekrutieren. Auch wenn ein Login wohl selten gelingt, scheint die gefühlt gestiegene Anzahl fehlerhafter Login&#8217;s in den Logs des Servers, auf dem diese Seite hier gehostet wird, dafür zu sprechen, das diese primitive Form des Bruteforcens sich mehr den je lohnt.<br />
 Angeregt von einem <a href="http://www.reddit.com/r/technology/comments/85jy2/i_left_a_linux_machine_online_with_ssh_open_for_a/">Reddit-Post</a>, wollte ich mal schauen wieviele fehlgeschlagene Login-Versuche besagter Server mittlerweile verbuchen kann. In /var/log wird in der Datei authlog festgehalten (zumindest unter Gentoo, andere Systeme können leicht abweichen), wenn ein Fehllogin festgestellt wird. Bei eingeschaltetem Logrotate, kann man nun folgendermaßen prüfen wie viel Fehllogins in den gespeicherten Logs sich angesammelt haben:</p>
<p><code><br />
server1 log # zgrep "Invalid user" /var/log/authlog* |  wc<br />
 139059 1390590 13655520<br />
server1 log #<br />
</code><br />
<span id="more-301"></span><br />
Wow, fast 140000 Fehllogins für einen Zeitraum von 42 Tagen. Ungefähr 3000 pro Tag <img src='http://www.pastacode.de/wp-includes/images/smilies/icon_smile.gif' alt=':)' class='wp-smiley' /> </p>
<p>Wo bliebe der Spaß, wenn man sich nicht auch die Usernames mal (in sortierter Reihenfolge ohne Duplikate) anzeigen lassen kann?</p>
<p><code><br />
server1 log # zgrep "Invalid user" /var/log/authlog* | awk '{print $8}' | sort | uniq<br />
</code></p>
<p>Unter debian müsste der Befehl so aussehen:<br />
<code><br />
zgrep "invalid user" /var/log/auth.log* | awk '{print $11}' | sort | uniq<br />
</code></p>
<p>Gegebenfalls muss man sich die Spaltennummer (nach dem Dollar) und den Dateinnamen der Authlog anpassen.</p>
<p>Bei mir ergibt das eine lange Liste, die man sich <a href="http://www.pastacode.de/code/ssh-usernames-from-bruteforce-attack.txt">hier</a> runterladen kann.</p>
<p> Na&#8230; ist euer Ssh-Account auf der Liste?</p>
]]></content:encoded>
			<wfw:commentRss>http://www.pastacode.de/eine-liste-beliebter-usernames-das-grundrauschen-der-ssh-bruteforce-attacken/de/feed/de/</wfw:commentRss>
		</item>
		<item>
		<title>Extending GNU Screen - Adding a taskbar</title>
		<link>http://www.pastacode.de/extending-gnu-screen-adding-a-taskbar/en/</link>
		<comments>http://www.pastacode.de/extending-gnu-screen-adding-a-taskbar/en/#comments</comments>
		<pubDate>Sat, 17 Jan 2009 15:44:24 +0000</pubDate>
		<dc:creator>Benjamin Milde</dc:creator>
		
		<category><![CDATA[Howto]]></category>

		<category><![CDATA[Tipps]]></category>

		<guid isPermaLink="false">http://www.pastacode.de/?p=221</guid>
		<description><![CDATA[One of the biggest drawbacks of GNU Screen is that you don&#8217;t see an overview of your virtual terminals in most standard configurations. But that can be easily changed. My screen now looks like this:
You can clearly see which programs are running and you have a good overview. The other goodies like cpu load display [...]]]></description>
			<content:encoded><![CDATA[<p>One of the biggest drawbacks of GNU Screen is that you don&#8217;t see an overview of your virtual terminals in most standard configurations. But that can be easily changed. My screen now looks like this:</p>
<div id="attachment_74" class="wp-caption alignnone" style="width: 593px"><img src="http://www.pastacode.de/wp-content/screen_pimpt.png" alt="Bild / Screenshot eines gepimpten und aufgemotzten screen-Terminals" title="screen_pimpt" width="583" height="412" class="size-full wp-image-74" /><p class="wp-caption-text">Screenshot of extented screen with taskbar</p></div>
<p>You can clearly see which programs are running and you have a good overview. The other goodies like cpu load display and the clock is also very practical.</p>
<p>The global configuration file /etc/screenrc already has some minor tweaks (Depending on your distribution). If you only want the taskbar for a particular user, than the local .screenrc in your home directory is the file to edit.</p>
<p>The heart of my screen configuration is: </p>
<p><code><br />
backtick 1 0 0 /usr/bin/cpuusage<br />
hardstatus alwayslastline<br />
hardstatus string '%{= kG} %{G}%H %{g}[%= %{=kw}%?%-Lw%?%{r}(%{W}%n*%f%t%?(%u)%?%{r})%{w}%?%+Lw%?%?%= %{g}] %1`%% CPU %{W}%c %{g}&#8217;<br />
</code></p>
<p>With &#8220;backtick&#8221; a command-directive (1 here - must be a number) is noted.  The &#8220;0 0&#8243; then means that whenever a new output from the program is produced, screen stores the last line of output. &#8220;Hardstatus&#8221; is for the taskbar and each % directive is for special purposes. With `% 1 for example the last line of the backtick command is printed. For all the other directives better read the <a  rel="no-follow" href="http://www.mediacollege.com/cgi-bin/man/page.cgi?topic=screen">GNU screen-manpage</a></p>
<p>The cpuusage-script looks like this:</p>
<link rel="stylesheet" href="http://www.pastacode.de/wp-content/plugins/codeviewer/codeviewer.css" type="text/css" media="all" />
<ol class="codelist">
<li value="1" class="tab0 odd"><code><span style="color: #666666; font-style: italic;">#!/bin/bash</span></code></li>
<li value="2" class="tab0 even"><code><span style="color: #c20cb9; font-weight: bold;">awk</span> <span style="color: #ff0000;">&#8216;BEGIN {file = &quot;/proc/stat&quot;;while (a==a) {getline &lt; file;u=$2-up;s=$3-sp;n=$4-np;i=$5-ip;printf (&quot;%2.1f\n&quot;),(u+s)/(u+s+n+i)*100;up=$2;sp=$3;np=$4;ip=$5;close(file);system(&quot;sleep 1&quot;)}}&#8217;</span></code></li>
<li class="sourcelink"><strong>Download this code:</strong> <a href="http://www.pastacode.de/code/cpuusage">cpuusage</a></li>
</ol>
<p>This awk-oneliner uses the information from /proc/stat to calculate the cpuload for one second. That is supported on all unixes with proc support (Mac OS X has no proc).</p>
<p>What&#8217;s missing now, is dynamic window titles. In the previous configuration, all titles are set to &#8220;n * bash&#8221;, we had to change the titles manually.</p>
<p>With a special escape-sequence, the title can be set from the console. The screen manpage explains the procedure:</p>
<p><code><br />
       The default name for all shell windows can be set with the "shelltitle"<br />
       command in the .screenrc file, while all other windows are created with<br />
       a "screen" command and thus can have their name set with the -t option.<br />
       Interactively,    there    is    the    title-string    escape-sequence<br />
       (<esc>kname<esc>\)  and the &#8220;title&#8221; command (C-a A).  The former can be<br />
       output from an application to control the window&#8217;s name under  software<br />
       control,  and  the  latter  will prompt for a name when typed.  You can<br />
       also bind pre-defined names to keys with the  &#8220;title&#8221;  command  to  set<br />
       things quickly without prompting.<br/><br />
       Finally,  screen has a shell-specific heuristic that is enabled by set-<br />
       ting the window&#8217;s name to &#8220;search|name&#8221; and arranging to  have  a  null<br />
       title escape-sequence output as a part of your prompt.  The search por-<br />
       tion specifies an end-of-prompt search string, while the  name  portion<br />
       specifies the default shell name for the window.  If the name ends in a<br />
       &#8216;:&#8217; screen will add what it believes to be the current command  running<br />
       in  the window to the end of the window&#8217;s shell name (e.g. &#8220;name:cmd&#8221;).<br />
       Otherwise the current command name supersedes the shell name  while  it<br />
       is running.<br/><br />
       Here&#8217;s  how  it  works:   you must modify your shell prompt to output a<br />
       null title-escape-sequence (<esc>k<esc>\) as a  part  of  your  prompt.<br />
       The  last part of your prompt must be the same as the string you speci-<br />
       fied for the search portion of the title.  Once this is set up,  screen<br />
       will  use  the title-escape-sequence to clear the previous command name<br />
       and get ready for the next command.  Then, when a newline  is  received<br />
       from  the shell, a search is made for the end of the prompt.  If found,<br />
       it will grab the first word after the matched string and use it as  the<br />
       command  name.  If the command name begins with either &#8216;!&#8217;, &#8216;%&#8217;, or &#8216;^&#8217;<br />
       screen will use the first word on the  following  line  (if  found)  in<br />
       preference  to  the  just-found  name.  This helps csh users get better<br />
       command names when using job control or history recall commands.</p>
<p></code></p>
<p>My shellprompt looks like this:</p>
<p><code><br />
server1 pastacode #<br />
</code></p>
<p>That means, all my commands are typed in after the #. So, I have to add this to my .shellrc :</p>
<p><code><br />
#dynamic title<br />
shelltitle '# |bash'<br />
</code></p>
<p>Screen now looks for a # when it gets the escape-sequence.  &#8220;| Bash&#8221; means that the default title is &#8220;Bash&#8221;. We now only need the escape sequence in our promt; that can be customized (in Bash) with the PS1 variable. To do this we will either edit the /etc/bashrc (for any user) or the local .bashrc in our home directory. My .bashrc looks like this:</p>
<link rel="stylesheet" href="http://www.pastacode.de/wp-content/plugins/codeviewer/codeviewer.css" type="text/css" media="all" />
<ol class="codelist">
<li value="1" class="tab0 odd"><code><span style="color: #7a0874; font-weight: bold;">export</span> <span style="color: #007800;">EDITOR</span>=<span style="color: #000000; font-weight: bold;">/</span>usr<span style="color: #000000; font-weight: bold;">/</span>bin<span style="color: #000000; font-weight: bold;">/</span><span style="color: #c20cb9; font-weight: bold;">vi</span></code></li>
<li value="2" class="even">&nbsp;</li>
<li value="3" class="tab1 odd"><code><span style="color: #666666; font-style: italic;"># Set the screen title</span></code></li>
<li value="4" class="tab1 even"><code><span style="color: #000000; font-weight: bold;">case</span> <span style="color: #007800;">$TERM</span> <span style="color: #000000; font-weight: bold;">in</span></code></li>
<li value="5" class="tab2 odd"><code><span style="color: #c20cb9; font-weight: bold;">screen</span><span style="color: #000000; font-weight: bold;">*</span><span style="color: #7a0874; font-weight: bold;">&#41;</span></code></li>
<li value="6" class="tab3 even"><code><span style="color: #666666; font-style: italic;"># This is the escape sequence ESC k \w ESC \</span></code></li>
<li value="7" class="tab3 odd"><code><span style="color: #666666; font-style: italic;">#Use path as titel</span></code></li>
<li value="8" class="tab3 even"><code><span style="color: #666666; font-style: italic;">#SCREENTITLE=&#8217;\[\ek\w\e\\\]&#8216;</span></code></li>
<li value="9" class="tab3 odd"><code><span style="color: #666666; font-style: italic;">#Use program name as titel</span></code></li>
<li value="10" class="tab3 even"><code><span style="color: #007800;">SCREENTITLE</span>=<span style="color: #ff0000;">&#8216;\[\ek\e\\\]&#8216;</span></code></li>
<li value="11" class="tab3 odd"><code><span style="color: #000000; font-weight: bold;">;;</span></code></li>
<li value="12" class="tab2 even"><code><span style="color: #000000; font-weight: bold;">*</span><span style="color: #7a0874; font-weight: bold;">&#41;</span></code></li>
<li value="13" class="tab3 odd"><code><span style="color: #007800;">SCREENTITLE</span>=<span style="color: #ff0000;">&#8221;</span></code></li>
<li value="14" class="tab3 even"><code><span style="color: #000000; font-weight: bold;">;;</span></code></li>
<li value="15" class="tab1 odd"><code><span style="color: #000000; font-weight: bold;">esac</span></code></li>
<li value="16" class="even">&nbsp;</li>
<li value="17" class="odd">&nbsp;</li>
<li value="18" class="tab0 even"><code><span style="color: #007800;">PS1</span>=<span style="color: #ff0000;">&quot;<span style="color: #007800;">${SCREENTITLE}</span><span style="color: #007800;">${PS1}</span>&quot;</span></code></li>
<li class="sourcelink"><strong>Download this code:</strong> <a href="http://www.pastacode.de/code/bashrc">bashrc</a></li>
</ol>
<p>The PS1 is altered to add the screen escape-sequence, but only when we are in screen. In my file, you can actually choose between two versions: either the current path is the dynamic title, or the program name, although I prefer the latter. Unfortunately viewing both seems to be not a trivial thing.</p>
<p>So I hope the whole thing works for you - for suggestions, better ideas - write a comment!</p>
<p>Last but not least my complete .screenrc: </p>
<link rel="stylesheet" href="http://www.pastacode.de/wp-content/plugins/codeviewer/codeviewer.css" type="text/css" media="all" />
<ol class="codelist">
<li value="1" class="tab0 odd"><code><span style="color: #666666; font-style: italic;">#no bells and startup messages</span></code></li>
<li value="2" class="tab0 even"><code>startup_message off</code></li>
<li value="3" class="tab0 odd"><code>vbell off</code></li>
<li value="4" class="even">&nbsp;</li>
<li value="5" class="tab0 odd"><code><span style="color: #666666; font-style: italic;">#10000 lines scrollback buffer</span></code></li>
<li value="6" class="tab0 even"><code>defscrollback <span style="color: #000000;">10000</span></code></li>
<li value="7" class="tab0 odd"><code><span style="color: #666666; font-style: italic;">#no login</span></code></li>
<li value="8" class="tab0 even"><code>deflogin off</code></li>
<li value="9" class="odd">&nbsp;</li>
<li value="10" class="tab0 even"><code><span style="color: #666666; font-style: italic;"># Default shell</span></code></li>
<li value="11" class="tab0 odd"><code>shell <span style="color: #c20cb9; font-weight: bold;">bash</span></code></li>
<li value="12" class="even">&nbsp;</li>
<li value="13" class="tab0 odd"><code><span style="color: #666666; font-style: italic;">#Timeout for displaying messages</span></code></li>
<li value="14" class="tab0 even"><code>msgwait <span style="color: #000000;">1</span></code></li>
<li value="15" class="tab0 odd"><code>activity <span style="color: #ff0000;">&quot; &nbsp; &nbsp; &nbsp; &nbsp; Activity has appeared in window &nbsp; &nbsp; &nbsp;%n - %t&quot;</span></code></li>
<li value="16" class="even">&nbsp;</li>
<li value="17" class="tab0 odd"><code><span style="color: #666666; font-style: italic;">#taskbar</span></code></li>
<li value="18" class="tab0 even"><code>backtick <span style="color: #000000;">1</span> <span style="color: #000000;">0</span> <span style="color: #000000;">0</span> <span style="color: #000000; font-weight: bold;">/</span>usr<span style="color: #000000; font-weight: bold;">/</span>bin<span style="color: #000000; font-weight: bold;">/</span>cpuusage</code></li>
<li value="19" class="tab0 odd"><code>hardstatus alwayslastline</code></li>
<li value="20" class="tab0 even"><code>hardstatus string <span style="color: #ff0000;">&#8216;%{= kG} %{G}%H %{g}[%= %{=kw}%?%-Lw%?%{r}(%{W}%n*%f%t%?(%u)%?%{r})%{w}%?%+Lw%?%?%= %{g}] %1`%% CPU %{W}%c %{g}&#8217;</span></code></li>
<li value="21" class="odd">&nbsp;</li>
<li value="22" class="tab0 even"><code><span style="color: #666666; font-style: italic;">#dynamic title</span></code></li>
<li value="23" class="tab0 odd"><code>shelltitle <span style="color: #ff0000;">&#8216;# |bash&#8217;</span></code></li>
<li value="24" class="even">&nbsp;</li>
<li value="25" class="tab0 odd"><code><span style="color: #666666; font-style: italic;">#When your ssh connection dies, screen is autodetached</span></code></li>
<li value="26" class="tab0 even"><code>autodetach on</code></li>
<li value="27" class="odd">&nbsp;</li>
<li value="28" class="tab0 even"><code><span style="color: #666666; font-style: italic;">#Nice 256 term colors</span></code></li>
<li value="29" class="tab0 odd"><code>attrcolor b <span style="color: #ff0000;">&quot;.I&quot;</span></code></li>
<li value="30" class="tab0 even"><code>termcapinfo xterm <span style="color: #ff0000;">&#8216;Co#256:AB=\E[48;5;%dm:AF=\E[38;5;%dm&#8217;</span></code></li>
<li class="sourcelink"><strong>Download this code:</strong> <a href="http://www.pastacode.de/code/screenrc">screenrc</a></li>
</ol>
<p>And the cpuusage script: </p>
<link rel="stylesheet" href="http://www.pastacode.de/wp-content/plugins/codeviewer/codeviewer.css" type="text/css" media="all" />
<ol class="codelist">
<li value="1" class="tab0 odd"><code><span style="color: #666666; font-style: italic;">#!/bin/bash</span></code></li>
<li value="2" class="tab0 even"><code><span style="color: #c20cb9; font-weight: bold;">awk</span> <span style="color: #ff0000;">&#8216;BEGIN {file = &quot;/proc/stat&quot;;while (a==a) {getline &lt; file;u=$2-up;s=$3-sp;n=$4-np;i=$5-ip;printf (&quot;%2.1f\n&quot;),(u+s)/(u+s+n+i)*100;up=$2;sp=$3;np=$4;ip=$5;close(file);system(&quot;sleep 1&quot;)}}&#8217;</span></code></li>
<li class="sourcelink"><strong>Download this code:</strong> <a href="http://www.pastacode.de/code/cpuusage">cpuusage</a></li>
</ol>
<p>Sources:</p>
<p>The pages below helped me alot:</p>
<p><a href="http://listserv.ccjclearline.com/pipermail/kwlug-disc/2006-November/002132.html">http://listserv.ccjclearline.com/pipermail/kwlug-disc/2006-November/002132.html</a><br />
<a href="http://b79.net/code/screenrc">http://b79.net/code/screenrc</a><br />
<a href="http://www.mediacollege.com/cgi-bin/man/page.cgi?topic=screen">http://www.mediacollege.com/cgi-bin/man/page.cgi?topic=screen</a></p>
]]></content:encoded>
			<wfw:commentRss>http://www.pastacode.de/extending-gnu-screen-adding-a-taskbar/en/feed/en/</wfw:commentRss>
		</item>
		<item>
		<title>Songbird &#8230; The Firefox of audioplayers</title>
		<link>http://www.pastacode.de/songbird-the-firefox-of-audioplayers/en/</link>
		<comments>http://www.pastacode.de/songbird-the-firefox-of-audioplayers/en/#comments</comments>
		<pubDate>Sat, 17 Jan 2009 15:08:20 +0000</pubDate>
		<dc:creator>Benjamin Milde</dc:creator>
		
		<category><![CDATA[Musik]]></category>

		<category><![CDATA[Tipps]]></category>

		<guid isPermaLink="false">http://www.pastacode.de/?p=202</guid>
		<description><![CDATA[ From a certain size on one&#8217;s own music collection is not simply sortable in a file structure. The index approach is something I started to like, I gained control over my collection again. This approach is used by almost all the major players - be it Amarok (Linux), Windows Media Player or Itunes.
 Songbird [...]]]></description>
			<content:encoded><![CDATA[<p><div id="attachment_180" class="wp-caption alignright" style="width: 310px"><a href="http://www.pastacode.de/wp-content/songbird-screenshot.png"><img src="http://www.pastacode.de/wp-content/songbird-screenshot-300x172.png" alt="Songbird screenshot under Mac OS X" title="Songbird screenshot" width="300" height="172" class="size-medium wp-image-180" /></a><p class="wp-caption-text">Songbird screenshot under Mac OS X</p></div> From a certain size on one&#8217;s own music collection is not simply sortable in a file structure. The index approach is something I started to like, I gained control over my collection again. This approach is used by almost all the major players - be it Amarok (Linux), Windows Media Player or Itunes.</p>
<p> Songbird is coming to conquer the crown of this sort of audioplayers. The big download button on <a href="http://www.getsongbird.com/">getsongbird.com</a>, the domain, the site &#8230;. all that is familiar and is reminiscent of Firefox and Co.<span id="more-202"></span></p>
<p>Like back then with Firefox, it will take some time until Songbird reaches the masses.  I tested it&#8230; and hey, I&#8217;m really impressed. This player just has the potential to reach the masses. The appearance just seems like iTunes, but there is more to discover under the hood.</p>
<p>Like with Firefox, Songbird can be extended - some interesting plugins have already been developed. There is mashTape that displays all sorts of useful information about the artist played (see screenshot), the Last.fm Album cover plugin, which shows covers from last.fm&#8230; or the album art manager, to manage covers locally.</p>
<p>There is even iPod support as plugin, which I have not yet tested. It is a very pleasant thing, to have a free (open source!) audio player as an alternative to Itunes and co. </p>
<p>Long live the birdy! <img src='http://www.pastacode.de/wp-includes/images/smilies/icon_wink.gif' alt=';)' class='wp-smiley' /> </p>
]]></content:encoded>
			<wfw:commentRss>http://www.pastacode.de/songbird-the-firefox-of-audioplayers/en/feed/en/</wfw:commentRss>
		</item>
	</channel>
</rss>

