Update: in the newest versions of dokuwiki it is now much easier to simply extract the files and visit /install.php in a browser instead.
In my opinion DokuWiki is the best wiki software out there (see
features). In addition to all those cool features like namespaces, it stores pages in plaintext files, thus no database backend is required. Setting it up is pretty easy also. I promised to investigate the steps needed to set up DokuWiki with the simplest authentication scheme for a friend and I thought others might benefit from it too, so here it is.
Warning: this is not an official documentation and the whole installation process is clearly described in the DokuWiki Wiki. Authentication setup is described here.
What we wish to accomplish is to get an installed DokuWiki which is ideal for a team, allowing access only for members (even read access prohibited for outsiders).
Let's get the wiki installed first:
1.
Download and extract DokuWiki. At the time of this blog entry, the latest release is dokuwiki-2006-03-09b.
2. Move dokuwiki under your DocumentRoot (for example, htdocs/dokuwiki). Rename the directory to "dokuwiki" or anything else if you wish.
3. Create an empty file called dokuwiki/data/changes.log
4. Rename dokuwiki/conf/local.php.dist to dokuwiki/conf/local.php
5. Open dokuwiki/conf/dokuwiki.php, see if you need to make any changes, but instead of changing the contents in this file directly, copy those lines to dokuwiki/conf/local.php and do it there. This way your changes won't get lost when upgrading later.
6. Create the following directories if they do not exist: data/meta, data/attic, data/cache, data/locks.
7. Visit your new wiki at http://localhost/dokuwiki or whatever you chose on your system. You can also visit http://localhost/dokuwiki/doku.php?do=check to see if everything's fine.
Then create the simplest Auth scheme possible:
1. Copy conf/acl.auth.php.dist to conf/acl.auth.php
2. Copy conf/users.auth.php.dist to conf/users.auth.php
3. Add the following lines to your conf/local.php
$conf['useacl'] = 1; // this enables the ACL feature
$conf['superuser'] = '@admin'; // admin group is superuser
$conf['openregister'] = 0; // users are no longer allowed to register themselves (default is 1)
$conf['autopasswd'] = 1; //autogenerate passwords and email them to user
$conf['passcrypt'] = 'md5'; // Used crypt method (smd5,md5,sha1,ssha,crypt,mysql,my411)
$conf['defaultgroup']= 'user'; // Default groups new Users are added to
$conf['profileconfirm'] = '1'; // Require current password to confirm changes to user profile
$conf['authtype'] = 'plain'; // plaintext backend (default)
4. Create a superuser manually: open users.auth.php and insert the following line:
admin:21232f297a57a5a743894a0e4a801fc3:Admin:example@example.com:admin
This will create the "admin" user with the password "admin", belonging to the admin group (notice how you don't need to use @ in the group name here).
Set up the desired authentication restrictions on the web interface:
1. Log in with the admin user in your wiki. The login button is at the bottom right of the main page of your dokuwiki.
2. After logging in, you must see an "Admin" button where the Login button was in the previous step. Click this button.
3. Click on "Access Control List Management", add the following entries:
* (Namespace) Group admin
* (Namespace) Group user
4. Apply the following permissions:
Group ALL: none
Group User: read, edit, create
Group Admin: read, edit, create, upload, delete
That's all. You can add new users by clicking on the Admin button then on the link "Add new user". They will be e-mailed with their generated passwords so they can log in to the wiki. We have set up DokuWiki in the above steps so that users will belong to the @user group by default.
Hope this helps, enjoy!