# Unable to enable LDAP Authentication

**URL:** <https://forum.xwiki.org/t/unable-to-enable-ldap-authentication/14345>\
**Category:** Help / Discuss\
**Created:** [March 28, 2024, 12:20pm UTC](https://forum.xwiki.org/t/unable-to-enable-ldap-authentication/14345 "2024-03-28T12:20:56Z")\
**Posts on this page:** 2\
**Page:** 1

<div class="post-metadata">

**Author:** ![FatherTed2](https://forum.xwiki.org/letter_avatar_proxy/v4/letter/f/dec6dc/32.png) [@FatherTed2](https://forum.xwiki.org/u/FatherTed2)\
**Post date:** [March 28, 2024, 12:20pm UTC](https://forum.xwiki.org/t/unable-to-enable-ldap-authentication/14345/1 "2024-03-28T12:20:56Z")

</div>

Hi All,

I have spent two weeks on this but have not been successful in enabling LDAP authentication on our xwiki. This is a fresh install of XWiki. I am quite familiar with LDAP and have it running on few of our other linux servers in our environment. I have two issues with this.

Firstly, I’m unable to install the extension. If I search for the extension, sometimes it shows up in the search results and other times it doesn’t. Even if it shows up in the list available extensions, even after installing it, I am unable to see it in the Local Installed Extensions. Twice I was able to see it in the local extensions but after a server reboot, it disappeared again.

Second issue I have is with the actual LDAP. If the extension installs successfully and I go to enable LDAP, I can see the following message.

The current authentication service cannot be modified because it’s controlled by the xwiki.cfg configuration file.

 ![image](https://forum.xwiki.org/uploads/default/original/2X/7/70cdafb44e15f8ec24089682339f46a53447d605.png)

Only once was I able to see the option to enable it but that also disappeared after a server reboot.

Below is my xwiki.cfg configuration as well:

xwiki.authentication.authclass=org.xwiki.contrib.ldap.XWikiLDAPAuthServiceImpl  
xwiki.authentication.ldap=1  
xwiki.authentication.ldap.trylocal=1  
xwiki.authentication.ldap.server=192.168.8.4  
xwiki.authentication.ldap.port=389  
xwiki.authentication.ldap.bind\_DN=CN=svc\_xwiki,OU=Service Accounts,OU=Users OU,DC=contoso,DC=NET  
xwiki.authentication.ldap.bind\_pass={1}  
xwiki.authentication.ldap.base\_DN=ou=contoso,dc=net  
xwiki.authentication.ldap.UID\_attr=sAMAccountName  
xwiki.authentication.ldap.fields\_mapping=last\_name=sn,first\_name=givenName,email=mail,phone=telephoneNumber  
xwiki.authentication.ldap.update\_user=1

How do I restart the XWiki services after making change to xwiki.cfg?

Any ideas if there is something I could be doing wrong?

Thanks,

Confused

---

<div class="post-metadata">

**Author:** ![humphrey1911](https://forum.xwiki.org/user_avatar/forum.xwiki.org/humphrey1911/32/7557_2.png) [@humphrey1911](https://forum.xwiki.org/u/humphrey1911)\
**Post date:** [October 8, 2024, 6:41am UTC](https://forum.xwiki.org/t/unable-to-enable-ldap-authentication/14345/2 "2024-10-08T06:41:52Z")

</div>

Hi!  
My configuration, which uses an ldap connection, looks like this:  
#-# The group management class.

# xwiki.authentication.groupclass=com.xpn.xwiki.user.impl.xwiki.XWikiGroupServiceImpl

#-# The authentication management class.  
xwiki.authentication.authclass=org.xwiki.contrib.ldap.XWikiLDAPAuthServiceImpl  
xwiki.authentication.ldap=1  
xwiki.authentication.ldap.trylocal=1  
[xwiki.authentication.ldap.server=ad-ldap.int.test.org](http://xwiki.authentication.ldap.server=ad-ldap.int.test.org)  
xwiki.authentication.ldap.bind\_DN=ad-username  
xwiki.authentication.ldap.bind\_pass=ad-pass  
xwiki.authentication.ldap.base\_DN=dc=tst,dc=int,dc=test,dc=org  
xwiki.authentication.ldap.UID\_attr=sAMAccountName  
xwiki.authentication.ldap.user\_group=cn=Group\_user,ou=exemple1,ou=exemple2,ou=Groups,ou=test,dc=tst,dc=int,dc=test,dc=org  
xwiki.authentication.ldap.fields\_mapping=last\_name=sn,first\_name=givenName  
xwiki.authentication.ldap.update\_user=1

However, there is a problem: when I configure LDAP to work, the page deletion function stops working.

An error appears instead of the deletion confirmation page. I think I mentioned this earlier, I’ll look for it now.  
[It is not possible to delete a page after enabling authentication via LDAP - Help / Discuss - XWiki Forum](https://forum.xwiki.org/t/it-is-not-possible-to-delete-a-page-after-enabling-authentication-via-ldap/15114)
