<br><br><div><span class="gmail_quote">On 10/19/07, <b class="gmail_sendername">Johnny Ernst Nielsen</b> &lt;<a href="mailto:j_e_n_pub@yahoo.dk">j_e_n_pub@yahoo.dk</a>&gt; wrote:</span><blockquote class="gmail_quote" style="border-left: 1px solid rgb(204, 204, 204); margin: 0pt 0pt 0pt 0.8ex; padding-left: 1ex;">
Fredag 19 oktober 2007 17:38 kvad Jeff Schallenberg:<br>&gt; I have just installed a pmwiki site on my Ubuntu server.<br>&gt;<br>&gt; It works and looks great - I have configured a logo and a skin, I<br>&gt; can create and edit pages - but that is the problem. This site is
<br>&gt; to be used for a private non-profit group - less than a dozen<br>&gt; users. I would like to allow viewing, editing and uploading only by<br>&gt; this group.<br>&gt;<br>&gt; I have edited the config.php file to include the following lines:
<br>&gt;<br>&gt; $DefaultPasswords[&#39;admin&#39;] = crypt(&#39;secret&#39;);<br>&gt; $EnableUpload = 1;<br>&gt; $DefaultPasswords[&#39;upload&#39;] = crypt(&#39;secret&#39;);<br>&gt;<br>&gt; But, even after restarting the server, I can still edit pages
<br>&gt; without entering any password. If I check the recent changes, I<br>&gt; see:<br>&gt;<br>&gt;&nbsp;&nbsp;&nbsp;&nbsp;-<br>&gt; HomePage&lt;<a href="http://jeffnet.zapto.org:85/pmwiki/pmwiki.php?n=Main.HomeP">http://jeffnet.zapto.org:85/pmwiki/pmwiki.php?n=Main.HomeP
</a><br>&gt;age&gt;. . . October 19, 2007, at 08:54 AM by ?:<br>&gt;&nbsp;&nbsp;&nbsp;&nbsp;-<br>&gt; NewPage&lt;<a href="http://jeffnet.zapto.org:85/pmwiki/pmwiki.php?n=Main.NewPag">http://jeffnet.zapto.org:85/pmwiki/pmwiki.php?n=Main.NewPag
</a><br>&gt;e&gt;. . . October 19, 2007, at 08:42 AM by ?:<br>&gt;&nbsp;&nbsp;&nbsp;&nbsp;-<br>&gt; WikiSandbox&lt;<a href="http://jeffnet.zapto.org:85/pmwiki/pmwiki.php?n=Main.Wi">http://jeffnet.zapto.org:85/pmwiki/pmwiki.php?n=Main.Wi</a><br>
&gt;kiSandbox&gt;. . . October 18, 2007, at 08:49 PM by ?:<br>&gt;<br>&gt; So, pmwiki doesn&#39;t even know who is editing!<br>&gt;<br>&gt; How can I protect my pmwiki site so that I have admin privileges,<br>&gt; and group members have read, write and upload privileges.
<br>&gt;<br>&gt; I have read the documentation on security and passwords, and I<br>&gt; understood that setting passwords in config.php was sufficient to<br>&gt; limit edit privileges to users who know those passwords.<br>
&gt;<br>&gt; What am I missing?<br>&gt;<br>&gt; Thanks for your help! And thanks for the great software!<br><br>We are all newbies in different fields. It&#39;s all right.<br><br>There are two ways.<br><br>One with passwords, but no usernames.
<br><br>One with both user names and passwords.<br><br>For the first method you need to add the proper passwords to the<br>proper actions.<br><br>Add to your config.php:<br>$DefaultPasswords[&#39;admin&#39;] = crypt(&#39;adminpassword&#39;);
<br>$DefaultPasswords[&#39;read&#39;] = crypt(&#39;readpassword&#39;);<br>$DefaultPasswords[&#39;edit&#39;] = crypt(&#39;editpassword&#39;);<br>$DefaultPasswords[&#39;attr&#39;] = crypt(&#39;attributespassword&#39;);<br>And so forth.
<br>You get the idea.<br>Se the details here:<br>&lt;<a href="http://www.pmwiki.org/wiki/PmWiki/PasswordsAdmin">http://www.pmwiki.org/wiki/PmWiki/PasswordsAdmin</a>&gt;<br><br>With this method you give the same password to all who should have the
<br>same permissions.</blockquote><div><br><br>NOTE that this is the default way of securing a PmWiki site, and your users will still be able to enter an &quot;Author&quot; name for each edit -- in fact, one simple addition to this scheme is to require an Author name for each edit.&nbsp; This scheme is almost always sufficient for the kind of use you are envisioning.&nbsp; For my small businesses and nonprofit clients, I almost always use this, and very, very seldom have any reason to even discuss a user-based authentication scheme with them.
<br><br>This is simple to operate and maintain unless you want to have an elaborate system of different permissions for many different areas of the wiki.&nbsp; Even then it&#39;s still usable.<br><br>Here&#39;s what I have in my standard 
config.php file<br><br>&nbsp;&nbsp;&nbsp; &nbsp;&nbsp;&nbsp; $PmWikiAdmin = crypt(&#39;adminpasswordhere&#39;);<br>&nbsp;&nbsp;&nbsp; &nbsp;&nbsp;&nbsp; $PmWikiUser = crypt(&#39;userpasswordhere&#39;);<br><br>&nbsp;&nbsp;&nbsp; &nbsp;&nbsp;&nbsp; $DefaultPasswords[&#39;admin&#39;] = $PmWikiAdmin;<br>&nbsp;&nbsp;&nbsp; &nbsp;&nbsp;&nbsp; $DefaultPasswords[&#39;attr&#39;] = $PmWikiAdmin;
<br><br>&nbsp;&nbsp;&nbsp; &nbsp;&nbsp;&nbsp; $DefaultPasswords[&#39;edit&#39;] = $PmWikiUser;<br>
&nbsp;&nbsp;&nbsp; &nbsp;&nbsp;&nbsp; # $DefaultPasswords[&#39;read&#39;] = $PmWikiUser; //if you don&#39;t want your wiki to be publicly viewable<br>
<br>&nbsp;&nbsp;&nbsp; &nbsp;&nbsp;&nbsp; $HandleAuth[&#39;source&#39;] = &#39;edit&#39;;&nbsp; //require edit password in order to view wiki source for a page<br>&nbsp;&nbsp;&nbsp; &nbsp;&nbsp;&nbsp; $HandleAuth[&#39;diff&#39;] = &#39;edit&#39;;&nbsp; //require edit password in order to view page history
<br><br>&nbsp;&nbsp;&nbsp; &nbsp;&nbsp;&nbsp; ##example array of passwords<br>&nbsp;&nbsp;&nbsp; &nbsp;&nbsp;&nbsp; #&nbsp;&nbsp;&nbsp; $DefaultPasswords[&#39;whatever&#39;] = array(crypt(&#39;alpha&#39;), crypt(&#39;beta&#39;)); //how to do it if you need more than one<br><br>&nbsp;&nbsp;&nbsp; //Require author name - 
<a href="http://www.pmwiki.org/wiki/Cookbook/RequireAuthor">http://www.pmwiki.org/wiki/Cookbook/RequireAuthor</a><br>&nbsp;&nbsp;&nbsp; $EnablePostAuthorRequired = 1;<br><br>&nbsp;&nbsp;&nbsp; //Author cookie<br>&nbsp;&nbsp;&nbsp; include_once(&quot;$FarmD/scripts/author.php&quot;);
<br>&nbsp;&nbsp;&nbsp; if($AuthId &amp;&amp; !@$_COOKIE[$AuthorCookie]) {<br>&nbsp;&nbsp;&nbsp; $Author = $AuthId; setcookie($AuthorCookie,<br>&nbsp;&nbsp;&nbsp; $Author, $AuthorCookieExpires, $AuthorCookieDir); }<br><br><br>Happy wiki-ing!<br><br>Tegan<br></div></div>