<?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>Out of Control® &#187; RHEL and Ensim</title>
	<atom:link href="http://www.outofcontrol.ca/category/how-to/rhel-and-ensim/feed/" rel="self" type="application/rss+xml" />
	<link>http://www.outofcontrol.ca</link>
	<description>Keeping you in control</description>
	<lastBuildDate>Mon, 19 Jul 2010 14:30:00 +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>Installing PECL geoip problem</title>
		<link>http://www.outofcontrol.ca/2009/02/10/installing-pecl-geoip-problem/</link>
		<comments>http://www.outofcontrol.ca/2009/02/10/installing-pecl-geoip-problem/#comments</comments>
		<pubDate>Tue, 10 Feb 2009 14:08:20 +0000</pubDate>
		<dc:creator>plattapuss</dc:creator>
				<category><![CDATA[Apache]]></category>
		<category><![CDATA[RHEL 5 plain]]></category>
		<category><![CDATA[RHEL and Ensim]]></category>
		<category><![CDATA[geoip]]></category>
		<category><![CDATA[pecl]]></category>
		<category><![CDATA[php]]></category>

		<guid isPermaLink="false">http://www.outofcontrol.ca/?p=177</guid>
		<description><![CDATA[I needed the pecl package geoip installed on one of my RHEL5 servers running PHP 5. This is an easy task but you might get a slightly confusing error which will stop you. First off there are two ways to install a PECL package. First is to simply issue a pecl command at the prompt: [...]]]></description>
			<content:encoded><![CDATA[<p>I needed the pecl package geoip installed on one of my RHEL5 servers running PHP 5. This is an easy task but you might get a slightly confusing error which will stop you. </p>
<p>First off there are two ways to install a PECL package. First is to simply issue a pecl command at the prompt: pecl install geoip</p>
<p>Or, you can download the package and install it manually:</p>
<div class="igBar"><span id="lcode-5"><a href="#" onclick="javascript:showPlainTxt('code-5'); return false;">PLAIN TEXT</a></span></div>
<div class="syntax_hilite"><span class="langName">CODE:</span>
<div id="code-5">
<div class="code">
<ol>
<li style="font-family: 'Courier New', Courier, monospace; color: black; font-weight: normal; font-style: normal;color:#3A6A8B;">
<div style="font-family: 'Courier New', Courier, monospace; font-weight: normal;">cd /tmp</div>
</li>
<li style="font-weight: bold;color:#26536A;">
<div style="font-family: 'Courier New', Courier, monospace; font-weight: normal;">wget http:<span style="color:#FF9933; font-style:italic;">//pecl.php.net/get/geoip-1.0.6.tgz</span></div>
</li>
<li style="font-family: 'Courier New', Courier, monospace; color: black; font-weight: normal; font-style: normal;color:#3A6A8B;">
<div style="font-family: 'Courier New', Courier, monospace; font-weight: normal;">tar -zxvf&nbsp; geoip-<span style="color:#800000;color:#800000;">1</span>.<span style="color:#800000;color:#800000;">0</span>.<span style="color:#800000;color:#800000;">6</span>.<span style="">tgz</span></div>
</li>
<li style="font-weight: bold;color:#26536A;">
<div style="font-family: 'Courier New', Courier, monospace; font-weight: normal;">cd geoip-<span style="color:#800000;color:#800000;">1</span>.<span style="color:#800000;color:#800000;">0</span>.<span style="color:#800000;color:#800000;">6</span></div>
</li>
<li style="font-family: 'Courier New', Courier, monospace; color: black; font-weight: normal; font-style: normal;color:#3A6A8B;">
<div style="font-family: 'Courier New', Courier, monospace; font-weight: normal;">phpize</div>
</li>
<li style="font-weight: bold;color:#26536A;">
<div style="font-family: 'Courier New', Courier, monospace; font-weight: normal;">./configure</div>
</li>
<li style="font-family: 'Courier New', Courier, monospace; color: black; font-weight: normal; font-style: normal;color:#3A6A8B;">
<div style="font-family: 'Courier New', Courier, monospace; font-weight: normal;">make</div>
</li>
<li style="font-weight: bold;color:#26536A;">
<div style="font-family: 'Courier New', Courier, monospace; font-weight: normal;">make install </div>
</li>
</ol>
</div>
</div>
</div>
<p></p>
<p>Either of these methods still requires you to add a file in /etc/php.d to enable the new package. For the geoip package you can add a file called geoip.ini to /etc/php.d</p>
<div class="igBar"><span id="lcode-6"><a href="#" onclick="javascript:showPlainTxt('code-6'); return false;">PLAIN TEXT</a></span></div>
<div class="syntax_hilite"><span class="langName">CODE:</span>
<div id="code-6">
<div class="code">
<ol>
<li style="font-family: 'Courier New', Courier, monospace; color: black; font-weight: normal; font-style: normal;color:#3A6A8B;">
<div style="font-family: 'Courier New', Courier, monospace; font-weight: normal;">; Enable geoip extension module</div>
</li>
<li style="font-weight: bold;color:#26536A;">
<div style="font-family: 'Courier New', Courier, monospace; font-weight: normal;">extension=geoip.<span style="">so</span> </div>
</li>
</ol>
</div>
</div>
</div>
<p></p>
<p>You can check quickly if geoip is installed by running 'php -r 'print_r(phpinfo());' | grep -i geoip' at the command line:</p>
<div class="igBar"><span id="lcode-7"><a href="#" onclick="javascript:showPlainTxt('code-7'); return false;">PLAIN TEXT</a></span></div>
<div class="syntax_hilite"><span class="langName">CODE:</span>
<div id="code-7">
<div class="code">
<ol>
<li style="font-family: 'Courier New', Courier, monospace; color: black; font-weight: normal; font-style: normal;color:#3A6A8B;">
<div style="font-family: 'Courier New', Courier, monospace; font-weight: normal;"><span style="color:#006600; font-weight:bold;">&#91;</span><span style="color:#800000;color:#800000;">08</span>:<span style="color:#800000;color:#800000;">19</span>:<span style="color:#800000;color:#800000;">27</span> root@server php.<span style="">d</span><span style="color:#006600; font-weight:bold;">&#93;</span># php -r <span style="color:#CC0000;">'print_r(phpinfo());'</span> | grep -i geoip </div>
</li>
<li style="font-weight: bold;color:#26536A;">
<div style="font-family: 'Courier New', Courier, monospace; font-weight: normal;">/etc/php.<span style="">d</span>/geoip.<span style="">ini</span>,</div>
</li>
<li style="font-family: 'Courier New', Courier, monospace; color: black; font-weight: normal; font-style: normal;color:#3A6A8B;">
<div style="font-family: 'Courier New', Courier, monospace; font-weight: normal;">geoip</div>
</li>
<li style="font-weight: bold;color:#26536A;">
<div style="font-family: 'Courier New', Courier, monospace; font-weight: normal;">geoip support =&gt; enabled</div>
</li>
<li style="font-family: 'Courier New', Courier, monospace; color: black; font-weight: normal; font-style: normal;color:#3A6A8B;">
<div style="font-family: 'Courier New', Courier, monospace; font-weight: normal;">geoip extension version =&gt; <span style="color:#800000;color:#800000;">1</span>.<span style="color:#800000;color:#800000;">0</span>.<span style="color:#800000;color:#800000;">6</span></div>
</li>
<li style="font-weight: bold;color:#26536A;">
<div style="font-family: 'Courier New', Courier, monospace; font-weight: normal;">geoip library version =&gt; <span style="color:#800000;color:#800000;">1004005</span></div>
</li>
<li style="font-family: 'Courier New', Courier, monospace; color: black; font-weight: normal; font-style: normal;color:#3A6A8B;">
<div style="font-family: 'Courier New', Courier, monospace; font-weight: normal;">geoip.<span style="">custom_directory</span> =&gt; no value =&gt; no value</div>
</li>
<li style="font-weight: bold;color:#26536A;">
<div style="font-family: 'Courier New', Courier, monospace; font-weight: normal;">OLDPWD =&gt; /tmp/geoip-<span style="color:#800000;color:#800000;">1</span>.<span style="color:#800000;color:#800000;">0</span>.<span style="color:#800000;color:#800000;">6</span></div>
</li>
<li style="font-family: 'Courier New', Courier, monospace; color: black; font-weight: normal; font-style: normal;color:#3A6A8B;">
<div style="font-family: 'Courier New', Courier, monospace; font-weight: normal;">_SERVER<span style="color:#006600; font-weight:bold;">&#91;</span><span style="color:#CC0000;">"OLDPWD"</span><span style="color:#006600; font-weight:bold;">&#93;</span> =&gt; /tmp/geoip-<span style="color:#800000;color:#800000;">1</span>.<span style="color:#800000;color:#800000;">0</span>.<span style="color:#800000;color:#800000;">6</span></div>
</li>
<li style="font-weight: bold;color:#26536A;">
<div style="font-family: 'Courier New', Courier, monospace; font-weight: normal;">_ENV<span style="color:#006600; font-weight:bold;">&#91;</span><span style="color:#CC0000;">"OLDPWD"</span><span style="color:#006600; font-weight:bold;">&#93;</span> =&gt; /tmp/geoip-<span style="color:#800000;color:#800000;">1</span>.<span style="color:#800000;color:#800000;">0</span>.<span style="color:#800000;color:#800000;">6</span> </div>
</li>
</ol>
</div>
</div>
</div>
<p></p>
<p>If there is no output, then you have done something wrong and geoip is not installed.</p>
<p>However, if you get something like this:</p>
<div class="igBar"><span id="lcode-8"><a href="#" onclick="javascript:showPlainTxt('code-8'); return false;">PLAIN TEXT</a></span></div>
<div class="syntax_hilite"><span class="langName">CODE:</span>
<div id="code-8">
<div class="code">
<ol>
<li style="font-family: 'Courier New', Courier, monospace; color: black; font-weight: normal; font-style: normal;color:#3A6A8B;">
<div style="font-family: 'Courier New', Courier, monospace; font-weight: normal;"><span style="color:#006600; font-weight:bold;">&#91;</span><span style="color:#800000;color:#800000;">07</span>:<span style="color:#800000;color:#800000;">57</span>:<span style="color:#800000;color:#800000;">57</span> root@server geoip-<span style="color:#800000;color:#800000;">1</span>.<span style="color:#800000;color:#800000;">0</span>.<span style="color:#800000;color:#800000;">6</span><span style="color:#006600; font-weight:bold;">&#93;</span># ./configure</div>
</li>
<li style="font-weight: bold;color:#26536A;">
<div style="font-family: 'Courier New', Courier, monospace; font-weight: normal;">checking for egrep... <span style="">grep</span> -E</div>
</li>
<li style="font-family: 'Courier New', Courier, monospace; color: black; font-weight: normal; font-style: normal;color:#3A6A8B;">
<div style="font-family: 'Courier New', Courier, monospace; font-weight: normal;">checking for a sed that does not truncate output... /bin/sed</div>
</li>
<li style="font-weight: bold;color:#26536A;">
<div style="font-family: 'Courier New', Courier, monospace; font-weight: normal;">checking for gcc... <span style="">gcc</span></div>
</li>
<li style="font-family: 'Courier New', Courier, monospace; color: black; font-weight: normal; font-style: normal;color:#3A6A8B;">
<div style="font-family: 'Courier New', Courier, monospace; font-weight: normal;">checking for C compiler default output file name... <span style="">a</span>.<span style="">out</span></div>
</li>
<li style="font-weight: bold;color:#26536A;">
<div style="font-family: 'Courier New', Courier, monospace; font-weight: normal;">checking whether the C compiler works... <span style="">yes</span></div>
</li>
<li style="font-family: 'Courier New', Courier, monospace; color: black; font-weight: normal; font-style: normal;color:#3A6A8B;">
<div style="font-family: 'Courier New', Courier, monospace; font-weight: normal;">checking whether we are cross compiling... <span style="">no</span></div>
</li>
<li style="font-weight: bold;color:#26536A;">
<div style="font-family: 'Courier New', Courier, monospace; font-weight: normal;">checking for suffix of executables... </div>
</li>
<li style="font-family: 'Courier New', Courier, monospace; color: black; font-weight: normal; font-style: normal;color:#3A6A8B;">
<div style="font-family: 'Courier New', Courier, monospace; font-weight: normal;"><span style="">checking</span> for suffix of object files... <span style="">o</span></div>
</li>
<li style="font-weight: bold;color:#26536A;">
<div style="font-family: 'Courier New', Courier, monospace; font-weight: normal;">checking whether we are using the GNU C compiler... <span style="">yes</span></div>
</li>
<li style="font-family: 'Courier New', Courier, monospace; color: black; font-weight: normal; font-style: normal;color:#3A6A8B;">
<div style="font-family: 'Courier New', Courier, monospace; font-weight: normal;">checking whether gcc accepts -g... <span style="">yes</span></div>
</li>
<li style="font-weight: bold;color:#26536A;">
<div style="font-family: 'Courier New', Courier, monospace; font-weight: normal;">checking for gcc option to accept ANSI C... <span style="">none</span> needed</div>
</li>
<li style="font-family: 'Courier New', Courier, monospace; color: black; font-weight: normal; font-style: normal;color:#3A6A8B;">
<div style="font-family: 'Courier New', Courier, monospace; font-weight: normal;">checking whether gcc and cc understand -c and -o together... <span style="">yes</span></div>
</li>
<li style="font-weight: bold;color:#26536A;">
<div style="font-family: 'Courier New', Courier, monospace; font-weight: normal;">checking if compiler supports -R... <span style="">no</span></div>
</li>
<li style="font-family: 'Courier New', Courier, monospace; color: black; font-weight: normal; font-style: normal;color:#3A6A8B;">
<div style="font-family: 'Courier New', Courier, monospace; font-weight: normal;">checking if compiler supports -Wl,-rpath,... <span style="">yes</span></div>
</li>
<li style="font-weight: bold;color:#26536A;">
<div style="font-family: 'Courier New', Courier, monospace; font-weight: normal;">checking build system type... <span style="">i686</span>-redhat-linux-gnu</div>
</li>
<li style="font-family: 'Courier New', Courier, monospace; color: black; font-weight: normal; font-style: normal;color:#3A6A8B;">
<div style="font-family: 'Courier New', Courier, monospace; font-weight: normal;">checking host system type... <span style="">i686</span>-redhat-linux-gnu</div>
</li>
<li style="font-weight: bold;color:#26536A;">
<div style="font-family: 'Courier New', Courier, monospace; font-weight: normal;">checking target system type... <span style="">i686</span>-redhat-linux-gnu</div>
</li>
<li style="font-family: 'Courier New', Courier, monospace; color: black; font-weight: normal; font-style: normal;color:#3A6A8B;">
<div style="font-family: 'Courier New', Courier, monospace; font-weight: normal;">checking for PHP prefix... /usr</div>
</li>
<li style="font-weight: bold;color:#26536A;">
<div style="font-family: 'Courier New', Courier, monospace; font-weight: normal;">checking for PHP includes... -I/usr/include/php -I/usr/include/php/main -I/usr/include/php/TSRM -I/usr/include/php/Zend -I/usr/include/php/ext</div>
</li>
<li style="font-family: 'Courier New', Courier, monospace; color: black; font-weight: normal; font-style: normal;color:#3A6A8B;">
<div style="font-family: 'Courier New', Courier, monospace; font-weight: normal;">checking for PHP extension directory... /usr/lib/php/modules</div>
</li>
<li style="font-weight: bold;color:#26536A;">
<div style="font-family: 'Courier New', Courier, monospace; font-weight: normal;">checking for PHP installed headers prefix... /usr/include/php</div>
</li>
<li style="font-family: 'Courier New', Courier, monospace; color: black; font-weight: normal; font-style: normal;color:#3A6A8B;">
<div style="font-family: 'Courier New', Courier, monospace; font-weight: normal;">checking for re2c... <span style="">no</span></div>
</li>
<li style="font-weight: bold;color:#26536A;">
<div style="font-family: 'Courier New', Courier, monospace; font-weight: normal;">configure: WARNING: You will need re2c <span style="color:#800000;color:#800000;">0</span>.<span style="color:#800000;color:#800000;">9</span>.<span style="color:#800000;color:#800000;">11</span> or later if you want to regenerate PHP parsers.</div>
</li>
<li style="font-family: 'Courier New', Courier, monospace; color: black; font-weight: normal; font-style: normal;color:#3A6A8B;">
<div style="font-family: 'Courier New', Courier, monospace; font-weight: normal;"><span style="">checking</span> for gawk... <span style="">gawk</span></div>
</li>
<li style="font-weight: bold;color:#26536A;">
<div style="font-family: 'Courier New', Courier, monospace; font-weight: normal;">checking for geoip support... <span style="">yes</span>, shared</div>
</li>
<li style="font-family: 'Courier New', Courier, monospace; color: black; font-weight: normal; font-style: normal;color:#3A6A8B;">
<div style="font-family: 'Courier New', Courier, monospace; font-weight: normal;">checking for geoip files in default path... <span style="">not</span> found</div>
</li>
<li style="font-weight: bold;color:#26536A;">
<div style="font-family: 'Courier New', Courier, monospace; font-weight: normal;">configure: error: Please reinstall the geoip distribution </div>
</li>
</ol>
</div>
</div>
</div>
<p></p>
<p>You might scratch your head and say to yourself, but I am trying to install the geoip distribution, what gives? What the PECL package is looking for is the geoip-devel rpm. Simply issue yum install geoip-devel at the prompt, then go ahead with one of the above methods of installing the PECL geoip package. </p>
]]></content:encoded>
			<wfw:commentRss>http://www.outofcontrol.ca/2009/02/10/installing-pecl-geoip-problem/feed/</wfw:commentRss>
		<slash:comments>1</slash:comments>
		</item>
		<item>
		<title>Test your servers Virus filters &#8211; don&#8217;t assume</title>
		<link>http://www.outofcontrol.ca/2008/12/16/test-your-servers-virus-filters-dont-assume/</link>
		<comments>http://www.outofcontrol.ca/2008/12/16/test-your-servers-virus-filters-dont-assume/#comments</comments>
		<pubDate>Tue, 16 Dec 2008 21:45:26 +0000</pubDate>
		<dc:creator>plattapuss</dc:creator>
				<category><![CDATA[How-To]]></category>
		<category><![CDATA[Internet]]></category>
		<category><![CDATA[RHEL and Ensim]]></category>
		<category><![CDATA[Servers]]></category>
		<category><![CDATA[anti-virus]]></category>
		<category><![CDATA[linux]]></category>

		<guid isPermaLink="false">http://www.outofcontrol.ca/?p=162</guid>
		<description><![CDATA[On one of our RHEL5 servers running Ensim, we noticed after the last big update of RHEL using 'yum update', that MailScanner was capped out, using tons of our CPU power. In the past when this happens I usually find it is ClamAV acting up. However, we were using on this server a free version [...]]]></description>
			<content:encoded><![CDATA[<p>On one of our RHEL5 servers running Ensim, we noticed after the last big update of RHEL using 'yum update', that MailScanner was capped out, using tons of our CPU power. In the past when this happens I usually find it is ClamAV acting up. However, we were using on this server a free version of <a href="http://www.f-prot.com/">f-prot</a>. I took a chance and purchased the latest greatest mail server version of f-prot and installed it. Bingo, the problem went away. </p>
<p>Why f-prot? It works and it is easier on the server. I have noticed that the server load with f-prot is noticeably lower than when using ClamAV.</p>
<p>Once the new version of f-prot was properly installed, I wanted to test that it worked as it should. A <a href="http://www.nightowlswebspace.com/">friend</a> suggested to test the virus scanner I should put it to a real-world test using one of <a href="http://www.declude.com/articles.asp?ID=100">Declude.com</a>'s free tools. </p>
<p><a href="http://www.declude.com/Articles.asp?ID=99">This test</a> would actually send an email to my server with a file that was made to get caught be anti-virus filters.</p>
<p>The test worked well, too bad my anti-virus f-prot filter didn't. After a quick check I realized I had not modified one path in my MailScanner rules file to point to the new f-prot location. After I fixed that, I ran the test again, and sure enough, my anti-virus filter was working as it should.</p>
<p>Lesson learnt? Never assume your new software works, test it!</p>
]]></content:encoded>
			<wfw:commentRss>http://www.outofcontrol.ca/2008/12/16/test-your-servers-virus-filters-dont-assume/feed/</wfw:commentRss>
		<slash:comments>2</slash:comments>
		</item>
		<item>
		<title>Yum Lock table is out of available locker entries</title>
		<link>http://www.outofcontrol.ca/2008/11/27/yum-lock-table-is-out-of-available-locker-entries/</link>
		<comments>http://www.outofcontrol.ca/2008/11/27/yum-lock-table-is-out-of-available-locker-entries/#comments</comments>
		<pubDate>Thu, 27 Nov 2008 15:17:45 +0000</pubDate>
		<dc:creator>plattapuss</dc:creator>
				<category><![CDATA[How-To]]></category>
		<category><![CDATA[RHEL and Ensim]]></category>
		<category><![CDATA[linux]]></category>
		<category><![CDATA[mailscanner]]></category>
		<category><![CDATA[rhel]]></category>
		<category><![CDATA[yum]]></category>

		<guid isPermaLink="false">http://www.outofcontrol.ca/?p=152</guid>
		<description><![CDATA[Today while running a yum update on one RHEL5 server, I got the following error and python traceback: PLAIN TEXT CODE: yum update Loading "security" plugin Loading "rhnplugin" plugin rhel-i386-server-5&#160; &#160; &#160; &#160; 100% &#124;=========================&#124; 1.2 kB&#160; &#160; 00:00&#160; &#160; &#160; primary.xml.gz&#160; &#160; &#160; &#160; &#160; &#160; 100% &#124;=========================&#124; 1.6 MB&#160; &#160; 00:01&#160; &#160; &#160; [...]]]></description>
			<content:encoded><![CDATA[<p>Today while running a yum update on one RHEL5 server, I got the following error and python traceback:</p>
<div class="igBar"><span id="lcode-11"><a href="#" onclick="javascript:showPlainTxt('code-11'); return false;">PLAIN TEXT</a></span></div>
<div class="syntax_hilite"><span class="langName">CODE:</span>
<div id="code-11">
<div class="code">
<ol>
<li style="font-family: 'Courier New', Courier, monospace; color: black; font-weight: normal; font-style: normal;color:#3A6A8B;">
<div style="font-family: 'Courier New', Courier, monospace; font-weight: normal;">yum update</div>
</li>
<li style="font-weight: bold;color:#26536A;">
<div style="font-family: 'Courier New', Courier, monospace; font-weight: normal;">Loading <span style="color:#CC0000;">"security"</span> plugin</div>
</li>
<li style="font-family: 'Courier New', Courier, monospace; color: black; font-weight: normal; font-style: normal;color:#3A6A8B;">
<div style="font-family: 'Courier New', Courier, monospace; font-weight: normal;">Loading <span style="color:#CC0000;">"rhnplugin"</span> plugin</div>
</li>
<li style="font-weight: bold;color:#26536A;">
<div style="font-family: 'Courier New', Courier, monospace; font-weight: normal;">rhel-i386-server-<span style="color:#800000;color:#800000;">5</span>&nbsp; &nbsp; &nbsp; &nbsp; <span style="color:#800000;color:#800000;">100</span>% |=========================| <span style="color:#800000;color:#800000;">1</span>.<span style="color:#800000;color:#800000;">2</span> kB&nbsp; &nbsp; <span style="color:#800000;color:#800000;">00</span>:<span style="color:#800000;color:#800000;">00</span>&nbsp; &nbsp; &nbsp;</div>
</li>
<li style="font-family: 'Courier New', Courier, monospace; color: black; font-weight: normal; font-style: normal;color:#3A6A8B;">
<div style="font-family: 'Courier New', Courier, monospace; font-weight: normal;">primary.<span style="">xml</span>.<span style="">gz</span>&nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; <span style="color:#800000;color:#800000;">100</span>% |=========================| <span style="color:#800000;color:#800000;">1</span>.<span style="color:#800000;color:#800000;">6</span> MB&nbsp; &nbsp; <span style="color:#800000;color:#800000;">00</span>:<span style="color:#800000;color:#800000;">01</span>&nbsp; &nbsp; &nbsp;</div>
</li>
<li style="font-weight: bold;color:#26536A;">
<div style="font-family: 'Courier New', Courier, monospace; font-weight: normal;">rhel-i386-: ################################################## <span style="color:#800000;color:#800000;">4462</span>/<span style="color:#800000;color:#800000;">4462</span></div>
</li>
<li style="font-family: 'Courier New', Courier, monospace; color: black; font-weight: normal; font-style: normal;color:#3A6A8B;">
<div style="font-family: 'Courier New', Courier, monospace; font-weight: normal;">Skipping security plugin, no data</div>
</li>
<li style="font-weight: bold;color:#26536A;">
<div style="font-family: 'Courier New', Courier, monospace; font-weight: normal;">Setting up Update Process</div>
</li>
<li style="font-family: 'Courier New', Courier, monospace; color: black; font-weight: normal; font-style: normal;color:#3A6A8B;">
<div style="font-family: 'Courier New', Courier, monospace; font-weight: normal;">rpmdb: Lock table is out of available locker entries</div>
</li>
<li style="font-weight: bold;color:#26536A;">
<div style="font-family: 'Courier New', Courier, monospace; font-weight: normal;">rpmdb: Unknown locker ID: 75ba</div>
</li>
<li style="font-family: 'Courier New', Courier, monospace; color: black; font-weight: normal; font-style: normal;color:#3A6A8B;">
<div style="font-family: 'Courier New', Courier, monospace; font-weight: normal;">error: db4 error<span style="color:#006600; font-weight:bold;">&#40;</span><span style="color:#800000;color:#800000;">22</span><span style="color:#006600; font-weight:bold;">&#41;</span> from dbenv-&gt;<span style="">close</span>: Invalid argument</div>
</li>
<li style="font-weight: bold;color:#26536A;">
<div style="font-family: 'Courier New', Courier, monospace; font-weight: normal;">error: cannot open Packages index using db3 - Cannot allocate memory <span style="color:#006600; font-weight:bold;">&#40;</span><span style="color:#800000;color:#800000;">12</span><span style="color:#006600; font-weight:bold;">&#41;</span></div>
</li>
<li style="font-family: 'Courier New', Courier, monospace; color: black; font-weight: normal; font-style: normal;color:#3A6A8B;">
<div style="font-family: 'Courier New', Courier, monospace; font-weight: normal;">error: cannot open Packages database in /var/lib/rpm</div>
</li>
<li style="font-weight: bold;color:#26536A;">
<div style="font-family: 'Courier New', Courier, monospace; font-weight: normal;">Traceback <span style="color:#006600; font-weight:bold;">&#40;</span>most recent call last<span style="color:#006600; font-weight:bold;">&#41;</span>:</div>
</li>
<li style="font-family: 'Courier New', Courier, monospace; color: black; font-weight: normal; font-style: normal;color:#3A6A8B;">
<div style="font-family: 'Courier New', Courier, monospace; font-weight: normal;">&nbsp; File <span style="color:#CC0000;">"/usr/bin/yum"</span>, line <span style="color:#800000;color:#800000;">29</span>, in ?</div>
</li>
<li style="font-weight: bold;color:#26536A;">
<div style="font-family: 'Courier New', Courier, monospace; font-weight: normal;">&nbsp; &nbsp; yummain.<span style="">main</span><span style="color:#006600; font-weight:bold;">&#40;</span>sys.<span style="">argv</span><span style="color:#006600; font-weight:bold;">&#91;</span><span style="color:#800000;color:#800000;">1</span>:<span style="color:#006600; font-weight:bold;">&#93;</span><span style="color:#006600; font-weight:bold;">&#41;</span></div>
</li>
<li style="font-family: 'Courier New', Courier, monospace; color: black; font-weight: normal; font-style: normal;color:#3A6A8B;">
<div style="font-family: 'Courier New', Courier, monospace; font-weight: normal;">&nbsp; File <span style="color:#CC0000;">"/usr/share/yum-cli/yummain.py"</span>, line <span style="color:#800000;color:#800000;">105</span>, in main</div>
</li>
<li style="font-weight: bold;color:#26536A;">
<div style="font-family: 'Courier New', Courier, monospace; font-weight: normal;">&nbsp; &nbsp; result, resultmsgs = base.<span style="">doCommands</span><span style="color:#006600; font-weight:bold;">&#40;</span><span style="color:#006600; font-weight:bold;">&#41;</span></div>
</li>
<li style="font-family: 'Courier New', Courier, monospace; color: black; font-weight: normal; font-style: normal;color:#3A6A8B;">
<div style="font-family: 'Courier New', Courier, monospace; font-weight: normal;">&nbsp; File <span style="color:#CC0000;">"/usr/share/yum-cli/cli.py"</span>, line <span style="color:#800000;color:#800000;">293</span>, in doCommands</div>
</li>
<li style="font-weight: bold;color:#26536A;">
<div style="font-family: 'Courier New', Courier, monospace; font-weight: normal;">&nbsp; &nbsp; return self.<span style="">yum_cli_commands</span><span style="color:#006600; font-weight:bold;">&#91;</span>self.<span style="">basecmd</span><span style="color:#006600; font-weight:bold;">&#93;</span>.<span style="">doCommand</span><span style="color:#006600; font-weight:bold;">&#40;</span>self, self.<span style="">basecmd</span>, self.<span style="">extcmds</span><span style="color:#006600; font-weight:bold;">&#41;</span></div>
</li>
<li style="font-family: 'Courier New', Courier, monospace; color: black; font-weight: normal; font-style: normal;color:#3A6A8B;">
<div style="font-family: 'Courier New', Courier, monospace; font-weight: normal;">&nbsp; File <span style="color:#CC0000;">"/usr/share/yum-cli/yumcommands.py"</span>, line <span style="color:#800000;color:#800000;">163</span>, in doCommand</div>
</li>
<li style="font-weight: bold;color:#26536A;">
<div style="font-family: 'Courier New', Courier, monospace; font-weight: normal;">&nbsp; &nbsp; return base.<span style="">updatePkgs</span><span style="color:#006600; font-weight:bold;">&#40;</span>extcmds<span style="color:#006600; font-weight:bold;">&#41;</span></div>
</li>
<li style="font-family: 'Courier New', Courier, monospace; color: black; font-weight: normal; font-style: normal;color:#3A6A8B;">
<div style="font-family: 'Courier New', Courier, monospace; font-weight: normal;">&nbsp; File <span style="color:#CC0000;">"/usr/share/yum-cli/cli.py"</span>, line <span style="color:#800000;color:#800000;">600</span>, in updatePkgs</div>
</li>
<li style="font-weight: bold;color:#26536A;">
<div style="font-family: 'Courier New', Courier, monospace; font-weight: normal;">&nbsp; &nbsp; installed = self.<span style="">rpmdb</span>.<span style="">simplePkgList</span><span style="color:#006600; font-weight:bold;">&#40;</span><span style="color:#006600; font-weight:bold;">&#41;</span></div>
</li>
<li style="font-family: 'Courier New', Courier, monospace; color: black; font-weight: normal; font-style: normal;color:#3A6A8B;">
<div style="font-family: 'Courier New', Courier, monospace; font-weight: normal;">&nbsp; File <span style="color:#CC0000;">"/usr/lib/python2.4/site-packages/yum/rpmsack.py"</span>, line <span style="color:#800000;color:#800000;">158</span>, in simplePkgList</div>
</li>
<li style="font-weight: bold;color:#26536A;">
<div style="font-family: 'Courier New', Courier, monospace; font-weight: normal;">&nbsp; &nbsp; return self.<span style="">pkglist</span></div>
</li>
<li style="font-family: 'Courier New', Courier, monospace; color: black; font-weight: normal; font-style: normal;color:#3A6A8B;">
<div style="font-family: 'Courier New', Courier, monospace; font-weight: normal;">&nbsp; File <span style="color:#CC0000;">"/usr/lib/python2.4/site-packages/yum/rpmsack.py"</span>, line <span style="color:#800000;color:#800000;">59</span>, in _get_pkglist</div>
</li>
<li style="font-weight: bold;color:#26536A;">
<div style="font-family: 'Courier New', Courier, monospace; font-weight: normal;">&nbsp; &nbsp; self._make_header_dict<span style="color:#006600; font-weight:bold;">&#40;</span><span style="color:#006600; font-weight:bold;">&#41;</span></div>
</li>
<li style="font-family: 'Courier New', Courier, monospace; color: black; font-weight: normal; font-style: normal;color:#3A6A8B;">
<div style="font-family: 'Courier New', Courier, monospace; font-weight: normal;">&nbsp; File <span style="color:#CC0000;">"/usr/lib/python2.4/site-packages/yum/rpmsack.py"</span>, line <span style="color:#800000;color:#800000;">235</span>, in _make_header_dict</div>
</li>
<li style="font-weight: bold;color:#26536A;">
<div style="font-family: 'Courier New', Courier, monospace; font-weight: normal;">&nbsp; &nbsp; for <span style="color:#006600; font-weight:bold;">&#40;</span>hdr, idx<span style="color:#006600; font-weight:bold;">&#41;</span> in self._all_packages<span style="color:#006600; font-weight:bold;">&#40;</span><span style="color:#006600; font-weight:bold;">&#41;</span>:</div>
</li>
<li style="font-family: 'Courier New', Courier, monospace; color: black; font-weight: normal; font-style: normal;color:#3A6A8B;">
<div style="font-family: 'Courier New', Courier, monospace; font-weight: normal;">&nbsp; File <span style="color:#CC0000;">"/usr/lib/python2.4/site-packages/yum/rpmsack.py"</span>, line <span style="color:#800000;color:#800000;">206</span>, in _all_packages</div>
</li>
<li style="font-weight: bold;color:#26536A;">
<div style="font-family: 'Courier New', Courier, monospace; font-weight: normal;">&nbsp; &nbsp; mi = ts.<span style="">dbMatch</span><span style="color:#006600; font-weight:bold;">&#40;</span><span style="color:#006600; font-weight:bold;">&#41;</span></div>
</li>
<li style="font-family: 'Courier New', Courier, monospace; color: black; font-weight: normal; font-style: normal;color:#3A6A8B;">
<div style="font-family: 'Courier New', Courier, monospace; font-weight: normal;">TypeError: rpmdb open failed </div>
</li>
</ol>
</div>
</div>
</div>
<p></p>
<p>As scary as all that looks, it was easy to find the solution. Apparently this is caused by a well known rpm DB lock. First ensure that no instances of yum or rpm are running. You can do this by issuing the command 'ps ax | grep yum' and 'os ax | grep rpm'. If either of these show an instance of yum or running, kill it off or wait for it to finish. Then as super user, following these tho instructions:</p>
<div class="igBar"><span id="lcode-12"><a href="#" onclick="javascript:showPlainTxt('code-12'); return false;">PLAIN TEXT</a></span></div>
<div class="syntax_hilite"><span class="langName">CODE:</span>
<div id="code-12">
<div class="code">
<ol>
<li style="font-family: 'Courier New', Courier, monospace; color: black; font-weight: normal; font-style: normal;color:#3A6A8B;">
<div style="font-family: 'Courier New', Courier, monospace; font-weight: normal;">rm /var/lib/rpm/__db.*</div>
</li>
<li style="font-weight: bold;color:#26536A;">
<div style="font-family: 'Courier New', Courier, monospace; font-weight: normal;">rpm --rebuilddb </div>
</li>
</ol>
</div>
</div>
</div>
<p></p>
<p>That is it. You should be able to run 'yum clean all' and 'yum update'. Since we use MailScanner, I had to then contend with the annoying conflict with the MailScanner perl packages. <a href="http://www.outofcontrol.ca/2008/06/18/yum-update-cau…e-from-package/">But... that is another story</a>.</p>
]]></content:encoded>
			<wfw:commentRss>http://www.outofcontrol.ca/2008/11/27/yum-lock-table-is-out-of-available-locker-entries/feed/</wfw:commentRss>
		<slash:comments>0</slash:comments>
		</item>
		<item>
		<title>Use smartd Smartmontools to prevent data loss</title>
		<link>http://www.outofcontrol.ca/2008/07/10/use-smartd-smartmontools-to-prevent-a-disaster/</link>
		<comments>http://www.outofcontrol.ca/2008/07/10/use-smartd-smartmontools-to-prevent-a-disaster/#comments</comments>
		<pubDate>Thu, 10 Jul 2008 13:44:15 +0000</pubDate>
		<dc:creator>plattapuss</dc:creator>
				<category><![CDATA[How-To]]></category>
		<category><![CDATA[RHEL 5 plain]]></category>
		<category><![CDATA[RHEL and Ensim]]></category>
		<category><![CDATA[hard disk]]></category>
		<category><![CDATA[hard drive]]></category>
		<category><![CDATA[monitoring]]></category>
		<category><![CDATA[prevention]]></category>

		<guid isPermaLink="false">http://www.outofcontrol.ca/?p=143</guid>
		<description><![CDATA[Are you responsibly for one or more servers. Perhaps you have a computer at home that you worry about at night, "What happens if my hard drive fails?" If this is you, then you need SmartMonTools. Actually, it comes pre-installed on most flavours of Linux these days, but amazingly enough, it is not set to [...]]]></description>
			<content:encoded><![CDATA[<p>Are you responsibly for one or more servers. Perhaps you have a computer at home that you worry about at night, "What happens if my hard drive fails?" If this is you, then you need <a href="http://smartmontools.sourceforge.net/">SmartMonTools</a>. Actually, it comes pre-installed on most flavours of Linux these days, but amazingly enough, it is not set to run automatically.</p>
<p>SmartMonTools will monitor your Self Monitoring And Reporting Technology (S.M.A.R.T.) enable hard drives for potential problems which can occur before a hard drive completely files. If properly setup, it will warn you of these potential issues and possibly save your data. Of course you have a proper backup system in case just such a disaster should occur.</p>
<p>I am assuming that SmartMonTools is already installed on your machine, but if not, you can get it here <a href="http://smartmontools.sourceforge.net/">http://smartmontools.sourceforge.net/</a>.</p>
<p>First step is to see if your hard drives are S.M.A.R.T. enabled. You can do this using the smartctl application that comes with SmartMonTools. Here is the output I get when I run 'smartctl -d ata -i /dev/sda'</p>
<div class="igBar"><span id="lcode-21"><a href="#" onclick="javascript:showPlainTxt('code-21'); return false;">PLAIN TEXT</a></span></div>
<div class="syntax_hilite"><span class="langName">CODE:</span>
<div id="code-21">
<div class="code">
<ol>
<li style="font-family: 'Courier New', Courier, monospace; color: black; font-weight: normal; font-style: normal;color:#3A6A8B;">
<div style="font-family: 'Courier New', Courier, monospace; font-weight: normal;"># smartctl -d ata -i /dev/sda</div>
</li>
<li style="font-weight: bold;color:#26536A;">
<div style="font-family: 'Courier New', Courier, monospace; font-weight: normal;">smartctl version <span style="color:#800000;color:#800000;">5</span>.<span style="color:#800000;color:#800000;">36</span> <span style="color:#006600; font-weight:bold;">&#91;</span>i686-redhat-linux-gnu<span style="color:#006600; font-weight:bold;">&#93;</span> Copyright <span style="color:#006600; font-weight:bold;">&#40;</span>C<span style="color:#006600; font-weight:bold;">&#41;</span> <span style="color:#800000;color:#800000;">2002</span>-<span style="color:#800000;color:#800000;">6</span> Bruce Allen</div>
</li>
<li style="font-family: 'Courier New', Courier, monospace; color: black; font-weight: normal; font-style: normal;color:#3A6A8B;">
<div style="font-family: 'Courier New', Courier, monospace; font-weight: normal;">Home page is http:<span style="color:#FF9933; font-style:italic;">//smartmontools.sourceforge.net/</span></div>
</li>
<li style="font-weight: bold;color:#26536A;">
<div style="font-family: 'Courier New', Courier, monospace; font-weight: normal;">&nbsp;</div>
</li>
<li style="font-family: 'Courier New', Courier, monospace; color: black; font-weight: normal; font-style: normal;color:#3A6A8B;">
<div style="font-family: 'Courier New', Courier, monospace; font-weight: normal;">=== START OF INFORMATION SECTION ===</div>
</li>
<li style="font-weight: bold;color:#26536A;">
<div style="font-family: 'Courier New', Courier, monospace; font-weight: normal;">Device Model:&nbsp; &nbsp; &nbsp;ST3500630AS</div>
</li>
<li style="font-family: 'Courier New', Courier, monospace; color: black; font-weight: normal; font-style: normal;color:#3A6A8B;">
<div style="font-family: 'Courier New', Courier, monospace; font-weight: normal;">Serial Number:&nbsp; &nbsp; 3QG02JST</div>
</li>
<li style="font-weight: bold;color:#26536A;">
<div style="font-family: 'Courier New', Courier, monospace; font-weight: normal;">Firmware Version: <span style="color:#800000;color:#800000;">3</span>.<span style="">AAC</span></div>
</li>
<li style="font-family: 'Courier New', Courier, monospace; color: black; font-weight: normal; font-style: normal;color:#3A6A8B;">
<div style="font-family: 'Courier New', Courier, monospace; font-weight: normal;">User Capacity:&nbsp; &nbsp; <span style="color:#800000;color:#800000;">500</span>,<span style="color:#800000;color:#800000;">107</span>,<span style="color:#800000;color:#800000;">862</span>,<span style="color:#800000;color:#800000;">016</span> bytes</div>
</li>
<li style="font-weight: bold;color:#26536A;">
<div style="font-family: 'Courier New', Courier, monospace; font-weight: normal;">Device is:&nbsp; &nbsp; &nbsp; &nbsp; Not in smartctl database <span style="color:#006600; font-weight:bold;">&#91;</span>for details use: -P showall<span style="color:#006600; font-weight:bold;">&#93;</span></div>
</li>
<li style="font-family: 'Courier New', Courier, monospace; color: black; font-weight: normal; font-style: normal;color:#3A6A8B;">
<div style="font-family: 'Courier New', Courier, monospace; font-weight: normal;">ATA Version is:&nbsp; &nbsp;<span style="color:#800000;color:#800000;">7</span></div>
</li>
<li style="font-weight: bold;color:#26536A;">
<div style="font-family: 'Courier New', Courier, monospace; font-weight: normal;">ATA Standard is:&nbsp; Exact ATA specification draft version not indicated</div>
</li>
<li style="font-family: 'Courier New', Courier, monospace; color: black; font-weight: normal; font-style: normal;color:#3A6A8B;">
<div style="font-family: 'Courier New', Courier, monospace; font-weight: normal;">Local Time is:&nbsp; &nbsp; Thu Jul <span style="color:#800000;color:#800000;">10</span> <span style="color:#800000;color:#800000;">05</span>:<span style="color:#800000;color:#800000;">18</span>:<span style="color:#800000;color:#800000;">47</span> <span style="color:#800000;color:#800000;">2008</span> PDT</div>
</li>
<li style="font-weight: bold;color:#26536A;">
<div style="font-family: 'Courier New', Courier, monospace; font-weight: normal;">SMART support is: Available - device has SMART capability.</div>
</li>
<li style="font-family: 'Courier New', Courier, monospace; color: black; font-weight: normal; font-style: normal;color:#3A6A8B;">
<div style="font-family: 'Courier New', Courier, monospace; font-weight: normal;"><span style="">SMART</span> support is: Enabled </div>
</li>
</ol>
</div>
</div>
</div>
<p></p>
<p>Those last two lines are what we are looking for. This drive is SMART enabled, so we are good to go. A couple of comments about the command I issued. If you want more information about your hard drive, try using the -a flag, which will show a lot about your hard drive. The '-d ata' flag was required for me to tell smartctl that I am going to check an ata drive. You may not require the -d flag.</p>
<p>The next step is to modify the /etc/smartd.conf file. Using your favourite editor, open up /etc/smartd.conf. The first thing you will do is remove the first line of the file. This line tells smartd that you have modified the file and not to over-write it. If you don't have a smartd.conf file, then you can auto-generate the first version simply by starting and stopping smartd with /etc/init.d/smartd start and then /etc/init.d/smartd stop. </p>
<p>Modify the conf file so that our drives will be monitored regularly. Here is my conf file:</p>
<div class="igBar"><span id="lcode-22"><a href="#" onclick="javascript:showPlainTxt('code-22'); return false;">PLAIN TEXT</a></span></div>
<div class="syntax_hilite"><span class="langName">CODE:</span>
<div id="code-22">
<div class="code">
<ol>
<li style="font-family: 'Courier New', Courier, monospace; color: black; font-weight: normal; font-style: normal;color:#3A6A8B;">
<div style="font-family: 'Courier New', Courier, monospace; font-weight: normal;"># Remove the line above if you have edited the file and you do not want</div>
</li>
<li style="font-weight: bold;color:#26536A;">
<div style="font-family: 'Courier New', Courier, monospace; font-weight: normal;"># it to be overwritten on the next smartd startup.</div>
</li>
<li style="font-family: 'Courier New', Courier, monospace; color: black; font-weight: normal; font-style: normal;color:#3A6A8B;">
<div style="font-family: 'Courier New', Courier, monospace; font-weight: normal;">&lt;SNIP&gt;</div>
</li>
<li style="font-weight: bold;color:#26536A;">
<div style="font-family: 'Courier New', Courier, monospace; font-weight: normal;">/dev/sda -d ata -H -m me@mydomain.<span style="">ca</span> -M test</div>
</li>
<li style="font-family: 'Courier New', Courier, monospace; color: black; font-weight: normal; font-style: normal;color:#3A6A8B;">
<div style="font-family: 'Courier New', Courier, monospace; font-weight: normal;">/dev/sdb -d ata -H -m me@ mydomain.<span style="">ca</span> -M test</div>
</li>
<li style="font-weight: bold;color:#26536A;">
<div style="font-family: 'Courier New', Courier, monospace; font-weight: normal;">&lt;SNIP&gt; </div>
</li>
</ol>
</div>
</div>
</div>
<p></p>
<p>First off, you will see that I defined the '-d ata' device flag. The -H flag is telling smartd to monitor the Health of the drive. -m  is telling smartd to mail someone, in this case me, of any issues. The '-M test' flag can only be used in conjunction with the -m flag and in this case is telling smartd to send a test email to me on start up. I have added the -M flag as I want to be sure that smartd is really working and can email me. </p>
<p>At the bottom of this post is a <a href="#flags">partial list of flags</a> that you can use with smartd.</p>
<p>If we try to start smartd right now, you will most likely be disappointed as nothing will happen. We first need to force smartd to see our drives by registering our hard drives with smartd. We can do this by running a quick CLI command for each drive:</p>
<div class="igBar"><span id="lcode-23"><a href="#" onclick="javascript:showPlainTxt('code-23'); return false;">PLAIN TEXT</a></span></div>
<div class="syntax_hilite"><span class="langName">CODE:</span>
<div id="code-23">
<div class="code">
<ol>
<li style="font-family: 'Courier New', Courier, monospace; color: black; font-weight: normal; font-style: normal;color:#3A6A8B;">
<div style="font-family: 'Courier New', Courier, monospace; font-weight: normal;">echo /dev/sda -d ata -m me@mydomain.<span style="">ca</span> -M test | smartd&nbsp; -c - -q onecheck </div>
</li>
</ol>
</div>
</div>
</div>
<p></p>
<p>We are piping a string of commands to smartd. The commands should look familiar to you, so I won't go over them again. The flags for smartd in this example are a little different, so lets go over those now. The -c flag is telling smartd to use a specific configuration file. The next single dash, when used with the smartd -c flag, is telling smartd to not use any configuration file, but rather, just accept commands piped in.  The -q flag is telling smartd when it should quit. In this case, we are telling smartd to register our drive, run one check on the drive, and then quit. This command line serves two purposes, it registers the device, then verifies that an email can be sent out. </p>
<p>Here is what I get when I run this command:</p>
<div class="igBar"><span id="lcode-24"><a href="#" onclick="javascript:showPlainTxt('code-24'); return false;">PLAIN TEXT</a></span></div>
<div class="syntax_hilite"><span class="langName">CODE:</span>
<div id="code-24">
<div class="code">
<ol>
<li style="font-family: 'Courier New', Courier, monospace; color: black; font-weight: normal; font-style: normal;color:#3A6A8B;">
<div style="font-family: 'Courier New', Courier, monospace; font-weight: normal;">echo /dev/sda -d ata -m me@mydomain.<span style="">ca</span> -M test | smartd&nbsp; -c - -q onecheck</div>
</li>
<li style="font-weight: bold;color:#26536A;">
<div style="font-family: 'Courier New', Courier, monospace; font-weight: normal;">smartd version <span style="color:#800000;color:#800000;">5</span>.<span style="color:#800000;color:#800000;">36</span> <span style="color:#006600; font-weight:bold;">&#91;</span>i686-redhat-linux-gnu<span style="color:#006600; font-weight:bold;">&#93;</span> Copyright <span style="color:#006600; font-weight:bold;">&#40;</span>C<span style="color:#006600; font-weight:bold;">&#41;</span> <span style="color:#800000;color:#800000;">2002</span>-<span style="color:#800000;color:#800000;">6</span> Bruce Allen</div>
</li>
<li style="font-family: 'Courier New', Courier, monospace; color: black; font-weight: normal; font-style: normal;color:#3A6A8B;">
<div style="font-family: 'Courier New', Courier, monospace; font-weight: normal;">Home page is http:<span style="color:#FF9933; font-style:italic;">//smartmontools.sourceforge.net/</span></div>
</li>
<li style="font-weight: bold;color:#26536A;">
<div style="font-family: 'Courier New', Courier, monospace; font-weight: normal;">&nbsp;</div>
</li>
<li style="font-family: 'Courier New', Courier, monospace; color: black; font-weight: normal; font-style: normal;color:#3A6A8B;">
<div style="font-family: 'Courier New', Courier, monospace; font-weight: normal;">Opened configuration file &lt;stdin&gt;</div>
</li>
<li style="font-weight: bold;color:#26536A;">
<div style="font-family: 'Courier New', Courier, monospace; font-weight: normal;">Drive: /dev/sda, implied <span style="color:#CC0000;">'-a'</span> Directive on line <span style="color:#800000;color:#800000;">1</span> of file &lt;stdin&gt;</div>
</li>
<li style="font-family: 'Courier New', Courier, monospace; color: black; font-weight: normal; font-style: normal;color:#3A6A8B;">
<div style="font-family: 'Courier New', Courier, monospace; font-weight: normal;">Configuration file &lt;stdin&gt; parsed.</div>
</li>
<li style="font-weight: bold;color:#26536A;">
<div style="font-family: 'Courier New', Courier, monospace; font-weight: normal;"><span style="">Device</span>: /dev/sda, opened</div>
</li>
<li style="font-family: 'Courier New', Courier, monospace; color: black; font-weight: normal; font-style: normal;color:#3A6A8B;">
<div style="font-family: 'Courier New', Courier, monospace; font-weight: normal;">Device: /dev/sda, not found in smartd database.</div>
</li>
<li style="font-weight: bold;color:#26536A;">
<div style="font-family: 'Courier New', Courier, monospace; font-weight: normal;"><span style="">Device</span>: /dev/sda, is SMART capable. <span style="">Adding</span> to <span style="color:#CC0000;">"monitor"</span> list.</div>
</li>
<li style="font-family: 'Courier New', Courier, monospace; color: black; font-weight: normal; font-style: normal;color:#3A6A8B;">
<div style="font-family: 'Courier New', Courier, monospace; font-weight: normal;"><span style="">Monitoring</span> <span style="color:#800000;color:#800000;">1</span> ATA and <span style="color:#800000;color:#800000;">0</span> SCSI devices</div>
</li>
<li style="font-weight: bold;color:#26536A;">
<div style="font-family: 'Courier New', Courier, monospace; font-weight: normal;">Executing test of mail to me@mydomain.<span style="">ca</span> ...</div>
</li>
<li style="font-family: 'Courier New', Courier, monospace; color: black; font-weight: normal; font-style: normal;color:#3A6A8B;">
<div style="font-family: 'Courier New', Courier, monospace; font-weight: normal;"><span style="">Test</span> of mail to me@mydomain.<span style="">ca</span>: successful</div>
</li>
<li style="font-weight: bold;color:#26536A;">
<div style="font-family: 'Courier New', Courier, monospace; font-weight: normal;">Started with <span style="color:#CC0000;">'-q onecheck'</span> option. <span style="">All</span> devices sucessfully checked once.</div>
</li>
<li style="font-family: 'Courier New', Courier, monospace; color: black; font-weight: normal; font-style: normal;color:#3A6A8B;">
<div style="font-family: 'Courier New', Courier, monospace; font-weight: normal;"><span style="">smartd</span> is exiting <span style="color:#006600; font-weight:bold;">&#40;</span>exit status <span style="color:#800000;color:#800000;">0</span><span style="color:#006600; font-weight:bold;">&#41;</span> </div>
</li>
</ol>
</div>
</div>
</div>
<p></p>
<p>The important line here is:</p>
<div class="igBar"><span id="lcode-25"><a href="#" onclick="javascript:showPlainTxt('code-25'); return false;">PLAIN TEXT</a></span></div>
<div class="syntax_hilite"><span class="langName">CODE:</span>
<div id="code-25">
<div class="code">
<ol>
<li style="font-family: 'Courier New', Courier, monospace; color: black; font-weight: normal; font-style: normal;color:#3A6A8B;">
<div style="font-family: 'Courier New', Courier, monospace; font-weight: normal;">Device: /dev/sda, is SMART capable. <span style="">Adding</span> to <span style="color:#CC0000;">"monitor"</span> list. </div>
</li>
</ol>
</div>
</div>
</div>
<p></p>
<p>We have now registered /dev/sda with smartd, and smartd will now monitor this device. In my inbox I got this email:</p>
<div class="igBar"><span id="lcode-26"><a href="#" onclick="javascript:showPlainTxt('code-26'); return false;">PLAIN TEXT</a></span></div>
<div class="syntax_hilite"><span class="langName">CODE:</span>
<div id="code-26">
<div class="code">
<ol>
<li style="font-family: 'Courier New', Courier, monospace; color: black; font-weight: normal; font-style: normal;color:#3A6A8B;">
<div style="font-family: 'Courier New', Courier, monospace; font-weight: normal;">This email was generated by the smartd daemon running on:</div>
</li>
<li style="font-weight: bold;color:#26536A;">
<div style="font-family: 'Courier New', Courier, monospace; font-weight: normal;">&nbsp;</div>
</li>
<li style="font-family: 'Courier New', Courier, monospace; color: black; font-weight: normal; font-style: normal;color:#3A6A8B;">
<div style="font-family: 'Courier New', Courier, monospace; font-weight: normal;">&nbsp; host name: server.<span style="">mydomain</span>.<span style="">ca</span></div>
</li>
<li style="font-weight: bold;color:#26536A;">
<div style="font-family: 'Courier New', Courier, monospace; font-weight: normal;">&nbsp;DNS domain: mydomain.<span style="">ca</span></div>
</li>
<li style="font-family: 'Courier New', Courier, monospace; color: black; font-weight: normal; font-style: normal;color:#3A6A8B;">
<div style="font-family: 'Courier New', Courier, monospace; font-weight: normal;">&nbsp;NIS domain: <span style="color:#006600; font-weight:bold;">&#40;</span>none<span style="color:#006600; font-weight:bold;">&#41;</span></div>
</li>
<li style="font-weight: bold;color:#26536A;">
<div style="font-family: 'Courier New', Courier, monospace; font-weight: normal;">&nbsp;</div>
</li>
<li style="font-family: 'Courier New', Courier, monospace; color: black; font-weight: normal; font-style: normal;color:#3A6A8B;">
<div style="font-family: 'Courier New', Courier, monospace; font-weight: normal;">The following warning/error was logged by the smartd daemon:</div>
</li>
<li style="font-weight: bold;color:#26536A;">
<div style="font-family: 'Courier New', Courier, monospace; font-weight: normal;">&nbsp;</div>
</li>
<li style="font-family: 'Courier New', Courier, monospace; color: black; font-weight: normal; font-style: normal;color:#3A6A8B;">
<div style="font-family: 'Courier New', Courier, monospace; font-weight: normal;">TEST EMAIL from smartd for device: /dev/sda</div>
</li>
<li style="font-weight: bold;color:#26536A;">
<div style="font-family: 'Courier New', Courier, monospace; font-weight: normal;">&nbsp;</div>
</li>
<li style="font-family: 'Courier New', Courier, monospace; color: black; font-weight: normal; font-style: normal;color:#3A6A8B;">
<div style="font-family: 'Courier New', Courier, monospace; font-weight: normal;">For details see host<span style="color:#CC0000;">'s SYSLOG (default: /var/log/messages). </span></div>
</li>
</ol>
</div>
</div>
</div>
<p></p>
<p>Once you have successfully run the command for all your devices, you can now fire up smartd with '/etc/init.d/smartd start'. If all went well you should have an email like above in your inbox for each device you set up in the config file. This is telling you that the daemon is running, and can send an email when an issue occurs. The last step is to remove the '-M test' flag from each device your /etc/smartd.conf file. Then restart smartd again with '/etc/init.d/smartd restart'.</p>
<p>Be sure that you have added smartd to your init levels 3, 4 and 5 with this command:</p>
<div class="igBar"><span id="lcode-27"><a href="#" onclick="javascript:showPlainTxt('code-27'); return false;">PLAIN TEXT</a></span></div>
<div class="syntax_hilite"><span class="langName">CODE:</span>
<div id="code-27">
<div class="code">
<ol>
<li style="font-family: 'Courier New', Courier, monospace; color: black; font-weight: normal; font-style: normal;color:#3A6A8B;">
<div style="font-family: 'Courier New', Courier, monospace; font-weight: normal;">chkconfig --level <span style="color:#800000;color:#800000;">345</span> smartd on </div>
</li>
</ol>
</div>
</div>
</div>
<p></p>
<p>That's it for today. Hopefully it will help you sleep better at night.</p>
<p><a name="#flags"></a></p>
<div class="igBar"><span id="lcode-28"><a href="#" onclick="javascript:showPlainTxt('code-28'); return false;">PLAIN TEXT</a></span></div>
<div class="syntax_hilite"><span class="langName">CODE:</span>
<div id="code-28">
<div class="code">
<ol>
<li style="font-family: 'Courier New', Courier, monospace; color: black; font-weight: normal; font-style: normal;color:#3A6A8B;">
<div style="font-family: 'Courier New', Courier, monospace; font-weight: normal;"># HERE IS A LIST OF DIRECTIVES FOR THIS CONFIGURATION FILE</div>
</li>
<li style="font-weight: bold;color:#26536A;">
<div style="font-family: 'Courier New', Courier, monospace; font-weight: normal;">#&nbsp; &nbsp;-d TYPE Set the device type to one of: ata, scsi</div>
</li>
<li style="font-family: 'Courier New', Courier, monospace; color: black; font-weight: normal; font-style: normal;color:#3A6A8B;">
<div style="font-family: 'Courier New', Courier, monospace; font-weight: normal;">#&nbsp; &nbsp;-T TYPE set the tolerance to one of: normal, permissive</div>
</li>
<li style="font-weight: bold;color:#26536A;">
<div style="font-family: 'Courier New', Courier, monospace; font-weight: normal;">#&nbsp; &nbsp;-o VAL&nbsp; Enable/disable automatic offline tests <span style="color:#006600; font-weight:bold;">&#40;</span>on/off<span style="color:#006600; font-weight:bold;">&#41;</span></div>
</li>
<li style="font-family: 'Courier New', Courier, monospace; color: black; font-weight: normal; font-style: normal;color:#3A6A8B;">
<div style="font-family: 'Courier New', Courier, monospace; font-weight: normal;">#&nbsp; &nbsp;-S VAL&nbsp; Enable/disable attribute autosave <span style="color:#006600; font-weight:bold;">&#40;</span>on/off<span style="color:#006600; font-weight:bold;">&#41;</span></div>
</li>
<li style="font-weight: bold;color:#26536A;">
<div style="font-family: 'Courier New', Courier, monospace; font-weight: normal;">#&nbsp; &nbsp;-H&nbsp; &nbsp; &nbsp; Monitor SMART Health Status, report if failed</div>
</li>
<li style="font-family: 'Courier New', Courier, monospace; color: black; font-weight: normal; font-style: normal;color:#3A6A8B;">
<div style="font-family: 'Courier New', Courier, monospace; font-weight: normal;">#&nbsp; &nbsp;-l TYPE Monitor SMART log.&nbsp; <span style="">Type</span> is one of: error, selftest</div>
</li>
<li style="font-weight: bold;color:#26536A;">
<div style="font-family: 'Courier New', Courier, monospace; font-weight: normal;">#&nbsp; &nbsp;-f&nbsp; &nbsp; &nbsp; Monitor for failure of any <span style="color:#CC0000;">'Usage'</span> Attributes</div>
</li>
<li style="font-family: 'Courier New', Courier, monospace; color: black; font-weight: normal; font-style: normal;color:#3A6A8B;">
<div style="font-family: 'Courier New', Courier, monospace; font-weight: normal;">#&nbsp; &nbsp;-m ADD&nbsp; Send warning email to ADD for -H, -l error, -l selftest, and -f</div>
</li>
<li style="font-weight: bold;color:#26536A;">
<div style="font-family: 'Courier New', Courier, monospace; font-weight: normal;">#&nbsp; &nbsp;-M TYPE Modify email warning behavior <span style="color:#006600; font-weight:bold;">&#40;</span>see man page<span style="color:#006600; font-weight:bold;">&#41;</span></div>
</li>
<li style="font-family: 'Courier New', Courier, monospace; color: black; font-weight: normal; font-style: normal;color:#3A6A8B;">
<div style="font-family: 'Courier New', Courier, monospace; font-weight: normal;">#&nbsp; &nbsp;-p&nbsp; &nbsp; &nbsp; Report changes in <span style="color:#CC0000;">'Prefailure'</span> Normalized Attributes</div>
</li>
<li style="font-weight: bold;color:#26536A;">
<div style="font-family: 'Courier New', Courier, monospace; font-weight: normal;">#&nbsp; &nbsp;-u&nbsp; &nbsp; &nbsp; Report changes in <span style="color:#CC0000;">'Usage'</span> Normalized Attributes</div>
</li>
<li style="font-family: 'Courier New', Courier, monospace; color: black; font-weight: normal; font-style: normal;color:#3A6A8B;">
<div style="font-family: 'Courier New', Courier, monospace; font-weight: normal;">#&nbsp; &nbsp;-t&nbsp; &nbsp; &nbsp; Equivalent to -p and -u Directives</div>
</li>
<li style="font-weight: bold;color:#26536A;">
<div style="font-family: 'Courier New', Courier, monospace; font-weight: normal;">#&nbsp; &nbsp;-r ID&nbsp; &nbsp;Also report Raw values of Attribute ID with -p, -u or -t</div>
</li>
<li style="font-family: 'Courier New', Courier, monospace; color: black; font-weight: normal; font-style: normal;color:#3A6A8B;">
<div style="font-family: 'Courier New', Courier, monospace; font-weight: normal;">#&nbsp; &nbsp;-R ID&nbsp; &nbsp;Track changes in Attribute ID Raw value with -p, -u or -t</div>
</li>
<li style="font-weight: bold;color:#26536A;">
<div style="font-family: 'Courier New', Courier, monospace; font-weight: normal;">#&nbsp; &nbsp;-i ID&nbsp; &nbsp;Ignore Attribute ID for -f Directive</div>
</li>
<li style="font-family: 'Courier New', Courier, monospace; color: black; font-weight: normal; font-style: normal;color:#3A6A8B;">
<div style="font-family: 'Courier New', Courier, monospace; font-weight: normal;">#&nbsp; &nbsp;-I ID&nbsp; &nbsp;Ignore Attribute ID for -p, -u or -t Directive</div>
</li>
<li style="font-weight: bold;color:#26536A;">
<div style="font-family: 'Courier New', Courier, monospace; font-weight: normal;">#&nbsp; &nbsp;-v N,ST Modifies labeling of Attribute N <span style="color:#006600; font-weight:bold;">&#40;</span>see man page<span style="color:#006600; font-weight:bold;">&#41;</span></div>
</li>
<li style="font-family: 'Courier New', Courier, monospace; color: black; font-weight: normal; font-style: normal;color:#3A6A8B;">
<div style="font-family: 'Courier New', Courier, monospace; font-weight: normal;">#&nbsp; &nbsp;-a&nbsp; &nbsp; &nbsp; Default: equivalent to -H -f -t -l error -l selftest</div>
</li>
<li style="font-weight: bold;color:#26536A;">
<div style="font-family: 'Courier New', Courier, monospace; font-weight: normal;">#&nbsp; &nbsp;-F TYPE Use firmware bug workaround. <span style="">Type</span> is one of: none, samsung</div>
</li>
<li style="font-family: 'Courier New', Courier, monospace; color: black; font-weight: normal; font-style: normal;color:#3A6A8B;">
<div style="font-family: 'Courier New', Courier, monospace; font-weight: normal;">#&nbsp; &nbsp;-P TYPE Drive-specific presets: use, ignore, show, showall</div>
</li>
<li style="font-weight: bold;color:#26536A;">
<div style="font-family: 'Courier New', Courier, monospace; font-weight: normal;">#&nbsp; &nbsp; #&nbsp; &nbsp; &nbsp; Comment: text after a hash sign is ignored</div>
</li>
<li style="font-family: 'Courier New', Courier, monospace; color: black; font-weight: normal; font-style: normal;color:#3A6A8B;">
<div style="font-family: 'Courier New', Courier, monospace; font-weight: normal;">#&nbsp; &nbsp; \&nbsp; &nbsp; &nbsp; Line continuation character</div>
</li>
<li style="font-weight: bold;color:#26536A;">
<div style="font-family: 'Courier New', Courier, monospace; font-weight: normal;"># Attribute ID is a decimal integer <span style="color:#800000;color:#800000;">1</span> &lt;= ID &lt;= <span style="color:#800000;color:#800000;">255</span></div>
</li>
<li style="font-family: 'Courier New', Courier, monospace; color: black; font-weight: normal; font-style: normal;color:#3A6A8B;">
<div style="font-family: 'Courier New', Courier, monospace; font-weight: normal;"># All but -d, -m and -M Directives are only implemented for ATA devices </div>
</li>
</ol>
</div>
</div>
</div>
<p></p>
]]></content:encoded>
			<wfw:commentRss>http://www.outofcontrol.ca/2008/07/10/use-smartd-smartmontools-to-prevent-a-disaster/feed/</wfw:commentRss>
		<slash:comments>1</slash:comments>
		</item>
		<item>
		<title>Fixing Linux pam.d issue &#8211; Deprecated pam_stack module</title>
		<link>http://www.outofcontrol.ca/2008/06/17/fixing-linux-pamd-issue-deprecated-pam_stack-module/</link>
		<comments>http://www.outofcontrol.ca/2008/06/17/fixing-linux-pamd-issue-deprecated-pam_stack-module/#comments</comments>
		<pubDate>Tue, 17 Jun 2008 12:21:51 +0000</pubDate>
		<dc:creator>plattapuss</dc:creator>
				<category><![CDATA[How-To]]></category>
		<category><![CDATA[RHEL and Ensim]]></category>
		<category><![CDATA[ensim]]></category>
		<category><![CDATA[linux]]></category>
		<category><![CDATA[pam]]></category>
		<category><![CDATA[rhel]]></category>
		<category><![CDATA[security]]></category>

		<guid isPermaLink="false">http://www.outofcontrol.ca/?p=139</guid>
		<description><![CDATA[This appeared thousands of times in my log: PLAIN TEXT CODE: Deprecated pam_stack module called from service "sshd" Not just for sshd, but also for pop and pop3 and smtp. Searching Google for a bit I came across this fix: Change the lines like this: PLAIN TEXT CODE: auth&#160; &#160; required&#160; &#160; &#160;pam_stack.so service=system-auth to [...]]]></description>
			<content:encoded><![CDATA[<p>This appeared thousands of times in my log:</p>
<div class="igBar"><span id="lcode-34"><a href="#" onclick="javascript:showPlainTxt('code-34'); return false;">PLAIN TEXT</a></span></div>
<div class="syntax_hilite"><span class="langName">CODE:</span>
<div id="code-34">
<div class="code">
<ol>
<li style="font-family: 'Courier New', Courier, monospace; color: black; font-weight: normal; font-style: normal;color:#3A6A8B;">
<div style="font-family: 'Courier New', Courier, monospace; font-weight: normal;">Deprecated pam_stack module called from service <span style="color:#CC0000;">"sshd"</span> </div>
</li>
</ol>
</div>
</div>
</div>
<p></p>
<p>Not just for sshd, but also for pop and pop3 and smtp. Searching Google for a bit I came across this fix:</p>
<p>Change the lines like this:</p>
<div class="igBar"><span id="lcode-35"><a href="#" onclick="javascript:showPlainTxt('code-35'); return false;">PLAIN TEXT</a></span></div>
<div class="syntax_hilite"><span class="langName">CODE:</span>
<div id="code-35">
<div class="code">
<ol>
<li style="font-family: 'Courier New', Courier, monospace; color: black; font-weight: normal; font-style: normal;color:#3A6A8B;">
<div style="font-family: 'Courier New', Courier, monospace; font-weight: normal;">auth&nbsp; &nbsp; required&nbsp; &nbsp; &nbsp;pam_stack.<span style="">so</span> service=system-auth </div>
</li>
</ol>
</div>
</div>
</div>
<p>
to this:</p>
<div class="igBar"><span id="lcode-36"><a href="#" onclick="javascript:showPlainTxt('code-36'); return false;">PLAIN TEXT</a></span></div>
<div class="syntax_hilite"><span class="langName">CODE:</span>
<div id="code-36">
<div class="code">
<ol>
<li style="font-family: 'Courier New', Courier, monospace; color: black; font-weight: normal; font-style: normal;color:#3A6A8B;">
<div style="font-family: 'Courier New', Courier, monospace; font-weight: normal;">auth&nbsp; &nbsp; &nbsp; &nbsp;include&nbsp; &nbsp; &nbsp; system-auth </div>
</li>
</ol>
</div>
</div>
</div>
<p></p>
<p><del datetime="2008-06-17T14:23:53+00:00">Do not change the lines that start with 'account', only the auth lines. </del> <b>You need to remove all occurances of pam_stack.so. Please see below for a more definitive guide and a link to the complete upgrade guide.</b> Change these in each file that contains the bad line in these places:</p>
<div class="igBar"><span id="lcode-37"><a href="#" onclick="javascript:showPlainTxt('code-37'); return false;">PLAIN TEXT</a></span></div>
<div class="syntax_hilite"><span class="langName">CODE:</span>
<div id="code-37">
<div class="code">
<ol>
<li style="font-family: 'Courier New', Courier, monospace; color: black; font-weight: normal; font-style: normal;color:#3A6A8B;">
<div style="font-family: 'Courier New', Courier, monospace; font-weight: normal;">/etc/pam.<span style="">d</span>/</div>
</li>
<li style="font-weight: bold;color:#26536A;">
<div style="font-family: 'Courier New', Courier, monospace; font-weight: normal;">/home/virtual/site*/fst/etc/pam.<span style="">d</span> </div>
</li>
</ol>
</div>
</div>
</div>
<p></p>
<p>To quickly find the files that need changing you can issue these commands:</p>
<div class="igBar"><span id="lcode-38"><a href="#" onclick="javascript:showPlainTxt('code-38'); return false;">PLAIN TEXT</a></span></div>
<div class="syntax_hilite"><span class="langName">CODE:</span>
<div id="code-38">
<div class="code">
<ol>
<li style="font-family: 'Courier New', Courier, monospace; color: black; font-weight: normal; font-style: normal;color:#3A6A8B;">
<div style="font-family: 'Courier New', Courier, monospace; font-weight: normal;">grep -l pam_stack.<span style="">so</span> /etc/pam.<span style="">d</span><span style="color:#008000;">/*</span></div>
</li>
<li style="font-weight: bold;color:#26536A;">
<div style="font-family: 'Courier New', Courier, monospace; font-weight: normal;"><span style="color:#008000;">grep -l pam_stack.so /home/virtual/site*/</span>fst/etc/pam.<span style="">d</span><span style="color:#008000;">/* </span></div>
</li>
</ol>
</div>
</div>
</div>
<p></p>
<p><del datetime="2008-06-17T14:23:53+00:00">The original solution can be <a href="http://forum.ensim.com/archive/index.php?t-18822.html">found here</a>.</del></p>
<p>From the upgrade guide below:</p>
<blockquote><p><b>Important</b>: There are four facilities in PAM configuration: auth, account, password and session. You need to update the configuration files for all of them, not just auth.<br />
Please note that you might also need to reorder the calls when making this change, as sometimes modules like pam_nologin were listed after pam_stack, even though they now need to be listed before the include directive.</p></blockquote>
<p>The <a href="http://www.gentoo.org/proj/en/base/pam/upgrade-0.99.xml">original how to can be found here</a>. My apologies for the link above, as it does have the fix, but offers no explanation or how-to for this patching.</p>
<p>Related errors:<br />
Deprecated pam_stack module called from service "pop"<br />
Deprecated pam_stack module called from service "sshd"<br />
Deprecated pam_stack module called from service "smtp"<br />
Deprecated pam_stack module called from service "imap"</p>
]]></content:encoded>
			<wfw:commentRss>http://www.outofcontrol.ca/2008/06/17/fixing-linux-pamd-issue-deprecated-pam_stack-module/feed/</wfw:commentRss>
		<slash:comments>1</slash:comments>
		</item>
		<item>
		<title>Moving Subversion to RHEL5</title>
		<link>http://www.outofcontrol.ca/2008/04/09/moving-subversion-to-rhel5/</link>
		<comments>http://www.outofcontrol.ca/2008/04/09/moving-subversion-to-rhel5/#comments</comments>
		<pubDate>Wed, 09 Apr 2008 23:17:34 +0000</pubDate>
		<dc:creator>plattapuss</dc:creator>
				<category><![CDATA[Apache]]></category>
		<category><![CDATA[How-To]]></category>
		<category><![CDATA[RHEL and Ensim]]></category>
		<category><![CDATA[rhel5]]></category>
		<category><![CDATA[subversion]]></category>
		<category><![CDATA[sudoers]]></category>
		<category><![CDATA[svn]]></category>

		<guid isPermaLink="false">http://www.outofcontrol.ca/?p=126</guid>
		<description><![CDATA[This week we had to resolve an issue with Subversion on RHEL5. We use post-commit hooks to have external directories get an auto-update from the repository everytime someone check-in a file or update. This all worked fine on RHEL4 using sudoers. On RHEL5 we were getting Authentication failures each time we tried. Turns out that [...]]]></description>
			<content:encoded><![CDATA[<p>This week we had to resolve an issue with Subversion on RHEL5. We use post-commit hooks to have external directories get an auto-update from the repository everytime someone check-in a file or update. This all worked fine on RHEL4 using sudoers. On RHEL5 we were getting Authentication failures each time we tried.</p>
<p>Turns out that RHEL5 has the /etc/sudoers file heavily modified with lots of yummy security goodness. A possible solution to this dilemma is to remove the line in the new sudoers marked Default reset_env. What this is does, is reload the environment variables to their default level. Subversion though, according to the official documents, performs the post-commit hooks using an empty environment. The best we could figure out was that sudoers tries to reload the environment variables just before the post-commit hook is run, and causes authentication to crap out. As soon as we commented out the default reset_env line in /etc/sudoers, our auto updates from SVN worked again! </p>
<p>Took a couple of hours to narrow it down to that problem, but we did sort it out in the end. Hope this helps someone else.</p>
]]></content:encoded>
			<wfw:commentRss>http://www.outofcontrol.ca/2008/04/09/moving-subversion-to-rhel5/feed/</wfw:commentRss>
		<slash:comments>0</slash:comments>
		</item>
		<item>
		<title>Getting Ensim sendmail to listen on an alternate port</title>
		<link>http://www.outofcontrol.ca/2008/03/29/getting-ensim-sendmail-to-listen-on-an-alternate-port/</link>
		<comments>http://www.outofcontrol.ca/2008/03/29/getting-ensim-sendmail-to-listen-on-an-alternate-port/#comments</comments>
		<pubDate>Sat, 29 Mar 2008 19:27:23 +0000</pubDate>
		<dc:creator>plattapuss</dc:creator>
				<category><![CDATA[How-To]]></category>
		<category><![CDATA[RHEL and Ensim]]></category>
		<category><![CDATA[Servers]]></category>

		<guid isPermaLink="false">http://www.outofcontrol.ca/2008/03/29/getting-ensim-sendmail-to-listen-on-an-alternate-port/</guid>
		<description><![CDATA[Updated: March 30th 2008 Setup a new server today! This time, instead of using port 465 and setting up the SSL certs etc, I wanted something a little easier to use. So, according to RFC 2476 at this link, I can use port 587. On our Ensim 10.3 box which runs on RHEL 5, this [...]]]></description>
			<content:encoded><![CDATA[<p><a href="#march30"><i>Updated: March 30th 2008</i></a></p>
<p>Setup a new server today! This time, instead of using port 465 and setting up the SSL certs etc, I wanted something a little easier to use. So, according to <a href="http://www.apps.ietf.org/rfc/rfc2476.html#sec-3.1">RFC 2476 at this link</a>, I can use port 587.</p>
<p>On our Ensim 10.3 box which runs on RHEL 5, this is an easy change to make. Note this should work equally well on RHEL4 and Ensim 4.0.x and Ensim 4.1.x.</p>
<p>As usual, lets modify the sendmail.mc file and NOT try to modify sendmail.cf, as a lot of others suggest. Modifying sendmail.cf will cause your changes to be lost next time you upgrade Ensim. </p>
<div class="igBar"><span id="lcode-47"><a href="#" onclick="javascript:showPlainTxt('code-47'); return false;">PLAIN TEXT</a></span></div>
<div class="syntax_hilite"><span class="langName">CODE:</span>
<div id="code-47">
<div class="code">
<ol>
<li style="font-family: 'Courier New', Courier, monospace; color: black; font-weight: normal; font-style: normal;color:#3A6A8B;">
<div style="font-family: 'Courier New', Courier, monospace; font-weight: normal;">cd /usr/lib/opcenter/sendmail/install</div>
</li>
<li style="font-weight: bold;color:#26536A;">
<div style="font-family: 'Courier New', Courier, monospace; font-weight: normal;">cp sendmail.<span style="">mc</span> sendmail.<span style="">mc</span>.<span style="">GOOD</span> # Always make a backup before proceeding!</div>
</li>
<li style="font-family: 'Courier New', Courier, monospace; color: black; font-weight: normal; font-style: normal;color:#3A6A8B;">
<div style="font-family: 'Courier New', Courier, monospace; font-weight: normal;">pico -w sendmail.<span style="">mc</span> # Or us vi or whatever your favourite editor is. </div>
</li>
</ol>
</div>
</div>
</div>
<p></p>
<p>Next, you will scroll down until you find this line:</p>
<div class="igBar"><span id="lcode-48"><a href="#" onclick="javascript:showPlainTxt('code-48'); return false;">PLAIN TEXT</a></span></div>
<div class="syntax_hilite"><span class="langName">CODE:</span>
<div id="code-48">
<div class="code">
<ol>
<li style="font-family: 'Courier New', Courier, monospace; color: black; font-weight: normal; font-style: normal;color:#3A6A8B;">
<div style="font-family: 'Courier New', Courier, monospace; font-weight: normal;">dnl DAEMON_OPTIONS<span style="color:#006600; font-weight:bold;">&#40;</span>`Port=smtp,Addr=<span style="color:#800000;color:#800000;">127</span>.<span style="color:#800000;color:#800000;">0</span>.<span style="color:#800000;color:#800000;">0</span>.<span style="color:#800000;color:#800000;">1</span>, Name=MTA<span style="color:#CC0000;">')dnl </span></div>
</li>
</ol>
</div>
</div>
</div>
<p></p>
<p>and immediately below it, add this line:</p>
<div class="igBar"><span id="lcode-49"><a href="#" onclick="javascript:showPlainTxt('code-49'); return false;">PLAIN TEXT</a></span></div>
<div class="syntax_hilite"><span class="langName">CODE:</span>
<div id="code-49">
<div class="code">
<ol>
<li style="font-family: 'Courier New', Courier, monospace; color: black; font-weight: normal; font-style: normal;color:#3A6A8B;">
<div style="font-family: 'Courier New', Courier, monospace; font-weight: normal;">DAEMON_OPTIONS<span style="color:#006600; font-weight:bold;">&#40;</span>`Port=<span style="color:#800000;color:#800000;">587</span>,Name=MTA<span style="color:#CC0000;">')dnl </span></div>
</li>
</ol>
</div>
</div>
</div>
<p></p>
<p>A couple of things here worth mentioning. You don't have to use port 587, you can use pretty much any available port you want. If you wish to RFC compliant however, then port 587 is the right port to use as an alternative sendmail port.  Also, for those of us not familiar with the sendmail.mc file, the dnl in front of the line, basically comments the line out. To uncomment the line, simply move the dnl to the end of the line. </p>
<p>Don't uncomment that first DAEMON_OPTIONS line unless you want to block every one on the internet from being able to send email from your server. Uncommenting that line essentially tells the server to listen to port 25 (SMTP) on the localhost (127.0.0.1) only, and ignore all other IP's address (the world!). </p>
<p>Alright, so by now you have made the changes above and are ready to get sendmail.cf updated.</p>
<div class="igBar"><span id="lcode-50"><a href="#" onclick="javascript:showPlainTxt('code-50'); return false;">PLAIN TEXT</a></span></div>
<div class="syntax_hilite"><span class="langName">CODE:</span>
<div id="code-50">
<div class="code">
<ol>
<li style="font-family: 'Courier New', Courier, monospace; color: black; font-weight: normal; font-style: normal;color:#3A6A8B;">
<div style="font-family: 'Courier New', Courier, monospace; font-weight: normal;">cp /etc/mail/sendmail.<span style="">cf</span> /etc/mail/sendmail.<span style="">cf</span>.<span style="">GOOD</span> # Remember, always make a backup!</div>
</li>
<li style="font-weight: bold;color:#26536A;">
<div style="font-family: 'Courier New', Courier, monospace; font-weight: normal;">m4 sendmail.<span style="">mc</span>&gt; /etc/mail/sendmail.<span style="">cf</span></div>
</li>
<li style="font-family: 'Courier New', Courier, monospace; color: black; font-weight: normal; font-style: normal;color:#3A6A8B;">
<div style="font-family: 'Courier New', Courier, monospace; font-weight: normal;">/etc/init.<span style="">d</span>/sendmail restart </div>
</li>
</ol>
</div>
</div>
</div>
<p></p>
<p>If you use a firewall, be sure to unblock port 587! Many people seem to over look this one (myself included!) and struggle trying to figure out why this little fix doesn't work. </p>
<p>If you have comments or suggestions, I would love to hear them on this topic.</p>
<hr />
<a name="march30"></a><br />
<i>Update: March 30th 2008</i><br />
Some people have discovered that turning on this feature causes email to stop sending email out from the server with the following error:</p>
<div class="igBar"><span id="lcode-51"><a href="#" onclick="javascript:showPlainTxt('code-51'); return false;">PLAIN TEXT</a></span></div>
<div class="syntax_hilite"><span class="langName">CODE:</span>
<div id="code-51">
<div class="code">
<ol>
<li style="font-family: 'Courier New', Courier, monospace; color: black; font-weight: normal; font-style: normal;color:#3A6A8B;">
<div style="font-family: 'Courier New', Courier, monospace; font-weight: normal;">stat=Deferred: Connection refused by <span style="color:#006600; font-weight:bold;">&#91;</span><span style="color:#800000;color:#800000;">127</span>.<span style="color:#800000;color:#800000;">0</span>.<span style="color:#800000;color:#800000;">0</span>.<span style="color:#800000;color:#800000;">1</span><span style="color:#006600; font-weight:bold;">&#93;</span> </div>
</li>
</ol>
</div>
</div>
</div>
<p></p>
<p>This can be resolved by add this code immediately before this line DAEMON_OPTIONS(`Port=587,Name=MTA')dnl:</p>
<div class="igBar"><span id="lcode-52"><a href="#" onclick="javascript:showPlainTxt('code-52'); return false;">PLAIN TEXT</a></span></div>
<div class="syntax_hilite"><span class="langName">CODE:</span>
<div id="code-52">
<div class="code">
<ol>
<li style="font-family: 'Courier New', Courier, monospace; color: black; font-weight: normal; font-style: normal;color:#3A6A8B;">
<div style="font-family: 'Courier New', Courier, monospace; font-weight: normal;">DAEMON_OPTIONS<span style="color:#006600; font-weight:bold;">&#40;</span>`Port=smtp,Addr=<span style="color:#800000;color:#800000;">0</span>.<span style="color:#800000;color:#800000;">0</span>.<span style="color:#800000;color:#800000;">0</span>.<span style="color:#800000;color:#800000;">0</span>, Name=MTA<span style="color:#CC0000;">')dnl </span></div>
</li>
</ol>
</div>
</div>
</div>
<p></p>
<p>Further more, I noticed that sendmail now has the 587 line already in the sendmail.mc file, but it is simply commented out. So instead of all of the above, you can look for this line:</p>
<div class="igBar"><span id="lcode-53"><a href="#" onclick="javascript:showPlainTxt('code-53'); return false;">PLAIN TEXT</a></span></div>
<div class="syntax_hilite"><span class="langName">CODE:</span>
<div id="code-53">
<div class="code">
<ol>
<li style="font-family: 'Courier New', Courier, monospace; color: black; font-weight: normal; font-style: normal;color:#3A6A8B;">
<div style="font-family: 'Courier New', Courier, monospace; font-weight: normal;">dnl DAEMON_OPTIONS<span style="color:#006600; font-weight:bold;">&#40;</span>`Port=submission, Name=MSA, M=Ea<span style="color:#CC0000;">')dnl </span></div>
</li>
</ol>
</div>
</div>
</div>
<p></p>
<p>and replace it for these two line:</p>
<div class="igBar"><span id="lcode-54"><a href="#" onclick="javascript:showPlainTxt('code-54'); return false;">PLAIN TEXT</a></span></div>
<div class="syntax_hilite"><span class="langName">CODE:</span>
<div id="code-54">
<div class="code">
<ol>
<li style="font-family: 'Courier New', Courier, monospace; color: black; font-weight: normal; font-style: normal;color:#3A6A8B;">
<div style="font-family: 'Courier New', Courier, monospace; font-weight: normal;">DAEMON_OPTIONS<span style="color:#006600; font-weight:bold;">&#40;</span>`Port=smtp,Addr=<span style="color:#800000;color:#800000;">0</span>.<span style="color:#800000;color:#800000;">0</span>.<span style="color:#800000;color:#800000;">0</span>.<span style="color:#800000;color:#800000;">0</span>, Name=MTA<span style="color:#CC0000;">')dnl</span></div>
</li>
<li style="font-weight: bold;color:#26536A;">
<div style="font-family: 'Courier New', Courier, monospace; font-weight: normal;"><span style="color:#CC0000;">DAEMON_OPTIONS(`Port=submission, Name=MSA, M=Ea'</span><span style="color:#006600; font-weight:bold;">&#41;</span>dnl </div>
</li>
</ol>
</div>
</div>
</div>
<p></p>
]]></content:encoded>
			<wfw:commentRss>http://www.outofcontrol.ca/2008/03/29/getting-ensim-sendmail-to-listen-on-an-alternate-port/feed/</wfw:commentRss>
		<slash:comments>0</slash:comments>
		</item>
		<item>
		<title>Upgrading Subversion from my own built version to an RPM version</title>
		<link>http://www.outofcontrol.ca/2008/02/08/upgrading-subversion-from-my-own-built-version-to-an-rpm-version/</link>
		<comments>http://www.outofcontrol.ca/2008/02/08/upgrading-subversion-from-my-own-built-version-to-an-rpm-version/#comments</comments>
		<pubDate>Fri, 08 Feb 2008 13:33:36 +0000</pubDate>
		<dc:creator>plattapuss</dc:creator>
				<category><![CDATA[How-To]]></category>
		<category><![CDATA[RHEL and Ensim]]></category>

		<guid isPermaLink="false">http://www.outofcontrol.ca/2008/02/08/upgrading-subversion-from-my-own-built-version-to-an-rpm-version/</guid>
		<description><![CDATA[The other day I had to upgrade Subversion to v1.4.6 on an older server that was running Subversion v1.3.1. Seemingly this would be an easy task and I had done it many times before using Dag.weeirs.com packages. On this machine though, I kept getting conflicts when trying to install the RPM's. Silly me had forgotten [...]]]></description>
			<content:encoded><![CDATA[<p>The other day I had to upgrade <a href="http://subversion.tigris.org">Subversion</a> to v1.4.6 on an older server that was running Subversion v1.3.1. Seemingly this would be an easy task and I had done it many times before using <a href="http://dag.wieers.com/">Dag.weeirs.com</a> packages. On this machine though, I kept getting conflicts when trying to install the RPM's. </p>
<p>Silly me had forgotten that I had compiled my own version of Subversion 1.3.1 way back when and I had compliled my own Trac install, which has since been upgraded to an RPM version also from Dag.weeirs.com. </p>
<p>The solution was simple enough, and I thought I would store it here in case I or anyone else needed the solution at some future point in time.<br />
<span id="more-118"></span><br />
First, if there are any RPM packages that you previously installed, trying doing 'rpm -e packagename' first. This was the case for one conflicting package that I actually had no use of. Second, my main conflict was that my server was using libraries in /usr/local/lib, and it was using my compiled svn and svnadmin from /usr/local/bin. </p>
<p>The fix was three simple steps:</p>
<p>1 - Edit /etc/ld.so.conf and remove the line linking up the libraries in /usr/local/lib. Save the file and reload the libraries with ldconfig.</p>
<p>2 - Delete svn* in /usr/local/bin. This will delete all svn related binaries.</p>
<p>3 - Delete the libraries in /usr/local/lib that were installed. If you are unsure which ones to delete you can always leave them be, as the server won't load them anymore. I however like a clean machine.</p>
<p>Note that if you use other libraries in /usr/local/lib for other applications, you will NOT want to unlink them in ld.conf. Instead, you will need to remove the svn libs, and all the svn-python libs etc in /usr/local/lib manually.</p>
<p>Once these parts were removed, I was easily able to upgrade my server to Subversion 1.4.6 using the RPM's.</p>
]]></content:encoded>
			<wfw:commentRss>http://www.outofcontrol.ca/2008/02/08/upgrading-subversion-from-my-own-built-version-to-an-rpm-version/feed/</wfw:commentRss>
		<slash:comments>0</slash:comments>
		</item>
		<item>
		<title>Listing disk and user quota on RHEL and Ensim</title>
		<link>http://www.outofcontrol.ca/2007/08/25/listing-disk-and-user-quota-on-rhel-and-ensim/</link>
		<comments>http://www.outofcontrol.ca/2007/08/25/listing-disk-and-user-quota-on-rhel-and-ensim/#comments</comments>
		<pubDate>Sat, 25 Aug 2007 12:22:48 +0000</pubDate>
		<dc:creator>plattapuss</dc:creator>
				<category><![CDATA[How-To]]></category>
		<category><![CDATA[RHEL and Ensim]]></category>

		<guid isPermaLink="false">http://www.outofcontrol.ca/2007/08/25/listing-disk-and-user-quota-on-rhel-and-ensim/</guid>
		<description><![CDATA[Today I need to quickly check the disk quota on a few of my clients. Since I keep forgetting what the command is to do this, I felt it worth posting here. Taken from this Redhat page: PLAIN TEXT CODE: repquota &#60;mount -point&#62; On my server I entered 'repquota /' (without the quotes). For more [...]]]></description>
			<content:encoded><![CDATA[<p>Today I need to quickly check the disk quota on a few of my clients. Since I keep forgetting what the command is to do this, I felt it worth posting here.</p>
<p>Taken from <a href="http://www.redhat.com/docs/manuals/linux/RHL-8.0-Manual/admin-primer/s1-storage-quotas.html">this Redhat page</a>:</p>
<div class="igBar"><span id="lcode-56"><a href="#" onclick="javascript:showPlainTxt('code-56'); return false;">PLAIN TEXT</a></span></div>
<div class="syntax_hilite"><span class="langName">CODE:</span>
<div id="code-56">
<div class="code">
<ol>
<li style="font-family: 'Courier New', Courier, monospace; color: black; font-weight: normal; font-style: normal;color:#3A6A8B;">
<div style="font-family: 'Courier New', Courier, monospace; font-weight: normal;">repquota &lt;mount -point&gt; </div>
</li>
</ol>
</div>
</div>
</div>
<p></p>
<p>On my server I entered 'repquota /' (without the quotes).</p>
<p>For more information checkout the redhat page on how to set up and manage user and disk quotas.</mount></p>
]]></content:encoded>
			<wfw:commentRss>http://www.outofcontrol.ca/2007/08/25/listing-disk-and-user-quota-on-rhel-and-ensim/feed/</wfw:commentRss>
		<slash:comments>0</slash:comments>
		</item>
		<item>
		<title>Rebuild Ensim FILESYSTEMTEMPLATE to solve bizarre errors</title>
		<link>http://www.outofcontrol.ca/2007/07/08/rebuild-ensim-filesystemtemplate-to-solve-bizarre-errors/</link>
		<comments>http://www.outofcontrol.ca/2007/07/08/rebuild-ensim-filesystemtemplate-to-solve-bizarre-errors/#comments</comments>
		<pubDate>Sun, 08 Jul 2007 19:15:47 +0000</pubDate>
		<dc:creator>plattapuss</dc:creator>
				<category><![CDATA[How-To]]></category>
		<category><![CDATA[RHEL and Ensim]]></category>

		<guid isPermaLink="false">http://www.outofcontrol.ca/2007/07/08/rebuild-ensim-filesystemtemplate-to-solve-bizarre-errors/</guid>
		<description><![CDATA[A few weeks ago one of my Ensim 4.1.0 RHEL4 servers and have since had endless troubles. My most recent problems involved me not being able to create any new sites on the server, which sort of puts a damper on what my hosting business was supposed to do! After some searching through forums and [...]]]></description>
			<content:encoded><![CDATA[<p>A few weeks ago one of my Ensim 4.1.0 RHEL4 servers and have since had endless troubles. My most recent problems involved me not being able to create any new sites on the server, which sort of puts a damper on what my hosting business was supposed to do!</p>
<p>After some searching through forums and not getting much help or info I found a solution on the Ensim forums. As this solution apparently solved ALL my problems I felt it worth repeating here, with credit where credit is due of course!</p>
<p>My error is just one of many errors that could result from this problem, but here is what my error was:</p>
<div class="igBar"><span id="lcode-64"><a href="#" onclick="javascript:showPlainTxt('code-64'); return false;">PLAIN TEXT</a></span></div>
<div class="syntax_hilite"><span class="langName">CODE:</span>
<div id="code-64">
<div class="code">
<ol>
<li style="font-family: 'Courier New', Courier, monospace; color: black; font-weight: normal; font-style: normal;color:#3A6A8B;">
<div style="font-family: 'Courier New', Courier, monospace; font-weight: normal;">Jul&nbsp; <span style="color:#800000;color:#800000;">6</span> <span style="color:#800000;color:#800000;">14</span>:<span style="color:#800000;color:#800000;">37</span>:<span style="color:#800000;color:#800000;">04</span> server <span style="color:#006600; font-weight:bold;">&#91;</span><span style="color:#800000;color:#800000;">22509</span><span style="color:#006600; font-weight:bold;">&#93;</span>: siteinfo: Enable service failed </div>
</li>
<li style="font-weight: bold;color:#26536A;">
<div style="font-family: 'Courier New', Courier, monospace; font-weight: normal;">Jul&nbsp; <span style="color:#800000;color:#800000;">6</span> <span style="color:#800000;color:#800000;">14</span>:<span style="color:#800000;color:#800000;">37</span>:<span style="color:#800000;color:#800000;">04</span> server <span style="color:#006600; font-weight:bold;">&#91;</span><span style="color:#800000;color:#800000;">22509</span><span style="color:#006600; font-weight:bold;">&#93;</span>:&nbsp; - <span style="color:#006600; font-weight:bold;">&#40;</span>ERROR:&nbsp; &nbsp;05ff000000000005<span style="color:#006600; font-weight:bold;">&#41;</span>: Failed to add administrator group myadmin to domain. <span style="">Error</span> <span style="color:#800000;color:#800000;">127</span>. <span style="">Standard</span> Out: <span style="color:#006600; font-weight:bold;">&#91;</span><span style="color:#006600; font-weight:bold;">&#93;</span> Standard Error: <span style="color:#006600; font-weight:bold;">&#91;</span><span style="color:#CC0000;">'/usr</span></div>
</li>
<li style="font-family: 'Courier New', Courier, monospace; color: black; font-weight: normal; font-style: normal;color:#3A6A8B;">
<div style="font-family: 'Courier New', Courier, monospace; font-weight: normal;"><span style="color:#CC0000;">/sbin/groupadd: U1<span style="color:#000099; font-weight:bold;">\x</span>c9<span style="color:#000099; font-weight:bold;">\x</span>89<span style="color:#000099; font-weight:bold;">\x</span>e5V<span style="color:#000099; font-weight:bold;">\x</span>83<span style="color:#000099; font-weight:bold;">\x</span>ec<span style="color:#000099; font-weight:bold;">\x</span>04<span style="color:#000099; font-weight:bold;">\x</span>8bu<span style="color:#000099; font-weight:bold;">\x</span>08<span style="color:#000099; font-weight:bold;">\x</span>8bV<span style="color:#000099; font-weight:bold;">\x</span>04<span style="color:#000099; font-weight:bold;">\x</span>c7<span style="color:#000099; font-weight:bold;">\x</span>04$<span style="color:#000099; font-weight:bold;">\x</span>fe<span style="color:#000099; font-weight:bold;">\x</span>ff<span style="color:#000099; font-weight:bold;">\x</span>ff<span style="color:#000099; font-weight:bold;">\x</span>ff<span style="color:#000099; font-weight:bold;">\x</span>8b<span style="color:#000099; font-weight:bold;">\x</span>06<span style="color:#000099; font-weight:bold;">\x</span>e8<span style="color:#000099; font-weight:bold;">\x</span>83<span style="color:#000099; font-weight:bold;">\x</span>eb<span style="color:#000099; font-weight:bold;">\x</span>ff<span style="color:#000099; font-weight:bold;">\x</span>ff<span style="color:#000099; font-weight:bold;">\x</span>89F<span style="color:#000099; font-weight:bold;">\x</span>08<span style="color:#000099; font-weight:bold;">\x</span>83<span style="color:#000099; font-weight:bold;">\x</span>ec<span style="color:#000099; font-weight:bold;">\x</span>04<span style="color:#000099; font-weight:bold;">\x</span>8bu<span style="color:#000099; font-weight:bold;">\x</span>fc<span style="color:#000099; font-weight:bold;">\x</span>c9<span style="color:#000099; font-weight:bold;">\x</span>c3<span style="color:#000099; font-weight:bold;">\x</span>90<span style="color:#000099; font-weight:bold;">\x</span>8d<span style="color:#000099; font-weight:bold;">\x</span>b4&amp;: @</span></div>
</li>
<li style="font-weight: bold;color:#26536A;">
<div style="font-family: 'Courier New', Courier, monospace; font-weight: normal;"><span style="color:#CC0000;"><span style="color:#000099; font-weight:bold;">\x</span>b4<span style="color:#000099; font-weight:bold;">\x</span>f7<span style="color:#000099; font-weight:bold;">\x</span>bf<span style="color:#000099; font-weight:bold;">\x</span>01: Error 18446744072635266048<span style="color:#000099; font-weight:bold;">\n</span>'</span><span style="color:#006600; font-weight:bold;">&#93;</span> </div>
</li>
<li style="font-family: 'Courier New', Courier, monospace; color: black; font-weight: normal; font-style: normal;color:#3A6A8B;">
<div style="font-family: 'Courier New', Courier, monospace; font-weight: normal;">Jul&nbsp; <span style="color:#800000;color:#800000;">6</span> <span style="color:#800000;color:#800000;">14</span>:<span style="color:#800000;color:#800000;">37</span>:<span style="color:#800000;color:#800000;">04</span> server5 <span style="color:#006600; font-weight:bold;">&#91;</span><span style="color:#800000;color:#800000;">22509</span><span style="color:#006600; font-weight:bold;">&#93;</span>:&nbsp; - <span style="color:#006600; font-weight:bold;">&#40;</span>ERROR:&nbsp; &nbsp;05ff000000000005<span style="color:#006600; font-weight:bold;">&#41;</span>: Failed to add administrator group myadmin to domain. <span style="">Error</span> <span style="color:#800000;color:#800000;">127</span>. <span style="">Standard</span> Out: <span style="color:#006600; font-weight:bold;">&#91;</span><span style="color:#006600; font-weight:bold;">&#93;</span> Standard Error: <span style="color:#006600; font-weight:bold;">&#91;</span><span style="color:#CC0000;">'/usr</span></div>
</li>
<li style="font-weight: bold;color:#26536A;">
<div style="font-family: 'Courier New', Courier, monospace; font-weight: normal;"><span style="color:#CC0000;">/sbin/useradd: U1<span style="color:#000099; font-weight:bold;">\x</span>c9<span style="color:#000099; font-weight:bold;">\x</span>89<span style="color:#000099; font-weight:bold;">\x</span>e5V<span style="color:#000099; font-weight:bold;">\x</span>83<span style="color:#000099; font-weight:bold;">\x</span>ec<span style="color:#000099; font-weight:bold;">\x</span>04<span style="color:#000099; font-weight:bold;">\x</span>8bu<span style="color:#000099; font-weight:bold;">\x</span>08<span style="color:#000099; font-weight:bold;">\x</span>8bV<span style="color:#000099; font-weight:bold;">\x</span>04<span style="color:#000099; font-weight:bold;">\x</span>c7<span style="color:#000099; font-weight:bold;">\x</span>04$<span style="color:#000099; font-weight:bold;">\x</span>fe<span style="color:#000099; font-weight:bold;">\x</span>ff<span style="color:#000099; font-weight:bold;">\x</span>ff<span style="color:#000099; font-weight:bold;">\x</span>ff<span style="color:#000099; font-weight:bold;">\x</span>8b<span style="color:#000099; font-weight:bold;">\x</span>06<span style="color:#000099; font-weight:bold;">\x</span>e8<span style="color:#000099; font-weight:bold;">\x</span>83<span style="color:#000099; font-weight:bold;">\x</span>eb<span style="color:#000099; font-weight:bold;">\x</span>ff<span style="color:#000099; font-weight:bold;">\x</span>ff<span style="color:#000099; font-weight:bold;">\x</span>89F<span style="color:#000099; font-weight:bold;">\x</span>08<span style="color:#000099; font-weight:bold;">\x</span>83<span style="color:#000099; font-weight:bold;">\x</span>ec<span style="color:#000099; font-weight:bold;">\x</span>04<span style="color:#000099; font-weight:bold;">\x</span>8bu<span style="color:#000099; font-weight:bold;">\x</span>fc<span style="color:#000099; font-weight:bold;">\x</span>c9<span style="color:#000099; font-weight:bold;">\x</span>c3<span style="color:#000099; font-weight:bold;">\x</span>90<span style="color:#000099; font-weight:bold;">\x</span>8d<span style="color:#000099; font-weight:bold;">\x</span>b4&amp;: p<span style="color:#000099; font-weight:bold;">\</span></span></div>
</li>
<li style="font-family: 'Courier New', Courier, monospace; color: black; font-weight: normal; font-style: normal;color:#3A6A8B;">
<div style="font-family: 'Courier New', Courier, monospace; font-weight: normal;"><span style="color:#CC0000;">x12<span style="color:#000099; font-weight:bold;">\x</span>fd<span style="color:#000099; font-weight:bold;">\x</span>bf<span style="color:#000099; font-weight:bold;">\x</span>01: Error 18446744072635617840<span style="color:#000099; font-weight:bold;">\n</span>'</span><span style="color:#006600; font-weight:bold;">&#93;</span> </div>
</li>
<li style="font-weight: bold;color:#26536A;">
<div style="font-family: 'Courier New', Courier, monospace; font-weight: normal;">Jul&nbsp; <span style="color:#800000;color:#800000;">6</span> <span style="color:#800000;color:#800000;">14</span>:<span style="color:#800000;color:#800000;">37</span>:<span style="color:#800000;color:#800000;">04</span> server <span style="color:#006600; font-weight:bold;">&#91;</span><span style="color:#800000;color:#800000;">22509</span><span style="color:#006600; font-weight:bold;">&#93;</span>:&nbsp; - <span style="color:#006600; font-weight:bold;">&#40;</span>ERROR:&nbsp; &nbsp;05ff000000000021<span style="color:#006600; font-weight:bold;">&#41;</span>: Failed to set the site administrator<span style="color:#CC0000;">'s password and comment. Error 127. Standard Out: [] Standard Error</span></div>
</li>
<li style="font-family: 'Courier New', Courier, monospace; color: black; font-weight: normal; font-style: normal;color:#3A6A8B;">
<div style="font-family: 'Courier New', Courier, monospace; font-weight: normal;"><span style="color:#CC0000;"> : ['</span>/usr/sbin/usermod: U1\xc9\x89\xe5V\x83\xec\x04\x8bu\x08\x8bV\x04\xc7\x04$\xfe\xff\xff\xff\x8b\x06\xe8\x83\xeb\xff\xff\x89F\x08\x83\xec\x04\x8bu\xfc\xc9\xc3\x90\x8d</div>
</li>
<li style="font-weight: bold;color:#26536A;">
<div style="font-family: 'Courier New', Courier, monospace; font-weight: normal;">\xb4&amp;: \xe0\xb3\xed\xbf\x01: Error <span style="color:#800000;color:#800000;">18446744072634610592</span>\n<span style="color:#CC0000;">'] </span></div>
</li>
<li style="font-family: 'Courier New', Courier, monospace; color: black; font-weight: normal; font-style: normal;color:#3A6A8B;">
<div style="font-family: 'Courier New', Courier, monospace; font-weight: normal;"><span style="color:#CC0000;">Jul&nbsp; 6 14:37:04 server [22509]: delete_virtual_domain site12</span></div>
</li>
<li style="font-weight: bold;color:#26536A;">
<div style="font-family: 'Courier New', Courier, monospace; font-weight: normal;"><span style="color:#CC0000;">Jul&nbsp; 6 14:37:04 server [22509]: disable_virtual_domain site12</span></div>
</li>
<li style="font-family: 'Courier New', Courier, monospace; color: black; font-weight: normal; font-style: normal;color:#3A6A8B;">
<div style="font-family: 'Courier New', Courier, monospace; font-weight: normal;"><span style="color:#CC0000;">Jul&nbsp; 6 14:37:08 server [22509]: site 12 released 0 uids</span></div>
</li>
<li style="font-weight: bold;color:#26536A;">
<div style="font-family: 'Courier New', Courier, monospace; font-weight: normal;"><span style="color:#CC0000;">Jul&nbsp; 6 14:37:25 server [22509]: Delete virtual domain: Domain consistency check warning </span></div>
</li>
<li style="font-family: 'Courier New', Courier, monospace; color: black; font-weight: normal; font-style: normal;color:#3A6A8B;">
<div style="font-family: 'Courier New', Courier, monospace; font-weight: normal;"><span style="color:#CC0000;">Jul&nbsp; 6 14:37:25 server [22509]:&nbsp; - (WARNING: 01ff000000000033): Deleting a site that is in an inconsistent state. </span></div>
</li>
</ol>
</div>
</div>
</div>
<p></p>
<p>So, many thanks to <a href="http://forum.ensim.com/search.php?searchid=975284">Buckaroo</a> at <a href="http://forum.ensim.com/showthread.php?t=14677&#038;highlight=Rebuild+FST">forum.ensim.com</a> for this solution on how to rebuild your /home/virtual/FILESYSTEMTEMPLATE/</p>
<p>First step is to backup all your sites. If you are not sure how to do this, then find out now! You should have backups of all your sites or you might be seriously sorry one day.</p>
<p>Next step, just for safety is too make a tarball of the FILESYSTEMTEMPLATE directory, just in case all hell breaks lose during our fix here. Before you do this, it is best to see if there are any server backups tucked away in /home/virtual/FILESYSTEMTEMPLATE/.tmp/. If there are, in theory you can delete these, or at least move them to /home/admin during this process. To expose my ignorance on these, I really have no clue why there are backups there sometimes, but I can only assume they were placed there during Ensim control panel upgrades previously. At any rate, my /.tmp folder had 3GB of files in it, so I moved them aside before tarballing the /home/virtual/FILESYSTEMTEMPLATE folder.</p>
<div class="igBar"><span id="lcode-65"><a href="#" onclick="javascript:showPlainTxt('code-65'); return false;">PLAIN TEXT</a></span></div>
<div class="syntax_hilite"><span class="langName">CODE:</span>
<div id="code-65">
<div class="code">
<ol>
<li style="font-family: 'Courier New', Courier, monospace; color: black; font-weight: normal; font-style: normal;color:#3A6A8B;">
<div style="font-family: 'Courier New', Courier, monospace; font-weight: normal;">cd /home/virtual</div>
</li>
<li style="font-weight: bold;color:#26536A;">
<div style="font-family: 'Courier New', Courier, monospace; font-weight: normal;">tar -cvf FST.<span style="">tar</span> FILESYSTEMTEMPLATE </div>
</li>
</ol>
</div>
</div>
</div>
<p></p>
<p>Next we want to download all of the virtualhost-fst files from the Ensim ftp site. I always place my files in /usr/local/src. Here is what I did:</p>
<div class="igBar"><span id="lcode-66"><a href="#" onclick="javascript:showPlainTxt('code-66'); return false;">PLAIN TEXT</a></span></div>
<div class="syntax_hilite"><span class="langName">CODE:</span>
<div id="code-66">
<div class="code">
<ol>
<li style="font-family: 'Courier New', Courier, monospace; color: black; font-weight: normal; font-style: normal;color:#3A6A8B;">
<div style="font-family: 'Courier New', Courier, monospace; font-weight: normal;">cd /usr/local/src # If src doesn<span style="color:#CC0000;">'t exist you can create it with mkdir</span></div>
</li>
<li style="font-weight: bold;color:#26536A;">
<div style="font-family: 'Courier New', Courier, monospace; font-weight: normal;"><span style="color:#CC0000;">mkdir fst_fix</span></div>
</li>
<li style="font-family: 'Courier New', Courier, monospace; color: black; font-weight: normal; font-style: normal;color:#3A6A8B;">
<div style="font-family: 'Courier New', Courier, monospace; font-weight: normal;"><span style="color:#CC0000;">cd fst_fix </span></div>
</li>
</ol>
</div>
</div>
</div>
<p></p>
<p>At this point you will need to know the version of Ensim you are running. You can easily find it by logging into your webppliance as normal and look at the bottom of the left hand menus once you login. Mine says '4.1.0-8.rhel.4ES'.</p>
<p>Using this version number, we next need to ftp to the ensim ftp site and download all of the virtualhost-fst files:</p>
<div class="igBar"><span id="lcode-67"><a href="#" onclick="javascript:showPlainTxt('code-67'); return false;">PLAIN TEXT</a></span></div>
<div class="syntax_hilite"><span class="langName">CODE:</span>
<div id="code-67">
<div class="code">
<ol>
<li style="font-family: 'Courier New', Courier, monospace; color: black; font-weight: normal; font-style: normal;color:#3A6A8B;">
<div style="font-family: 'Courier New', Courier, monospace; font-weight: normal;"><span style="color:#006600; font-weight:bold;">&#91;</span>root@server FILESYSTEMTEMPLATE<span style="color:#006600; font-weight:bold;">&#93;</span># ftp ftp.<span style="">ensim</span>.<span style="">com</span></div>
</li>
<li style="font-weight: bold;color:#26536A;">
<div style="font-family: 'Courier New', Courier, monospace; font-weight: normal;">Connected to ftp2.<span style="">ensim</span>.<span style="">com</span>.</div>
</li>
<li style="font-family: 'Courier New', Courier, monospace; color: black; font-weight: normal; font-style: normal;color:#3A6A8B;">
<div style="font-family: 'Courier New', Courier, monospace; font-weight: normal;"><span style="color:#800000;color:#800000;">220</span> Ensim FTP Server ready.</div>
</li>
<li style="font-weight: bold;color:#26536A;">
<div style="font-family: 'Courier New', Courier, monospace; font-weight: normal;"><span style="color:#800000;color:#800000;">500</span> AUTH not understood</div>
</li>
<li style="font-family: 'Courier New', Courier, monospace; color: black; font-weight: normal; font-style: normal;color:#3A6A8B;">
<div style="font-family: 'Courier New', Courier, monospace; font-weight: normal;"><span style="color:#800000;color:#800000;">500</span> AUTH not understood</div>
</li>
<li style="font-weight: bold;color:#26536A;">
<div style="font-family: 'Courier New', Courier, monospace; font-weight: normal;">KERBEROS_V4 rejected as an authentication type</div>
</li>
<li style="font-family: 'Courier New', Courier, monospace; color: black; font-weight: normal; font-style: normal;color:#3A6A8B;">
<div style="font-family: 'Courier New', Courier, monospace; font-weight: normal;">Name <span style="color:#006600; font-weight:bold;">&#40;</span>ftp.<span style="">ensim</span>.<span style="">com</span>:root<span style="color:#006600; font-weight:bold;">&#41;</span>: anonymous</div>
</li>
<li style="font-weight: bold;color:#26536A;">
<div style="font-family: 'Courier New', Courier, monospace; font-weight: normal;"><span style="color:#800000;color:#800000;">331</span> Anonymous login ok, send your complete email address as your password.</div>
</li>
<li style="font-family: 'Courier New', Courier, monospace; color: black; font-weight: normal; font-style: normal;color:#3A6A8B;">
<div style="font-family: 'Courier New', Courier, monospace; font-weight: normal;"><span style="">Password</span>:</div>
</li>
<li style="font-weight: bold;color:#26536A;">
<div style="font-family: 'Courier New', Courier, monospace; font-weight: normal;"><span style="color:#800000;color:#800000;">230</span> Anonymous access granted, restrictions apply.</div>
</li>
<li style="font-family: 'Courier New', Courier, monospace; color: black; font-weight: normal; font-style: normal;color:#3A6A8B;">
<div style="font-family: 'Courier New', Courier, monospace; font-weight: normal;"><span style="">Remote</span> system type is UNIX.</div>
</li>
<li style="font-weight: bold;color:#26536A;">
<div style="font-family: 'Courier New', Courier, monospace; font-weight: normal;"><span style="">Using</span> binary mode to transfer files.</div>
</li>
<li style="font-family: 'Courier New', Courier, monospace; color: black; font-weight: normal; font-style: normal;color:#3A6A8B;">
<div style="font-family: 'Courier New', Courier, monospace; font-weight: normal;"><span style="">ftp</span>&gt; cd /apt/ensim/LWP/<span style="color:#800000;color:#800000;">4</span>.<span style="color:#800000;color:#800000;">1</span>.<span style="color:#800000;color:#800000;">0</span>/<span style="color:#800000;color:#800000;">8</span>.<span style="">rhel</span>.4ES/RPMS.<span style="">lwp</span> </div>
</li>
</ol>
</div>
</div>
</div>
<p></p>
<p>Note that you will need to place this line 'cd /apt/ensim/LWP/4.1.0/8.rhel.4ES/RPMS.lwp' with the proper version number from your installation. DO NOT try to install a different version of fst files.</p>
<p>Next we download all the files we need:</p>
<div class="igBar"><span id="lcode-68"><a href="#" onclick="javascript:showPlainTxt('code-68'); return false;">PLAIN TEXT</a></span></div>
<div class="syntax_hilite"><span class="langName">CODE:</span>
<div id="code-68">
<div class="code">
<ol>
<li style="font-family: 'Courier New', Courier, monospace; color: black; font-weight: normal; font-style: normal;color:#3A6A8B;">
<div style="font-family: 'Courier New', Courier, monospace; font-weight: normal;">mget virtualhosting-fst-* </div>
</li>
</ol>
</div>
</div>
</div>
<p></p>
<p>You will need to approve each download, but not to worry, it does not take very long to do this.</p>
<p>Once you are done, quit ftp, and move on to the next step.</p>
<p>Now, we need to create a little script to rebuild the /home/virtual/FILESYSTEMTEMPLATE directory. Copy and paste the following script into a filename of your choice so long as it is in the same directory as all the RPM's we just downloaded. I use pico to open and save a script called rebuild-fst.sh</p>
<div class="igBar"><span id="lcode-69"><a href="#" onclick="javascript:showPlainTxt('code-69'); return false;">PLAIN TEXT</a></span></div>
<div class="syntax_hilite"><span class="langName">CODE:</span>
<div id="code-69">
<div class="code">
<ol>
<li style="font-family: 'Courier New', Courier, monospace; color: black; font-weight: normal; font-style: normal;color:#3A6A8B;">
<div style="font-family: 'Courier New', Courier, monospace; font-weight: normal;">for dir in `ls /home/virtual/FILESYSTEMTEMPLATE`; do</div>
</li>
<li style="font-weight: bold;color:#26536A;">
<div style="font-family: 'Courier New', Courier, monospace; font-weight: normal;">&nbsp; if <span style="color:#006600; font-weight:bold;">&#91;</span> $dir != <span style="color:#CC0000;">"services"</span> -a $dir != <span style="color:#CC0000;">"log-"</span> <span style="color:#006600; font-weight:bold;">&#93;</span>; then</div>
</li>
<li style="font-family: 'Courier New', Courier, monospace; color: black; font-weight: normal; font-style: normal;color:#3A6A8B;">
<div style="font-family: 'Courier New', Courier, monospace; font-weight: normal;">&nbsp; &nbsp; rm -rf /home/virtual/FILESYSTEMTEMPLATE/$dir<span style="color:#008000;">/*</span></div>
</li>
<li style="font-weight: bold;color:#26536A;">
<div style="font-family: 'Courier New', Courier, monospace; font-weight: normal;"><span style="color:#008000;">&nbsp; fi</span></div>
</li>
<li style="font-family: 'Courier New', Courier, monospace; color: black; font-weight: normal; font-style: normal;color:#3A6A8B;">
<div style="font-family: 'Courier New', Courier, monospace; font-weight: normal;"><span style="color:#008000;">done</span></div>
</li>
<li style="font-weight: bold;color:#26536A;"></li>
<li style="font-family: 'Courier New', Courier, monospace; color: black; font-weight: normal; font-style: normal;color:#3A6A8B;">
<div style="font-family: 'Courier New', Courier, monospace; font-weight: normal;"><span style="color:#008000;">rpm -Uvh --replacepkgs virtualhosting-fst-*rpm --noscripts --notriggers</span></div>
</li>
<li style="font-weight: bold;color:#26536A;">
<div style="font-family: 'Courier New', Courier, monospace; font-weight: normal;"><span style="color:#008000;">rm -f /etc/virtualhosting/filelists/*.{dirs,links,packages,templates}.list</span></div>
</li>
<li style="font-family: 'Courier New', Courier, monospace; color: black; font-weight: normal; font-style: normal;color:#3A6A8B;">
<div style="font-family: 'Courier New', Courier, monospace; font-weight: normal;"><span style="color:#008000;">rm -f /etc/appliance/fst_state</span></div>
</li>
<li style="font-weight: bold;color:#26536A;"></li>
<li style="font-family: 'Courier New', Courier, monospace; color: black; font-weight: normal; font-style: normal;color:#3A6A8B;">
<div style="font-family: 'Courier New', Courier, monospace; font-weight: normal;"><span style="color:#008000;">set_pre_maintenance</span></div>
</li>
<li style="font-weight: bold;color:#26536A;">
<div style="font-family: 'Courier New', Courier, monospace; font-weight: normal;"><span style="color:#008000;">set_maintenance</span></div>
</li>
<li style="font-family: 'Courier New', Courier, monospace; color: black; font-weight: normal; font-style: normal;color:#3A6A8B;">
<div style="font-family: 'Courier New', Courier, monospace; font-weight: normal;"><span style="color:#008000;">set_post_maintenance</span></div>
</li>
<li style="font-weight: bold;color:#26536A;">
<div style="font-family: 'Courier New', Courier, monospace; font-weight: normal;"><span style="color:#008000;">service webppliance restart </span></div>
</li>
</ol>
</div>
</div>
</div>
<p></p>
<p>Save the file, and then chmod 700 rebuild-fst.sh</p>
<p>The above script does a couple of things:<br />
1 - It will loop through the entire /home/virtual/FILESYSTEMTEMPLATE directory and will delete everything in it except the services directory and the log- file. The services menu is where sendmail and mailscanner run its mail queues, so you don't want to touch those, or mail will bork.<br />
2 - Next, the script will rebuild the entire /home/virtual/FILESYSTEMTEMPLATE.<br />
3 - Finally, the script will run the server through maintenance mode, which will recreate the required links in the /home/virtual/FILESYSTEMTEMPLATE directory, and rebuild all the sites one by one. </p>
<p>Let's run that script now, and then sit back and wait. Since this script will completely rebuild every site, it takes quite awhile. All your sites will stay up during the rebuild, but the control panel will be offline thorughout the entire rebuild. Do the following to run the script:</p>
<div class="igBar"><span id="lcode-70"><a href="#" onclick="javascript:showPlainTxt('code-70'); return false;">PLAIN TEXT</a></span></div>
<div class="syntax_hilite"><span class="langName">CODE:</span>
<div id="code-70">
<div class="code">
<ol>
<li style="font-family: 'Courier New', Courier, monospace; color: black; font-weight: normal; font-style: normal;color:#3A6A8B;">
<div style="font-family: 'Courier New', Courier, monospace; font-weight: normal;">sh rebuild-fst.<span style="">sh</span> </div>
</li>
</ol>
</div>
</div>
</div>
<p></p>
<p>The server I ran this on has 76 sites, and it took almost 2 hours to rebuild, so if you have a couple of hundred sites, it will take awhile.</p>
]]></content:encoded>
			<wfw:commentRss>http://www.outofcontrol.ca/2007/07/08/rebuild-ensim-filesystemtemplate-to-solve-bizarre-errors/feed/</wfw:commentRss>
		<slash:comments>1</slash:comments>
		</item>
	</channel>
</rss>
