<?xml version="1.0" encoding="UTF-8"?>
<?xml-stylesheet href="http://feeds.feedburner.com/~d/styles/rss2full.xsl" type="text/xsl" media="screen"?><?xml-stylesheet href="http://feeds.feedburner.com/~d/styles/itemcontent.css" type="text/css" media="screen"?><rss 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" version="2.0">

<channel>
	<title>Sysadmin Tips</title>
	
	<link>http://www.cherpec.com</link>
	<description />
	<pubDate>Sun, 04 Jan 2009 11:37:51 +0000</pubDate>
	<generator>http://wordpress.org/?v=2.6.3</generator>
	<language>en</language>
			<atom10:link xmlns:atom10="http://www.w3.org/2005/Atom" rel="self" href="http://feeds.feedburner.com/SysadminTips" type="application/rss+xml" /><item>
		<title>Plesk rebuild Apache configuration files</title>
		<link>http://www.cherpec.com/2009/01/plesk-rebuild-apache-configuration-files/</link>
		<comments>http://www.cherpec.com/2009/01/plesk-rebuild-apache-configuration-files/#comments</comments>
		<pubDate>Sun, 04 Jan 2009 11:37:51 +0000</pubDate>
		<dc:creator>Vitalie Cherpec</dc:creator>
		
		<category><![CDATA[Linux]]></category>

		<category><![CDATA[Plesk]]></category>

		<guid isPermaLink="false">http://www.cherpec.com/?p=83</guid>
		<description><![CDATA[Sometimes you need to rebuild all your httpd.include files, it can be done with websrvmng command:

/usr/local/psa/admin/bin/websrvmng -av

]]></description>
			<content:encoded><![CDATA[<p>Sometimes you need to rebuild all your <strong>httpd.include</strong> files, it can be done with <strong>websrvmng</strong> command:</p>

<div class="wp_syntax"><div class="code"><pre class="bash bash" style="font-family:monospace;"><span style="color: #000000; font-weight: bold;">/</span>usr<span style="color: #000000; font-weight: bold;">/</span><span style="color: #7a0874; font-weight: bold;">local</span><span style="color: #000000; font-weight: bold;">/</span>psa<span style="color: #000000; font-weight: bold;">/</span>admin<span style="color: #000000; font-weight: bold;">/</span>bin<span style="color: #000000; font-weight: bold;">/</span>websrvmng <span style="color: #660033;">-av</span></pre></div></div>

]]></content:encoded>
			<wfw:commentRss>http://www.cherpec.com/2009/01/plesk-rebuild-apache-configuration-files/feed/</wfw:commentRss>
		</item>
		<item>
		<title>Rename command</title>
		<link>http://www.cherpec.com/2008/12/rename-command/</link>
		<comments>http://www.cherpec.com/2008/12/rename-command/#comments</comments>
		<pubDate>Tue, 23 Dec 2008 09:52:44 +0000</pubDate>
		<dc:creator>Vitalie Cherpec</dc:creator>
		
		<category><![CDATA[Linux]]></category>

		<category><![CDATA[Shell]]></category>

		<guid isPermaLink="false">http://www.cherpec.com/?p=63</guid>
		<description><![CDATA[Rename it&#8217;s handy command from util-linux package when you need to rename multiple files. From the manual: 


NAME
       rename - Rename files
SYNOPSIS
       rename from to file...
DESCRIPTION
       rename will rename the specified files
      [...]]]></description>
			<content:encoded><![CDATA[<p><strong>Rename</strong> it&#8217;s handy command from <strong>util-linux</strong> package when you need to rename multiple files. From the manual: </p>
<blockquote>
<pre>
NAME
       rename - Rename files
SYNOPSIS
       rename <strong>from</strong> <strong>to</strong> file...
DESCRIPTION
       rename will rename the specified files
       by replacing the first occurrence of
       <strong>from</strong> in their name by <strong>to</strong>.
...
</pre>
</blockquote>
<p>Example usage:</p>

<div class="wp_syntax"><div class="code"><pre class="bash bash" style="font-family:monospace;"><span style="color: #7a0874; font-weight: bold;">&#91;</span>vitalie<span style="color: #000000; font-weight: bold;">@</span>silver london<span style="color: #7a0874; font-weight: bold;">&#93;</span>$ <span style="color: #c20cb9; font-weight: bold;">ls</span> <span style="color: #660033;">-1</span>
DSC00967.JPG
DSC00968.JPG
DSC00969.JPG
DSC00970.JPG
DSC00971.JPG
<span style="color: #7a0874; font-weight: bold;">&#91;</span>vitalie<span style="color: #000000; font-weight: bold;">@</span>silver london<span style="color: #7a0874; font-weight: bold;">&#93;</span>$ rename DSC00 london_ <span style="color: #000000; font-weight: bold;">*</span>.JPG
<span style="color: #7a0874; font-weight: bold;">&#91;</span>vitalie<span style="color: #000000; font-weight: bold;">@</span>silver london<span style="color: #7a0874; font-weight: bold;">&#93;</span>$ <span style="color: #c20cb9; font-weight: bold;">ls</span> <span style="color: #660033;">-1</span>
london_967.JPG
london_968.JPG
london_969.JPG
london_970.JPG
london_971.JPG</pre></div></div>

]]></content:encoded>
			<wfw:commentRss>http://www.cherpec.com/2008/12/rename-command/feed/</wfw:commentRss>
		</item>
		<item>
		<title>Bind restricting recursion</title>
		<link>http://www.cherpec.com/2008/12/bind-restricting-recursion/</link>
		<comments>http://www.cherpec.com/2008/12/bind-restricting-recursion/#comments</comments>
		<pubDate>Tue, 23 Dec 2008 09:24:11 +0000</pubDate>
		<dc:creator>Vitalie Cherpec</dc:creator>
		
		<category><![CDATA[Linux]]></category>

		<category><![CDATA[Plesk]]></category>

		<category><![CDATA[bind]]></category>

		<guid isPermaLink="false">http://www.cherpec.com/?p=38</guid>
		<description><![CDATA[If your server allows recursive queries it can be exploited by malicious users. It should be restricted only to ip addresses from your local nets. 
To accomplish this, edit your /etc/named.conf and specify in &#8220;options&#8221; section which ACL are allowed to run recursive queries with allow-recursion option:

# /etc/named.conf
acl localnets &#123; 127.0.0.1; 192.168.0.0/24; &#125;;
&#160;
options &#123;
...
allow-recursion &#123; [...]]]></description>
			<content:encoded><![CDATA[<p>If your server allows recursive queries it can be exploited by malicious users. It should be restricted only to ip addresses from your local nets. </p>
<p>To accomplish this, edit your /etc/named.conf and specify in &#8220;options&#8221; section which ACL are allowed to run recursive queries with <strong>allow-recursion</strong> option:</p>

<div class="wp_syntax"><div class="code"><pre class="bash bash" style="font-family:monospace;"><span style="color: #666666; font-style: italic;"># /etc/named.conf</span>
acl localnets <span style="color: #7a0874; font-weight: bold;">&#123;</span> 127.0.0.1; 192.168.0.0<span style="color: #000000; font-weight: bold;">/</span><span style="color: #000000;">24</span>; <span style="color: #7a0874; font-weight: bold;">&#125;</span>;
&nbsp;
options <span style="color: #7a0874; font-weight: bold;">&#123;</span>
...
allow-recursion <span style="color: #7a0874; font-weight: bold;">&#123;</span> localnets; <span style="color: #7a0874; font-weight: bold;">&#125;</span>;
...
<span style="color: #7a0874; font-weight: bold;">&#125;</span>;</pre></div></div>

<p>then restart <strong>bind</strong> server:</p>

<div class="wp_syntax"><div class="code"><pre class="bash bash" style="font-family:monospace;"><span style="color: #7a0874; font-weight: bold;">&#91;</span>root<span style="color: #000000; font-weight: bold;">@</span><span style="color: #c20cb9; font-weight: bold;">red</span> ~<span style="color: #7a0874; font-weight: bold;">&#93;</span><span style="color: #666666; font-style: italic;"># /etc/init.d/named restart</span>
Stopping named: .                     <span style="color: #7a0874; font-weight: bold;">&#91;</span>  OK  <span style="color: #7a0874; font-weight: bold;">&#93;</span>
Starting named:                       <span style="color: #7a0874; font-weight: bold;">&#91;</span>  OK  <span style="color: #7a0874; font-weight: bold;">&#93;</span></pre></div></div>

<p>In <strong>Plesk</strong> it can be done from the Control Panel:<br />
Server->DNS Settings->DNS Preferences->Allow recursion<br />
and choose localhost or localnets.</p>
]]></content:encoded>
			<wfw:commentRss>http://www.cherpec.com/2008/12/bind-restricting-recursion/feed/</wfw:commentRss>
		</item>
		<item>
		<title>How to disable IPv6 in RHEL, Fedora, CentOS</title>
		<link>http://www.cherpec.com/2008/11/how-to-disable-ipv6-in-rhel-fedora-centos/</link>
		<comments>http://www.cherpec.com/2008/11/how-to-disable-ipv6-in-rhel-fedora-centos/#comments</comments>
		<pubDate>Fri, 21 Nov 2008 15:28:28 +0000</pubDate>
		<dc:creator>Vitalie Cherpec</dc:creator>
		
		<category><![CDATA[Linux]]></category>

		<category><![CDATA[centos]]></category>

		<category><![CDATA[fedora]]></category>

		<category><![CDATA[IPv6]]></category>

		<category><![CDATA[rhel]]></category>

		<guid isPermaLink="false">http://www.cherpec.com/?p=24</guid>
		<description><![CDATA[Open your /etc/modprobe.conf file and append:

# Turn off IPv6
alias net-pf-10 off
alias ipv6 off

Then restart your server.
]]></description>
			<content:encoded><![CDATA[<p>Open your /etc/modprobe.conf file and append:</p>

<div class="wp_syntax"><div class="code"><pre class="bash bash" style="font-family:monospace;"><span style="color: #666666; font-style: italic;"># Turn off IPv6</span>
<span style="color: #7a0874; font-weight: bold;">alias</span> net-pf-<span style="color: #000000;">10</span> off
<span style="color: #7a0874; font-weight: bold;">alias</span> ipv6 off</pre></div></div>

<p>Then restart your server.</p>
]]></content:encoded>
			<wfw:commentRss>http://www.cherpec.com/2008/11/how-to-disable-ipv6-in-rhel-fedora-centos/feed/</wfw:commentRss>
		</item>
		<item>
		<title>Lame servers messages</title>
		<link>http://www.cherpec.com/2008/11/lame-servers-messages/</link>
		<comments>http://www.cherpec.com/2008/11/lame-servers-messages/#comments</comments>
		<pubDate>Mon, 17 Nov 2008 19:33:47 +0000</pubDate>
		<dc:creator>Vitalie Cherpec</dc:creator>
		
		<category><![CDATA[Linux]]></category>

		<category><![CDATA[bind]]></category>

		<category><![CDATA[dns]]></category>

		<guid isPermaLink="false">http://www.cherpec.com/?p=23</guid>
		<description><![CDATA[Lame server is when a NS record for a domain specifies a server  which is not authoritative for that domain.
To keep your logs clean from lame server messages (/var/log/messages):

&#91;...&#93;
Nov 16 15:10:50 srv named&#91;99&#93;: lame server resolving 'abc.com' &#40;in 'abc.com'?&#41;: 1.2.3.4#53
Nov 16 15:10:50 srv named&#91;99&#93;: lame server resolving 'abc.com' &#40;in 'abc.com'?&#41;: 1.2.3.4#53
Nov 16 15:10:50 srv [...]]]></description>
			<content:encoded><![CDATA[<p>Lame server is when a NS record for a domain specifies a server  which is not authoritative for that domain.</p>
<p>To keep your logs clean from lame server messages (/var/log/messages):</p>

<div class="wp_syntax"><div class="code"><pre class="bash bash" style="font-family:monospace;"><span style="color: #7a0874; font-weight: bold;">&#91;</span>...<span style="color: #7a0874; font-weight: bold;">&#93;</span>
Nov <span style="color: #000000;">16</span> <span style="color: #000000;">15</span>:<span style="color: #000000;">10</span>:<span style="color: #000000;">50</span> srv named<span style="color: #7a0874; font-weight: bold;">&#91;</span><span style="color: #000000;">99</span><span style="color: #7a0874; font-weight: bold;">&#93;</span>: <span style="color: #c20cb9; font-weight: bold;">lame</span> server resolving <span style="color: #ff0000;">'abc.com'</span> <span style="color: #7a0874; font-weight: bold;">&#40;</span><span style="color: #000000; font-weight: bold;">in</span> <span style="color: #ff0000;">'abc.com'</span>?<span style="color: #7a0874; font-weight: bold;">&#41;</span>: 1.2.3.4<span style="color: #666666; font-style: italic;">#53</span>
Nov <span style="color: #000000;">16</span> <span style="color: #000000;">15</span>:<span style="color: #000000;">10</span>:<span style="color: #000000;">50</span> srv named<span style="color: #7a0874; font-weight: bold;">&#91;</span><span style="color: #000000;">99</span><span style="color: #7a0874; font-weight: bold;">&#93;</span>: <span style="color: #c20cb9; font-weight: bold;">lame</span> server resolving <span style="color: #ff0000;">'abc.com'</span> <span style="color: #7a0874; font-weight: bold;">&#40;</span><span style="color: #000000; font-weight: bold;">in</span> <span style="color: #ff0000;">'abc.com'</span>?<span style="color: #7a0874; font-weight: bold;">&#41;</span>: 1.2.3.4<span style="color: #666666; font-style: italic;">#53</span>
Nov <span style="color: #000000;">16</span> <span style="color: #000000;">15</span>:<span style="color: #000000;">10</span>:<span style="color: #000000;">50</span> srv named<span style="color: #7a0874; font-weight: bold;">&#91;</span><span style="color: #000000;">99</span><span style="color: #7a0874; font-weight: bold;">&#93;</span>: <span style="color: #c20cb9; font-weight: bold;">lame</span> server resolving <span style="color: #ff0000;">'abc.com'</span> <span style="color: #7a0874; font-weight: bold;">&#40;</span><span style="color: #000000; font-weight: bold;">in</span> <span style="color: #ff0000;">'abc.com'</span>?<span style="color: #7a0874; font-weight: bold;">&#41;</span>: 1.2.3.4<span style="color: #666666; font-style: italic;">#53</span>
Nov <span style="color: #000000;">16</span> <span style="color: #000000;">15</span>:<span style="color: #000000;">10</span>:<span style="color: #000000;">50</span> srv named<span style="color: #7a0874; font-weight: bold;">&#91;</span><span style="color: #000000;">99</span><span style="color: #7a0874; font-weight: bold;">&#93;</span>: <span style="color: #c20cb9; font-weight: bold;">lame</span> server resolving <span style="color: #ff0000;">'abc.com'</span> <span style="color: #7a0874; font-weight: bold;">&#40;</span><span style="color: #000000; font-weight: bold;">in</span> <span style="color: #ff0000;">'abc.com'</span>?<span style="color: #7a0874; font-weight: bold;">&#41;</span>: 1.2.3.4<span style="color: #666666; font-style: italic;">#53</span>
Nov <span style="color: #000000;">16</span> <span style="color: #000000;">19</span>:<span style="color: #000000;">43</span>:<span style="color: #000000;">25</span> srv named<span style="color: #7a0874; font-weight: bold;">&#91;</span><span style="color: #000000;">99</span><span style="color: #7a0874; font-weight: bold;">&#93;</span>: <span style="color: #c20cb9; font-weight: bold;">lame</span> server resolving <span style="color: #ff0000;">'abc.com'</span> <span style="color: #7a0874; font-weight: bold;">&#40;</span><span style="color: #000000; font-weight: bold;">in</span> <span style="color: #ff0000;">'abc.com'</span>?<span style="color: #7a0874; font-weight: bold;">&#41;</span>: 1.2.3.4<span style="color: #666666; font-style: italic;">#53</span>
Nov <span style="color: #000000;">16</span> <span style="color: #000000;">19</span>:<span style="color: #000000;">43</span>:<span style="color: #000000;">25</span> srv named<span style="color: #7a0874; font-weight: bold;">&#91;</span><span style="color: #000000;">99</span><span style="color: #7a0874; font-weight: bold;">&#93;</span>: <span style="color: #c20cb9; font-weight: bold;">lame</span> server resolving <span style="color: #ff0000;">'abc.com'</span> <span style="color: #7a0874; font-weight: bold;">&#40;</span><span style="color: #000000; font-weight: bold;">in</span> <span style="color: #ff0000;">'abc.com'</span>?<span style="color: #7a0874; font-weight: bold;">&#41;</span>: 1.2.3.4<span style="color: #666666; font-style: italic;">#53</span>
<span style="color: #7a0874; font-weight: bold;">&#91;</span>...<span style="color: #7a0874; font-weight: bold;">&#93;</span></pre></div></div>

<p> Edit your /etc/named.conf and add:</p>

<div class="wp_syntax"><div class="code"><pre class="bash bash" style="font-family:monospace;">logging <span style="color: #7a0874; font-weight: bold;">&#123;</span>
  category lame-servers <span style="color: #7a0874; font-weight: bold;">&#123;</span> null; <span style="color: #7a0874; font-weight: bold;">&#125;</span>;
<span style="color: #7a0874; font-weight: bold;">&#125;</span>;</pre></div></div>

<p>Then restart bind daemon.</p>
]]></content:encoded>
			<wfw:commentRss>http://www.cherpec.com/2008/11/lame-servers-messages/feed/</wfw:commentRss>
		</item>
		<item>
		<title>Howto enable antivirus for all accounts in Plesk</title>
		<link>http://www.cherpec.com/2008/10/howto-enable-antivirus-for-all-accounts-in-plesk/</link>
		<comments>http://www.cherpec.com/2008/10/howto-enable-antivirus-for-all-accounts-in-plesk/#comments</comments>
		<pubDate>Fri, 24 Oct 2008 18:52:44 +0000</pubDate>
		<dc:creator>Vitalie Cherpec</dc:creator>
		
		<category><![CDATA[Linux]]></category>

		<category><![CDATA[Plesk]]></category>

		<category><![CDATA[AntiVirus]]></category>

		<category><![CDATA[Dr.Web]]></category>

		<guid isPermaLink="false">http://www.cherpec.com/?p=22</guid>
		<description><![CDATA[To enable AntiVirus for all accounts in Plesk you can use the following script:

#!/bin/bash
&#160;
mysql -uadmin -p`cat /etc/psa/.psa.shadow` psa&#60;&#60;-EOT
UPDATE mail 
  SET virusfilter = 'any'
  WHERE postbox = 'true' AND virusfilter != 'any'
EOT

You can  run it daily from the cron to keep your mailboxes protected.
]]></description>
			<content:encoded><![CDATA[<p>To enable AntiVirus for all accounts in <strong>Plesk</strong> you can use the following script:</p>

<div class="wp_syntax"><div class="code"><pre class="bash bash" style="font-family:monospace;"><span style="color: #666666; font-style: italic;">#!/bin/bash</span>
&nbsp;
mysql <span style="color: #660033;">-uadmin</span> -p<span style="color: #000000; font-weight: bold;">`</span><span style="color: #c20cb9; font-weight: bold;">cat</span> <span style="color: #000000; font-weight: bold;">/</span>etc<span style="color: #000000; font-weight: bold;">/</span>psa<span style="color: #000000; font-weight: bold;">/</span>.psa.shadow<span style="color: #000000; font-weight: bold;">`</span> psa<span style="color: #000000; font-weight: bold;">&lt;&lt;</span>-EOT
UPDATE mail 
  SET virusfilter = <span style="color: #ff0000;">'any'</span>
  WHERE postbox = <span style="color: #ff0000;">'true'</span> AND virusfilter <span style="color: #000000; font-weight: bold;">!</span>= <span style="color: #ff0000;">'any'</span>
EOT</pre></div></div>

<p>You can  run it daily from the <strong>cron</strong> to keep your mailboxes protected.</p>
]]></content:encoded>
			<wfw:commentRss>http://www.cherpec.com/2008/10/howto-enable-antivirus-for-all-accounts-in-plesk/feed/</wfw:commentRss>
		</item>
		<item>
		<title>Nagios check_mailq: is not executable by uid 0</title>
		<link>http://www.cherpec.com/2008/08/nagios-check_mailq-is-not-executable-by-uid-0/</link>
		<comments>http://www.cherpec.com/2008/08/nagios-check_mailq-is-not-executable-by-uid-0/#comments</comments>
		<pubDate>Tue, 26 Aug 2008 10:54:58 +0000</pubDate>
		<dc:creator>Vitalie Cherpec</dc:creator>
		
		<category><![CDATA[Linux]]></category>

		<category><![CDATA[nagios]]></category>

		<category><![CDATA[tips]]></category>

		<guid isPermaLink="false">http://www.cherpec.com/?p=20</guid>
		<description><![CDATA[If you receive this error then your plugin needs patching:

ERROR:  is not executable by &#40;uid 0:gid&#40;0 10 6 4 3 2 1 0&#41;&#41;

The patch:

--- /usr/lib/nagios/plugins/check_mailq 2007-04-20 23:14:48.000000000 +0300
+++ check_mailq 2007-06-04 11:53:06.000000000 +0300
@@ -40,7 +40,7 @@
 sub print_usage &#40;&#41;;
 sub process_arguments &#40;&#41;;
&#160;
-$ENV&#123;'PATH'&#125;='';
+$ENV&#123;'PATH'&#125;='/bin:/usr/bin';
 $ENV&#123;'BASH_ENV'&#125;='';
 $ENV&#123;'ENV'&#125;='';
 $PROGNAME = &#34;check_mailq&#34;;
@@ -49,6 +49,9 @@
 $msg_p = 0 ;
 $state [...]]]></description>
			<content:encoded><![CDATA[<p>If you receive this error then your plugin needs patching:</p>

<div class="wp_syntax"><div class="code"><pre class="bash bash" style="font-family:monospace;">ERROR:  is not executable by <span style="color: #7a0874; font-weight: bold;">&#40;</span>uid 0:gid<span style="color: #7a0874; font-weight: bold;">&#40;</span>0 <span style="color: #000000;">10</span> <span style="color: #000000;">6</span> <span style="color: #000000;">4</span> <span style="color: #000000;">3</span> <span style="color: #000000;">2</span> <span style="color: #000000;">1</span> 0<span style="color: #7a0874; font-weight: bold;">&#41;</span><span style="color: #7a0874; font-weight: bold;">&#41;</span></pre></div></div>

<p>The patch:</p>

<div class="wp_syntax"><div class="code"><pre class="diff diff" style="font-family:monospace;">--- /usr/lib/nagios/plugins/check_mailq <span style="">2007</span>-04-<span style="">20</span> <span style="">23</span>:<span style="">14</span>:<span style="">48.000000000</span> +0300
<span style="color: #888822;">+++ check_mailq <span style="">2007</span>-06-04 <span style="">11</span>:<span style="">53</span>:<span style="">06.000000000</span> +0300</span>
<span style="color: #440088;">@@ -<span style="">40</span>,<span style="">7</span> +<span style="">40</span>,<span style="">7</span> @@</span>
 sub print_usage <span style="">&#40;</span><span style="">&#41;</span>;
 sub process_arguments <span style="">&#40;</span><span style="">&#41;</span>;
&nbsp;
<span style="color: #991111;">-$ENV<span style="">&#123;</span>'PATH'<span style="">&#125;</span>='';</span>
<span style="color: #00b000;">+$ENV<span style="">&#123;</span>'PATH'<span style="">&#125;</span>='/bin:/usr/bin';</span>
 $ENV<span style="">&#123;</span>'BASH_ENV'<span style="">&#125;</span>='';
 $ENV<span style="">&#123;</span>'ENV'<span style="">&#125;</span>='';
 $PROGNAME = &quot;check_mailq&quot;;
<span style="color: #440088;">@@ -<span style="">49</span>,<span style="">6</span> +<span style="">49</span>,<span style="">9</span> @@</span>
 $msg_p = 0 ;
 $state = $ERRORS<span style="">&#123;</span>'UNKNOWN'<span style="">&#125;</span>;
&nbsp;
<span style="color: #00b000;">+# </span>
<span style="color: #00b000;">+$utils::PATH_TO_QMAIL_QSTAT = &quot;/var/qmail/bin/qmail-qstat&quot;;</span>
<span style="color: #00b000;">+</span>
 Getopt::Long::Configure<span style="">&#40;</span>'bundling'<span style="">&#41;</span>;
 $status = process_arguments<span style="">&#40;</span><span style="">&#41;</span>;
 if <span style="">&#40;</span>$status<span style="">&#41;</span><span style="">&#123;</span>
<span style="color: #440088;">@@ -<span style="">63</span>,<span style="">7</span> +<span style="">66</span>,<span style="">6</span> @@</span>
 alarm<span style="">&#40;</span>$opt_t<span style="">&#41;</span>;
&nbsp;
 # switch based on MTA
<span style="color: #991111;">-</span>
 if <span style="">&#40;</span>$mailq eq &quot;sendmail&quot;<span style="">&#41;</span> <span style="">&#123;</span>
&nbsp;
        ## open mailq</pre></div></div>

]]></content:encoded>
			<wfw:commentRss>http://www.cherpec.com/2008/08/nagios-check_mailq-is-not-executable-by-uid-0/feed/</wfw:commentRss>
		</item>
		<item>
		<title>Plesk password recovery</title>
		<link>http://www.cherpec.com/2008/08/plesk-password-recovery/</link>
		<comments>http://www.cherpec.com/2008/08/plesk-password-recovery/#comments</comments>
		<pubDate>Mon, 25 Aug 2008 15:57:21 +0000</pubDate>
		<dc:creator>Vitalie Cherpec</dc:creator>
		
		<category><![CDATA[Linux]]></category>

		<category><![CDATA[Plesk]]></category>

		<category><![CDATA[password recovery]]></category>

		<category><![CDATA[tips]]></category>

		<guid isPermaLink="false">http://www.cherpec.com/?p=18</guid>
		<description><![CDATA[If you forgot your admin password in Plesk, you&#8217;ll need to connect to your server with ssh and you can find the password in the file /etc/psa/.psa.shadow .

&#91;root@apollo ~&#93;# cat /etc/psa/.psa.shadow
&#60;admin_pass&#62;

To find mailbox&#8217;s password in Plesk, connect to your server with ssh, then use the following SQL query to reveal mailbox password (replace MAILBOX_NAME with [...]]]></description>
			<content:encoded><![CDATA[<p>If you forgot your admin password in Plesk, you&#8217;ll need to connect to your server with ssh and you can find the password in the file /etc/psa/.psa.shadow .</p>

<div class="wp_syntax"><div class="code"><pre class="bash bash" style="font-family:monospace;"><span style="color: #7a0874; font-weight: bold;">&#91;</span>root<span style="color: #000000; font-weight: bold;">@</span>apollo ~<span style="color: #7a0874; font-weight: bold;">&#93;</span><span style="color: #666666; font-style: italic;"># cat /etc/psa/.psa.shadow</span>
<span style="color: #000000; font-weight: bold;">&lt;</span>admin_pass<span style="color: #000000; font-weight: bold;">&gt;</span></pre></div></div>

<p>To find mailbox&#8217;s password in Plesk, connect to your server with ssh, then use the following SQL query to reveal mailbox password (replace MAILBOX_NAME with your mailbox name):</p>

<div class="wp_syntax"><div class="code"><pre class="bash bash" style="font-family:monospace;"><span style="color: #7a0874; font-weight: bold;">&#91;</span>root<span style="color: #000000; font-weight: bold;">@</span>apollo ~<span style="color: #7a0874; font-weight: bold;">&#93;</span><span style="color: #666666; font-style: italic;"># mysql -u admin -p`cat /etc/psa/.psa.shadow` psa</span>
<span style="color: #7a0874; font-weight: bold;">&#91;</span>...<span style="color: #7a0874; font-weight: bold;">&#93;</span>
mysql<span style="color: #000000; font-weight: bold;">&gt;</span> SELECT m.mail_name, d.name, a.password FROM mail AS m LEFT JOIN <span style="color: #7a0874; font-weight: bold;">&#40;</span>domains AS d, accounts AS a<span style="color: #7a0874; font-weight: bold;">&#41;</span> \
ON <span style="color: #7a0874; font-weight: bold;">&#40;</span>m.dom_id = d.id AND m.account_id = a.id<span style="color: #7a0874; font-weight: bold;">&#41;</span> WHERE m.mail_name=<span style="color: #ff0000;">'MAILBOX_NAME'</span></pre></div></div>

]]></content:encoded>
			<wfw:commentRss>http://www.cherpec.com/2008/08/plesk-password-recovery/feed/</wfw:commentRss>
		</item>
		<item>
		<title>Howto install RMagick on CentOS 4</title>
		<link>http://www.cherpec.com/2008/08/howto-install-rmagick-on-centos-4/</link>
		<comments>http://www.cherpec.com/2008/08/howto-install-rmagick-on-centos-4/#comments</comments>
		<pubDate>Mon, 25 Aug 2008 15:42:53 +0000</pubDate>
		<dc:creator>Vitalie Cherpec</dc:creator>
		
		<category><![CDATA[Linux]]></category>

		<category><![CDATA[Ruby]]></category>

		<category><![CDATA[centos 4]]></category>

		<category><![CDATA[RHEL 4]]></category>

		<category><![CDATA[RMagick]]></category>

		<guid isPermaLink="false">http://www.cherpec.com/?p=19</guid>
		<description><![CDATA[RMagick is an interface between the Ruby programming language and the ImageMagick® and GraphicsMagick image processing libraries.
To install RMagick on CentOS 4 you&#8217;ll need to install RMagick version 1 because version 2 requires newer version of ImageMagick that&#8217;s not available in CentOS 4 repositories.
I do assume that you already have installed RubyGems. If not,  [...]]]></description>
			<content:encoded><![CDATA[<blockquote><p><a href="http://rmagick.rubyforge.org/">RMagick</a> is an interface between the Ruby programming language and the ImageMagick® and GraphicsMagick image processing libraries.</p></blockquote>
<p>To install RMagick on CentOS 4 you&#8217;ll need to install RMagick version 1 because version 2 requires newer version of ImageMagick that&#8217;s not available in CentOS 4 repositories.</p>
<p>I do assume that you already have installed RubyGems. If not,  then read my post <a href="http://www.cherpec.com/2008/07/install-rubygems-on-centos-4/">Install RubyGems on CentOS 4</a>. </p>
<p>Let&#8217;s start by installing required libraries:</p>

<div class="wp_syntax"><div class="code"><pre class="bash bash" style="font-family:monospace;"><span style="color: #7a0874; font-weight: bold;">&#91;</span>root<span style="color: #000000; font-weight: bold;">@</span>lion ~<span style="color: #7a0874; font-weight: bold;">&#93;</span><span style="color: #666666; font-style: italic;"># yum  install gcc gcc-c++ ImageMagick-devel ghostscript freetype-devel \ </span>
                         libjpeg-devel libpng-devel libpng10-devel libwmf-devel libexif-devel libtiff-devel
<span style="color: #7a0874; font-weight: bold;">&#91;</span>...<span style="color: #7a0874; font-weight: bold;">&#93;</span></pre></div></div>

<p>Then install RMagick gem specifying version with &#8216;-v&#8217; switch:</p>

<div class="wp_syntax"><div class="code"><pre class="bash bash" style="font-family:monospace;"><span style="color: #7a0874; font-weight: bold;">&#91;</span>root<span style="color: #000000; font-weight: bold;">@</span>lion ~<span style="color: #7a0874; font-weight: bold;">&#93;</span><span style="color: #666666; font-style: italic;"># gem install rmagick -v 1.15.14 </span>
Building native extensions.  This could take a while...
Successfully installed rmagick-1.15.14
<span style="color: #000000;">1</span> gem installed</pre></div></div>

]]></content:encoded>
			<wfw:commentRss>http://www.cherpec.com/2008/08/howto-install-rmagick-on-centos-4/feed/</wfw:commentRss>
		</item>
		<item>
		<title>Using squirrelmail in Plesk</title>
		<link>http://www.cherpec.com/2008/08/using-squirrelmail-in-plesk/</link>
		<comments>http://www.cherpec.com/2008/08/using-squirrelmail-in-plesk/#comments</comments>
		<pubDate>Sat, 02 Aug 2008 18:22:08 +0000</pubDate>
		<dc:creator>Vitalie Cherpec</dc:creator>
		
		<category><![CDATA[Linux]]></category>

		<category><![CDATA[Plesk]]></category>

		<category><![CDATA[centos]]></category>

		<category><![CDATA[fedora]]></category>

		<category><![CDATA[plesk 8.3]]></category>

		<category><![CDATA[rhel]]></category>

		<category><![CDATA[squirrelmail]]></category>

		<category><![CDATA[webmail]]></category>

		<guid isPermaLink="false">http://www.cherpec.com/?p=17</guid>
		<description><![CDATA[Configuring apache for squirrelmail following  this tutorial is not enough. You&#8217;ll need to configure squirrelmail too. Edit your /etc/squirrelmail/config_local.php file and paste the following configuration:

// courier-imap settings
$imap_server_type       = 'courier';
$default_folder_prefix  = 'INBOX.';
$trash_folder           = 'Trash';
$sent_folder     [...]]]></description>
			<content:encoded><![CDATA[<p>Configuring apache for <strong>squirrelmail</strong> following  this <a href="http://kb.parallels.com/en/1775">tutorial</a> is not enough. You&#8217;ll need to configure squirrelmail too. Edit your /etc/squirrelmail/config_local.php file and paste the following configuration:</p>

<div class="wp_syntax"><div class="code"><pre class="php php" style="font-family:monospace;"><span style="color: #666666; font-style: italic;">// courier-imap settings</span>
<span style="color: #000088;">$imap_server_type</span>       <span style="color: #339933;">=</span> <span style="">'courier'</span>;
<span style="color: #000088;">$default_folder_prefix</span>  <span style="color: #339933;">=</span> <span style="">'INBOX.'</span>;
<span style="color: #000088;">$trash_folder</span>           <span style="color: #339933;">=</span> <span style="">'Trash'</span>;
<span style="color: #000088;">$sent_folder</span>            <span style="color: #339933;">=</span> <span style="">'Sent'</span>;
<span style="color: #000088;">$draft_folder</span>           <span style="color: #339933;">=</span> <span style="">'Drafts'</span>;
<span style="color: #000088;">$show_prefix_option</span>     <span style="color: #339933;">=</span> <span style="color: #000000; font-weight: bold;">false</span>;
<span style="color: #000088;">$default_sub_of_inbox</span>   <span style="color: #339933;">=</span> <span style="color: #000000; font-weight: bold;">false</span>;
<span style="color: #000088;">$show_contain_subfolders_option</span> <span style="color: #339933;">=</span> <span style="color: #000000; font-weight: bold;">false</span>;
<span style="color: #000088;">$optional_delimiter</span>     <span style="color: #339933;">=</span> <span style="">'.'</span>;
<span style="color: #000088;">$delete_folder</span>          <span style="color: #339933;">=</span> <span style="color: #000000; font-weight: bold;">true</span>;
<span style="color: #000088;">$force_username_lowercase</span> <span style="color: #339933;">=</span> <span style="color: #000000; font-weight: bold;">false</span>;
&nbsp;
<span style="color: #666666; font-style: italic;">// other settings</span>
<span style="color: #000088;">$default_charset</span>        <span style="color: #339933;">=</span> <span style="">'iso-8859-1'</span>;
<span style="color: #000088;">$lossy_encoding</span>         <span style="color: #339933;">=</span> <span style="color: #000000; font-weight: bold;">false</span>;
<span style="color: #000088;">$sendmail_args</span>          <span style="color: #339933;">=</span> <span style="">'-i -t'</span>;
<span style="color: #000088;">$encode_header_key</span>      <span style="color: #339933;">=</span> <span style="">''</span>;
<span style="color: #000088;">$hide_auth_header</span>       <span style="color: #339933;">=</span> <span style="color: #000000; font-weight: bold;">false</span>;
<span style="color: #000088;">$plugins</span><span style="color: #009900;">&#91;</span><span style="color: #cc66cc;">3</span><span style="color: #009900;">&#93;</span> <span style="color: #339933;">=</span> <span style="">'filters'</span>;
<span style="color: #000088;">$abook_global_file</span> <span style="color: #339933;">=</span> <span style="">''</span>;
<span style="color: #000088;">$abook_global_file_writeable</span> <span style="color: #339933;">=</span> <span style="color: #000000; font-weight: bold;">false</span>;
&nbsp;
<span style="color: #000088;">$addrbook_global_dsn</span> <span style="color: #339933;">=</span> <span style="">''</span>;
<span style="color: #000088;">$addrbook_global_table</span> <span style="color: #339933;">=</span> <span style="">'global_abook'</span>;
<span style="color: #000088;">$addrbook_global_writeable</span> <span style="color: #339933;">=</span> <span style="color: #000000; font-weight: bold;">false</span>;
<span style="color: #000088;">$addrbook_global_listing</span> <span style="color: #339933;">=</span> <span style="color: #000000; font-weight: bold;">false</span>;</pre></div></div>

]]></content:encoded>
			<wfw:commentRss>http://www.cherpec.com/2008/08/using-squirrelmail-in-plesk/feed/</wfw:commentRss>
		</item>
	</channel>
</rss>
