<?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>sonyboy.dk &#187; linux</title>
	<atom:link href="http://www.sonyboy.dk/tag/linux/feed/" rel="self" type="application/rss+xml" />
	<link>http://www.sonyboy.dk</link>
	<description>Tools, tip, tricks and other stuff I might come up with</description>
	<lastBuildDate>Sat, 17 Jul 2010 22:01:05 +0000</lastBuildDate>
	<language>en</language>
	<sy:updatePeriod>hourly</sy:updatePeriod>
	<sy:updateFrequency>1</sy:updateFrequency>
	<generator>http://wordpress.org/?v=3.0.1</generator>
		<item>
		<title>Apache2 hangs with ‘Digest: generating secret for digest authentication’</title>
		<link>http://www.sonyboy.dk/2009/10/20/apache2-hangs-with-%e2%80%98digest-generating-secret-for-digest-authentication%e2%80%99/</link>
		<comments>http://www.sonyboy.dk/2009/10/20/apache2-hangs-with-%e2%80%98digest-generating-secret-for-digest-authentication%e2%80%99/#comments</comments>
		<pubDate>Tue, 20 Oct 2009 12:31:24 +0000</pubDate>
		<dc:creator>Sonyboy</dc:creator>
				<category><![CDATA[Howto]]></category>
		<category><![CDATA[apache2]]></category>
		<category><![CDATA[linux]]></category>

		<guid isPermaLink="false">http://www.sonyboy.dk/?p=28</guid>
		<description><![CDATA[I was running Apache2+SSL on a VM (Virtual Machine). After enabling&#160;SSL and trying to add another&#160;SSL site, apache would refuse to restart and the following error would show up in /var/log/apache2.log Digest: generating secret for digest authentication After doing some research, it turns out that the VM did not have enough entropy to generate much [...]]]></description>
			<content:encoded><![CDATA[<p>I was running Apache2+SSL on a VM (Virtual Machine).</p>
<p>After enabling&nbsp;<acronym title="Secure Sockets Layer">SSL</acronym> and trying to add another&nbsp;<acronym title="Secure Sockets Layer">SSL</acronym> site, apache would refuse to restart and the following error would show up in /var/log/apache2.log</p>
<blockquote>
<pre>Digest: generating secret for digest authentication</pre>
</blockquote>
<p>After doing some research, it turns out that the VM did not have enough entropy to generate much of anything. Increasing this is easy, but may not be completely secure.</p>
<div class="codesnip-container" >$ cat /proc/sys/kernel/random/entropy_avail<br />
139</div>
<p>I found that&nbsp;<strong>rng-tools</strong> could help me solve this.</p>
<div class="codesnip-container" >apt-get install rng-tools</div>
<p>Start the service</p>
<div class="codesnip-container" >rngd -r /dev/urandom -o /dev/random</div>
<p>After running rngd, the entropy will increase at a gradual rate.</p>
<div class="codesnip-container" >cat /proc/sys/kernel/random/entropy_avail<br />
2220</div>
<p><strong>If you want this to survive a reboot, you’ll need to put it in a startup script.</strong></p>
]]></content:encoded>
			<wfw:commentRss>http://www.sonyboy.dk/2009/10/20/apache2-hangs-with-%e2%80%98digest-generating-secret-for-digest-authentication%e2%80%99/feed/</wfw:commentRss>
		<slash:comments>0</slash:comments>
		</item>
		<item>
		<title>Apache2 &#8211; No space left on device</title>
		<link>http://www.sonyboy.dk/2009/07/22/apache-no-space-left-on-device/</link>
		<comments>http://www.sonyboy.dk/2009/07/22/apache-no-space-left-on-device/#comments</comments>
		<pubDate>Wed, 22 Jul 2009 07:32:59 +0000</pubDate>
		<dc:creator>Sonyboy</dc:creator>
				<category><![CDATA[Uncategorized]]></category>
		<category><![CDATA[apache2]]></category>
		<category><![CDATA[linux]]></category>
		<category><![CDATA[semaphore]]></category>

		<guid isPermaLink="false">http://www.sonyboy.dk/?p=34</guid>
		<description><![CDATA[I had problems restarting Apache2&#8230; After researching a lot I found that it was due there were myriads of semaphore-arrays left, owned by my www-data user. The following appears to be some of the errors Apache writes in the log. [emerg] (28)No space left on device: Couldn&#8217;t create accept lock or [crit] (28)No space left [...]]]></description>
			<content:encoded><![CDATA[<p>I had problems restarting Apache2&#8230; After researching a lot I found that it was due there were myriads of semaphore-arrays left, owned by my www-data user.</p>
<p>The following appears to be some of the errors Apache writes in the log.</p>
<ul>
<li>
<div class="codesnip-container" >[emerg] (28)No space left on device: Couldn&#8217;t create accept lock</div>
<p> or</li>
<li>
<div class="codesnip-container" >[crit] (28)No space left on device: mod_rewrite: could not create rewrite_log_lock Configuration Failed</div>
<p> or</li>
<li>
<div class="codesnip-container" >[error] (28)No space left on device: Cannot create SSLMutex</div>
</li>
</ul>
<p>After stopping Apache I found the semaphores with the following command</p>
<div class="codesnip-container" >ipcs -s | grep www-data</div>
<p>Removing this semaphores immediately solved the problem.</p>
<div class="codesnip-container" >ipcs -s | grep www-data | perl -e &#8216;while (&lt;STDIN&gt;) { @a=split(/\s+/); print `ipcrm sem $a[1]`}&#8217;</div>
]]></content:encoded>
			<wfw:commentRss>http://www.sonyboy.dk/2009/07/22/apache-no-space-left-on-device/feed/</wfw:commentRss>
		<slash:comments>0</slash:comments>
		</item>
		<item>
		<title>HOWTO: Purge files from an already removed package</title>
		<link>http://www.sonyboy.dk/2009/06/23/howto-purge-files-from-an-already-removed-package/</link>
		<comments>http://www.sonyboy.dk/2009/06/23/howto-purge-files-from-an-already-removed-package/#comments</comments>
		<pubDate>Tue, 23 Jun 2009 14:00:48 +0000</pubDate>
		<dc:creator>Sonyboy</dc:creator>
				<category><![CDATA[Howto]]></category>
		<category><![CDATA[apt]]></category>
		<category><![CDATA[dpkg]]></category>
		<category><![CDATA[linux]]></category>
		<category><![CDATA[purge]]></category>

		<guid isPermaLink="false">http://www.sonyboy.dk/?p=43</guid>
		<description><![CDATA[Simply use the following command: dpkg &#8211;purge PACKAGENAME]]></description>
			<content:encoded><![CDATA[<p>Simply use the following command:</p>
<div class="codesnip-container" >dpkg &#8211;purge PACKAGENAME</div>
]]></content:encoded>
			<wfw:commentRss>http://www.sonyboy.dk/2009/06/23/howto-purge-files-from-an-already-removed-package/feed/</wfw:commentRss>
		<slash:comments>0</slash:comments>
		</item>
		<item>
		<title>NTP: Who is using my NTP server?</title>
		<link>http://www.sonyboy.dk/2008/09/28/ntp-who-is-using-my-ntp-server/</link>
		<comments>http://www.sonyboy.dk/2008/09/28/ntp-who-is-using-my-ntp-server/#comments</comments>
		<pubDate>Sun, 28 Sep 2008 21:36:06 +0000</pubDate>
		<dc:creator>Sonyboy</dc:creator>
				<category><![CDATA[Tips and Tricks]]></category>
		<category><![CDATA[linux]]></category>
		<category><![CDATA[ntp]]></category>

		<guid isPermaLink="false">http://www.sonyboy.dk/?p=56</guid>
		<description><![CDATA[You can check which hosts are talking to your time server by using the monlist command of ntpdc, e.g. ntpdc -c monlist Please note that a maximum of 600 entries is supported with current versions of ntpdc. The protocol (or better: the contents of the return packets) used by ntpdc is not standardized, therefore it [...]]]></description>
			<content:encoded><![CDATA[<p>You can check which hosts are talking to your time server by using the monlist command of ntpdc, e.g. ntpdc -c monlist Please note that a maximum of 600 entries is supported with current versions of ntpdc. The protocol (or better: the contents of the return packets) used by ntpdc is not standardized, therefore it is recommended to only use ntpdc with a matching ntpd, i.e. both should have the same version number.</p>
<p>To get by this 600 entry limitation, many server operators run client statistics scripts, such as Wayne Schlitt&#8217;s ntp_clients and ntp_clients_stats scripts, which can be found at <a title="http://www.schlitt.net/scripts/ntp/index.html" rel="nofollow" href="http://www.schlitt.net/scripts/ntp/index.html">http://www.schlitt.net/scripts/ntp/index.html</a> . They work very well, but can use quite a bit of system resources if your client counts are in the high thousands. Examples of these scripts in action can be found at:</p>
<ul>
<li><a href="http://www.schlitt.net/ntpstats/ntp_stats.txt" target="_blank">http://www.schlitt.net/ntpstats/ntp_stats.txt</a></li>
<li><a href="http://saturn.dennishilberg.com/ntpstats/ntp_clients_stats.php" target="_blank">http://saturn.dennishilberg.com/ntpstats/ntp_clients_stats.php</a> (slightly modified)</li>
</ul>
<h3>ntpq -p</h3>
<p>The character in the left margin indicates the fate of this peer in the clock selection process. The codes mean:</p>
<div class="codesnip-container" >&lt;sp&gt; discarded due to high stratum and/or failed sanity checks;<br />
&#8220;x&#8221; designated falsticker by the intersection algorithm;<br />
&#8220;.&#8221; culled from the end of the candidate list;<br />
&#8220;-&#8221; discarded by the clustering algorithm;<br />
&#8220;+&#8221; included in the final selection set;<br />
&#8220;#&#8221; selected for synchronization but distance exceeds maximum;<br />
&#8220;*&#8221; selected for synchronization;<br />
&#8220;o&#8221; selected for synchronization, PPS signal in use.</p>
<div></div>
</div>
]]></content:encoded>
			<wfw:commentRss>http://www.sonyboy.dk/2008/09/28/ntp-who-is-using-my-ntp-server/feed/</wfw:commentRss>
		<slash:comments>0</slash:comments>
		</item>
		<item>
		<title>Disable AppArmor</title>
		<link>http://www.sonyboy.dk/2008/09/28/disable-apparmor/</link>
		<comments>http://www.sonyboy.dk/2008/09/28/disable-apparmor/#comments</comments>
		<pubDate>Sun, 28 Sep 2008 21:27:57 +0000</pubDate>
		<dc:creator>Sonyboy</dc:creator>
				<category><![CDATA[Howto]]></category>
		<category><![CDATA[Tips and Tricks]]></category>
		<category><![CDATA[apparmor]]></category>
		<category><![CDATA[linux]]></category>
		<category><![CDATA[selinux]]></category>
		<category><![CDATA[ubuntu]]></category>

		<guid isPermaLink="false">http://www.sonyboy.dk/?p=40</guid>
		<description><![CDATA[AppArmor is a security extension (similar to SELinux) that should provide extended security. In my opinion you don&#8217;t need it to configure a secure system, and it usually causes more problems than advantages (think of it after you have done a week of trouble-shooting because some service wasn&#8217;t working as expected, and then you find [...]]]></description>
			<content:encoded><![CDATA[<p>AppArmor is a security extension (similar to SELinux) that should provide extended security. In my opinion you don&#8217;t need it to configure a secure system, and it usually causes more problems than advantages (think of it after you have done a week of trouble-shooting because some service wasn&#8217;t working as expected, and then you find out that everything was ok, only AppArmor was causing the problem).</p>
<p>We can disable it like this:</p>
<div class="codesnip-container" >/etc/init.d/apparmor stop<br />
update-rc.d -f apparmor remove</div>
]]></content:encoded>
			<wfw:commentRss>http://www.sonyboy.dk/2008/09/28/disable-apparmor/feed/</wfw:commentRss>
		<slash:comments>0</slash:comments>
		</item>
	</channel>
</rss>
