LDAP user renamed and changed email address. Everthing lost in seafile

We have renamed a user because of marriage. Now when she logs in to seafile with her new email address, she is treated as new user. She cannot access her previous libraries and does not have access to content shared to her old mail address.

Is there any way to change the mail address of an existing ldap user?
Or is there any way to move everything from the old to the newly created ldap user?

I am very interested in this topic.

@daniel.pan @Jonathan
Is there any information regarding this problem? I think it is very common to rename a user, isn’t it?

within the admin web interface, you can transfer the librairies from the old email account towards the new email account. It is quick and simple but the user will loose its shares with the others.
Renaming accounts is not a trivial work as the email appears in many SQL tables.
Seafile staff can help you if you have many accounts to rename.

Renaming accounts is not a trivial work as the email appears in many SQL tables.

This is due to a bad database design. It is better to refer to user_id instead of email.

Table USERS should be like:
user_id email

Table REPOS should be like
repo_id user_id

instead of
repo_id email

1 Like

REALLY? Everthing is tied together by the users e-mail-address??? :man_facepalming:
That’s very stupid and bad design. @galvanopus is absolutely right with his answer!

That must also be a huge problem with the LDAP sync of the pro version…

Please make this (using unique user IDs internal) a feature for next version of seafile!

everyone intersted in this feature, give this post a like

If you use LDAP, the recommend way is to use userPrincipalName to identify a user. The userPrincipalName will not change when you change a user’s email. It is documented in LDAP/AD Integration - Seafile Admin Manual

If you use email to identify a user already, you can use this API to migrate a old user’s libraries and sharing information to a new user: https://download.seafile.com/published/web-api/v2.1-admin/accounts.md#user-content-Migrate%20Account

The API is available since version 8.0

You are wrong about this. If the UPN is using the last name, it will change if the person marries or is divorced. You can also set the UPN to match the e-mail-address or include the first name in the UPN. There are many reasons for changing the users name. Just think about transgender people in the company. The only thing that never changes in Active Directory (as long as you don’t delete and recreate the account) is the SID!