I succesfully join fedora and ubuntu thanks to realmd package. After I join the machine I can also log with a domain user with no problem. What I'd like to do now is to move and existing local user to a domain one. I found usermod useful to change a local username. Here is the command:
sudo usermod --login newuser --home /home/newuser -m olduser
Then I just need to modify /etc/passwd and replace what's left about 'olduser' with 'newuser'.
However, renaming the username to a domain user is not enough: it will be a local user anyway with a local password. How do I make an existing user a domain user ?