It's better when it's simple

User Tools

Site Tools


AuthRemoteUser Plugin

Compatible with DokuWiki

  • 2024-02-06 "Kaos" unknown
  • 2023-04-04 "Jack Jackrum" unknown
  • 2022-07-31 "Igor" unknown
  • 2020-07-29 "Hogfather" yes

plugin Provides single sign-on authentication via an environment variable which is set through authentication systems like HTTP-Auth, LDAP, CAS, Cosign, NTLM, PAM, WebAuth, SSPI, and so on

Last updated on


This plugin allows integration with the web server's built-in authentication system via an environment variable which is set through

  • HTTP-Auth,
  • LDAP,
  • CAS,
  • Cosign,
  • NTLM,
  • PAM,
  • WebAuth,
  • SSPI,
  • and so on.

Default variable name is REMOTE_USER.

It uses the default plain text file conf/users.auth.php to store user information.


  1. Enable an authentication system which sets (domain and) username in an environment variable on your webserver (_SERVER[…]) (and disable anonymous authentication) on your web server.
  2. Search and install the plugin using the Extension Manager. Refer to Plugin Installation Instructions on how to install plugins manually.


  1. Determine the variable name your authentication system uses:
    • Default is REMOTE_USER.
    • If your authentication system uses another variable name notice this name.
  2. Determine your username:
    1. Save file phpinfo.php on your web server:

    2. Open phpinfo.php in your web browser and search for the value in _SERVER[…] whereby is the variable name of your authentication system.
    3. Add this value as new user ID to your user list if it is missing and add them groups admin and user1)
    4. Remove file phpinfo.php.
  3. In your DokuWiki login as superuser, click Admin, choose Configuration Settings, and configure these settings:
    1. Disable action profile.
    2. If enabled, disable option subscribers temporarily.
    3. Enable authtype AuthRemoteUser.
    4. Disable rememberme.
    5. If your authentication system doesn't use variable name REMOTE_USER set the name (see also topic 1.2) in server_var_name_of_auth_system.
    6. Save this configuration.
  4. Remove DokuWiki cookie from your browser or close and restart your browser.
  5. Reload your DokuWiki installation. Your login should be automatically detected.
  6. Now, you can re-enable option subscribers again (see above).

Copy the configuration settings to the conf/local.protected.php file to protect the settings against changes via Config Manager.

Administration of users and its groups is done in the User Manager which is fully supported by this plugin.


AuthRemoteUser uses the same storage backend like authplain that is conf/users.auth.php. Users which are added after switching to AuthRemoteUser, won't contain an encrypted password.

That is: You can switch back to authplain (and enable profile setting) whenever you want, and all your users which were already added before are still able to login using their (hopefully yet known) password. All other users can use the forget my password link.

File Format

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

loginname:password:Real Name:email:group
  • loginname:
    This has to be a valid pagename.
  • password:
    Encrypted password if user id was added using authplain, otherwise empty.
  • Real Name:
    Real name of the user.
  • email:
    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.


Since conf/users.auth.php is a plain text file, it can be edited with any text editor.

Don't be surprised: The user ID is converted to a valid pagename.
plugin/authremoteuser.txt · Last modified: 2021-09-06 11:44 by karl-wilhelm-rips

Except where otherwise noted, content on this wiki is licensed under the following license: CC Attribution-Share Alike 4.0 International
CC Attribution-Share Alike 4.0 International Donate Powered by PHP Valid HTML5 Valid CSS Driven by DokuWiki