# LDAP-login only works for newly added Nextcloud users

**URL:** <https://help.nextcloud.com/t/ldap-login-only-works-for-newly-added-nextcloud-users/189842>\
**Category:** ℹ️ Support\
**Tags:** server\_migration, nc27, ldap\
**Created:** [April 29, 2024, 10:20am UTC](https://help.nextcloud.com/t/ldap-login-only-works-for-newly-added-nextcloud-users/189842 "2024-04-29T10:20:02Z")\
**Posts on this page:** 1\
**Showing post:** 3

<div class="post-metadata">

**Author:** ![jtr](https://help.nextcloud.com/letter_avatar/jtr/32/6_22734026db12803ebb3e059622ac3534.png) [@jtr](https://help.nextcloud.com/u/jtr)\
**Post date:** [May 21, 2024, 3:23pm UTC](https://help.nextcloud.com/t/ldap-login-only-works-for-newly-added-nextcloud-users/189842/3 "2024-05-21T15:23:54Z")

</div>

> [@NextClaus](#):
>
> We did a LDAP migration. The users were moved to a new LDAP. The username remained identical.

I don’t recall all the specifics off-hand, but the usernames aren’t the only important element AFAIK. There are other dependencies that must be dealt with when doing a migration - e.g.

> [@Migrating OpenLDAP to AD backend](https://help.nextcloud.com/t/migrating-openldap-to-ad-backend/35404):
>
> Hi, I am having to migrate LDAP backends for my Nextcloud version 13.0.4 server. Currently, my (NGO, non-profit) users authenticate against an OpenLDAP server, but their accounts have since been moved to an Active Directory. Of course, users do not want to use their profiles or files. Has anyone done this before and could outline the process? Thanks!

> [@Migration to LDAP keeping users and data](https://help.nextcloud.com/t/migration-to-ldap-keeping-users-and-data/13205):
>
> Currently, I’m trying to migrate to LDAP. I’d like to keep the existing users and this seems to be a kind of an issue. By default, nextcloud creates new nextcloud users for all these LDAP users. I’m on nextcloud 12. Starting point I’m running nextcloud 12. I’m using the default setup (more or less). I have a couple of users within nextcloud and they share a couple of files and calendars. The password is stored within nextcloud. Goal I’d like to keep most of the setup, I only want to authenti…

> [@LDAP Migration with different DN](https://help.nextcloud.com/t/ldap-migration-with-different-dn/88449):
>
> Hi everyone, I want to change our LDAP Service from OpenLDAP to freeIPA and with it the structure of the LDAP-tree, so we have another DN as before. Goal: Every user should keep his account with his files, rights (etc.) after the migration of the LDAP-server. Starting Point: Nextcloud version 18 LDAP with old DN works fine The owncloud-name is the uid-LDAP-Attribute the DN changes, but the LDAP attributes uid, uidNumber, gid, gidNumber, cn, mail and much more stays the same Connecting the …

> **[Migrating to another LDAP server](https://portal.nextcloud.com/article/Authentication/LDAP/Migrating-to-another-LDAP-server)**
>
> The Nextcloud Subscription Portal.

> [@Map old LDAP users to new on server change](https://help.nextcloud.com/t/map-old-ldap-users-to-new-on-server-change/171038):
>
> Hi everyone, Currently using Active Directory as a user back end, but wish to move to LLDAP. I have LLDAP setup and working with Nextcloud, but users in LLDAP are treated as new in Nextcloud. Does anyone have any guidance how I can use LLDAP but maintain the user mapping? Presumably I need to update some anchor attribute in Nextcloud somewhere? This article may have the answer for me, but disappointingly is behind a paywall - appears you must be a customer to read it: [Migrating to another LDAP…](https://portal.nextcloud.com/article/Authentication/LDAP/Migrating-to-another-LDAP-server)

> [@A quick and dirty howto for LDAP server migration](https://help.nextcloud.com/t/a-quick-and-dirty-howto-for-ldap-server-migration/181699):
>
> I will share you my method to migrate from one LDAP server to another with differents CN. Configure the new LDAP server in your nextcloud instance. In command line use OCC to update the mapping table (oc\_ldap\_group\_mapping) occ user:list It will fill the table with users from the new directory. Adapt and use this dirty python script to remove the old mapping and to connect local user to the new ldap one. If you have a lot of users, you will need another script to get the mapping list…

---

_[View the full topic](https://help.nextcloud.com/t/ldap-login-only-works-for-newly-added-nextcloud-users/189842)._
