[K12OSN] hard drive upgrade

Les Mikesell les at futuresource.com
Sat Dec 11 18:50:03 UTC 2004


On Sat, 2004-12-11 at 12:17, Liam Marshall wrote:
> I forgot to add, will this how to work if the users home directories are 
> buried in the /home directory?   ie /home/grade1/user1.....user2.....etc

If you stick to the same distribution version you should be able
to just copy the whole /etc/passwd, /etc/shadow, /etc/group (and add
/etc/gshadow).  If you upgrade distributions, you may have some
new or different users for systems services so you should probably
edit the files, keeping the newly created users below uid 500
and adding your old ones above uid 500.   As long as the location
of your home directories is the same on the new system as the
old, everything should work.  The only system reference to this
location is in /etc/passwd.  You can also move the location of
any home directory and adjust the reference in /etc/passwd if you
want to change the layout.

---
  Les Mikesell
    les at futuresource.com




> At 12:06 PM 12/11/2004, you wrote:
> >am am setting up to upgrade my harddrives.  I have been unable to find an 
> >elegent way to copy all the old partitions over to the new raided SATA 
> >drives, so I have decided to do a clean install, and transfer over home 
> >directories and users instead.  I did some research and came up with this 
> >how to off the net.  I would appreciate it if someone would look it over 
> >and let me know if this is going to work.  Otherwise I would have to go on 
> >faith.  I have almost 600 users so I don;t want to recreate all of them
> >
> >Beginning of How To*************
> >_________________________________________________________________________________________________
> >the files you need to be concerned about to move users and passwords over are:
> >
> >/etc/passwd
> >/etc/shadow
> >/etc/group
> >
> >BUT it isn't as easy as just copying the old files to the new server ... 
> >you will need to edit the new files (on the new server) and add any users 
> >that are not already in the new files ... but don't change or add users 
> >that exist already in the new files.
> >
> >SO ... copy the old passwd and shadow files over to the new server ... 
> >name them passwd.old and shadow.old
> >
> >open /etc/passwd on the new server and passwd.old from the old server ...
> >
> >the user john is in old ... but not new ... so copy the whole line for 
> >john from the old to the new file (add it at the bottom of the file) ... 
> >do that for all users not currently in new.
> >
> >Now keep passwd (from the new server) open ... open shadow new and shadow 
> >old ... copy the entries for shadow old into shadow new (put them in using 
> >the same order that they are in on the new passwd file).
> >
> >Now for /etc/group ... add all the groups not currently in new from old....
> >
> >save the three new files /etc/passwd, /etc/shadow, /etc/groups
> >--------------------------------------
> >next, copy all the users directories from the old server to the new server 
> >(everything in /home old to /home new)
> >
> >if the mail gets delivered to the home directories, you are done ... if it 
> >goes somewhere else, you need to copy those directories over as well...
> >
> >End of How To***********
> >___________________________________________________________________________________________________
> >
> >also, while I am at it I thought I would upgrade from K12LTSP 4.0 to 
> >either 4.1 or 4.2.  Would it be ok to do that and still copy over the 
> >users/passwords/groups/ and their home directories as per the above 
> >instructions?
> >
> >
> >
> >_______________________________________________
> >K12OSN mailing list
> >K12OSN at redhat.com
> >https://www.redhat.com/mailman/listinfo/k12osn
> >For more info see <http://www.k12os.org>
> 
> _______________________________________________
> K12OSN mailing list
> K12OSN at redhat.com
> https://www.redhat.com/mailman/listinfo/k12osn
> For more info see <http://www.k12os.org>




More information about the K12OSN mailing list