Skip site navigation (1)Skip section navigation (2)
Date:      Tue, 16 Jan 2018 01:15:19 +0100
From:      Miroslav Lachman <000.fbsd@quip.cz>
To:        kremels@kreme.com, FreeBSD Current <freebsd-current@freebsd.org>
Subject:   Re: Copying to a new computer
Message-ID:  <5A5D4417.2020106@quip.cz>
In-Reply-To: <DC1679F5-D6B7-414B-812A-8329B827A56A@kreme.com>
References:  <DC1679F5-D6B7-414B-812A-8329B827A56A@kreme.com>

next in thread | previous in thread | raw e-mail | index | archive | help
@lbutlr wrote on 2018/01/16 00:12:
> I am replacing an old machine with a newer machine and I want to be sure I can move the shell users to the new machine, especially since I am mostly going too be setting up the machine as new.
>
> What are the minimal files that I need to copy over so that the users and groups from the old machine are on the new machine and without having to reset all the passwords?
>
> (Most the users are in sql databases, so that's not an issue, but there are a few with shell accounts, those are the ones I'm concerned with.
>
> I was intending to stick with v11.1 at this point.

You can copy these files:

/etc/group
/etc/login.conf
/etc/master.passwd
/etc/passwd

And DB files

/etc/login.conf.db
/etc/pwd.db
/etc/spwd.db

Or you can recreate them with pwd_mkdb and cap_mkdb (see their man pages)

If you installed some shells like bash or zsh for users, then you must 
installed them too and verify /etc/shells settings.

Additionally you may need a copy of /etc/profile and /etc/csh.cshrc if 
you modified them.

Miroslav Lachman



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