Using Ubuntu and Docker, moved servers, broke password

I wanted to understand what happened. I moved from Ubuntu in VirtualBox on a Windows PC to a dedicated machine. Installed same version of Ubuntu, 18.04, and I copied my config folder over. I matched all the files, permissions, and users, and folders, etc…

Home Assistant fired right up, but I could not login. The salt inside the auth_provider file in .storage was different, if I copied the one from the other machine back over, it would change it again.

I used this method…

Going into the container, making a new password, updated the file, restarting,then I was working again.

Does it make the salt from something on the host? It couldn’t be in the container…

Anything else I need to look out for from moving systems?

How you move the files? Copy/paste, rsync, scp, other?

I did scp, at first I didn’t do it as root, so it didn’t copy root owned files, but then I did sudo scp -r and then check all file counts and permissions… I had to tweak a view permissions, but I got it to match 100% with both old and new system terminals up doing comparison

Also, in the auth provider, after I ran it, HA changed the salt… So I know the issue, the salt was different, so the hash decrypted different, so my password didn’t match…

After first load I loaded auth provider on both terminals and salt on new machine was different, but it kept the user hash, or maybe it just auto generated a whole new file, not sure

If you properly copy config folder there should be no issue. Also must ensure file/folder permissions are same between systems or you may run into issues.

I did all that, it was weird, I copied the file multiple times, the only change it seems is it was rewriting a new salt in auth provider, no idea why…

It’s up and running now and working, just figured I would ask if anyone else had issue…

All other passwords saved in integrations seem to work, so those must use another config or hash that worked…

I copied the files over and over, would stop container, check file and values, start container, open file, and HA would have changed it…

No permissions or read issues in logs or anything