Skip site navigation (1)Skip section navigation (2)
Date:      Wed, 12 Dec 2001 14:18:54 -0600
From:      Ben Weaver <bweaver@tranquility.net>
To:        Bill Sandiford <sysop@interlinks.net>
Cc:        freebsd-questions@FreeBSD.ORG
Subject:   Re: Migrating users from one machine to another
Message-ID:  <20011212141854.C63510@tranquility.net>
In-Reply-To: <000701c1832e$012d3a00$0fa06bcf@custinfo>; from sysop@interlinks.net on Wed, Dec 12, 2001 at 11:56:53AM -0500
References:  <000701c1832e$012d3a00$0fa06bcf@custinfo>

next in thread | previous in thread | raw e-mail | index | archive | help
###On Wed, Dec 12, 2001 at 11:56:53AM -0500, Bill Sandiford wrote:
> Hi :
> 
> I have a mail server with approx 2000 users that is starting to die.  I
> have built a new machine (new hard drives etc.) and need to migrate all of
> the users from the old machine to the new.  I have looked for an online
> resource that explains the process but was unable to find one.  I am
> assuming that all I need to do is copy the follow files from the old machine
> to the new, but I am afraid that I may miss one
> 
> /etc/passwd
> /etc/master.passwd
> /etc/groups

Those three files are the key ones to have.  If the new server is
running a newer version of FreeBSD or newer versions of some
software, make sure that you duplicate any special accounts or
groups already existing in the new /etc/master.passwd and
/etc/groupd but not existing in the old files.  Once you move
/etc/master.passwd over, be sure to run a pwd_mkdb on it.

A VERY important part of the upgrade is to make sure that your
login.conf default password format matches your password format
scheme in /etc/master.passwd.  For instance, if you're migrating
from an older version of FreeBSD, the default format might be DES,
but newer versions of FreeBSD default to md5.  The result would be
that authentication attempts would fail.  If the format of your
master.passwd file is DES, change the line

passwd_format=md5:\

to

passwd_format=des:\

in your /etc/login.conf, then run cap_mkdb /etc/login.conf

To move all of your home directories shouldn't require a special
script.  All you need to do is transfer all of the old /home to the
new /home.  You can do this with tar, or scp -R if you want to.  For
instance from the old server you can:

tar czf - -C /home . | ssh root@new.server.isp.net tar xvzf - -C /home 

You could also pull the drive(s) from the old server and mount them
in the new server or make an nfs share and copy them with the cp
command...  Anything will work. 

One other thing is where are the mail spool files for all of your
users?  Are they in $HOME/.mail or in /var/mail/$USER.  If they're
in /var, you'll have to move those as well.  Don't forget to take
your mail server down before moving the spool files.  It just
wouldn't do if you moved someone's mail over to the new server and
they got some new, important mail delievered to them before you
brought the new server online and it went to the old server
unbeknownst to you.

I hope this helped a bit.  Good luck.

-Ben

To Unsubscribe: send mail to majordomo@FreeBSD.org
with "unsubscribe freebsd-questions" in the body of the message




Want to link to this message? Use this URL: <https://mail-archive.FreeBSD.org/cgi/mid.cgi?20011212141854.C63510>