Re: Moving users from Debian-based distro to CentOS

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]



On Mon, 9 Aug 2010, John R Pierce wrote:

> To: CentOS mailing list <centos@xxxxxxxxxx>
> From: John R Pierce <pierce@xxxxxxxxxxxx>
> Subject: Re:  Moving users from Debian-based distro to CentOS
>
>  On 08/08/10 10:47 PM, Dotan Cohen 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).
>>
>> All advice appreciated. Thanks.
>>
>
> why not use useradd with the -u uid option so they match?
>
> don't forget groups, btw.   -g, -G, and create the groups with the same
> GID's.

Yes, that's the easiest way if there are only a few users on 
the system. The numeric UID's and GID's will still be on 
each users files and directories they own. So it makes sense 
to just create the user accounts with those UID's and GID's.

>From my Auto Linux Installer script:

# -------------------------------------------------- #
# Create test user account for rodney.

echo "Creating new user account for rodney"
echo "Adding rodney to audio group"
echo

useradd \
--comment 'User test account' \
--uid 505 \
--gid users \
--groups audio \
-M \
rodney

# Create login password for rodney.
lusermod -P 'qazwsxe' rodney

# -------------------------------------------------- #

Kind Regards,

Keith Roberts

-----------------------------------------------------------------
Websites:
http://www.php-debuggers.net
http://www.karsites.net
http://www.raised-from-the-dead.org.uk

All email addresses are challenge-response protected with
TMDA [http://tmda.net]
-----------------------------------------------------------------
_______________________________________________
CentOS mailing list
CentOS@xxxxxxxxxx
http://lists.centos.org/mailman/listinfo/centos


[Index of Archives]     [CentOS]     [CentOS Announce]     [CentOS Development]     [CentOS ARM Devel]     [CentOS Docs]     [CentOS Virtualization]     [Carrier Grade Linux]     [Linux Media]     [Asterisk]     [DCCP]     [Netdev]     [Xorg]     [Linux USB]
  Powered by Linux