TL;DR: Don't do this. A colleague recommended me not doing this, but dump users data and recreate users in FreeIPA which is much simpler, quicker and more reliable. And now I agree with him. For I have aged.
If you do, however, plan to do this for whatever reasons, lots of text under the cut