LinuxQuestions.org

LinuxQuestions.org (/questions/)
-   Linux - Newbie (https://www.linuxquestions.org/questions/linux-newbie-8/)
-   -   How to preserve user account information when replacing Linux distro? (https://www.linuxquestions.org/questions/linux-newbie-8/how-to-preserve-user-account-information-when-replacing-linux-distro-306856/)

farnell_mark 03-27-2005 11:10 PM

How to preserve user account information when replacing Linux distro?
 
I have an old hard disk with a partition dedicated to /home, which contains accounts for my users. However if I remove all the other partitions (/home is still intact) and replace the old fedora partition with Debian Sarge, then how can I let my users be able to log in to the system, use their olf settings and have access to their directories under /home

i.e. other than just the data in the /home directory, how can I preserve the user information (e.g. name and passwords etc. of all people entitled to use this computer) during the upgrade of the operating system?

Thanks!

Mark

Optimistic 03-27-2005 11:31 PM

You will have to add the /home info in fstab and that should mount it just fine. So far as passwords and stuff goes I'm not so sure. Sorry.

dryajov 03-28-2005 06:10 PM

Copy the /etc/passwd and /etc/shadow from the old distro to the new installation and you should be fine, also add an entry to the /etc/fstab file for the /home partition.

alienDog 03-28-2005 06:19 PM

I wouldn't just go replacing /etc/passwd and /etc/shadow of the new system with the files copied from old system. Sounds a bit risky... Better to compare the files and make changes to the new system as needed. At least make backups of the new system's files before replacing them. You might also need /etc/group and /etc/gshadow if you want to keep the group information too.

dryajov 03-28-2005 09:51 PM

That's correct, a back up of the system files is mandatory, also the group files are a good idea, since the passwd file holds information of the group a particular user belongs to and that information should match the group files info.

Two things you should keep an eye on is:

First: That the shell is in the path the passwd file is referring, if its not then, I would do a symbolic link to the correct place.

Second: That the shadow file is readable/writable by the root user only.

Regards,


All times are GMT -5. The time now is 04:14 PM.