aad-auth
aad-auth copied to clipboard
Migrate a local user to domain user
I would like to migrate a local user to a domain user like forsenit migration tool offers for windows. This could be a very useful tool/script
It looks like this is a possible solution, considering testuser as the username to migrate to [email protected]:
- Create the new domain user just by loggin in with [email protected]
- Create a new admin user and login with that
- Delete the /home/[email protected] folder
- Rename the old home folder /home/testuser to /home/[email protected]
- Do a
sudo chown -R [email protected]:[email protected] /home/[email protected] - Login with [email protected] and you should be done
The only "problems" I found is some leftover from the oldusr in some conf files:
sudo grep -R testuser 2>/dev/null
snap/firefox/common/.mozilla/firefox/s39yi92d.default/pkcs11.txt:parameters=configdir='sql:/home/testuser/snap/firefox/common/.mozilla/firefox/s39yi92d.default' certPrefix='' keyPrefix='' secmod='secmod.db' flags=optimizeSpace updatedir='' updateCertPrefix='' updateKeyPrefix='' updateid='' updateTokenDescription=''
snap/snap-store/1106/.config/gtk-3.0/bookmarks:file:///home/testuser/Documents
snap/snap-store/1106/.config/gtk-3.0/bookmarks:file:///home/testuser/Music
snap/snap-store/1106/.config/gtk-3.0/bookmarks:file:///home/testuser/Pictures
snap/snap-store/1106/.config/gtk-3.0/bookmarks:file:///home/testuser/Videos
snap/snap-store/1106/.config/gtk-3.0/bookmarks:file:///home/testuser/Downloads
snap/snap-store/current/.config/gtk-3.0/bookmarks:file:///home/testuser/Documents
snap/snap-store/current/.config/gtk-3.0/bookmarks:file:///home/testuser/Music
snap/snap-store/current/.config/gtk-3.0/bookmarks:file:///home/testuser/Pictures
snap/snap-store/current/.config/gtk-3.0/bookmarks:file:///home/testuser/Videos
snap/snap-store/current/.config/gtk-3.0/bookmarks:file:///home/testuser/Downloads
.config/gtk-3.0/bookmarks:file:///home/testuser/Documents
.config/gtk-3.0/bookmarks:file:///home/testuser/Music
.config/gtk-3.0/bookmarks:file:///home/testuser/Pictures
.config/gtk-3.0/bookmarks:file:///home/testuser/Videos
.config/gtk-3.0/bookmarks:file:///home/testuser/Downloads
Seahorse apparently sync the domain password with the local user password after a couple of login. An ultimate issue is there: ecryptfs-migrate-home cannot still be used with domain users. https://bugs.launchpad.net/ecryptfs/+bug/1630477