<?xml version="1.0" encoding="UTF-8"?>
<!-- generator="wordpress/2.2.1" -->
<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/"
	>

<channel>
	<title>Parantido Web Log</title>
	<link>http://blog.techfusion.it</link>
	<description>- Natural (SysAdmin) Cycle Life Brainstorming -</description>
	<pubDate>Mon, 04 Feb 2008 22:26:20 +0000</pubDate>
	<generator>http://wordpress.org/?v=2.2.1</generator>
	<language>en</language>
			<item>
		<title>Qmail Scanner: qmail-scanner-queue.pl return-path anonymizer</title>
		<link>http://blog.techfusion.it/2007/12/20/qmail-scanner-qmail-scanner-queuepl-return-path-anonymizer/</link>
		<comments>http://blog.techfusion.it/2007/12/20/qmail-scanner-qmail-scanner-queuepl-return-path-anonymizer/#comments</comments>
		<pubDate>Thu, 20 Dec 2007 15:02:36 +0000</pubDate>
		<dc:creator>Parantido</dc:creator>
		
		<category><![CDATA[Sys Admin]]></category>

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

		<guid isPermaLink="false">http://blog.techfusion.it/2007/12/20/qmail-scanner-qmail-scanner-queuepl-return-path-anonymizer/</guid>
		<description><![CDATA[The following patch is able to anonymize the entire mails routing path.
Reason about this feature is the following:


Customers privacy preservation
Nullify RBL (Source Path) SpamCheck for RBListed ISP connection (fastweb.net, tim.it, etc etc).



In the diff patch attached file you can find some commented code block. You can store an original email copy, if you would to [...]]]></description>
			<content:encoded><![CDATA[<p>The following patch is able to anonymize the entire mails routing path.</p>
<p>Reason about this feature is the following:</p>
<blockquote>
<ol>
<li>Customers privacy preservation</li>
<li>Nullify RBL (Source Path) SpamCheck for RBListed ISP connection (fastweb.net, tim.it, etc etc).</li>
</ol>
</blockquote>
<blockquote></blockquote>
<blockquote><p>In the diff patch attached file you can find some commented code block. You can store an original email copy, if you would to save it, commenting out code lines (not suggested in a thousand-emails-for-day environment).</p>
<p>Download <a href="http://blog.techfusion.it/files/qmail-scanner-queue.diff.patch">qmail-scanner.queue.diff.patch</a></p></blockquote>
]]></content:encoded>
			<wfw:commentRss>http://blog.techfusion.it/2007/12/20/qmail-scanner-qmail-scanner-queuepl-return-path-anonymizer/feed/</wfw:commentRss>
		</item>
		<item>
		<title>Perl: &#8220;How to&#8221; Develop a Dynamic Plugin Engine</title>
		<link>http://blog.techfusion.it/2007/12/18/perl-how-to-develop-a-dynamic-plugin-engine/</link>
		<comments>http://blog.techfusion.it/2007/12/18/perl-how-to-develop-a-dynamic-plugin-engine/#comments</comments>
		<pubDate>Tue, 18 Dec 2007 10:08:53 +0000</pubDate>
		<dc:creator>Parantido</dc:creator>
		
		<category><![CDATA[Develop]]></category>

		<guid isPermaLink="false">http://blog.techfusion.it/2007/12/18/perl-how-to-develop-a-dynamic-plugin-engine/</guid>
		<description><![CDATA[:: INTRODUCTION
&#160;
The main problem in my projects was a dynamically features extension through new implementations and new technology fully-fit across the time (software maintenance). For this problem i&#8217;m looking for a method to develop a core engine and to develop features through hooked attached plugins.
I decided to write this tutorial to share my plugin connector [...]]]></description>
			<content:encoded><![CDATA[<h4 align="left"><font color="#c0c0c0"><strong>:: INTRODUCTION</strong></font></h4>
<p align="justify">&nbsp;</p>
<p align="justify"><font color="#c0c0c0">The main problem in my projects was a dynamically features extension through new implementations and new technology fully-fit across the time (software maintenance). For this problem i&#8217;m looking for a method to develop a core engine and to develop features through hooked attached plugins.</font></p>
<p align="left"><font color="#c0c0c0">I decided to write this tutorial to share my plugin connector view.</font></p>
<p align="justify">&nbsp;</p>
<h4 align="left"><font color="#c0c0c0"><strong>:: MAIN SCENARIO</strong></font></h4>
<p align="justify">&nbsp;</p>
<p><font color="#c0c0c0"><img src="http://www.techfusion.it/images/main.jpg" title="Main Scenario" alt="Main Scenario" align="middle" height="291" width="700" /><br />
Here we have the base scenario about plugins/core interconnection.</font></p>
<p><font color="#c0c0c0"><strong>:: DATA FLOW</strong></font></p>
<ol>
<li>
<p align="left"><font color="#c0c0c0">An exeternal request incoming</font></p>
</li>
<li>
<p align="left"><font color="#c0c0c0">Core module do something and pass result to communicator interface.</font></p>
</li>
<li>
<p align="left"><font color="#c0c0c0">Communicator Interface analyze data received, and identify the correct plugin to load.</font></p>
</li>
<li>
<p align="left"><font color="#c0c0c0">Communicator Plugin Method, receive data from Communicator Core Interface and parse looking for the correct method to call</font></p>
</li>
<li>
<p align="left"><font color="#c0c0c0">Method receive data from Communicator Plugin Method and do something.</font></p>
</li>
<li>
<p align="left"><font color="#c0c0c0">Result value will be returned back through the reversed flow path.</font></p>
</li>
</ol>
<p align="justify">&nbsp;</p>
<h4 align="left"><font color="#c0c0c0"><strong>:: MESSAGE STRUCTURE</strong></font></h4>
<p align="justify">&nbsp;</p>
<p align="left"><font color="#c0c0c0">To accomplish the data flow structure depicted before we should to have the following message structure:</font></p>
<p style="text-align: center"><font color="#c0c0c0"><img src="http://www.techfusion.it/images/messagestructure.jpg" title="Message Structure" alt="Message Structure" height="106" width="693" /></font></p>
<p align="left"><font color="#c0c0c0">A structure like this is useful to build a correct data flow through Main Core Application and Multiple Plugins.</font></p>
<p align="justify">&nbsp;</p>
<h4 align="left"><font color="#c0c0c0"><strong>:: BENEFITS</strong></font></h4>
<p align="justify">&nbsp;</p>
<ol>
<li>
<p align="left"><font color="#c0c0c0">Path Oriented Communication (Like TCP/IP Communication &#8230; it works <img src='http://blog.techfusion.it/wp-includes/images/smilies/icon_smile.gif' alt=':)' class='wp-smiley' /> ) </font></p>
</li>
<li>
<p align="left"><font color="#c0c0c0">Low CPU Computation Load (No load on message passing architecture)<br />
</font></li>
<li>
<p align="left"><font color="#c0c0c0">Multiple Plugins Loading (We can call multiple plugins at the same time)<br />
</font></li>
<li>
<p align="left"><font color="#c0c0c0">Memory Optimization (Dinamic Module Load/Unload)</font></p>
</li>
<li>
<p align="left"><font color="#c0c0c0">Better Software Management (Only Plugins should to be maintained)<br />
</font></li>
<li>
<p align="left"><font color="#c0c0c0">Better Collaboration (Everyone could write his own plugin)<br />
</font></li>
<li>
<p align="left"><font color="#c0c0c0">&#8230; and more over !!! <img src='http://blog.techfusion.it/wp-includes/images/smilies/icon_smile.gif' alt=':)' class='wp-smiley' /> </font></p>
</li>
</ol>
<p align="justify">&nbsp;</p>
<h4 align="left"> <font color="#c0c0c0">:: DISADVANTAGES</font></h4>
<p align="justify">&nbsp;</p>
<ol>
<li>
<p align="left"><font color="#c0c0c0">Considerable Network Load (in case of heavy production environment)</font></p>
</li>
<li>
<p align="left"><font color="#c0c0c0">Plugins Developing Rules (plugins should be written following a rigorous scheme)</font></p>
</li>
</ol>
<p align="left">&nbsp;</p>
<h4 align="left"><font color="#c0c0c0"><strong>:: SOURCE CODE</strong></font></h4>
<p align="left"><font color="#c0c0c0">Let&#8217;s post some code to understand basic concepts:</font></p>
<p align="left"><font color="#c0c0c0">We receive a preformatted input string from our input device. In this string we have the message structure depicted before. Then, first of all, we should to get our &#8220;Header&#8221; (passed[0]);</font></p>
<p align="left"><font color="#c0c0c0">In the following statement we prepare the plugins load call</font></p>
<pre><font color="#c0c0c0"># Construct Module Name
my $obj = &#8220;SRVConf::&#8221; . $passed[0];</font></pre>
<p align="left"><font color="#c0c0c0">Now we must (in Perl) load requested plugin through eval syscall</font></p>
<pre><font color="#c0c0c0"># Use Dynamical Module
eval &#8220;use $obj&#8221;;</font></pre>
<p align="left"><font color="#c0c0c0">Now we can call Plugins Communicator method.</font></p>
<pre><font color="#c0c0c0"># Initialize Module
if(my $module = $obj-&gt;new())
   my @returned = $obj-&gt;communicator($passed[1]);</font></pre>
<p align="left"><font color="#c0c0c0">For those about Plugins Statement we must supply a &#8220;new&#8221; method</font></p>
<pre><font color="#c0c0c0">
sub new {
my $this = {};
&#8230;.
}
</font></pre>
<p align="left"><font color="#c0c0c0">and a &#8220;communicator&#8221; method that know all Plugin method list</font></p>
<pre><font color="#c0c0c0">
sub communicator() {
    if ($action eq &#8220;adduser&#8221;) {
        return(_adduser($splitedstr[1]));
    } elsif ($action eq &#8220;moduser&#8221;) {
        return(_moduser($splitedstr[1]));
    } elsif ($action eq &#8220;deluser&#8221;) {
        return(_deluser($splitedstr[1]));
    } elsif ($action eq &#8220;getuserinfo&#8221;) {
&#8230;&#8230;
</font></pre>
]]></content:encoded>
			<wfw:commentRss>http://blog.techfusion.it/2007/12/18/perl-how-to-develop-a-dynamic-plugin-engine/feed/</wfw:commentRss>
		</item>
		<item>
		<title>Wishes for an Happy 27th Birthday</title>
		<link>http://blog.techfusion.it/2007/11/12/wishes-for-an-happy-27th-birthday/</link>
		<comments>http://blog.techfusion.it/2007/11/12/wishes-for-an-happy-27th-birthday/#comments</comments>
		<pubDate>Mon, 12 Nov 2007 08:58:48 +0000</pubDate>
		<dc:creator>Parantido</dc:creator>
		
		<category><![CDATA[Uncategorized]]></category>

		<guid isPermaLink="false">http://blog.techfusion.it/2007/11/12/wishes-for-an-happy-27th-birthday/</guid>
		<description><![CDATA[
]]></description>
			<content:encoded><![CDATA[<p><img src="http://www.gralon.net/cartes-virtuelles/cartes/anniversaire/vg-happy-birthday.jpg" height="392" width="420" /></p>
]]></content:encoded>
			<wfw:commentRss>http://blog.techfusion.it/2007/11/12/wishes-for-an-happy-27th-birthday/feed/</wfw:commentRss>
		</item>
		<item>
		<title>Just Certified</title>
		<link>http://blog.techfusion.it/2007/11/10/just-certified/</link>
		<comments>http://blog.techfusion.it/2007/11/10/just-certified/#comments</comments>
		<pubDate>Sat, 10 Nov 2007 14:03:01 +0000</pubDate>
		<dc:creator>Parantido</dc:creator>
		
		<category><![CDATA[Sys Admin]]></category>

		<guid isPermaLink="false">http://blog.techfusion.it/2007/11/10/just-certified/</guid>
		<description><![CDATA[


Exam Date/
 Time
Exam Name
&#160;
Client/
Exam Number
&#160;
Exam Status
Registration Expiration
&#160;


25-Oct-2007
10:00 AM
LPI Level 1 Exam 101
&#160;
Linux Professional Institute (LPI)
117-101
&#160;
Passed
30-Sep-2008
11:59 PM
Receipt



]]></description>
			<content:encoded><![CDATA[<p><center></p>
<table style="border: 1px dotted;" bgcolor="#999999" cellpadding="2" cellspacing="1" height="77" width="400">
<tr>
<td align="center" background="/images/bg_box.gif" valign="top" width="80"><strong>Exam Date/</strong><br />
<strong> Time</strong></td>
<td align="center" background="/images/bg_box.gif" valign="top"><strong>Exam Name</strong></td>
<td align="center" background="/images/bg_box.gif" valign="top">&nbsp;</td>
<td align="center" background="/images/bg_box.gif" valign="top"><strong>Client/<br />
Exam Number</strong></td>
<td align="center" background="/images/bg_box.gif" valign="top">&nbsp;</td>
<td align="center" background="/images/bg_box.gif" valign="top"><strong>Exam Status</strong></td>
<td align="center" background="/images/bg_box.gif" valign="top"><strong>Registration Expiration</strong></td>
<td align="center" background="/images/bg_box.gif" valign="top">&nbsp;</td>
</tr>
<tr>
<td align="left" background="/images/bg_box.gif" valign="top">25-Oct-2007<br />
10:00 AM</td>
<td align="left" background="/images/bg_box.gif" valign="top">LPI Level 1 Exam 101</td>
<td align="left" background="/images/bg_box.gif" valign="top">&nbsp;</td>
<td align="left" background="/images/bg_box.gif" valign="top">Linux Professional Institute (LPI)<br />
117-101</td>
<td align="left" background="/images/bg_box.gif" valign="top">&nbsp;</td>
<td align="left" background="/images/bg_box.gif" valign="top">Passed</td>
<td align="left" background="/images/bg_box.gif" valign="top">30-Sep-2008<br />
11:59 PM</td>
<td align="left" background="/images/bg_box.gif" valign="top">Receipt</td>
</tr>
</table>
<p><center></p>
]]></content:encoded>
			<wfw:commentRss>http://blog.techfusion.it/2007/11/10/just-certified/feed/</wfw:commentRss>
		</item>
		<item>
		<title>Clima Day - Request for Energy</title>
		<link>http://blog.techfusion.it/2007/08/01/clima-day-request-for-energy/</link>
		<comments>http://blog.techfusion.it/2007/08/01/clima-day-request-for-energy/#comments</comments>
		<pubDate>Wed, 01 Aug 2007 13:49:04 +0000</pubDate>
		<dc:creator>Parantido</dc:creator>
		
		<category><![CDATA[Uncategorized]]></category>

		<guid isPermaLink="false">http://blog.techfusion.it/2007/08/01/clima-day-request-for-energy/</guid>
		<description><![CDATA[
]]></description>
			<content:encoded><![CDATA[<p align="center"><img src="http://media.techeblog.com/images/processdata.jpg" align="bottom" border="0" height="639" width="450" /></p>
]]></content:encoded>
			<wfw:commentRss>http://blog.techfusion.it/2007/08/01/clima-day-request-for-energy/feed/</wfw:commentRss>
		</item>
		<item>
		<title>ANSI Escape Sequences</title>
		<link>http://blog.techfusion.it/2007/06/27/ansi-escape-sequences/</link>
		<comments>http://blog.techfusion.it/2007/06/27/ansi-escape-sequences/#comments</comments>
		<pubDate>Wed, 27 Jun 2007 14:10:28 +0000</pubDate>
		<dc:creator>Parantido</dc:creator>
		
		<category><![CDATA[Sys Admin]]></category>

		<guid isPermaLink="false">http://blog.techfusion.it/archives/6</guid>
		<description><![CDATA[Intro
ANSI Escape sequences are used to perform special operations on the terminal, such as changing the output color, making it bold, printing at a specified coordinate etc.
The sequences
 Wherever you see &#8216;#&#8217;, that should be replaced by the appropriate number.
Cursor Controls:
ESC[#;#H or ESC[#;#f (Moves cusor to line #, column #)
ESC[#A (Moves cursor up # lines)
ESC[#B [...]]]></description>
			<content:encoded><![CDATA[<h3 class="post-title" align="left"><font color="#999999"><strong>Intro</strong></font></h3>
<p><font color="#999999">ANSI Escape sequences are used to perform special operations on the terminal, such as changing the output color, making it bold, printing at a specified coordinate etc.</font></p>
<h3 align="left"><font color="#999999"><strong>The sequences</strong></font></h3>
<p align="left"><font color="#999999"> Wherever you see &#8216;#&#8217;, that should be replaced by the appropriate number.</font></p>
<p align="left"><font color="#999999"><strong>Cursor Controls:</strong></font></p>
<pre><font color="#999999"><strong>ESC[#;#H or ESC[#;#f</strong> (Moves cusor to line #, column #)</font></pre>
<pre><font color="#999999"><strong>ESC[#A</strong> (Moves cursor up # lines)</font><font color="#999999">
</font><font color="#999999"><strong>ESC[#B</strong> (Moves cursor down # lines)</font>

<font color="#999999">
</font><font color="#999999"><strong>ESC[#C</strong> (Moves cursor forward # spaces)</font>

<font color="#999999">
</font><font color="#999999"><strong>ESC[#D</strong> (Moves cursor back # spaces)</font>

<font color="#999999">
</font><font color="#999999"><strong>ESC[#;#R</strong> (Reports current cursor line &amp; column)</font>

<font color="#999999">
</font><font color="#999999"><strong>ESC[s </strong>(Saves cursor position for recall later)</font>

<font color="#999999">
</font><font color="#999999"><strong>ESC[u</strong> (Return to saved cursor position)</font></pre>
<pre><font color="#999999">

<strong>Erase Functions:</strong></font><font color="#999999">
</font><font color="#999999"><strong>ESC[2J</strong> (Clear screen and home cursor)</font>

<font color="#999999">
</font><font color="#999999"><strong>ESC[K</strong> (Clear to end of line)

</font></pre>
<pre><font color="#999999">

<strong>Set Graphics Rendition:</strong></font><font color="#999999">
</font><font color="#999999"><strong>ESC[#;#;&#8230;.;#m</strong>                     </font></pre>
<pre><font color="#999999">Set display attributes where # is

</font></pre>
<ul>
<li><font color="#999999">00 for normal display (or just 0)</font></li>
<li><font color="#999999">01 for bold on (or just 1)</font></li>
<li><font color="#999999">02 faint (or just 2)</font></li>
<li><font color="#999999">03 standout (or just 3)</font></li>
<li><font color="#999999">04 underline (or just 4)</font></li>
<li><font color="#999999">05 blink on (or just 5)</font></li>
<li><font color="#999999">07 reverse video on (or just 7)</font></li>
<li><font color="#999999">08 nondisplayed (invisible) ( or just 8 )</font></li>
<li><font color="#999999">22 normal</font></li>
<li><font color="#999999">23 no-standout</font></li>
<li><font color="#999999">24 no-underline</font></li>
<li><font color="#999999">25 no-blink</font></li>
<li><font color="#999999">27 no-reverse</font></li>
<li><font color="#999999">30 black foreground</font></li>
<li><font color="#999999">31 red foreground</font></li>
<li><font color="#999999">32 green foreground</font></li>
<li><font color="#999999">33 yellow foreground</font></li>
<li><font color="#999999">34 blue foreground</font></li>
<li><font color="#999999">35 magenta foreground</font></li>
<li><font color="#999999">36 cyan foreground</font></li>
<li><font color="#999999">37 white foreground</font></li>
<li><font color="#999999">39 default foreground</font></li>
<li><font color="#999999">40 black background</font></li>
<li><font color="#999999">41 red background</font></li>
<li><font color="#999999">42 green background</font></li>
<li><font color="#999999">43 yellow background</font></li>
<li><font color="#999999">44 blue background</font></li>
<li><font color="#999999">45 magenta background</font></li>
<li><font color="#999999">46 cyan background</font></li>
<li><font color="#999999">47 white background</font></li>
<li><font color="#999999">49 default background</font></li>
</ul>
<pre> <font color="#999999">

<strong>ESC[=#;7h or</strong> (Put screen in indicated mode where # is)</font><font color="#999999">
</font><font color="#999999"><strong>ESC[=h or</strong> (0 for 40 x 25 black &amp; white)</font>

<font color="#999999">
</font><font color="#999999"><strong>ESC[=0h or</strong> (1 for 40 x 25 color)</font>

<font color="#999999">
</font><font color="#999999"><strong>ESC[?7h</strong> (2 for 80 x 25 b&amp;w)

</font></pre>
<ul>
<li><font color="#999999">3 for 80 x 25 color</font></li>
<li><font color="#999999">4 for 320 x 200 color graphics</font></li>
<li><font color="#999999">5 for 320 x 200 b &amp; w graphics</font></li>
<li><font color="#999999">6 for 640 x 200 b &amp; w graphics</font></li>
<li><font color="#999999">7 to wrap at end of line</font></li>
</ul>
<pre><font color="#999999"><strong>ESC[=#;7l</strong> or <strong>ESC[=l</strong> or (Resets mode # set with above command)</font><font color="#999999">
</font><font color="#999999"><strong>ESC[=0l</strong> or <strong>ESC[?7l</strong></font></pre>
<pre><font color="#999999">

<strong>Keyboard Reassignments:</strong></font><font color="#999999">
</font><font color="#999999"><strong>ESC[#;#;&#8230;p</strong> (Keyboard reassignment. The first ASCII)</font>

<font color="#999999">
</font><font color="#999999">or <strong>ESC[&#8221;string&#8221;p</strong> (code defines which code is to be)</font>

<font color="#999999">
</font><font color="#999999">or <strong>ESC[#;&#8221;string&#8221;;#;</strong> (changed. The remaining codes define)</font>

<font color="#999999">
</font><font color="#999999"><strong>#;&#8221;string&#8221;;#p</strong> (what it is to be changed to)</font></pre>
<pre><font color="#999999">

E.g. Reassign the Q and q keys to the A and a keys (and vice versa).</font><font color="#999999">
</font><font color="#999999"><strong>ESC [65;81p</strong> (A becomes Q)</font>

<font color="#999999">
</font><font color="#999999"><strong>ESC [97;113p</strong> (a becomes q)</font>

<font color="#999999">
</font><font color="#999999"><strong>ESC [81;65p</strong> (Q becomes A)</font>

<font color="#999999">
</font><font color="#999999"><strong>ESC [113;97p</strong> (q becomes a)

</font></pre>
<pre><font color="#999999">E.g. Reassign the F10 key to a DIR command.</font></pre>
<pre><font color="#999999">
</font><font color="#999999"><strong>ESC [0;68;&#8221;dir&#8221;;13p</strong> (The 0;68 is the extended ASCII code)</font>

<font color="#999999">
</font><font color="#999999">for the F10 key and 13 is the ASCII</font>

<font color="#999999">
</font><font color="#999999">code for a carriage return.</font></pre>
<pre><font color="#999999">
</font><font color="#999999"><strong>Other function key codes </strong>      </font></pre>
<pre><font color="#999999">F1=59,F2=60,F3=61,F4=62,F5=63</font><font color="#999999">
</font><font color="#999999">F6=64,F7=65,F8=66,F9=67,F10=68</font></pre>
]]></content:encoded>
			<wfw:commentRss>http://blog.techfusion.it/2007/06/27/ansi-escape-sequences/feed/</wfw:commentRss>
		</item>
		<item>
		<title>Libapache2 Mod Auth: &#8220;(9)Bad file descriptor: Could not open password file: (null)&#8221;</title>
		<link>http://blog.techfusion.it/2007/06/04/libapache2-mod-auth-9bad-file-descriptor-could-not-open-password-file-null/</link>
		<comments>http://blog.techfusion.it/2007/06/04/libapache2-mod-auth-9bad-file-descriptor-could-not-open-password-file-null/#comments</comments>
		<pubDate>Mon, 04 Jun 2007 10:09:41 +0000</pubDate>
		<dc:creator>Parantido</dc:creator>
		
		<category><![CDATA[Sys Admin]]></category>

		<guid isPermaLink="false">http://blog.techfusion.it/archives/5</guid>
		<description><![CDATA[Recentemente è stato aggiornato il pacchetto libapache2-mod-auth e all&#8217;utilizzo degli stessi file di configurazione provoca il seguente errore:
(9)Bad file descriptor: Could not open password file: (null)
Per risolvere la situazione è sufficiente aggiungere la seguente linea al proprio file di configurazione:
AuthBasicAuthoritative off
Come riportato dalla fonte del bug il problema è il seguente:
&#8220;The only difference between apache [...]]]></description>
			<content:encoded><![CDATA[<p>Recentemente è stato aggiornato il pacchetto <strong>libapache2-mod-auth</strong> e all&#8217;utilizzo degli stessi file di configurazione provoca il seguente errore:</p>
<p align="center"><strong>(9)Bad file descriptor: Could not open password file: (null)</strong></p>
<p align="left">Per risolvere la situazione è sufficiente aggiungere la seguente linea al proprio file di configurazione:</p>
<p align="center"><strong>AuthBasicAuthoritative off</strong></p>
<p align="left">Come riportato dalla <a href="http://www.mail-archive.com/debian-bugs-dist@lists.debian.org/msg309705.html" target="_blank">fonte del bug</a> il problema è il seguente:</p>
<p align="center">&#8220;The only difference between apache 2.2.3-2 and 2.2.3-3.3 that appears<br />
relevant is that 2.2.3-3.1 *enables* authz_user by default&#8221;</p>
<p align="left">&nbsp;</p>
]]></content:encoded>
			<wfw:commentRss>http://blog.techfusion.it/2007/06/04/libapache2-mod-auth-9bad-file-descriptor-could-not-open-password-file-null/feed/</wfw:commentRss>
		</item>
		<item>
		<title>Apache2 + MySQL Mod_Auth V2 (libapache2-mod-auth-mysql)</title>
		<link>http://blog.techfusion.it/2007/01/15/apache2-mysql-mod_auth-v2-libapache2-mod-auth-mysql/</link>
		<comments>http://blog.techfusion.it/2007/01/15/apache2-mysql-mod_auth-v2-libapache2-mod-auth-mysql/#comments</comments>
		<pubDate>Mon, 15 Jan 2007 15:18:32 +0000</pubDate>
		<dc:creator>Parantido</dc:creator>
		
		<category><![CDATA[Sys Admin]]></category>

		<guid isPermaLink="false">http://blog.techfusion.it/archives/4</guid>
		<description><![CDATA[Il post di seguito spiega come utilizzare la seconda versione del mod &#8220;MySQL Authentication&#8221; con un Apache Server versione 2.x.
La distribuzione utilizzata è una Debian GNU/Linux Stable.
Innanzitutto installare i pacchetti necessari (dato per assunto che sia stato già installato apache2/mysql)
# apt-get install libapache2-mod-auth-mysql
Creare la tabella nel database MySQL
mysql -uroot -p
mysql&#62; create database apache_auth;
mysql&#62; CREATE TABLE [...]]]></description>
			<content:encoded><![CDATA[<p><font color="#999999">Il post di seguito spiega come utilizzare la seconda versione del mod &#8220;MySQL Authentication&#8221; con un Apache Server versione 2.x.</font></p>
<p><font color="#999999">La distribuzione utilizzata è una Debian GNU/Linux Stable.</font></p>
<p><font color="#999999">Innanzitutto installare i pacchetti necessari (dato per assunto che sia stato già installato apache2/mysql)</font></p>
<p><font color="#999999"># apt-get install </font><font color="#999999" face="courier new,courier,monospace" size="2"><em>libapache2-mod-auth-mysql</em></font></p>
<p><font color="#999999">Creare la tabella nel database MySQL</font></p>
<p><font color="#999999" face="courier new,courier,monospace" size="2"><em>mysql -uroot -p</em></font></p>
<p><font color="#999999" face="courier new,courier,monospace" size="2"><em>mysql&gt; create database apache_auth;</em></font></p>
<p><font color="#999999" face="courier new,courier,monospace" size="2"><em>mysql&gt; CREATE TABLE `users` (<br />
</em></font></p>
<blockquote><p><font color="#999999" face="courier new,courier,monospace" size="2"><em> `login` varchar(25) NOT NULL default &#8221;,</em></font></p></blockquote>
<blockquote><p><font color="#999999" face="courier new,courier,monospace" size="2"><em> `passwd` varchar(25) NOT NULL default &#8221;,</em></font></p></blockquote>
<blockquote><p><font color="#999999" face="courier new,courier,monospace" size="2"><em> PRIMARY KEY  (`login`),</em></font></p></blockquote>
<p><font color="#999999" face="courier new,courier,monospace" size="2"><em> ) ENGINE=MyISAM DEFAULT CHARSET=latin1;</em></font></p>
<p><font color="#999999">Creare un utente (definito da auth_user/auth_password) con USAGE Privileges sulla tabella appena creata</font></p>
<p><font color="#999999" face="courier new,courier,monospace" size="2"><em>mysql&gt; grant all on apache_auth.* to auth_user@localhost identified by &#8216;</em></font><font color="#999999" size="2"><font face="courier new,courier,monospace"><em>auth_password</em></font></font><font color="#999999">&#8216;;</font></p>
<p><font color="#999999" face="courier new,courier,monospace" size="2"><em>mysql&gt; flush privileges</em></font></p>
<p><font color="#999999">Definire nel file di configurazione /etc/apache2/apache2.conf la directory per la quale deve essere letto il file .htaccess</font></p>
<blockquote><p><font color="#999999" face="courier new,courier,monospace" size="2"><em>   Options +Indexes FollowSymLinks MultiViews</em></font></p></blockquote>
<blockquote><p><font color="#999999" face="courier new,courier,monospace" size="2"><em>      AllowOverride AuthConfig Options FileInfo Limit</em></font></p></blockquote>
<blockquote><p><font color="#999999" face="courier new,courier,monospace" size="2"><em>          Order allow,deny</em></font></p></blockquote>
<blockquote><p><font color="#999999" face="courier new,courier,monospace" size="2"><em>              Allow from all</em></font></p></blockquote>
<p><font color="#999999" face="courier new,courier,monospace" size="2"><em>              </em></font></p>
<p><font color="#999999" face="courier new,courier,monospace" size="2"><em>              </em></font></p>
<p><font color="#999999">Creare il file .htaccess fisicamente nella directory relativa sul filesystem e inserirci le seguenti righe:</font></p>
<blockquote><p><font color="#999999"><em>AuthMYSQL on</em></font></p>
<p><font color="#999999"><em>AuthType Basic<br />
AuthName &#8220;Autenticazione Richiesta&#8221;</em></font></p>
<p><font color="#999999"><em>AuthMySQL_User <font face="courier new,courier,monospace" size="2">auth_user</font><br />
AuthMySQL_Password <font face="courier new,courier,monospace" size="2">auth_password</font><br />
AuthMySQL_Host 127.0.0.1<br />
AuthMySQL_Authoritative on<br />
AuthMySQL_DB apache_auth<br />
AuthMySQL_Password_Table users<br />
AuthMySQL_Username_Field login<br />
Auth_MySQL_Password_Field passwd</em></font></p>
<p><font color="#999999"><em>AuthMySQL_Empty_Passwords off<br />
AuthMySQL_Encryption_Types Plaintext Crypt_DES</em></font></p>
<p><font color="#999999"><em>require valid-user</em></font></p></blockquote>
<p><font color="#999999">In questo modo, tutti gli utenti definiti nella tabella &#8220;apache_auth&#8221; si autenticheranno con successo nella directory definita.</font></p>
<p><font color="#999999">Di seguito sono descritte tutte le possibili direttive utilizzabili (prese dal package sorgente mantenuto da <a href="http://qa.debian.org/developer.php?login=mpalmer@debian.org">Matthew Palmer</a>)</font></p>
<p><font color="#999999">&#8212;- START &#8212;-</font></p>
<p><font color="#999999">Auth_MySQL_Info</font></p>
<p><font color="#999999">Server-wide config option to specify the database host, username,<br />
and password used to connect to the MySQL server.This option affects all directories which do not override it via<br />
AuthMySQL_Host, AuthMySQL_User, and/or AuthMySQL_Password.</font></p>
<p><font color="#999999">AuthMySQL_DefaultHost<br />
Specifies the MySQL server to use for authentication.</font></p>
<p><font color="#999999">This option affects all directories which do not override it via<br />
AuthMySQL_Host.</font></p>
<p><font color="#999999">AuthMySQL_Host<br />
Synonym for AuthMySQL_DefaultHost, to be used in .htaccess files and<br />
directory-specific entries.</font></p>
<p><font color="#999999">Auth_MySQL_DefaultPort</font></p>
<p><font color="#999999">Specifies a port to use to talk to a MySQL server.  If left empty,<br />
the default (3306) will be used.This option affects all directories which do not override it via<br />
Auth_MySQL_Port.</font></p>
<p><font color="#999999">Auth_MySQL_Port</font></p>
<p><font color="#999999">Specifies a non-default port to use (other than 3306) when talking<br />
to the MySQL server on AuthMySQL_Host or AuthMySQL_DefaultHost.Auth_MySQL_DefaultSocket<br />
If using a local MySQL server, you can<br />
specify a non-default named pipe to use instead of the default pipe<br />
name compiled into your MySQL client library.</font></p>
<p><font color="#999999">This option affects all directories which do not override it via<br />
Auth_MySQL_Socket.</font></p>
<p><font color="#999999">Auth_MySQL_Socket<br />
If using a local MySQL server, you can specify a non-default named<br />
pipe to use instead of the default one compiled into MySQL with this<br />
option.</font></p>
<p><font color="#999999">AuthMySQL_DefaultUser<br />
Specifies the username for connection to the MySQL server.</font></p>
<p><font color="#999999">AuthMySQL_User<br />
Synonym for AuthMySQL_DefaultUser, to be used in .htaccess files and<br />
directory-specific entries.</font></p>
<p><font color="#999999">AuthMySQL_DefaultPassword</font></p>
<p><font color="#999999">Specifies the password user together with the above user.AuthMySQL_Password</font></p>
<p><font color="#999999">Synonym for AuthMySQL_Password, to be used in .htaccess files and<br />
directory-specific entries.Auth_MySQL_General_DB<br />
Server-wide, specifies a default database name to use.</font></p>
<p><font color="#999999">Auth_MySQL_DB<br />
Synonym for Auth_MySQL_General_DB, to be used in .htaccess files and<br />
directory-specific entries.</font></p>
<p><font color="#999999">AuthMySQL_DefaultDB<br />
Synonym for Auth_MySQL_General_DB.</font></p>
<p><font color="#999999">AuthMySQL_DB<br />
Synonym for Auth_MySQL_General_DB, to be used in .htaccess files and<br />
directory-specific entries.</font></p>
<p><font color="#999999">AuthName &#8220;&#8221;<br />
Describes the data you&#8217;re guarding.</font></p>
<p><font color="#999999">AuthType<br />
The authentication process used in the transaction.  Stick with<br />
Basic, no others work at present.</font></p>
<p><font color="#999999">require<br />
Specify what is considered a valid authentication.   can be<br />
either user, group, or valid-user.  valid-user is the simplest -<br />
anyone who gets the username and password right gets in.  Otherwise,<br />
the user must either have a username in the space-separated list of<br />
identifiers (if using user) or must be a member of a group in the<br />
list of identifiers (if user group).</font></p>
<p><font color="#999999">Multiple require statements are allowed; if multiple require<br />
statements are present in a configuration, then the user will be<br />
considered authenticated if they can satisfy any of the require<br />
statements supplied.</font></p>
<p><font color="#999999">Auth_MySQL_Password_Table</font></p>
<p><font color="#999999">The name of the MySQL table in the specified database which stores<br />
username:password pairs.  By default, it is &#8216;mysql_auth&#8217;.AuthMySQL_Password_Table</font></p>
<p><font color="#999999">Synonym for Auth_MySQL_Password_Table.Auth_MySQL_Group_Table<br />
As per &#8230;Password_Table above, stores username:group pairs.<br />
Normally you&#8217;ll store username:password:group triplets in the one<br />
table, but we are nothing if not flexible.  Defaults to<br />
&#8216;mysql_auth&#8217;.</font></p>
<p><font color="#999999">AuthMySQL_Group_Table<br />
Synonym for Auth_MySQL_Group_Table.</font></p>
<p><font color="#999999">Auth_MySQL_Username_Field<br />
The name of the field which stores usernames.  Defaults to<br />
&#8216;username&#8217;. The username/password combo specified in Auth_MySQL_Info<br />
must have select privileges to this field in the Password and Group<br />
tables.</font></p>
<p><font color="#999999">AuthMySQL_Username_Field<br />
Synonym for Auth_MySQL_Username_Field.</font></p>
<p><font color="#999999">Auth_MySQL_Password_Field</font></p>
<p><font color="#999999">As per &#8230;Username_Field above, but for passwords.  Same MySQL<br />
access privileges.  Defaults to &#8216;password&#8217;.AuthMySQL_Password_Field</font></p>
<p><font color="#999999">Synonym for Auth_MySQL_Password_Field.Auth_MySQL_Group_Field<br />
As per &#8230;Username_Field above.  Defaults to &#8216;groups&#8217;.</font></p>
<p><font color="#999999">AuthMySQL_Group_Field<br />
Synonym for Auth_MySQL_Group_Field.</font></p>
<p><font color="#999999">Auth_MySQL_Group_User_Field<br />
The name of the field in the groups table which stores the username.<br />
Defaults to the field name specified for usernames in the passwords<br />
table.</font></p>
<p><font color="#999999">AuthMySQL_Group_User_Field<br />
Synonym for Auth_MySQL_Group_User_Field.</font></p>
<p><font color="#999999">Auth_MySQL_Password_Clause<br />
Adds arbitrary clause to username:password matching query, for example:<br />
&#8221; AND Allowed=1&#8243;. Clause has to start with space. Default is empty.</font></p>
<p><font color="#999999">Auth_MySQL_Group_Clause<br />
Adds arbitrary clause to username:group matching query, for example:<br />
&#8221; AND Allowed=1&#8243;. Clause has to start with space. Default is empty.</font></p>
<p><font color="#999999">Auth_MySQL_Empty_Passwords<br />
Whether or not to allow empty passwords.  If the password field is<br />
empty (equals to &#8221;) and this option is &#8216;on&#8217;, users would be able to<br />
access the page by just specifying their username WITHOUT ANY<br />
PASSWORD CHECKING.  If this is &#8216;off&#8217;, they would be denied access.<br />
Default: &#8216;on&#8217;.</font></p>
<p><font color="#999999">AuthMySQL_Empty_Passwords<br />
Synonym for Auth_MySQL_Empty_Passwords.</font></p>
<p><font color="#999999">Auth_MySQL_Encryption_Types</font></p>
<p><font color="#999999">Select which types of encryption to check, and in which order to<br />
check them.  It overrides the legacy Auth_MySQL_Scrambled_Passwords<br />
and Auth_MySQL_Encrypted_Passwords directives.  Multiple encryption<br />
types may be specified, to instruct the module to check each<br />
password in multiple encryption schemes - a useful feature for<br />
legacy transitions.  For example:</font></p>
<p><font color="#999999">Auth_MySQL_Encryption_Types Plaintext Crypt_DES</font></p>
<p><font color="#999999">Would instruct the module to do a direct comparison of the entered<br />
password with the contents of the password field, and if that fails,<br />
to do a DES crypt() check, a la Unix password handling.</font></p>
<p><font color="#999999">The available encryption types supported at this time are:</font></p>
<p><font color="#999999">Plaintext<br />
Pretty self-explanatory.  Not recommended.</font></p>
<p><font color="#999999">Crypt_DES<br />
Check the password via the standard Unix crypt() call, using<br />
DES hashing.</font></p>
<p><font color="#999999">Crypt_MD5<br />
Check the password via the standard Unix crypt() call, using<br />
an MD5 hash.</font></p>
<p><font color="#999999">Crypt<br />
Check the password via the standard Unix crypt() call,<br />
without preference for the hashing scheme employed.  This is<br />
the generally preferred means of checking crypt()ed<br />
passwords, because it allows you to use other schemes which<br />
may be available on your system, such as blowfish.</font></p>
<p><font color="#999999">PHP_MD5<br />
Compares with an MD5 hash, encoded in the way that PHP and<br />
MySQL handle MD5 hashes - 32 character hex code, with<br />
lowercase letters.</font></p>
<p><font color="#999999">SHA1Sum<br />
Compares with a SHA1 hash, encoded the way that MySQL, PHP,<br />
and the sha1sum command produce their output (a 40 character<br />
lowercase hex representation).</font></p>
<p><font color="#999999">MySQL<br />
The hashing scheme used by the MySQL PASSWORD() function.</font></p>
<p><font color="#999999">AuthMySQL_Encryption_Types<br />
Synonym for Auth_MySQL_Encryption_Types.</font></p>
<p><font color="#999999">Auth_MySQL_Encrypted_Passwords  (DEPRECATED)<br />
Equivalent to: Auth_MySQL_Encryption_Types Crypt_DES<br />
Only used if &#8230;Encryption_Types is not set.  Defaults to &#8216;on&#8217;.  If<br />
both this option and &#8230;Scrambled_Passwords are &#8216;off&#8217; and<br />
&#8230;Encryption_Types is not set, passwords are expected to be in<br />
plaintext.</font></p>
<p><font color="#999999">AuthMySQL_Encrypted_Passwords  (DEPRECATED)<br />
Synonym for Auth_MySQL_Encrypted_Passwords.</font></p>
<p><font color="#999999">Auth_MySQL_Scrambled_Passwords  (DEPRECATED)<br />
Equivalent to: Auth_MySQL_Encryption_Types MySQL<br />
The same restrictions apply to this directive as to<br />
&#8230;Encrypted_Passwords.</font></p>
<p><font color="#999999">AuthMySQL_Scrambled_Passwords  (DEPRECATED)<br />
Synonym for Auth_MySQL_Scrambled_Passwords.</font></p>
<p><font color="#999999">Auth_MySQL_Authoritative<br />
Whether or not to use other authentication schemes if the user is<br />
successfully authenticated.  That is, if the user passes the MySQL<br />
authentication, they may still be rejected by a later module if this<br />
option is set &#8216;off&#8217;.  The default is &#8216;on&#8217; (i.e. if the user passes<br />
the MySQL module, they&#8217;re considered OK).</font></p>
<p><font color="#999999">AuthMySQL_Authoritative<br />
Synonym for Auth_MySQL_Authoritative.</font></p>
<p><font color="#999999">Auth_MySQL_Non_Persistent<br />
If set to &#8216;on&#8217;, the link to the MySQL server is explicitly closed<br />
after each authentication request.  Note that I can&#8217;t think of any<br />
possible good reason to do this, unless your platform makes MySQL go<br />
crazy when it has plenty of simultaneous threads (bad handling of<br />
file descriptors may cause that).  In my opinion, one should<br />
increase the maximum number of simultaneous threads in MySQL and<br />
keep this option off.  Default: off, and for good reason.</font></p>
<p><font color="#999999">AuthMySQL_Persistent<br />
An antonym for Auth_MySQL_Non_Persistent.</font></p>
<p><font color="#999999">AuthMySQL_AllowOverride<br />
Whether or not .htaccess files are allowed to use their own<br />
Host/User/Password/DB specifications.  If set to &#8216;off&#8217;, then the<br />
defaults specified in the httpd.conf cannot be overridden.</font></p>
<p><font color="#999999">Auth_MYSQL<br />
Whether or not to enable MySQL authentication.  If it&#8217;s off, the<br />
MySQL authentication will simply pass authentication off to other<br />
modules defined.</font></p>
<p><font color="#999999">AuthMySQL<br />
Synonym for Auth_MYSQL.</font></p>
<p><font color="#999999">&#8212; END &#8212;</font></p>
]]></content:encoded>
			<wfw:commentRss>http://blog.techfusion.it/2007/01/15/apache2-mysql-mod_auth-v2-libapache2-mod-auth-mysql/feed/</wfw:commentRss>
		</item>
	</channel>
</rss>
