Ldap: password change wrong password

I have set up my Nextcloud with AD Integration but when I try to change my password it always says “wrong password”. I have already tried to add the login attributes mentioned in this thread:

but it isn’t working for me. I’m using Nextcloud 18 and a Microsoft AD running on Windows Server 2019.

Could you give us some more details? E.g.:

  • LDAPS enabled and working from your Nextcloud server?
  • LDAPS bind user is in domain admin group?
  • dsHeuristc attribute is configured correctly?
  1. yes ldaps is working fine
  2. yes
  3. yes set to 000000001

Ok, fine. Could you paste the exact error message and your ldap login query?

Did you change the interal user name attribute in the ldap expert’s tab?

This is the error message from the log:
Login failed: ‘F12707F2-873B-4973-ABA9-C139FA689FF9’ (Remote IP: ‘myip’)
(Seems like nextcloud is trying to authenticate with the uid)

And yes I changed it to sAMAccountName.

When I try to reset my password via the “forgot password?” link on the login page it works

Yes, it seems to me as well that nextcloud is trying to authenticate with the uid and. But you mentioned that you changed the internal user name for the UUID it to sAMAccountName.
Did you change this setting after a while? It could probably be an UUID mismatch probably.

Yes that seemed to be the case here. I only tested with accounts i had previously logged in with. With new users I can change passwords. Do you know how I can fix this problem with the users that are still mapped with the uid?

You should take a look in your the oc_ldap_user_mapping table of your nextcloud database and find the difference between old and new users. But be careful on changing entries :wink:

After changing the UID from old to new you’ll might have to rename the user’s directory and ownership: