So, my old laptop recently died on me. My laptop’s hard-drive is fine. I’ve copied most of my laptop’s data to my desktop computer.
However, I want to log into my laptop’s account.
I tried replacing my desktop computer’s hard-drive with my laptop’s hard-drive but that didn’t work.
Adding a user to my desktop computer and replacing it with my laptop’s account could have worked if I had used different usernames on each computer… but I hadn’t so that won’t work.
Therefore I’m in need of some advice: how can I accomplish this?
I had a few ideas of my own but I figured there had to be an easier way.
User accounts are determined not by the name ( just used for the home directory) but the UID (user ID) Chances are that unless you happen to have many users that your user ID is 1000 on both machines and thus you should have full permissions on either to the home directories on any drive. Also as root you have full permissions to everything.
Indeed, I used root to copy most of my data from my laptop hard-drive to my desktop computer.
But I want to log into my laptop account. And for that, opensuse needs to recognize the account on my laptop hard-drive. Which is impossible because Yast doesn’t like two accounts with the same username. The only solution I could come up with was the following changes:
/sda1 = swap
/sda2 = /
/sda3 = /home
removable media (formerly laptop hard-drive) with /home partition
and turn it into:
/sda1 = swap
/sda2 = /
/sda3 now an unmounted /home partition
removable media (formerly laptop hard-drive) now a mounted /home partition
and use to my advantage the similar username and user ID. This would allow me to log into my laptop account.
Check the permissions if you used root then the your /home/username and contents may now be owned by root. Change the ownership back to your user UID can use the chown command
Also how did you copy?? file by file or clone the partition. If cloned the UUID of home partition will be different and it won’t mount using the desktop machines original UUID in which case you need to edit /etc/fstab and set the correct UUID. Can be found in a live boot in /dev/disk/by-uuid directory