[CentOS] Re: Copying user accounts (passwords) to another server

thad thad.mailist at gmail.com
Wed Nov 29 23:51:06 UTC 2006


I agree on this it could make things bad especially if you have
applications with users account, uid and gid matters and also if there
are nfs mount points that applications use and has to be migrated or
copy over, be care wary of user and group ownership and permission.


On 11/29/06, Kevan Benson <kbenson at a-1networks.com> wrote:
> On Wednesday 29 November 2006 05:43, Walt Reed wrote:
> > On Wed, Nov 29, 2006 at 01:31:48PM -0000, Nigel Kendrick said:
> > > I am doing a server swap out tomorrow and wondered if there was a utility
> > > that will copy user account details and their current passwords from one
> > > server to another (both CentOS 4) - there's only about 15 to do so it's
> > > not a major issue.
> >
> > Rsync and scp are your friend.
> >
> > You can either cut and paste the user info from the /etc/passwd, shadow,
> > and group files manually, or copy the entire files which wiill also copy
> > over all the system accounts (root password and such):
> >
> > cd /etc
> > scp -p passwd shadow group newserver:/etc
> >
> > Then of course you will probably need to copy the user home directories
> > over:
> >
> > cd /home
> > rsync -aze ssh * newserver:/home
>
> It's worth noting that if you use external packages (rpmforge, kbsingh), that
> some packages may create users without a set UID (as the core packages seem
> to have), and if already installed on the new system, it might be using a
> different UID.  In these cases, you should either copy regular user portions
> of the files only, or take a careful look at a diff between the old and new
> files to ensure there are no problems.
>
> This caused me a few minutes of confusion with clamav/clamd (specifically the
> milter socket) which had an incorrect owner after passwd sync on a mail
> server migration.
>
> --
> - Kevan Benson
> - A-1 Networks
> _______________________________________________
> CentOS mailing list
> CentOS at centos.org
> http://lists.centos.org/mailman/listinfo/centos
>


-- 
sometimes truth is stranger than fiction
-bad religion-
http://www.bloglines.com/blog/mailist



More information about the CentOS mailing list