server icon indicating copy to clipboard operation
server copied to clipboard

Change/rename login name

Open HLFH opened this issue 8 years ago • 76 comments

Hi,

I would like to rename/change my login name and we can't do that for now on Nextcloud. Can you support it?

For now:

Each Nextcloud user has two names: a unique Login Name used for authentication, and a Full Name, which is their display name. You can edit the display name of a user, but you cannot change the login name of any user.

Thanks,

HLFH avatar Jun 20 '17 15:06 HLFH

No - the login name for now is our internal ID. We will not support this. You could also login via your email address (if it is only used once in the instance)

MorrisJobke avatar Jul 18 '17 18:07 MorrisJobke

This is bad... Really bad.

sscholl avatar Mar 22 '18 08:03 sscholl

Yeah, an ability to rename users would be very useful.

rysiekpl avatar Jun 21 '18 09:06 rysiekpl

This is a useful feature.

amjad avatar May 02 '20 04:05 amjad

Quite sad.

t1mothy666 avatar Aug 31 '20 12:08 t1mothy666

I would like to raise this issue again, because it is a very important Nextcloud limitation, especially for the following cases:

  • trans folks who transition and want to eliminate their deadname (aka old first name, the name they were assigned that doesn't match their gender) in their username,
  • folks who marry or divorce and want to eliminate their old last name in their username.

Other popular software like GitLab and Mattermost support changing the username without any problems.

If it's really not possible to change the "userid" at all for technical limitiations, it would be nice if it could still be overwritten virtually, so that the "userid" doesn't appear anywhere (except internally).

/cc @schiessle @rullzer @MorrisJobke

caugner avatar Jun 09 '21 09:06 caugner

Depending on the case it is even a legal obligation. see https://gdpr-info.eu/art-16-gdpr/ (right to rectification)

bpcurse avatar Jun 09 '21 12:06 bpcurse

Usernames almost never stick around for the entirety of someones life. Some are young and choose dumb, embarrassing names like xXNoobKiller69Xx, and some may regret using their real name as their username. Of course it's their own fault, and they could always create new accounts, but the more services support a simple means to rename your account, or migrate everything to a new account under a different username, the many more hours are saved for many people. That's what I think, anyway. Obviously the trans stuff is also quite relevant right now, but that was already mentioned. P.S., is it fair to call and flag this as "technological debt"? I believe the current best practice is not to let users choose their uniquely identifying name, but rather assign each a random numeric value. Then there's also what I'd call the "Discord approach", where users choose only a display name, and get a randomly assigned, smaller numeric value, however still with a unique number it maps to under the hood.

adroslice avatar Jul 28 '21 21:07 adroslice

Also facing this question/issue.

Could a workaround be to have a function or feature that transfers ownership of all files/folders/tasks etc. from one user to another? That way, the workaround could be:

  1. Create a new account with the desired username 'UsernameB'
  2. Transfer ownership of all data from account 'UsernameA' to 'UsernameB'
  3. Delete 'UsernameA' account.

Not ideal, but might be easier from a technical standpoint?

pjrobertson avatar Aug 03 '21 05:08 pjrobertson

@pjrobertson do you know if there is any way to do this? Esp. with things like calanders, export/import is difficult.

gabevenberg avatar Aug 18 '21 14:08 gabevenberg

I don't know. The above suggested workflow was hypothetical. I see occ has files:transfer-ownership and dav:move-calendar. Those may work

pjrobertson avatar Aug 19 '21 01:08 pjrobertson

Any updates on the issue? I do not think this has been resolved.

ErikUden avatar Oct 22 '21 23:10 ErikUden

I believe this is important too!

Verhoeckx avatar Oct 27 '21 17:10 Verhoeckx

For me, this would also be a very important function. Especially now that there are problems with the current Android version --> "Server not available" occurs when the username contains a space.

Edit: I know i can login with my e-mail address but than i have to reconfigure my account and syncs 😞

felix-berlin avatar Nov 28 '21 15:11 felix-berlin

I don't know. The above suggested workflow was hypothetical. I see occ has files:transfer-ownership and dav:move-calendar. Those may work

If I'm right, this only transfers the files and calendars. But what happens with the remaining data of other apps?

felix-berlin avatar Nov 28 '21 15:11 felix-berlin

Did anybody ever try to change the username directly in the database, table nc_accounts? Unfortunately, I don't have a test instance to try this safely.

MostFrabjous avatar Dec 25 '21 16:12 MostFrabjous

Usernames are only used in two places: the database and the data folder. So it ‘only’ requires a find-and-replace in every database table and recursively in the data folder.

What would be better though, is assigning an ID for each user upon account generation, and have the username appear in one place in the database…

msberends avatar Dec 26 '21 08:12 msberends

No - the login name for now is our internal ID. We will not support this. You could also login via your email address (if it is only used once in the instance)

@MorrisJobke Maybe you should reconsider this statement. It is fine to say "we don't support this at the moment" for the reasons given (username used as internal ID). But on the other hand using a user-facing string as internal ID is almost always a bad design choice. So in my opinion it would be much better to admit that this should be reworked and fixed in the future, though this might not be an easy task. I'm really tempted to reopen this, but maybe someone else wants to voice their opinion first.

fschrempf avatar Jan 10 '22 16:01 fschrempf

@fschrempf I'm not working full time on this project anymore and my spare time is quite limited.

I also fully understand that this is a problem, still moving away from this has a huge potential of breaking many many instances out there and is a far from trivial task. There are options to mask the authentication methods (see LDAP for example where the user ID is by default a UUID) and there it is also not a problem. Still there should be all potential user facing elements being moved over to the display name instead of the internal ID. But then this would be fine.

That's basically it what we came to in the past years. Could I ask you to keep me out of further discussions?

MorrisJobke avatar Jan 10 '22 20:01 MorrisJobke

So if we don't want to change the login name, b/c it's used as "internal UID", we could introduce a "visible name" to override it, this wouldn't break anything, as the "internal UID" could be a save fallback.

MostFrabjous avatar Jan 11 '22 06:01 MostFrabjous

What I don't get is that it seems to already exists? When you create a new user you can already chose a display name.

vivaldi_Z6gfv5fNjQ

This UI is available at URI /settings/users

RedKage avatar Jan 11 '22 08:01 RedKage

So if we don't want to change the login name, b/c it's used as "internal UID", we could introduce a "visible name" to override it, this wouldn't break anything, as the "internal UID" could be a save fallback.

I think this is the solution!

Verhoeckx avatar Jan 11 '22 18:01 Verhoeckx

What I don't get is that it seems to already exists? When you create a new user you can already chose a display name.

vivaldi_Z6gfv5fNjQ

This UI is available at URI /settings/users

So it's more a UX problem: how can Nextcloud expose the function of the display name more, and especially during the creation of the initial user.

Verhoeckx avatar Jan 11 '22 18:01 Verhoeckx

Nextcloud - user list

You can change the display name, but the overview is very confusing; why not a separate column for the display name?

Verhoeckx avatar Jan 11 '22 19:01 Verhoeckx

Could I ask you to keep me out of further discussions?

Sure, no problem!

fschrempf avatar Jan 11 '22 19:01 fschrempf

So it's more a UX problem: how can Nextcloud expose the function of the display name more, and especially during the creation of the initial user.

Even if the UI would use the display name everywhere, we would need to get rid of the username being used internally as ID, or turn it into some non-readable, random UID.

fschrempf avatar Jan 11 '22 19:01 fschrempf

On Tuesday, 11 January 2022 19:48:33 GMT Frieder Schrempf wrote:

Even if the UI would use the display name everywhere, we would need to get rid of the username being used internally as ID, or turn it into some non-readable, random UID.

But that's easy, no? It's a question of using the user id field in a different way. Switch to using UUIDs instead or something like that such that this simply becomes a non-issue.

The beauty of it is it can even be done on existing instances gradually, just start using it this way for new users.

-- Best, r

rysiekpl avatar Jan 11 '22 19:01 rysiekpl

Use the display name in the interface, and use the username in the background for a unique hash!

Verhoeckx avatar Jan 11 '22 20:01 Verhoeckx

What about the desktop sync clients? They are often authenticated with usernames (I always log in to the web instance with username btw, so that should become impossible then and only allow an email address?).

msberends avatar Jan 11 '22 20:01 msberends

On Tuesday, 11 January 2022 20:18:33 GMT dr. Matthijs Berends wrote:

What about the desktop sync clients? They are often authenticated with user names (I always log in to the web instance with username btw, so that should become impossible then and only allow an email address?).

Using e-mail addresses as login IDs is a good practice anyway -- most people will remember their e-mail address, but will forget their username on some random service they have to log into maybe twice a year.

-- Best, r

rysiekpl avatar Jan 11 '22 20:01 rysiekpl