[Debian Bug]: Please implement user backup and restore
From https://bugs.debian.org/923163. See also: https://discuss.freedombox.org/t/backups-does-not-back-up-users-settings-and-info/1420
[Petter Reinholdtsen] At the moment, if you want to migrate from one instanace of the freedombox to another, for example to replace the hardware, there is no way to migrate the users too.
The backup do not provide backup of the users, and the restore do not handle recovery of users.
Please implement backup of restore of users.
I found a copy of user information in LDAP, it can be extracted using slapcat. I also found a copy in /var/lib/plinth/plinth.sqlite3, which can be extracted using sqlite3 and the ".dump auth_user" statement. But unfortunately, this is not enough. I tried, and got a 500 when trying to edit a user imported this way.
[Petter Reinholdtsen]
But unfortunately, this is not enough. I tried, and got a 500 when trying to edit a user imported this way.
I found the missing piece of the puzzle. The SQL information in plinth_userprofile need to exist too for the imported users. By copying the user information from both auth_user and plinth_userprofile, I could modify the imported users.