<?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>David Hrbáč</title>
	<atom:link href="http://www.hrbac.cz/feed/" rel="self" type="application/rss+xml" />
	<link>http://www.hrbac.cz</link>
	<description>/var/log/davidhrbáč</description>
	<lastBuildDate>Sat, 12 May 2012 21:18:05 +0000</lastBuildDate>
	<language>en</language>
	<sy:updatePeriod>hourly</sy:updatePeriod>
	<sy:updateFrequency>1</sy:updateFrequency>
	<generator>http://wordpress.org/?v=3.3.2</generator>
		<item>
		<title>Centos 6 public key authentication fix</title>
		<link>http://www.hrbac.cz/2012/05/centos-6-public-key-authentication-fix/</link>
		<comments>http://www.hrbac.cz/2012/05/centos-6-public-key-authentication-fix/#comments</comments>
		<pubDate>Sat, 12 May 2012 21:18:05 +0000</pubDate>
		<dc:creator>David Hrbáč</dc:creator>
				<category><![CDATA[CentOS]]></category>

		<guid isPermaLink="false">http://www.hrbac.cz/?p=427</guid>
		<description><![CDATA[Due to SELinux enabled we are not able to use public key authentication on Centos 6. Here is the quick fix: test -x /sbin/restorecon &#38;&#38; /sbin/restorecon .ssh .ssh/authorized_keys]]></description>
			<content:encoded><![CDATA[<p>Due to SELinux enabled we are not able to use public key authentication on Centos 6. Here is the quick fix:</p>

<div class="wp_syntax"><div class="code"><pre class="bash" style="font-family:monospace;"><span style="color: #7a0874; font-weight: bold;">test</span> <span style="color: #660033;">-x</span> <span style="color: #000000; font-weight: bold;">/</span>sbin<span style="color: #000000; font-weight: bold;">/</span>restorecon <span style="color: #000000; font-weight: bold;">&amp;&amp;</span> <span style="color: #000000; font-weight: bold;">/</span>sbin<span style="color: #000000; font-weight: bold;">/</span>restorecon .ssh .ssh<span style="color: #000000; font-weight: bold;">/</span>authorized_keys</pre></div></div>

]]></content:encoded>
			<wfw:commentRss>http://www.hrbac.cz/2012/05/centos-6-public-key-authentication-fix/feed/</wfw:commentRss>
		<slash:comments>0</slash:comments>
		</item>
		<item>
		<title>Generating passwords with /dev/random</title>
		<link>http://www.hrbac.cz/2012/04/generating-passwords-with-devrandom/</link>
		<comments>http://www.hrbac.cz/2012/04/generating-passwords-with-devrandom/#comments</comments>
		<pubDate>Tue, 24 Apr 2012 18:28:20 +0000</pubDate>
		<dc:creator>David Hrbáč</dc:creator>
				<category><![CDATA[bash]]></category>

		<guid isPermaLink="false">http://www.hrbac.cz/?p=422</guid>
		<description><![CDATA[One-liner to generate passwords, lock files, etc. watch -n5 'cat /dev/urandom &#124; tr -dc [:alnum:] &#124; head -c12; echo']]></description>
			<content:encoded><![CDATA[<p>One-liner to generate passwords, lock files, etc.</p>

<div class="wp_syntax"><div class="code"><pre class="bash" style="font-family:monospace;"><span style="color: #c20cb9; font-weight: bold;">watch</span> <span style="color: #660033;">-n5</span> <span style="color: #ff0000;">'cat /dev/urandom | tr -dc [:alnum:] | head -c12; echo'</span></pre></div></div>

]]></content:encoded>
			<wfw:commentRss>http://www.hrbac.cz/2012/04/generating-passwords-with-devrandom/feed/</wfw:commentRss>
		<slash:comments>0</slash:comments>
		</item>
		<item>
		<title>PowerCli to add vlan to vmware cluster</title>
		<link>http://www.hrbac.cz/2012/04/powercli-to-add-vlan-to-vmware-cluster/</link>
		<comments>http://www.hrbac.cz/2012/04/powercli-to-add-vlan-to-vmware-cluster/#comments</comments>
		<pubDate>Thu, 19 Apr 2012 11:12:29 +0000</pubDate>
		<dc:creator>David Hrbáč</dc:creator>
				<category><![CDATA[powercli]]></category>
		<category><![CDATA[vmware]]></category>

		<guid isPermaLink="false">http://www.hrbac.cz/?p=419</guid>
		<description><![CDATA[Oneliner to add vlans to the all hosts within vSphere cluster: Get-Cluster &#34;CIT Cluster&#34; &#124; Get-VMHost &#124; Get-VirtualSwitch -name vSwitch0 &#124; New-VirtualPortGroup -name &#34;Networking - Vlan80&#34; -VLanId 80]]></description>
			<content:encoded><![CDATA[<p>Oneliner to add vlans to the all hosts within vSphere cluster:</p>

<div class="wp_syntax"><div class="code"><pre class="powershell" style="font-family:monospace;">Get<span style="color: pink;">-</span>Cluster <span style="color: #800000;">&quot;CIT Cluster&quot;</span> <span style="color: pink;">|</span> Get<span style="color: pink;">-</span>VMHost <span style="color: pink;">|</span> Get<span style="color: pink;">-</span>VirtualSwitch <span style="color: #008080; font-style: italic;">-name</span> vSwitch0 <span style="color: pink;">|</span> New<span style="color: pink;">-</span>VirtualPortGroup <span style="color: #008080; font-style: italic;">-name</span> <span style="color: #800000;">&quot;Networking - Vlan80&quot;</span> <span style="color: pink;">-</span>VLanId <span style="color: #804000;">80</span></pre></div></div>

]]></content:encoded>
			<wfw:commentRss>http://www.hrbac.cz/2012/04/powercli-to-add-vlan-to-vmware-cluster/feed/</wfw:commentRss>
		<slash:comments>0</slash:comments>
		</item>
		<item>
		<title>Create ESXi 4.0 USB stick with dd on Linux</title>
		<link>http://www.hrbac.cz/2012/04/create-esxi-4-0-usb-stick-with-dd-on-linux/</link>
		<comments>http://www.hrbac.cz/2012/04/create-esxi-4-0-usb-stick-with-dd-on-linux/#comments</comments>
		<pubDate>Sun, 15 Apr 2012 12:20:43 +0000</pubDate>
		<dc:creator>David Hrbáč</dc:creator>
				<category><![CDATA[vmware]]></category>

		<guid isPermaLink="false">http://www.hrbac.cz/?p=412</guid>
		<description><![CDATA[These are the steps to create ESX 4.0 USB stick: mount -o loop VMware-VMvisor-Installer-4.0.0.update04-504850.x86_64.iso /mnt/ cp /mnt/image.tgz . tar xvzf image.tgz bunzip2 usr/lib/vmware/installer/VMware-VMvisor-big-4.0.0-504850-x86_64.dd.bz2 dd if=usr/lib/vmware/installer/VMware-VMvisor-big-4.0.0-504850-x86_64.dd of=/dev/sdb rm -r usr umount /mnt]]></description>
			<content:encoded><![CDATA[<p>These are the steps to create ESX 4.0 USB stick:</p>

<div class="wp_syntax"><div class="code"><pre class="bash" style="font-family:monospace;"><span style="color: #c20cb9; font-weight: bold;">mount</span> <span style="color: #660033;">-o</span> loop VMware-VMvisor-Installer-4.0.0.update04-<span style="color: #000000;">504850</span>.x86_64.iso <span style="color: #000000; font-weight: bold;">/</span>mnt<span style="color: #000000; font-weight: bold;">/</span>
<span style="color: #c20cb9; font-weight: bold;">cp</span> <span style="color: #000000; font-weight: bold;">/</span>mnt<span style="color: #000000; font-weight: bold;">/</span>image.tgz .
<span style="color: #c20cb9; font-weight: bold;">tar</span> xvzf image.tgz 
<span style="color: #c20cb9; font-weight: bold;">bunzip2</span> usr<span style="color: #000000; font-weight: bold;">/</span>lib<span style="color: #000000; font-weight: bold;">/</span>vmware<span style="color: #000000; font-weight: bold;">/</span>installer<span style="color: #000000; font-weight: bold;">/</span>VMware-VMvisor-big-4.0.0-<span style="color: #000000;">504850</span>-x86_64.dd.bz2
<span style="color: #c20cb9; font-weight: bold;">dd</span> <span style="color: #007800;">if</span>=usr<span style="color: #000000; font-weight: bold;">/</span>lib<span style="color: #000000; font-weight: bold;">/</span>vmware<span style="color: #000000; font-weight: bold;">/</span>installer<span style="color: #000000; font-weight: bold;">/</span>VMware-VMvisor-big-4.0.0-<span style="color: #000000;">504850</span>-x86_64.dd <span style="color: #007800;">of</span>=<span style="color: #000000; font-weight: bold;">/</span>dev<span style="color: #000000; font-weight: bold;">/</span>sdb
<span style="color: #c20cb9; font-weight: bold;">rm</span> <span style="color: #660033;">-r</span> usr
<span style="color: #c20cb9; font-weight: bold;">umount</span> <span style="color: #000000; font-weight: bold;">/</span>mnt</pre></div></div>

]]></content:encoded>
			<wfw:commentRss>http://www.hrbac.cz/2012/04/create-esxi-4-0-usb-stick-with-dd-on-linux/feed/</wfw:commentRss>
		<slash:comments>0</slash:comments>
		</item>
		<item>
		<title>Create ESXi 4.1 USB stick with dd on Linux</title>
		<link>http://www.hrbac.cz/2012/04/create-esxi-4-1-usb-stick-with-dd-on-linux/</link>
		<comments>http://www.hrbac.cz/2012/04/create-esxi-4-1-usb-stick-with-dd-on-linux/#comments</comments>
		<pubDate>Sun, 15 Apr 2012 10:18:26 +0000</pubDate>
		<dc:creator>David Hrbáč</dc:creator>
				<category><![CDATA[vmware]]></category>

		<guid isPermaLink="false">http://www.hrbac.cz/?p=406</guid>
		<description><![CDATA[These are the steps to create ESX 4.1 USB stick: mount -o loop VMware-VMvisor-Installer-4.1.0.update02-502767.x86_64.iso /mnt/ cp /mnt/imagedd.bz2 . bunzip2 imagedd.bz2 dd if=imagedd of=/dev/sdb rm imagedd umount /mnt]]></description>
			<content:encoded><![CDATA[<p>These are the steps to create ESX 4.1 USB stick:</p>

<div class="wp_syntax"><div class="code"><pre class="bash" style="font-family:monospace;"><span style="color: #c20cb9; font-weight: bold;">mount</span> <span style="color: #660033;">-o</span> loop VMware-VMvisor-Installer-4.1.0.update02-<span style="color: #000000;">502767</span>.x86_64.iso <span style="color: #000000; font-weight: bold;">/</span>mnt<span style="color: #000000; font-weight: bold;">/</span>
<span style="color: #c20cb9; font-weight: bold;">cp</span> <span style="color: #000000; font-weight: bold;">/</span>mnt<span style="color: #000000; font-weight: bold;">/</span>imagedd.bz2 .
<span style="color: #c20cb9; font-weight: bold;">bunzip2</span> imagedd.bz2 
<span style="color: #c20cb9; font-weight: bold;">dd</span> <span style="color: #007800;">if</span>=imagedd <span style="color: #007800;">of</span>=<span style="color: #000000; font-weight: bold;">/</span>dev<span style="color: #000000; font-weight: bold;">/</span>sdb
<span style="color: #c20cb9; font-weight: bold;">rm</span> imagedd
<span style="color: #c20cb9; font-weight: bold;">umount</span> <span style="color: #000000; font-weight: bold;">/</span>mnt</pre></div></div>

]]></content:encoded>
			<wfw:commentRss>http://www.hrbac.cz/2012/04/create-esxi-4-1-usb-stick-with-dd-on-linux/feed/</wfw:commentRss>
		<slash:comments>0</slash:comments>
		</item>
		<item>
		<title>Sed oneliner to change Centos 4 repos to vault.centos.org</title>
		<link>http://www.hrbac.cz/2012/04/sed-oneliner-to-change-centos-4-repos-to-vault-centos-org/</link>
		<comments>http://www.hrbac.cz/2012/04/sed-oneliner-to-change-centos-4-repos-to-vault-centos-org/#comments</comments>
		<pubDate>Thu, 05 Apr 2012 15:13:07 +0000</pubDate>
		<dc:creator>David Hrbáč</dc:creator>
				<category><![CDATA[CentOS 4.x]]></category>

		<guid isPermaLink="false">http://www.hrbac.cz/?p=399</guid>
		<description><![CDATA[Centos 4 is now EOLed. You should upgrade or remove your 4.x server from production. Since EOL all repositories have been moved to vault.centos.org. Yum is not working any more because of that. Here is my quick and dirty solution....]]></description>
			<content:encoded><![CDATA[<p>Centos 4 is now EOLed. You should upgrade or remove your 4.x server from production. Since EOL all repositories have been moved to vault.centos.org. Yum is not working any more because of that. Here is my quick and dirty solution.</p>

<div class="wp_syntax"><div class="code"><pre class="bash" style="font-family:monospace;"><span style="color: #c20cb9; font-weight: bold;">sed</span> <span style="color: #ff0000;">&quot;s/\/mirror\.centos\.org\/centos/\/vault\.centos\.org/g;<span style="color: #000099; font-weight: bold;">\
</span>s/^#baseurl/baseurl/g;<span style="color: #000099; font-weight: bold;">\
</span>s/^mirrorlist/#mirrorlist/g;<span style="color: #000099; font-weight: bold;">\
</span>s/<span style="color: #000099; font-weight: bold;">\$</span>releasever/4\.9/g&quot;</span> <span style="color: #000000; font-weight: bold;">/</span>etc<span style="color: #000000; font-weight: bold;">/</span>yum.repos.d<span style="color: #000000; font-weight: bold;">/</span>CentOS-Base.repo -i.bak
<span style="color: #c20cb9; font-weight: bold;">sed</span> <span style="color: #ff0000;">&quot;s/\/mirror\.centos\.org\/centos/\/vault\.centos\.org/g;<span style="color: #000099; font-weight: bold;">\
</span>s/^#baseurl/baseurl/g;<span style="color: #000099; font-weight: bold;">\
</span>s/^mirrorlist/#mirrorlist/g;<span style="color: #000099; font-weight: bold;">\
</span>s/<span style="color: #000099; font-weight: bold;">\$</span>releasever/4\.9/g&quot;</span> <span style="color: #000000; font-weight: bold;">/</span>etc<span style="color: #000000; font-weight: bold;">/</span>yum.repos.d<span style="color: #000000; font-weight: bold;">/</span>CentOS-fasttrack.repo -i.bak</pre></div></div>

]]></content:encoded>
			<wfw:commentRss>http://www.hrbac.cz/2012/04/sed-oneliner-to-change-centos-4-repos-to-vault-centos-org/feed/</wfw:commentRss>
		<slash:comments>0</slash:comments>
		</item>
		<item>
		<title>fdupes to remove duplicate files on Linux</title>
		<link>http://www.hrbac.cz/2012/03/fdupes-to-remove-duplicate-files-on-linux/</link>
		<comments>http://www.hrbac.cz/2012/03/fdupes-to-remove-duplicate-files-on-linux/#comments</comments>
		<pubDate>Thu, 29 Mar 2012 14:12:45 +0000</pubDate>
		<dc:creator>David Hrbáč</dc:creator>
				<category><![CDATA[Uncategorized]]></category>

		<guid isPermaLink="false">http://www.hrbac.cz/?p=393</guid>
		<description><![CDATA[Quick and dirty solution to remove all duplicate files but one: yes 1 &#124; fdupes -rd /path/to/folder]]></description>
			<content:encoded><![CDATA[<p>Quick and dirty solution to remove all duplicate files but one:</p>

<div class="wp_syntax"><div class="code"><pre class="bash" style="font-family:monospace;"><span style="color: #c20cb9; font-weight: bold;">yes</span> <span style="color: #000000;">1</span> <span style="color: #000000; font-weight: bold;">|</span> fdupes <span style="color: #660033;">-rd</span> <span style="color: #000000; font-weight: bold;">/</span>path<span style="color: #000000; font-weight: bold;">/</span>to<span style="color: #000000; font-weight: bold;">/</span>folder</pre></div></div>

]]></content:encoded>
			<wfw:commentRss>http://www.hrbac.cz/2012/03/fdupes-to-remove-duplicate-files-on-linux/feed/</wfw:commentRss>
		<slash:comments>2</slash:comments>
		</item>
		<item>
		<title>dovecot-0.99.11-9.EL4 &#8211; assertion failed</title>
		<link>http://www.hrbac.cz/2012/02/dovecot-0-99-11-9-el4-assertion-failed/</link>
		<comments>http://www.hrbac.cz/2012/02/dovecot-0-99-11-9-el4-assertion-failed/#comments</comments>
		<pubDate>Wed, 15 Feb 2012 11:20:03 +0000</pubDate>
		<dc:creator>David Hrbáč</dc:creator>
				<category><![CDATA[CentOS 4.x]]></category>
		<category><![CDATA[mailing]]></category>

		<guid isPermaLink="false">http://www.hrbac.cz/?p=363</guid>
		<description><![CDATA[A few days back I&#8217;m getting this error within /var/log/maillog: file lib.c: line 37 (nearest_power): assertion failed: (num]]></description>
			<content:encoded><![CDATA[<p>A few days back I&#8217;m getting this error within /var/log/maillog:</p>
<p><code>file lib.c: line 37 (nearest_power): assertion failed: (num <= ((size_t)1 << (BITS_IN_SIZE_T-1)))</code></p>
<p>We are using the latest dovecot package for EL4:</p>

<div class="wp_syntax"><div class="code"><pre class="bash" style="font-family:monospace;"><span style="color: #7a0874; font-weight: bold;">&#91;</span>root<span style="color: #000000; font-weight: bold;">@</span>hruska tmp<span style="color: #7a0874; font-weight: bold;">&#93;</span><span style="color: #666666; font-style: italic;"># rpm -q dovecot</span>
dovecot-0.99.11-<span style="color: #000000;">10</span>.EL4</pre></div></div>

<p>Package changelog has interesting entry:</p>

<div class="wp_syntax"><div class="code"><pre class="bash" style="font-family:monospace;"><span style="color: #7a0874; font-weight: bold;">&#91;</span>root<span style="color: #000000; font-weight: bold;">@</span>hruska ~<span style="color: #7a0874; font-weight: bold;">&#93;</span><span style="color: #666666; font-style: italic;"># rpm -q --changelog dovecot| head</span>
<span style="color: #000000; font-weight: bold;">*</span> Tue Aug 09 <span style="color: #000000;">2011</span> Michal Hlavinka <span style="color: #000000; font-weight: bold;">&lt;</span>mhlavink<span style="color: #000000; font-weight: bold;">@</span>redhat.com<span style="color: #000000; font-weight: bold;">&gt;</span> - 0.99.11-<span style="color: #000000;">10</span>
&nbsp;
- fix potential crash when parsing header names that contain NUL characters <span style="color: #7a0874; font-weight: bold;">&#40;</span><span style="color: #666666; font-style: italic;">#728674)</span></pre></div></div>

<p>So, let's go fetch the #728674 entry on <a href="https://bugzilla.redhat.com/show_bug.cgi?id=728674">https://bugzilla.redhat.com/show_bug.cgi?id=728674</a>. Oops, the page reads "You are not authorized to access bug #728674."<br />
Good. So, Google has this: <a href="http://www.somerandomstuff.com/2011/09/30/dovecot-crash/">http://www.somerandomstuff.com/2011/09/30/dovecot-crash/</a> Well, no way to search 1TB of emails for unknown email...</p>
<p>This is my resolution:</p>

<div class="wp_syntax"><div class="code"><pre class="bash" style="font-family:monospace;"><span style="color: #7a0874; font-weight: bold;">&#91;</span>root<span style="color: #000000; font-weight: bold;">@</span>hruska tmp<span style="color: #7a0874; font-weight: bold;">&#93;</span><span style="color: #666666; font-style: italic;"># wget http://merlin.fit.vutbr.cz/mirrors/centos/4/os/i386/CentOS/RPMS/dovecot-0.99.11-9.EL4.i386.rpm</span>
<span style="color: #7a0874; font-weight: bold;">&#91;</span>root<span style="color: #000000; font-weight: bold;">@</span>hruska tmp<span style="color: #7a0874; font-weight: bold;">&#93;</span><span style="color: #666666; font-style: italic;"># rpm -Uhv dovecot-0.99.11-9.EL4.i386.rpm --oldpackage</span></pre></div></div>

<p>Everything's ok now.</p>
]]></content:encoded>
			<wfw:commentRss>http://www.hrbac.cz/2012/02/dovecot-0-99-11-9-el4-assertion-failed/feed/</wfw:commentRss>
		<slash:comments>0</slash:comments>
		</item>
		<item>
		<title>Firefox and Thunderbird repositories for Ubuntu 10.10</title>
		<link>http://www.hrbac.cz/2012/01/firefox-and-thunderbird-repositories-for-ubuntu-10-10/</link>
		<comments>http://www.hrbac.cz/2012/01/firefox-and-thunderbird-repositories-for-ubuntu-10-10/#comments</comments>
		<pubDate>Tue, 17 Jan 2012 21:43:41 +0000</pubDate>
		<dc:creator>David Hrbáč</dc:creator>
				<category><![CDATA[Uncategorized]]></category>

		<guid isPermaLink="false">http://www.hrbac.cz/?p=359</guid>
		<description><![CDATA[sudo add-apt-repository ppa:mozillateam/firefox-stable sudo add-apt-repository ppa:mozillateam/thunderbird-stable]]></description>
			<content:encoded><![CDATA[<p><code>sudo add-apt-repository ppa:mozillateam/firefox-stable<br />
sudo add-apt-repository ppa:mozillateam/thunderbird-stable<br />
</code></p>
]]></content:encoded>
			<wfw:commentRss>http://www.hrbac.cz/2012/01/firefox-and-thunderbird-repositories-for-ubuntu-10-10/feed/</wfw:commentRss>
		<slash:comments>0</slash:comments>
		</item>
		<item>
		<title>Add line to the top of files with sed</title>
		<link>http://www.hrbac.cz/2011/10/add-line-to-the-top-of-files-with-sed/</link>
		<comments>http://www.hrbac.cz/2011/10/add-line-to-the-top-of-files-with-sed/#comments</comments>
		<pubDate>Tue, 25 Oct 2011 15:20:21 +0000</pubDate>
		<dc:creator>David Hrbáč</dc:creator>
				<category><![CDATA[sed]]></category>

		<guid isPermaLink="false">http://www.hrbac.cz/?p=354</guid>
		<description><![CDATA[One-liner to add line at the beginning of the file(s). find mirrors-* -exec sed -i 1i'http://webmel53.vsb.cz/hrb33/el$releasever/hrb/stable/$basearch/' &#123;&#125; \;]]></description>
			<content:encoded><![CDATA[<p>One-liner to add line at the beginning of the file(s).</p>

<div class="wp_syntax"><div class="code"><pre class="bash" style="font-family:monospace;"><span style="color: #c20cb9; font-weight: bold;">find</span> mirrors-<span style="color: #000000; font-weight: bold;">*</span> <span style="color: #660033;">-exec</span> <span style="color: #c20cb9; font-weight: bold;">sed</span> <span style="color: #660033;">-i</span> 1i<span style="color: #ff0000;">'http://webmel53.vsb.cz/hrb33/el$releasever/hrb/stable/$basearch/'</span> <span style="color: #7a0874; font-weight: bold;">&#123;</span><span style="color: #7a0874; font-weight: bold;">&#125;</span> \;</pre></div></div>

]]></content:encoded>
			<wfw:commentRss>http://www.hrbac.cz/2011/10/add-line-to-the-top-of-files-with-sed/feed/</wfw:commentRss>
		<slash:comments>0</slash:comments>
		</item>
	</channel>
</rss>

