<?xml version="1.0" encoding="UTF-8"?><rss version="2.0"
	xmlns:content="http://purl.org/rss/1.0/modules/content/"
	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/"
		>
<channel>
	<title>Comments on: Password protecting MediaWiki with mod_auth_mysql</title>
	<atom:link href="http://richardkmiller.com/184/password-protecting-mediawiki-with-mod_auth_mysql/feed" rel="self" type="application/rss+xml" />
	<link>http://richardkmiller.com/184/password-protecting-mediawiki-with-mod_auth_mysql</link>
	<description></description>
	<lastBuildDate>Tue, 15 May 2012 02:38:28 +0000</lastBuildDate>
	<sy:updatePeriod>hourly</sy:updatePeriod>
	<sy:updateFrequency>1</sy:updateFrequency>
	<generator>http://wordpress.org/?v=3.3.1</generator>
	<item>
		<title>By: Richard K Miller</title>
		<link>http://richardkmiller.com/184/password-protecting-mediawiki-with-mod_auth_mysql/comment-page-1#comment-168216</link>
		<dc:creator>Richard K Miller</dc:creator>
		<pubDate>Thu, 31 Mar 2011 23:48:35 +0000</pubDate>
		<guid isPermaLink="false">http://www.richardkmiller.com/blog/archives/2006/05/password-protecting-mediawiki-with-mod_auth_mysql#comment-168216</guid>
		<description>If you still get &quot;Could not open password file&quot; after taking the above step, add this directive as well:

AuthUserFile /dev/null</description>
		<content:encoded><![CDATA[<div class='microid-781638ceff08110e27cb6063c5cd105a241b5e67'>If you still get &#8220;Could not open password file&#8221; after taking the above step, add this directive as well:</p>
<p>AuthUserFile /dev/null</p></div>
]]></content:encoded>
	</item>
	<item>
		<title>By: hakre</title>
		<link>http://richardkmiller.com/184/password-protecting-mediawiki-with-mod_auth_mysql/comment-page-1#comment-153891</link>
		<dc:creator>hakre</dc:creator>
		<pubDate>Fri, 06 Nov 2009 15:10:12 +0000</pubDate>
		<guid isPermaLink="false">http://www.richardkmiller.com/blog/archives/2006/05/password-protecting-mediawiki-with-mod_auth_mysql#comment-153891</guid>
		<description>My just made extension that does the trick for mod_auth_mysql with md5 now in case there is no way to create a mysql view:

http://subfiles.net/mediawiki/mediawiki-extension-mod_auth_mysql-v0-1.zip

(mediawiki-1.15.1)

feel free to delete all my comments and you can offer the link on top (or offer the zip as well, it&#039;s released under AGPL).</description>
		<content:encoded><![CDATA[<div class='microid-ae0b9a651af032245bb81bf7d82ec194c04105f9'>My just made extension that does the trick for mod_auth_mysql with md5 now in case there is no way to create a mysql view:</p>
<p><a href="http://subfiles.net/mediawiki/mediawiki-extension-mod_auth_mysql-v0-1.zip" rel="nofollow">http://subfiles.net/mediawiki/mediawiki-extension-mod_auth_mysql-v0-1.zip</a></p>
<p>(mediawiki-1.15.1)</p>
<p>feel free to delete all my comments and you can offer the link on top (or offer the zip as well, it&#8217;s released under AGPL).</p></div>
]]></content:encoded>
	</item>
	<item>
		<title>By: hakre</title>
		<link>http://richardkmiller.com/184/password-protecting-mediawiki-with-mod_auth_mysql/comment-page-1#comment-153887</link>
		<dc:creator>hakre</dc:creator>
		<pubDate>Fri, 06 Nov 2009 09:53:13 +0000</pubDate>
		<guid isPermaLink="false">http://www.richardkmiller.com/blog/archives/2006/05/password-protecting-mediawiki-with-mod_auth_mysql#comment-153887</guid>
		<description>With my mediawiki-1.15.1 and $wgPasswordSalt = false; mediawiki will use only md5() to create the hash but it will prefix the value in the database with :A:.

Right now I have not found a solution to circumvent that with built in methods.

There is a mediawii hook called UserCryptPassword ( &amp;$password, &amp;$salt, &amp;$wgPasswordSalt, &amp;$hash ) that can overwrite the hash creation. this could be used to create a mediawiki php extension (will try that now) incorporating that routine. maybe this already exists as well. 

this is identified cause why mysql auth didn&#039;t work any longer mediawiki in my case.</description>
		<content:encoded><![CDATA[<div class='microid-ae0b9a651af032245bb81bf7d82ec194c04105f9'>With my mediawiki-1.15.1 and $wgPasswordSalt = false; mediawiki will use only md5() to create the hash but it will prefix the value in the database with :A:.</p>
<p>Right now I have not found a solution to circumvent that with built in methods.</p>
<p>There is a mediawii hook called UserCryptPassword ( &amp;$password, &amp;$salt, &amp;$wgPasswordSalt, &amp;$hash ) that can overwrite the hash creation. this could be used to create a mediawiki php extension (will try that now) incorporating that routine. maybe this already exists as well. </p>
<p>this is identified cause why mysql auth didn&#8217;t work any longer mediawiki in my case.</p></div>
]]></content:encoded>
	</item>
	<item>
		<title>By: hakre</title>
		<link>http://richardkmiller.com/184/password-protecting-mediawiki-with-mod_auth_mysql/comment-page-1#comment-153886</link>
		<dc:creator>hakre</dc:creator>
		<pubDate>Fri, 06 Nov 2009 08:42:25 +0000</pubDate>
		<guid isPermaLink="false">http://www.richardkmiller.com/blog/archives/2006/05/password-protecting-mediawiki-with-mod_auth_mysql#comment-153886</guid>
		<description>Please ignore my last comment, I checked the values in the DB against md5($pass) and it is correct, a simple md5 hash is in there.

Need to make more checks.</description>
		<content:encoded><![CDATA[<div class='microid-ae0b9a651af032245bb81bf7d82ec194c04105f9'>Please ignore my last comment, I checked the values in the DB against md5($pass) and it is correct, a simple md5 hash is in there.</p>
<p>Need to make more checks.</p></div>
]]></content:encoded>
	</item>
	<item>
		<title>By: hakre</title>
		<link>http://richardkmiller.com/184/password-protecting-mediawiki-with-mod_auth_mysql/comment-page-1#comment-153885</link>
		<dc:creator>hakre</dc:creator>
		<pubDate>Fri, 06 Nov 2009 08:38:18 +0000</pubDate>
		<guid isPermaLink="false">http://www.richardkmiller.com/blog/archives/2006/05/password-protecting-mediawiki-with-mod_auth_mysql#comment-153885</guid>
		<description>Did not work for me. I have problems to get it to work with mediawiki-1.15.1. I assume that the passwords stored inside the DB are not stored in a format that can be handled by the mysql auth module any longer. Authorization just does not work. Maybe a change in the data definition and hashing? 

user_name  	varchar(255) - utf8_bin - 
user_password  	tinyblob - - BINARY

I need to check wether or not blobs are suppored. I even created a new user AFTER changing the $wgPasswordSalt = false; directive to false. Logging in with the new user into mediawiki does work. Over the httpd authentication the new user can not log in (as well as the old user can&#039;t).</description>
		<content:encoded><![CDATA[<div class='microid-ae0b9a651af032245bb81bf7d82ec194c04105f9'>Did not work for me. I have problems to get it to work with mediawiki-1.15.1. I assume that the passwords stored inside the DB are not stored in a format that can be handled by the mysql auth module any longer. Authorization just does not work. Maybe a change in the data definition and hashing? </p>
<p>user_name  	varchar(255) &#8211; utf8_bin &#8211;<br />
user_password  	tinyblob &#8211; - BINARY</p>
<p>I need to check wether or not blobs are suppored. I even created a new user AFTER changing the $wgPasswordSalt = false; directive to false. Logging in with the new user into mediawiki does work. Over the httpd authentication the new user can not log in (as well as the old user can&#8217;t).</p></div>
]]></content:encoded>
	</item>
	<item>
		<title>By: Manoj Bhardwaj</title>
		<link>http://richardkmiller.com/184/password-protecting-mediawiki-with-mod_auth_mysql/comment-page-1#comment-153257</link>
		<dc:creator>Manoj Bhardwaj</dc:creator>
		<pubDate>Mon, 07 Sep 2009 16:24:11 +0000</pubDate>
		<guid isPermaLink="false">http://www.richardkmiller.com/blog/archives/2006/05/password-protecting-mediawiki-with-mod_auth_mysql#comment-153257</guid>
		<description>@Rob Velseboer

Worked like a charm. 

As Paul mentioned, the quotes in $wgWhitelistRead needed changing. Other than that, there was no needto install DB Modules and yet I was able to password protect the wiki for authorised users only. It also prevented anonymous users from creating new accounts.

Kind regards,
Manoj</description>
		<content:encoded><![CDATA[<div class='microid-c9293cb6af474736b73dc6ffa6a2c03110a5b111'>@Rob Velseboer</p>
<p>Worked like a charm. </p>
<p>As Paul mentioned, the quotes in $wgWhitelistRead needed changing. Other than that, there was no needto install DB Modules and yet I was able to password protect the wiki for authorised users only. It also prevented anonymous users from creating new accounts.</p>
<p>Kind regards,<br />
Manoj</p></div>
]]></content:encoded>
	</item>
	<item>
		<title>By: Götz</title>
		<link>http://richardkmiller.com/184/password-protecting-mediawiki-with-mod_auth_mysql/comment-page-1#comment-152672</link>
		<dc:creator>Götz</dc:creator>
		<pubDate>Sun, 21 Jun 2009 10:04:55 +0000</pubDate>
		<guid isPermaLink="false">http://www.richardkmiller.com/blog/archives/2006/05/password-protecting-mediawiki-with-mod_auth_mysql#comment-152672</guid>
		<description>@Richard I just wrote some code and it seems to work.

I didn&#039;t need to create a new cookie, because the UserID cookie is only to be found, when the user is logged in, so I copied some code from include/User.php method loadFromSession. Now you still could log out, but you never need to login, because with each request you&#039;re automatically logged in with your HTTP Auth login data if the UserID cookie isn&#039;t present.

I&#039;m just tidying up my code and may send you the extension later today.</description>
		<content:encoded><![CDATA[<div class='microid-0b30e447e784b95a81afad8c336458638e288fca'>@Richard I just wrote some code and it seems to work.</p>
<p>I didn&#8217;t need to create a new cookie, because the UserID cookie is only to be found, when the user is logged in, so I copied some code from include/User.php method loadFromSession. Now you still could log out, but you never need to login, because with each request you&#8217;re automatically logged in with your HTTP Auth login data if the UserID cookie isn&#8217;t present.</p>
<p>I&#8217;m just tidying up my code and may send you the extension later today.</p></div>
]]></content:encoded>
	</item>
	<item>
		<title>By: Richard K Miller</title>
		<link>http://richardkmiller.com/184/password-protecting-mediawiki-with-mod_auth_mysql/comment-page-1#comment-152670</link>
		<dc:creator>Richard K Miller</dc:creator>
		<pubDate>Sat, 20 Jun 2009 22:30:48 +0000</pubDate>
		<guid isPermaLink="false">http://www.richardkmiller.com/blog/archives/2006/05/password-protecting-mediawiki-with-mod_auth_mysql#comment-152670</guid>
		<description>@Götz: Ah, I see what you mean, and it seems like you have a good idea here. I hope it works. If you create a plugin for it, let me know.</description>
		<content:encoded><![CDATA[<div class='microid-781638ceff08110e27cb6063c5cd105a241b5e67'>@Götz: Ah, I see what you mean, and it seems like you have a good idea here. I hope it works. If you create a plugin for it, let me know.</div>
]]></content:encoded>
	</item>
	<item>
		<title>By: Götz</title>
		<link>http://richardkmiller.com/184/password-protecting-mediawiki-with-mod_auth_mysql/comment-page-1#comment-152669</link>
		<dc:creator>Götz</dc:creator>
		<pubDate>Sat, 20 Jun 2009 21:47:09 +0000</pubDate>
		<guid isPermaLink="false">http://www.richardkmiller.com/blog/archives/2006/05/password-protecting-mediawiki-with-mod_auth_mysql#comment-152669</guid>
		<description>Hi Richard,

thank you for yozur reply. That&#039;s exactly what I&#039;m trying to do. However MediaWiki seems to provide no user/session data when the UserLoadFromSession hook is called. I thought about just creating an own additional cookie using the UserLoginComplete hook and check this cookie to avoid the redirection loop.

Kind regards,
Götz</description>
		<content:encoded><![CDATA[<div class='microid-0b30e447e784b95a81afad8c336458638e288fca'>Hi Richard,</p>
<p>thank you for yozur reply. That&#8217;s exactly what I&#8217;m trying to do. However MediaWiki seems to provide no user/session data when the UserLoadFromSession hook is called. I thought about just creating an own additional cookie using the UserLoginComplete hook and check this cookie to avoid the redirection loop.</p>
<p>Kind regards,<br />
Götz</p></div>
]]></content:encoded>
	</item>
	<item>
		<title>By: Richard K Miller</title>
		<link>http://richardkmiller.com/184/password-protecting-mediawiki-with-mod_auth_mysql/comment-page-1#comment-152668</link>
		<dc:creator>Richard K Miller</dc:creator>
		<pubDate>Sat, 20 Jun 2009 21:37:23 +0000</pubDate>
		<guid isPermaLink="false">http://www.richardkmiller.com/blog/archives/2006/05/password-protecting-mediawiki-with-mod_auth_mysql#comment-152668</guid>
		<description>@Götz: I haven&#039;t seen anyone do this yet, but I&#039;d be interested in it too. I assume you&#039;d need some sort of MediaWiki plugin that looks for the presence of $_SERVER[&#039;PHP_AUTH_USER&#039;] and $_SERVER[&#039;PHP_AUTH_PW&#039;] and then bypasses the login form with those credentials.</description>
		<content:encoded><![CDATA[<div class='microid-781638ceff08110e27cb6063c5cd105a241b5e67'>@Götz: I haven&#8217;t seen anyone do this yet, but I&#8217;d be interested in it too. I assume you&#8217;d need some sort of MediaWiki plugin that looks for the presence of $_SERVER['PHP_AUTH_USER'] and $_SERVER['PHP_AUTH_PW'] and then bypasses the login form with those credentials.</div>
]]></content:encoded>
	</item>
	<item>
		<title>By: Götz</title>
		<link>http://richardkmiller.com/184/password-protecting-mediawiki-with-mod_auth_mysql/comment-page-1#comment-152651</link>
		<dc:creator>Götz</dc:creator>
		<pubDate>Thu, 18 Jun 2009 15:58:31 +0000</pubDate>
		<guid isPermaLink="false">http://www.richardkmiller.com/blog/archives/2006/05/password-protecting-mediawiki-with-mod_auth_mysql#comment-152651</guid>
		<description>Hello Richard,

thanks for this great tutorial. After I struggled a bit with some configuration settings (different versions of the module and different names of directives, ...) I managed to set this up successfully.

But I&#039;m still working on a single sign on. I tried forwarding the login data (I run PHP as module)  to the MediaWiki login form but either I get a redirection loop to the main page or when I turn off the redirection I get an error mesage that $wgTitle is empty.
Did anyone who comes by here manage to make MediaWiki use the HTTP Auth data to log in users correctly (as this is no &quot;external authentiocation&quot; the modules which I found didn&#039;t meet my needs).

Kind regards,
Götz</description>
		<content:encoded><![CDATA[<div class='microid-0b30e447e784b95a81afad8c336458638e288fca'>Hello Richard,</p>
<p>thanks for this great tutorial. After I struggled a bit with some configuration settings (different versions of the module and different names of directives, &#8230;) I managed to set this up successfully.</p>
<p>But I&#8217;m still working on a single sign on. I tried forwarding the login data (I run PHP as module)  to the MediaWiki login form but either I get a redirection loop to the main page or when I turn off the redirection I get an error mesage that $wgTitle is empty.<br />
Did anyone who comes by here manage to make MediaWiki use the HTTP Auth data to log in users correctly (as this is no &#8220;external authentiocation&#8221; the modules which I found didn&#8217;t meet my needs).</p>
<p>Kind regards,<br />
Götz</p></div>
]]></content:encoded>
	</item>
	<item>
		<title>By: Paul</title>
		<link>http://richardkmiller.com/184/password-protecting-mediawiki-with-mod_auth_mysql/comment-page-1#comment-151186</link>
		<dc:creator>Paul</dc:creator>
		<pubDate>Fri, 21 Nov 2008 17:49:36 +0000</pubDate>
		<guid isPermaLink="false">http://www.richardkmiller.com/blog/archives/2006/05/password-protecting-mediawiki-with-mod_auth_mysql#comment-151186</guid>
		<description>@Rob Velseboer
Your instructions for modifying LocalSettings.php to hide pages, require login, etc were PERFECT.  I didn&#039;t have to go modifying my db, apache which made it so much easier.
One thing to note is that the line that contains your $wgWhitelistRead in your example has &quot;smart quotes&quot; and if you copy/paste it into your LocalSettings.php, PHP will die.  Just change them to normal quotes and you&#039;ll be fine.</description>
		<content:encoded><![CDATA[<div class='microid-1a982315ccf98c646a25b10d0771f0960cfd18a1'>@Rob Velseboer<br />
Your instructions for modifying LocalSettings.php to hide pages, require login, etc were PERFECT.  I didn&#8217;t have to go modifying my db, apache which made it so much easier.<br />
One thing to note is that the line that contains your $wgWhitelistRead in your example has &#8220;smart quotes&#8221; and if you copy/paste it into your LocalSettings.php, PHP will die.  Just change them to normal quotes and you&#8217;ll be fine.</div>
]]></content:encoded>
	</item>
	<item>
		<title>By: Gregg</title>
		<link>http://richardkmiller.com/184/password-protecting-mediawiki-with-mod_auth_mysql/comment-page-1#comment-150933</link>
		<dc:creator>Gregg</dc:creator>
		<pubDate>Tue, 14 Oct 2008 13:52:55 +0000</pubDate>
		<guid isPermaLink="false">http://www.richardkmiller.com/blog/archives/2006/05/password-protecting-mediawiki-with-mod_auth_mysql#comment-150933</guid>
		<description>Thanks for this posting. I set this up a few years back using MediaWiki version 1.7 at the time. I had a need for the same setup at a new job and ran into a road block which looked like :A: before each password. This post saved me time fiddling for a work around. Works great on Debian Etch with latest MediaWiki release.</description>
		<content:encoded><![CDATA[<div class='microid-94747ae1aa627998483e5b50a4ed7ccceac0ad0c'>Thanks for this posting. I set this up a few years back using MediaWiki version 1.7 at the time. I had a need for the same setup at a new job and ran into a road block which looked like :A: before each password. This post saved me time fiddling for a work around. Works great on Debian Etch with latest MediaWiki release.</div>
]]></content:encoded>
	</item>
	<item>
		<title>By: Péter</title>
		<link>http://richardkmiller.com/184/password-protecting-mediawiki-with-mod_auth_mysql/comment-page-1#comment-145002</link>
		<dc:creator>Péter</dc:creator>
		<pubDate>Fri, 28 Mar 2008 11:47:48 +0000</pubDate>
		<guid isPermaLink="false">http://www.richardkmiller.com/blog/archives/2006/05/password-protecting-mediawiki-with-mod_auth_mysql#comment-145002</guid>
		<description>Rob - thanks for the advice! I don&#039;t have access to the apache configuration on my server, so it was much simpler to just hide the content from anonymous users. Works great.</description>
		<content:encoded><![CDATA[<div class='microid-5ea92dbcbe87b28322176cce3a22df61fbeb6154'>Rob &#8211; thanks for the advice! I don&#8217;t have access to the apache configuration on my server, so it was much simpler to just hide the content from anonymous users. Works great.</div>
]]></content:encoded>
	</item>
	<item>
		<title>By: Michael</title>
		<link>http://richardkmiller.com/184/password-protecting-mediawiki-with-mod_auth_mysql/comment-page-1#comment-144637</link>
		<dc:creator>Michael</dc:creator>
		<pubDate>Tue, 11 Mar 2008 23:10:07 +0000</pubDate>
		<guid isPermaLink="false">http://www.richardkmiller.com/blog/archives/2006/05/password-protecting-mediawiki-with-mod_auth_mysql#comment-144637</guid>
		<description>Quote-
You’ll need to uncompress the .tar.gz file with tar -xzf. If it produces an .so file then you can place it with the others .so files and then include it in your Apache configuration file. If it produces source, then you’ll need to compile it with “sudo make install”.


I&#039;m a giant among midgets at my job, where I&#039;ve been setting up an intranet (WinXP, Apache 2+PHP, MediaWiki, MySql, FreeBSD).

Unfortunately, I&#039;ve been having trouble extending Apache by installing modules like mod_auth_mysql, mod_dav, etc. I don&#039;t know how to uncompress a tar.gz with -xsf under windows. Is there an application that does this? I don&#039;t know how to get/make .so plug in files.</description>
		<content:encoded><![CDATA[<div class='microid-15d3750441c186b38978a0c1a947325c3a3e2d35'>Quote-<br />
You’ll need to uncompress the .tar.gz file with tar -xzf. If it produces an .so file then you can place it with the others .so files and then include it in your Apache configuration file. If it produces source, then you’ll need to compile it with “sudo make install”.</p>
<p>I&#8217;m a giant among midgets at my job, where I&#8217;ve been setting up an intranet (WinXP, Apache 2+PHP, MediaWiki, MySql, FreeBSD).</p>
<p>Unfortunately, I&#8217;ve been having trouble extending Apache by installing modules like mod_auth_mysql, mod_dav, etc. I don&#8217;t know how to uncompress a tar.gz with -xsf under windows. Is there an application that does this? I don&#8217;t know how to get/make .so plug in files.</p></div>
]]></content:encoded>
	</item>
	<item>
		<title>By: Phil Ilten</title>
		<link>http://richardkmiller.com/184/password-protecting-mediawiki-with-mod_auth_mysql/comment-page-1#comment-144602</link>
		<dc:creator>Phil Ilten</dc:creator>
		<pubDate>Tue, 04 Mar 2008 22:59:33 +0000</pubDate>
		<guid isPermaLink="false">http://www.richardkmiller.com/blog/archives/2006/05/password-protecting-mediawiki-with-mod_auth_mysql#comment-144602</guid>
		<description>Just a note, using the &quot;Basic&quot; type of authentication transmits all passwords as plaintext and makes this method of securing easily compromised using packet sniffing. I suggest that if you want to use this method that you secure your wiki using SSL so that all info from login and the wiki is encrypted and cannot be sniffed.</description>
		<content:encoded><![CDATA[<div class='microid-b7c46652ef4307c86b5ecd84f6bbdb4fbf96b345'>Just a note, using the &#8220;Basic&#8221; type of authentication transmits all passwords as plaintext and makes this method of securing easily compromised using packet sniffing. I suggest that if you want to use this method that you secure your wiki using SSL so that all info from login and the wiki is encrypted and cannot be sniffed.</div>
]]></content:encoded>
	</item>
	<item>
		<title>By: Richard K Miller</title>
		<link>http://richardkmiller.com/184/password-protecting-mediawiki-with-mod_auth_mysql/comment-page-1#comment-144465</link>
		<dc:creator>Richard K Miller</dc:creator>
		<pubDate>Thu, 21 Feb 2008 14:07:45 +0000</pubDate>
		<guid isPermaLink="false">http://www.richardkmiller.com/blog/archives/2006/05/password-protecting-mediawiki-with-mod_auth_mysql#comment-144465</guid>
		<description>Nathan: Thank you for your comment. I had just upgraded to Apache 2.2 (also running FreeBSD 6.2, MediaWiki 1.11, and mod_auth_mysql_another-3.0.0) so your insight was just what I needed.</description>
		<content:encoded><![CDATA[<div class='microid-781638ceff08110e27cb6063c5cd105a241b5e67'>Nathan: Thank you for your comment. I had just upgraded to Apache 2.2 (also running FreeBSD 6.2, MediaWiki 1.11, and mod_auth_mysql_another-3.0.0) so your insight was just what I needed.</div>
]]></content:encoded>
	</item>
	<item>
		<title>By: &#187; What goes around, comes around Richard K Miller</title>
		<link>http://richardkmiller.com/184/password-protecting-mediawiki-with-mod_auth_mysql/comment-page-1#comment-144462</link>
		<dc:creator>&#187; What goes around, comes around Richard K Miller</dc:creator>
		<pubDate>Thu, 21 Feb 2008 05:57:09 +0000</pubDate>
		<guid isPermaLink="false">http://www.richardkmiller.com/blog/archives/2006/05/password-protecting-mediawiki-with-mod_auth_mysql#comment-144462</guid>
		<description>[...] but this week I experienced some karma-like effects. Two years ago for work, I developed code to protect wiki websites. Then I published it on my [...]</description>
		<content:encoded><![CDATA[<div class='microid-88b8681570c77fa698e513a06d73565965e641a5'>[...] but this week I experienced some karma-like effects. Two years ago for work, I developed code to protect wiki websites. Then I published it on my [...]</div>
]]></content:encoded>
	</item>
	<item>
		<title>By: nformation &#187; Securing Mediawiki</title>
		<link>http://richardkmiller.com/184/password-protecting-mediawiki-with-mod_auth_mysql/comment-page-1#comment-144446</link>
		<dc:creator>nformation &#187; Securing Mediawiki</dc:creator>
		<pubDate>Tue, 19 Feb 2008 20:32:19 +0000</pubDate>
		<guid isPermaLink="false">http://www.richardkmiller.com/blog/archives/2006/05/password-protecting-mediawiki-with-mod_auth_mysql#comment-144446</guid>
		<description>[...] generally followed Richard K Miller&#8217;s guide. I had to overcome a couple obstacles, but now it&#8217;s up and running. I think that&#8217;s way [...]</description>
		<content:encoded><![CDATA[<div class='microid-648523cad624343a955c979fe7250358e83ec1e2'>[...] generally followed Richard K Miller&#8217;s guide. I had to overcome a couple obstacles, but now it&#8217;s up and running. I think that&#8217;s way [...]</div>
]]></content:encoded>
	</item>
	<item>
		<title>By: Nathan</title>
		<link>http://richardkmiller.com/184/password-protecting-mediawiki-with-mod_auth_mysql/comment-page-1#comment-144444</link>
		<dc:creator>Nathan</dc:creator>
		<pubDate>Tue, 19 Feb 2008 19:40:15 +0000</pubDate>
		<guid isPermaLink="false">http://www.richardkmiller.com/blog/archives/2006/05/password-protecting-mediawiki-with-mod_auth_mysql#comment-144444</guid>
		<description>I was getting the same &quot; Could not open password file: (null)&quot; error from Richard&#039;s example. I tried the format that Tecteun suggests, but that didn&#039;t work either. I did some googling and found this - https://secure-support.novell.com/KanisaPlatform/Publishing/652/3810088_f.SAL_Public.html 
Which says that it&#039;s an issue of basic auth, and suggests adding the line &quot;AuthBasicAuthoritative Off&quot; so I added that to Richard&#039;s example and that made things go. I hope that is of benefit to others.

It may benefit others to mention the version used. FreeBSD 6.3, Mediawiki 1.11.1, apache-2.2.8,  mod_auth_mysql_another-3.0.0_2 (from the ports collection).

This configuration documentation for mod_auth_mysql might also help people : http://modauthmysql.sourceforge.net/CONFIGURE</description>
		<content:encoded><![CDATA[<div class='microid-8ea30e10a8d1c94946591285d78bc4ab457faede'>I was getting the same &#8221; Could not open password file: (null)&#8221; error from Richard&#8217;s example. I tried the format that Tecteun suggests, but that didn&#8217;t work either. I did some googling and found this &#8211; <a href="https://secure-support.novell.com/KanisaPlatform/Publishing/652/3810088_f.SAL_Public.html" rel="nofollow">https://secure-support.novell.com/KanisaPlatform/Publishing/652/3810088_f.SAL_Public.html</a><br />
Which says that it&#8217;s an issue of basic auth, and suggests adding the line &#8220;AuthBasicAuthoritative Off&#8221; so I added that to Richard&#8217;s example and that made things go. I hope that is of benefit to others.</p>
<p>It may benefit others to mention the version used. FreeBSD 6.3, Mediawiki 1.11.1, apache-2.2.8,  mod_auth_mysql_another-3.0.0_2 (from the ports collection).</p>
<p>This configuration documentation for mod_auth_mysql might also help people : <a href="http://modauthmysql.sourceforge.net/CONFIGURE" rel="nofollow">http://modauthmysql.sourceforge.net/CONFIGURE</a></div>
]]></content:encoded>
	</item>
	<item>
		<title>By: Rob Velseboer</title>
		<link>http://richardkmiller.com/184/password-protecting-mediawiki-with-mod_auth_mysql/comment-page-1#comment-82143</link>
		<dc:creator>Rob Velseboer</dc:creator>
		<pubDate>Thu, 24 May 2007 08:50:49 +0000</pubDate>
		<guid isPermaLink="false">http://www.richardkmiller.com/blog/archives/2006/05/password-protecting-mediawiki-with-mod_auth_mysql#comment-82143</guid>
		<description>Actually, you can protect Mediawiki against both reading and writing by anonymous users. Put these lines in your LocalSettings.php file to do so:

$wgGroupPermissions[&#039;*&#039;][&#039;edit&#039;] = false;
$wgGroupPermissions[&#039;*&#039;][&#039;read&#039;] = false;

Now, anonymous users cannot read any pages, except for the ones you explicitly whitelist, like this:

$wgWhitelistRead = array( &quot;Special:Userlogin&quot;, &quot;-&quot;, &quot;MediaWiki:Monobook.css&quot;, &quot;Main_Page&quot; );

That line is probably already in your LocalSettings.php, just add pages you want anonymous users to see. 
If you don&#039;t even want them to see your wiki front page, remove &quot;Main_Page&quot; from this list. 
Visitors will now be asked to log in immediately, even before they get to see your front page.

Unfortunately, by default Mediawiki lets users create their own accounts and this would mean that anonymous visitors can just create an account and have all the privileges you didn&#039;t want them to have.
Protect your wiki against account creation by adding this line to LocalSettings.php:

$wgGroupPermissions[&#039;*&#039;][&#039;createaccount&#039;] = false;

Be aware that now legitimate new users cannot create their own accounts either, (but that problem also existed with the mod_auth_mysql approach). 

There is a way for wiki admin users to create new accounts though:

* Go to the Special:Userlogin page (after loging in as an admin)
* Click &quot;Create an account&quot;
* Fill in the form, uncheck the box &quot;Remember my login on this computer&quot;
* Click &quot;by e-mail&quot;

The new user gets an e-mail with a generated password (I found out the password I typed in the form was discarded)
After logging in for the first time, the new user is asked to choose a new password.

Hope this is useful for people who don&#039;t have access to the Apache configuration on their site, and also for people who are annoyed by having to log in twice.</description>
		<content:encoded><![CDATA[<div class='microid-8bd93be02b6168696c9a5c92d20de7c5a407615a'>Actually, you can protect Mediawiki against both reading and writing by anonymous users. Put these lines in your LocalSettings.php file to do so:</p>
<p>$wgGroupPermissions['*']['edit'] = false;<br />
$wgGroupPermissions['*']['read'] = false;</p>
<p>Now, anonymous users cannot read any pages, except for the ones you explicitly whitelist, like this:</p>
<p>$wgWhitelistRead = array( &#8220;Special:Userlogin&#8221;, &#8220;-&#8221;, &#8220;MediaWiki:Monobook.css&#8221;, &#8220;Main_Page&#8221; );</p>
<p>That line is probably already in your LocalSettings.php, just add pages you want anonymous users to see.<br />
If you don&#8217;t even want them to see your wiki front page, remove &#8220;Main_Page&#8221; from this list.<br />
Visitors will now be asked to log in immediately, even before they get to see your front page.</p>
<p>Unfortunately, by default Mediawiki lets users create their own accounts and this would mean that anonymous visitors can just create an account and have all the privileges you didn&#8217;t want them to have.<br />
Protect your wiki against account creation by adding this line to LocalSettings.php:</p>
<p>$wgGroupPermissions['*']['createaccount'] = false;</p>
<p>Be aware that now legitimate new users cannot create their own accounts either, (but that problem also existed with the mod_auth_mysql approach). </p>
<p>There is a way for wiki admin users to create new accounts though:</p>
<p>* Go to the Special:Userlogin page (after loging in as an admin)<br />
* Click &#8220;Create an account&#8221;<br />
* Fill in the form, uncheck the box &#8220;Remember my login on this computer&#8221;<br />
* Click &#8220;by e-mail&#8221;</p>
<p>The new user gets an e-mail with a generated password (I found out the password I typed in the form was discarded)<br />
After logging in for the first time, the new user is asked to choose a new password.</p>
<p>Hope this is useful for people who don&#8217;t have access to the Apache configuration on their site, and also for people who are annoyed by having to log in twice.</p></div>
]]></content:encoded>
	</item>
	<item>
		<title>By: NetMusician Labs &#187; Blog Archive &#187; Password protect your Mediawiki wikis</title>
		<link>http://richardkmiller.com/184/password-protecting-mediawiki-with-mod_auth_mysql/comment-page-1#comment-78347</link>
		<dc:creator>NetMusician Labs &#187; Blog Archive &#187; Password protect your Mediawiki wikis</dc:creator>
		<pubDate>Fri, 18 May 2007 14:58:57 +0000</pubDate>
		<guid isPermaLink="false">http://www.richardkmiller.com/blog/archives/2006/05/password-protecting-mediawiki-with-mod_auth_mysql#comment-78347</guid>
		<description>[...] found the following guide explaining how Mediawiki wikis can be password protected with basic http/htaccess authentication. [...]</description>
		<content:encoded><![CDATA[<div class='microid-ba2829d94178eabd8e6518d6deb6d7a93907e1f4'>[...] found the following guide explaining how Mediawiki wikis can be password protected with basic http/htaccess authentication. [...]</div>
]]></content:encoded>
	</item>
	<item>
		<title>By: Tecteun</title>
		<link>http://richardkmiller.com/184/password-protecting-mediawiki-with-mod_auth_mysql/comment-page-1#comment-60501</link>
		<dc:creator>Tecteun</dc:creator>
		<pubDate>Fri, 06 Apr 2007 14:28:18 +0000</pubDate>
		<guid isPermaLink="false">http://www.richardkmiller.com/blog/archives/2006/05/password-protecting-mediawiki-with-mod_auth_mysql#comment-60501</guid>
		<description>this was the specific error i got:
[Fri Apr 06 12:33:18 2007] [error] [client 192.168.1.52]
(9)Bad file descriptor: Could not open password file: (null)

(sorry, this should be in my previous post, if there was an edit option)</description>
		<content:encoded><![CDATA[<div class='microid-e35c5ddcb2789fa1f9177cba76bc7ea5b8b368bf'>this was the specific error i got:<br />
[Fri Apr 06 12:33:18 2007] [error] [client 192.168.1.52]<br />
(9)Bad file descriptor: Could not open password file: (null)</p>
<p>(sorry, this should be in my previous post, if there was an edit option)</p></div>
]]></content:encoded>
	</item>
	<item>
		<title>By: Tecteun</title>
		<link>http://richardkmiller.com/184/password-protecting-mediawiki-with-mod_auth_mysql/comment-page-1#comment-60500</link>
		<dc:creator>Tecteun</dc:creator>
		<pubDate>Fri, 06 Apr 2007 14:24:51 +0000</pubDate>
		<guid isPermaLink="false">http://www.richardkmiller.com/blog/archives/2006/05/password-protecting-mediawiki-with-mod_auth_mysql#comment-60500</guid>
		<description>I got a lot of nullpointer errors in my /var/log/httpd/error_log, i fixed it by changing the order of Auth parameters :

AuthName &quot;This wiki is password protected (make sure the first letter \
of the username is Uppercase)&quot;
AuthGroupFile /dev/null
AuthUserFile /dev/null
AuthMySQLEnable On
AuthMySQLHost localhost
AuthMySQLUser wikiuser
AuthMySQLPassword wikipassword
AuthMySQLDB wunderwikidb
AuthMySQLUserTable user
#AuthMySQLUserCondition &quot;users.status = 1&quot;
AuthMySQLNameField user_name
AuthMySQLPasswordField user_password
AuthMySQLNoPasswd Off
AuthMySQLPwEncryption md5
AuthMySQLAuthoritative On
require valid-user

Now its working :)
hope someone can use this info</description>
		<content:encoded><![CDATA[<div class='microid-e35c5ddcb2789fa1f9177cba76bc7ea5b8b368bf'>I got a lot of nullpointer errors in my /var/log/httpd/error_log, i fixed it by changing the order of Auth parameters :</p>
<p>AuthName &#8220;This wiki is password protected (make sure the first letter \<br />
of the username is Uppercase)&#8221;<br />
AuthGroupFile /dev/null<br />
AuthUserFile /dev/null<br />
AuthMySQLEnable On<br />
AuthMySQLHost localhost<br />
AuthMySQLUser wikiuser<br />
AuthMySQLPassword wikipassword<br />
AuthMySQLDB wunderwikidb<br />
AuthMySQLUserTable user<br />
#AuthMySQLUserCondition &#8220;users.status = 1&#8243;<br />
AuthMySQLNameField user_name<br />
AuthMySQLPasswordField user_password<br />
AuthMySQLNoPasswd Off<br />
AuthMySQLPwEncryption md5<br />
AuthMySQLAuthoritative On<br />
require valid-user</p>
<p>Now its working <img src='http://richardkmiller.com/wp-includes/images/smilies/icon_smile.gif' alt=':)' class='wp-smiley' /><br />
hope someone can use this info</div>
]]></content:encoded>
	</item>
	<item>
		<title>By: Noah Blumenfeld</title>
		<link>http://richardkmiller.com/184/password-protecting-mediawiki-with-mod_auth_mysql/comment-page-1#comment-53480</link>
		<dc:creator>Noah Blumenfeld</dc:creator>
		<pubDate>Wed, 21 Mar 2007 15:00:45 +0000</pubDate>
		<guid isPermaLink="false">http://www.richardkmiller.com/blog/archives/2006/05/password-protecting-mediawiki-with-mod_auth_mysql#comment-53480</guid>
		<description>Just wanted to say that this&#039;s very useful :) I&#039;ve used the mysql module to password protect other pages. Just wanted to add something to keep in mind.

Since mod_auth_mysql is being used with apache in basic authentication mode, as with any other basic apache auth scheme, it will request your username/password every time you goto the page. Most modern browsers cache username/password for that reason. 

So keep in mind that if you use this method (as opposed to php sessions or so), if the page is not closed (and/or cache is not purged, depending on browser) - the browser will let anybody else access that page as long as the username/password are in the cache.

So if you are using your wiki from a public access computer, keep that in mind. :) 

I&#039;m currently building a mission critical system and had to work around this problem.</description>
		<content:encoded><![CDATA[<div class='microid-499b8a1c41adb7052f8b953b4e087f0010426fab'>Just wanted to say that this&#8217;s very useful <img src='http://richardkmiller.com/wp-includes/images/smilies/icon_smile.gif' alt=':)' class='wp-smiley' />  I&#8217;ve used the mysql module to password protect other pages. Just wanted to add something to keep in mind.</p>
<p>Since mod_auth_mysql is being used with apache in basic authentication mode, as with any other basic apache auth scheme, it will request your username/password every time you goto the page. Most modern browsers cache username/password for that reason. </p>
<p>So keep in mind that if you use this method (as opposed to php sessions or so), if the page is not closed (and/or cache is not purged, depending on browser) &#8211; the browser will let anybody else access that page as long as the username/password are in the cache.</p>
<p>So if you are using your wiki from a public access computer, keep that in mind. <img src='http://richardkmiller.com/wp-includes/images/smilies/icon_smile.gif' alt=':)' class='wp-smiley' />  </p>
<p>I&#8217;m currently building a mission critical system and had to work around this problem.</p></div>
]]></content:encoded>
	</item>
	<item>
		<title>By: Richard K Miller</title>
		<link>http://richardkmiller.com/184/password-protecting-mediawiki-with-mod_auth_mysql/comment-page-1#comment-50014</link>
		<dc:creator>Richard K Miller</dc:creator>
		<pubDate>Thu, 15 Mar 2007 05:39:57 +0000</pubDate>
		<guid isPermaLink="false">http://www.richardkmiller.com/blog/archives/2006/05/password-protecting-mediawiki-with-mod_auth_mysql#comment-50014</guid>
		<description>@Robert

Thanks for stopping by!  I&#039;m glad you found the post.  Gary Thornock was the other Utahn that helped craft this solution.</description>
		<content:encoded><![CDATA[<div class='microid-781638ceff08110e27cb6063c5cd105a241b5e67'>@Robert</p>
<p>Thanks for stopping by!  I&#8217;m glad you found the post.  Gary Thornock was the other Utahn that helped craft this solution.</p></div>
]]></content:encoded>
	</item>
</channel>
</rss>

