Hi, this is a short guide on how to “convert” an external user (IMAP in my case but should probably work for any
user_external backend) to a Nextcloud-native (internal database) user.
- delete the user from
delete from user_external where uid='<user_uid>';
- create the user in
userstable without password:
insert into users values('<uid>','<display_name>','','<uid_lowercase');
- reset user’s password
$ occ user:resetpassword <uid>
This works for me on a small-scale deployment (tens of users, mixed internal and IMAP) on Nextcloud 24.0.5.
I didn’t test everything yet (shares, apps, etc.) but the user can login and all auth tokens seems to be preserved. E2E is not enabled!
You should be able to create the user with a password as well, you just need the proper hash to insert to the
users table. Not tested though.
ymmv, always test first and backup!