LDAP is enabled but get message "LDAP authentication is not enabled. Please set LDAP as authentication service in xwiki.cfg". Am I editing the correct xwiki.cfg?

New user here, and first time using and configuring an application like this.

I have XWiki installed via docker.

I’m having a time trying to get LDAP to work without buying the paid application. Right now I have LDAP Authenticator extension installed.

I see references to WEB-INF/xwiki.cfg to edit LDAP authentication but mine is located in etc/xwiki/xwiki.cfg.

I’ve created the LDAP entries and can confirm my setup is correct (I have another application that uses the same account for authentication)

Even after these changes I’m getting “LDAP authentication is not enabled. Please set LDAP as authentication service in xwiki.cfg”. Am I editing the correct xwiki.cfg file?

Actually yours is also at WEB-INF/xwiki.cfg :slight_smile: This is the location for all XWiki versions and distributions. However, the Docker distribution is doing something special to expose it in the mapped volume to make it easier to edit it (otherwise you’d need to docker exec inside the container to edit it and it would be lost when you destroy the container! This is documented here: https://github.com/xwiki-contrib/docker-xwiki/blob/master/README.md#configuration-options

The main XWiki configuration files ( xwiki.cfg , xwiki.properties and hibernate.cfg.xml ) are available in the mapped local directory for the permanent directory on your host.

Regarding LDAP I don’t know, I’ve never used it.

Hope it helps a bit.

Maybe tell us what you modified in xwiki.cfg. Did you restart the container?

Yeah that would help, wouldn’t it :slight_smile:

Here is how I have it configured

#-# LDAP authentication service

#-# Enable local accounts in addition to LDAP.
#-# Without this setting you will be unable to log into XWiki with local accounts.
#-# - 0: disable
#-# - 1: enable
#-# The default is 0


You need to docker stop it and docker start it again so that the xwiki.cfg file in the perm dir is copied to WEB-INF/lib. Did you do that?

Yes I did restart the container after each change.

Out of curiosity, could you log into the container with docker exec -it <containerid> bash -l and check that the WEB-INF/xwiki.cfg file has your changes?

That was it. I must’ve had a local installation of XWiki before I had a docker image for it. I was editing the wrong xwiki.cfg the whole time :man_facepalming:. LDAP works with the settings I provided, but I need to get first, last, and email mapped for things to be 100%

Appreciate your help on this!