How to rename username in Nextcloud

So here is workaround

Just writing here steps for future what did to accomplish this:

We had a username “Xyz Test” which we require to rename to xtest for example.

  1. Renamed user data directory “Xyz Test” to xtest
  2. Run command find . -name “Xyz Test” in nextcloud root directory, and renamed all found directories to xtest
  3. Took backup nextclouddb in .sql file
  4. opened nextclouddb.sql file in nano editor and replaced all entries “Xyz Test” by xtest in one go by using feature of nano editor.
  5. Saved the file and exit
  6. Restored nextclouddb.sql
  7. sudo -u www-data php occ files:scan userid or sudo -u www-data php occ files:scan --all

Now Xyz Test user can login with xtest. All files and talk conversation are there

This is the story :slight_smile:

4 Likes