I have an OpenLDAP server for central authentication. How to configure DokuWiki to enable authentication to the OpenLDAP server. In this guide, we will learn how to configure DokuWiki for OpenLDAP authentication.
Configure DokuWiki OpenLDAP authentication
Before proceeding, make sure that the OpenLDAP server and DokuWiki are installed. Follow the guide below to learn how to set up OpenLDAP and how to install DokuWiki on CentOS 8.
Install and set up OpenLDAP on CentOS 8
Install DokuWiki on CentOS 8
Install the required PHP LDAP module
To be able to connect to the OpenLDAP server, you need to install the PHP LDAP module by running:
dnf install php-ldap -y
Log in to DokuWiki as superuser
Once OpenLDAP and DokuWiki are up and running, log in to DokuWiki as superuser.
Enable DokuWiki LDAP authentication plugin
DokuWiki comes with a plugin called LDAP Authentication by default
authLDAP Allows authentication against LDAP directories.
All you need to do is activate the plugin. This can be done on the DokuWiki extension manager.
Click on the Admin tab (with the gear icon) at the top of the DokuWiki page, then Promotion Manager On the Management page that opens.
On the extension manager, find the LDAP authentication plugin and click next to it
Enable Button to activate the plugin.
Configure DokuWiki OpenLDAP authentication settings
After activating the plugin, you need to define your OpenLDAP connection settings. This can be done from Configuration Manager.
To access Configuration Manager, return to the DokuWiki management page and click Configuration settings.
On the configuration manager, navigate to table of Contents In the sidebar> Plug-in > Authentication. Define your OpenLDAP configuration settings. Make sure to make the appropriate changes based on your environment settings.
Limit OpenLDAP hostname / URL, port, base DN Where can I find user accounts, tHe binds DN user and password And any other related settings.
When configuration is complete, scroll down the page and click save Update your DokuWiki configuration settings.
The changes will be written to a file,
aGFja2Vy'; $conf['plugin']['authchained']['authtypes'] = 'authplain:authldap'; // end auto-generated content
Define DokuWiki default authentication method
After defining the OpenLDAP settings, continue to define the default authentication method.
Navigation table of Contents > DokuWiki > verification method.
On the authentication backend, select Authentication And save your changes.
Enable DokuWiki chained authentication plugin
What if the OpenLDAP connection fails? Therefore, it is best to be able to log in with a DokuWiki superuser account. In this way, please install and enable the Chained Auth plugin, which delegates authentication to the authentication plugin and then returns true first when checking the username and password.
Navigate to Extension Manager and search for plugins and install.
After successfully installing the plugin, you should see the plugin name, Chain authentication plugin Under the plugins in the directory.
Next, navigate to Configuration Manager and configure the plugin to enable pure authentication and LDAP authentication, including the fallback authentication backend.
Also, change the default authentication backend to Authentication chain insert.
After making changes, click save Button to update the configuration.
Test DokuWiki OpenLDAP authentication
Now log out of DokuWiki as superuser and log in as the user defined on the OpenLDAP server.
Then you go. OpenLDAP user has successfully logged in to DokuWiki.
You can further configure access control for users on DokuWiki. This marks the end of our guide on how to configure DokuWiki OpenLDAP authentication
Configure ownCloud OpenLDAP authentication
Configure SSSD for OpenLDAP authentication on Ubuntu 18.04
Install phpLDAPadmin on CentOS 8