Need to edit User DN in config

I am running Nextcloud 21 on Ubuntu

I was changing the AD user that connects to our Active Directory for authentication. Upon saving it something went wrong and now I am getting this error:

Internal Server Error

The server was unable to complete your request.

If this happens again, please send the technical details below to the server administrator.

More details can be found in the server log.

I think if I can just change the user dn and password. But Im not sure how to do that as Im locked out. Any thoughts?

I can log into the web interface as the local admin but going to settings returns the internal server error also

I ran into a similar problem recently.

If you have a backup of the database from before the change you could look up user_ldap settings in the oc_appconfig table.
Then update the faulty values directly in your database.

Thank you for the idea. Yes, i do have a copy. Would you happen to be able to tell me how it point me to how i could do that?

Sorry, I’m not familiar with partial restore of a database.
I was lucky enough that I only needed to restore user DN and one or two other values but not the password which is hashed.
Maybe you can restore the data into a new database and then look up the old values you need?

Did you use the occ command to edit it?

Actually it turned out to be an ldap password issue. I was able to use the show-password command and I saw that the password wasnt being entered correctly. Once that got fixed I was good to go.

No I used phpMyAdmin to edit the oc_appconfig table in the database directly.
I guess occ could have been used but finding out how would have taken me a lot more time.

Good to hear you’ve solved it.