Misconfigured ldap plugin stops server - how to reset settings?

Hi there,

TL;DR how do I reset the user_ldap plugin in an up to date NC to default so I can start over?

I installed an Ubuntu 20 LTS VM and opted for the snap-integrated nextcloud service. Installation of the service went fine so far.

I wanted to use the user_ldap app to hook up the nextcloud to my active directory server.

I installed the plugin, started configuring it (binding was ok, I’m a little familiar with ldap syntax) but then mid-process I remembered I wanted to create a dedicated AD user group on my AD server for nextcloud users. I created the group and found no “refresh” button in the user_ldap setup, so I clicked back a couple of times…and that’s when I knew I screwed up.

Nextcloud would throw an error about a page missing, after restarting apache/the entire vm it jumped straight to maintenance mode.

Running a nextcloud.occ maintenance:repair showed an error message of user_ldap “could not connect to ldap server”

nextcloud.occ app:disable user_ldap was the only thing I could do to revive the installation.

Now I need to reset the user_ldap plugin to re-configure it. I can’t uninstall it (“can’t uninstall because it was shipped”) and this snippet of code (not even sure it’s the right one) did not work:

curl -X GET https://[nextcloud-admin]:[admin password]@[nextcloud hostname]/ocs/v2.php/apps/user_ldap/api/v1/config/s02?showPassword=1 -H “OCS-APIREQUEST: true”

So… help me pease! Thanks!

Hey There,

Have you fixed it?

I have a very similar error with the LDAP Plugin.

nvmd. I fixed it with removing parts of the LDAP Config with occ until it worked :slight_smile: