[CentOS] Moving users from Debian-based distro to CentOS

Mon Aug 9 20:12:32 UTC 2010
Kwan Lowe <kwan.lowe at gmail.com>

On Mon, Aug 9, 2010 at 1:47 AM, Dotan Cohen <dotancohen at gmail.com> wrote:
> I have a Debian machine with four users that I plan on migrating to
> CentOS. As per Debian habits the UIDs start with 1000.
>
> Is it enough to reuse the Debian /etc/shadow and /etc/passwd files
> over? Or will I need to configure some other things? I had considered
> just creating four new users starting from UID 500 then chown -R -ing
> the user's home directories, but I find that invasive and possibly
> error prone (maybe there are files that are not owned by them).
>
Durn.... pushed send before I finished thinking..

You'd want to use a find by uid with the exec option..

find . -uid 12345 -exec chown johndoe {} \;

Keep in mind that if you have NFS mounts you'll need to synchronize
the uids on both systems.