Nextcloud LDAP authentication broken after AD users restore

NethServer Version: 7.3 latest
Module: Nextcloud 12.0.3

Hi,

Yesterday I uninstalled then reinstalled the AD account provider because its DNS domain name wasn’t set to a subdomain for some unknown reason.

Because of this I had to restore the users and group using the provided scripts.

My problem : all the UUIDs that are used by Nextcloud as username when using LDAP authentication changed. Therefore, even if I have access, all the accounts are duplicated and the data lies somewhere in ghost accounts, that can be seen using the occ ldap:show-remnants. Moreover, the authentication is now slow as hell.

I’d like to restore the data of those ghost users to the newly created one but there is a bug that makes it impossible. The fix exists but don’t seems to be merged in 12.0.3.

Questions :

  1. Is it possible to handle this UUID changes in future version of the user restore script. BTW : the password are lost too.

  2. Can someone help me to apply the fix to my current installation ? There are 6 files to change and would like to learn how to use the tool that can automate those changes.

Thanks,

Matthieu

Ref : Procedure "Change the FQDN" from manual doesn't work

Update : Nextcloud 12.0.4 solved the ghost account issue : they can now be deleted and probably merged with the “new” accounts.

There is still a potential issue regarding the UUIDs in case of a restore from a backup, I’ll investigate further.