[pmwiki-users] Setting general wiki-wide password

Tegan Dowling tmdowling at gmail.com
Tue Jun 13 06:48:23 CDT 2006


On 6/13/06, Neil Herber <nospam at eton.ca> wrote:
> At 2006-06-13  12:57 AM -0400, Donald Z. Osborn is rumored to have said:
> >But the main question simply is, what do I do to set a (global)
> >password for users of the site who wish to make ordinary
> >amendments/edits to ordinary pages throughout the site? Do I set an
> >admin password anyway, or give each page the same password
> >individually, or (hopefully) something a lot simpler.
>
>
> In the local/config.php file set:
>
>          $DefaultPasswords['edit'] = crypt('put_the_edit_password_here');
>
> That then requires authors to enter the password to be allowed to
> edit any page.
>
> Pages that are protected by default (most of the Site group pages)
> can only be edited by an author giving the admin password, because it
> overrides any protection.
>
> You can protect entire groups by setting passwords on the GroupAttributes page.

Administration of passwords from from inside config.php is a necessary
step to take *before* you can administer them from within the wiki.
They are two different things.  Anyway:

__config.php:__ here are the lines I use

// Site passwords
               $PmWikiAdminPassword = crypt('AdminPass');  #Set your
own 'AdminPass'
               $PmWikiUserPassword = crypt('UserPass');  #Set your own
'UserPass'
               $DefaultPasswords['admin'] = $PmWikiAdminPassword;
               $DefaultPasswords['attr'] = $PmWikiAdminPassword;
               $DefaultPasswords['edit'] = $PmWikiUserPassword;
               $DefaultPasswords['removecomment'] =
$PmWikiAdminPassword; #If you use the Cookbook/Comments recipe

//Require author name - http://www.pmwiki.org/wiki/Cookbook/RequireAuthor
       $EnablePostAuthorRequired = 1;

//Author cookie
       include_once("$FarmD/scripts/author.php");
       if($AuthId && !@$_COOKIE[$AuthorCookie]) {
       $Author = $AuthId; setcookie($AuthorCookie,
       $Author, $AuthorCookieExpires, $AuthorCookieDir); }

//  Uploads
               $EnableUploadVersions = 1;
               $EnableUpload = 1;
               $UploadUrlFmt = $ScriptUrl.'/uploads';
               $DefaultPasswords['upload'] = $PmWikiUserPassword;

//      Uploads Security - http://www.pmwiki.org/wiki/Cookbook/SecureAttachments
//      .htaccess file has been added to the uploads/ directory, with
the following two lines:
       //              Order Deny,Allow
       //              Deny from all
               $EnableDirectDownload = 0;

----------------------
NOTES about the above:

the Admin password is the "God" password; it over-rides all others
from within the wiki, and is required for 1) setting attributes
(passwords) from within the wiki and 2) editing any pages in the Site
wikigroup.

The User password is the default edit/upload password for all
wikigroups and pages that 1) are NOT in the Site wikigroup and 2) are
NOT otherwise password-protected from within the wiki for edit/upload.

__Passwords from within the wiki__
1) Set passwords for the **whole wikigroup**
Once you're logged in with the Admin password, you can
A) go to any page in any wikigroup, and working in your browser's address bar,
B) replace the page's pagename with: GroupAttributes?action=attr
C) on the form that comes up, set read, edit, upload (or any other)
password for that wikigroup.
D) to set multiple passwords for one action (read, for example), just
list them, separated by spaces.
E) if you want the wikigroup to have a read-only password *and* a
read/edit/upload password, you need to put *both* passwords in the
read field (look at the form, to see what this means), but only the
edit password in the edit and uploads fields.

2) Set passwords for an **individual page**
A) go to the page in question, and working in your browser's address bar,
B) AFTER the pagename, enter ?action=attr
C) on the form that comes up, set read, edit, upload (or any other)
password for that page.
D) to set multiple passwords for one action, just list them, separated by spaces
E) if you want the page to have a read-only password *and* a
read/edit/upload password, you need to put *both* passwords in the
read field (look at the form, to see what this means), but only the
edit password in the edit and uploads fields.
F) passwords set on a page this way will over-ride the passwords for
the wikigroup, so that the wikigroup's passwords will be insufficient
to perform actions on this page, unless (in step D) you include the
wikigroup's passwords in the list of passwords for the actions for the
page.

What I've written here will have a better chance of making sense to
you if you actually do what's described while reading.  Hope it helps.

Tegan




More information about the pmwiki-users mailing list