I'm using Linux Mint 17.3 and have created a new smaller disk with Mint 18. Now my plan is to mount the old partition from /mountpoint/oldroot/home/ into /home on the new system. So I create all 3 users with same user name and password as on the old system and then edit /etc/fstab, right?


  • I need to make sure that the numerical uid and gid match, how do I do that?
  • Is there any other thing to watch out for?

Ideally, I'd like to avoid running chown on the old home, because I'd like to use the two systems in parallel until I'm confident the transition was successful. But I'm a bit worried that I missed something.


You can use the usermod command to change a users credentials:



So you can adopt the values of your old system.

Home directory location (only if incomplete moving of /home ...)

usermod -d /path/to/new/home/dir USERNAME

For also moving the contents of the current home dir to the new location, use the -m option.

Alternatively you might also just move the old /etc/passwd, /etc/group and /etc/shadow files to the new system and skip the resetting of UID an GID.

One problem I see, might be if the two systems use the same names for some config files and thus produce errors.

| improve this answer | |

I ended up adjusting the GID and UID of the new install to those of the old installation using usermod -u <old-uid> <login> and groupmod -g <old-gid> <login> and made sure that the home directories are named the same on the new as on the old system. To change to the new home directories, I edited the fstab to mount them in /home, then renamed the default user directories mv /home/login /home/login_old and made empty directories mkdir /home/login as mount points used in the fstab file. After that, I immediately rebooted.

It worked fine and without errors, as Mint 17.3 and 18 were sufficiently similar.

I wouldn't recommend this in general for migrating from one distro to another or if the desktop environment is changed, because the old settings a user's home directory might cause problems.

| improve this answer | |

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service, privacy policy and cookie policy

Not the answer you're looking for? Browse other questions tagged or ask your own question.