Table of Contents
authsqlite Plugin
Compatible with DokuWiki
Hrun
Installation
External requirements: This plugin requires the following additional components that must be installed separately:
- PHP greater than 5.2.0 for proper SQLite3 support.
Search and install the plugin using the Extension Manager. Refer to Plugins on how to install plugins manually.
Examples/Usage
Create an authentication database in a folder which is readable and writeable by your web server, but outside of DOCUMENT_ROOT.
sqlite3 /var/wikiauth/auth.db < auth.sql
The auth.sql file is provided with the plugin. As written it will support a single user database for all animals in your farm, but per-animal group management.
Configuration and Settings
Configuration of the SQLite queries is detailed in the README.md file distributed with the plugin, or available at https://github.com/ClayDowling/authsqlite
The SQLite Database File configuration option should be a full path, and outside of your web server's DOCUMENT_ROOT folder. Otherwise it is trivial for somebody to download the file and gather all your user information.
Your First User
Getting your first user into the database is done like other database authentication mechanisms.
- Create the database as described above.
- Copy the username and password hash into the database from the user entry in DOKU_CONF/local.auth.php
- Create user and admin groups.
- Link the user to the new groups via the usergroups table.
The SQL to do that might look like this:
INSERT INTO user (login, pass) VALUES ('admin', '$1$abc123'); SELECT * FROM user; 1|admin|$1$abc123|| INSERT INTO groups (name) VALUES ('user'); INSERT INTO groups (name) VALUES ('admin'); SELECT * FROM groups; 1|user 2|admin
INSERT INTO usergroup (uid, gid) VALUES (1, 1); INSERT INTO usergroup (uid, gid) VALUES (1, 2);
Change Log
- 2015-06-25
- Initial release
Known Bugs and Issues
Please see the bug tracker above for current issues.