Skip to content
This repository has been archived by the owner on May 2, 2024. It is now read-only.

Migrate a local user to domain user #468

Open
suoko opened this issue Mar 1, 2024 · 2 comments
Open

Migrate a local user to domain user #468

suoko opened this issue Mar 1, 2024 · 2 comments
Labels
bug Something isn't working

Comments

@suoko
Copy link

suoko commented Mar 1, 2024

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

@suoko suoko added the bug Something isn't working label Mar 1, 2024
@suoko
Copy link
Author

suoko commented Mar 1, 2024

It looks like this is a possible solution, considering testuser as the username to migrate to user@domain.com:

  • Create the new domain user just by loggin in with user@domain.com
  • Create a new admin user and login with that
  • Delete the /home/user@domain.com folder
  • Rename the old home folder /home/testuser to /home/user@domain.com
  • Do a sudo chown -R user@domain.com:user@domain.com /home/user@domain.com
  • Login with user@domain.com 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

@suoko
Copy link
Author

suoko commented Mar 8, 2024

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

Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
bug Something isn't working
Projects
None yet
Development

No branches or pull requests

1 participant