Translations of this page?:

Plain Text Authentication Backend

This backend uses a plain text file conf/users.auth.php to store user information and passwords. Passwords are stored encrypted. 1)

This is the default backend.

Configuration

Enable Plain

The backend will be enabled with the configuration option

$conf['authtype'] = "plain";

( this should be in your conf/local.php )

File Format

Empty lines, and everything after a # character are ignored. Each line contains a colon separated array of 5 fields which are:

  • Login - This has to be a valid pagename
  • Password - Encrypted password. The encryption method could be defined through the option passcrypt
  • Real Name - Real name of the user
  • E-Mail - Email address of user
  • Groups - Comma separated list of groups a user is member of. The group names must follow the rules of valid pagenames.

To create MD5 hash values from a string you could use the script encode/decode. Due to the much better built-in functions of DokuWiki this script is deprecated and only stored here for nostalgia.

Example:

andi:ece23254502f07722a98aa5b7c70baa6:Andreas Gohr:andi@splitbrain.org:admin,users,upload

Editing

Since conf/users.auth.php is a plain text file, it can be edited with any text editor. For a small PHP command line script that eases the task of adding/changing users, have a look at adduser.php. Further tips on handling the plain auth file can be found here.

HTTP Auth

Be careful when combining this auth type with HTTP Authentication (”.htaccess”). For some reason the credentials of the HTTP auth are passed to DokuWiki, e.g. if you have the same username/password for http auth and the DokuWiki admin-account you are always logged in as admin.

1) You will often read in this wiki that passwords are “encrypted”, but this is not really true. Encrypted passwords implied that they could be decrypted again, but this is not the case. Passwords won't be encrypted but a hash will be calculated from the password that is unique in one direction and ambiguous in the other. In other words: It is pretty easy to calculate a hash value from a password but almost impossible to get the password from a given hash value.
 
auth/plain.txt · Last modified: 2008/11/01 23:32 by 80.109.115.245
 

Except where otherwise noted, content on this wiki is licensed under the following license: CC Attribution-Noncommercial-Share Alike 3.0 Unported

Imprint Recent changes RSS feed Donate Powered by PHP Valid XHTML 1.0 Valid CSS Driven by DokuWiki
WikiForumIRCBugsTranslate