Data migration

Data migration

am 27.07.2010 02:58:06 von cajun

I'm migrating an old RedHat server to a new Debian server. In migrating
the data there's a problem in that on the RH server the UID starts at
500, on the Debian server the UID starts at 1000. Resulting in something
like this:

Old User New
UID Name UID

500 Moe 1000
501 Larry 1001
502 Curley 1002
503 Shemp 1003

I've tossed this around in my head and haven't really arrived at a good
method to correct the UID's on the new server. I presume there will be a
similar problem with GID's as well, although I've not yet confirmed that.

I'm hopeful that someone will give me an idea that will give me a
kick-start so to speak.

Thanks,
Mike

--

Those who can, do. Those who cannot, teach. Those who cannot teach,
HACK!
19:50:01 up 8 days, 19:17, 4 users, load average: 0.08, 0.03, 0.00

Linux Registered User #241685 http://counter.li.org

--
To unsubscribe, e-mail: beginners-unsubscribe@perl.org
For additional commands, e-mail: beginners-help@perl.org
http://learn.perl.org/

Re: Data migration

am 27.07.2010 08:11:33 von Shlomi Fish

On Tuesday 27 Jul 2010 03:58:06 M.Lewis wrote:
> I'm migrating an old RedHat server to a new Debian server. In migrating
> the data there's a problem in that on the RH server the UID starts at
> 500, on the Debian server the UID starts at 1000. Resulting in something
> like this:
>
> Old User New
> UID Name UID
>
> 500 Moe 1000
> 501 Larry 1001
> 502 Curley 1002
> 503 Shemp 1003
>
> I've tossed this around in my head and haven't really arrived at a good
> method to correct the UID's on the new server. I presume there will be a
> similar problem with GID's as well, although I've not yet confirmed that.
>

My suggestion is to simply copy the appropriate lines from the /etc/passwd to
the new /etc/passwd.

Regards,

Shlomi Fish

> I'm hopeful that someone will give me an idea that will give me a
> kick-start so to speak.
>
> Thanks,
> Mike

--
------------------------------------------------------------ -----
Shlomi Fish http://www.shlomifish.org/
The Case for File Swapping - http://shlom.in/file-swap

God considered inflicting XSLT as the tenth plague of Egypt, but then
decided against it because he thought it would be too evil.

Please reply to list if it's a mailing list post - http://shlom.in/reply .

--
To unsubscribe, e-mail: beginners-unsubscribe@perl.org
For additional commands, e-mail: beginners-help@perl.org
http://learn.perl.org/

AW: Data migration

am 27.07.2010 08:32:27 von t.baetzler

Shlomi Fish wrote:
> My suggestion is to simply copy the appropriate lines from the
> /etc/passwd to
> the new /etc/passwd.

.... and of course not to forget about /etc/shadow because otherwise you =
won't be able to login.

HTH,
Thomas

--
To unsubscribe, e-mail: beginners-unsubscribe@perl.org
For additional commands, e-mail: beginners-help@perl.org
http://learn.perl.org/

Re: Data migration

am 27.07.2010 15:49:10 von cajun

On 07/27/2010 01:11 AM, Shlomi Fish wrote:
> On Tuesday 27 Jul 2010 03:58:06 M.Lewis wrote:
>> I'm migrating an old RedHat server to a new Debian server. In migrating
>> the data there's a problem in that on the RH server the UID starts at
>> 500, on the Debian server the UID starts at 1000. Resulting in something
>> like this:
>>
>> Old User New
>> UID Name UID
>>
>> 500 Moe 1000
>> 501 Larry 1001
>> 502 Curley 1002
>> 503 Shemp 1003
>>
>> I've tossed this around in my head and haven't really arrived at a good
>> method to correct the UID's on the new server. I presume there will be a
>> similar problem with GID's as well, although I've not yet confirmed that.
>>
>
> My suggestion is to simply copy the appropriate lines from the /etc/passwd to
> the new /etc/passwd.
>
> Regards,
>
> Shlomi Fish
>
>> I'm hopeful that someone will give me an idea that will give me a
>> kick-start so to speak.
>>
>> Thanks,
>> Mike
>

Thanks Shlomi. But in order for that to work, I would have to retain the
'old' UID numbering system, rather than use the 'new' (Debian) numbering
system. If I wanted to do that, your solution would work fine.

Maybe I've missed something.

Thanks,
Mike


--

A bug in the code is worth two in the documentation.
08:45:01 up 9 days, 8:12, 4 users, load average: 0.05, 0.05, 0.00

Linux Registered User #241685 http://counter.li.org

--
To unsubscribe, e-mail: beginners-unsubscribe@perl.org
For additional commands, e-mail: beginners-help@perl.org
http://learn.perl.org/

Re: Data migration

am 27.07.2010 16:15:53 von Ron Bergin

On Jul 26, 5:58=A0pm, ca...@cajuninc.com ("M.Lewis") wrote:
> I'm migrating an old RedHat server to a new Debian server. In migrating
> the data there's a problem in that on the RH server the UID starts at
> 500, on the Debian server the UID starts at 1000. Resulting in something
> like this:
>
> Old =A0 =A0 User =A0 =A0New
> UID =A0 =A0 Name =A0 =A0UID
>
> 500 =A0 =A0 Moe =A0 =A0 1000
> 501 =A0 =A0 Larry =A0 1001
> 502 =A0 =A0 Curley =A01002
> 503 =A0 =A0 Shemp =A0 1003
>
> I've tossed this around in my head and haven't really arrived at a good
> method to correct the UID's on the new server. I presume there will be a
> similar problem with GID's as well, although I've not yet confirmed that.
>
> I'm hopeful that someone will give me an idea that will give me a
> kick-start so to speak.
>
> Thanks,
> Mike

If you don't want to use the original UID's, then the first thing that
I can think of is to:

1) use useradd to create the new account

2) scp or rsync the original home directory to the new server

3) chown the user's files to reset the user/group id's


--
To unsubscribe, e-mail: beginners-unsubscribe@perl.org
For additional commands, e-mail: beginners-help@perl.org
http://learn.perl.org/

Re: Data migration

am 27.07.2010 16:27:31 von cajun

On 07/27/2010 09:15 AM, Ron Bergin wrote:
> On Jul 26, 5:58 pm, ca...@cajuninc.com ("M.Lewis") wrote:
>> I'm migrating an old RedHat server to a new Debian server. In migrating
>> the data there's a problem in that on the RH server the UID starts at
>> 500, on the Debian server the UID starts at 1000. Resulting in something
>> like this:
>>
>> Old User New
>> UID Name UID
>>
>> 500 Moe 1000
>> 501 Larry 1001
>> 502 Curley 1002
>> 503 Shemp 1003
>>
>> I've tossed this around in my head and haven't really arrived at a good
>> method to correct the UID's on the new server. I presume there will be a
>> similar problem with GID's as well, although I've not yet confirmed that.
>>
>> I'm hopeful that someone will give me an idea that will give me a
>> kick-start so to speak.
>>
>> Thanks,
>> Mike
>
> If you don't want to use the original UID's, then the first thing that
> I can think of is to:
>
> 1) use useradd to create the new account
>
> 2) scp or rsync the original home directory to the new server
>
> 3) chown the user's files to reset the user/group id's
>

That's what I was thinking too Ron, but I was hopeful for a more
automated method of doing them all rather than one user at a time.
There's not so many users that is just out of the question, but I'd like
to avoid it if I can do it simply.


--

I am a computer, dumber than any human and smarter than an administrator.
09:25:01 up 9 days, 8:52, 4 users, load average: 0.32, 0.14, 0.03

Linux Registered User #241685 http://counter.li.org

--
To unsubscribe, e-mail: beginners-unsubscribe@perl.org
For additional commands, e-mail: beginners-help@perl.org
http://learn.perl.org/

RE: Data migration

am 27.07.2010 16:28:22 von Bob McConnell

From: M.Lewis

> On 07/27/2010 01:11 AM, Shlomi Fish wrote:
>> On Tuesday 27 Jul 2010 03:58:06 M.Lewis wrote:
>>> I'm migrating an old RedHat server to a new Debian server. In
migrating
>>> the data there's a problem in that on the RH server the UID starts
at
>>> 500, on the Debian server the UID starts at 1000. Resulting in
something
>>> like this:
>>>
>>> Old User New
>>> UID Name UID
>>>
>>> 500 Moe 1000
>>> 501 Larry 1001
>>> 502 Curley 1002
>>> 503 Shemp 1003
>>>
>>> I've tossed this around in my head and haven't really arrived at a
good
>>> method to correct the UID's on the new server. I presume there will
be a
>>> similar problem with GID's as well, although I've not yet confirmed
that.
>>>
>>
>> My suggestion is to simply copy the appropriate lines from the
/etc/passwd to
>> the new /etc/passwd.
>>=20
>>> I'm hopeful that someone will give me an idea that will give me a
>>> kick-start so to speak.
>>
>=20
> Thanks Shlomi. But in order for that to work, I would have to retain
the=20
> 'old' UID numbering system, rather than use the 'new' (Debian)
numbering=20
> system. If I wanted to do that, your solution would work fine.
>=20
> Maybe I've missed something.

Maybe it would help if you explained what you mean by "correct the UID's
on the new server." Shlomi explained one method of correcting them, but
apparently that's not what you had in mind.

Bob McConnell

--
To unsubscribe, e-mail: beginners-unsubscribe@perl.org
For additional commands, e-mail: beginners-help@perl.org
http://learn.perl.org/

Re: Data migration

am 27.07.2010 16:36:09 von Ron Bergin

M.Lewis wrote:
>
> On 07/27/2010 09:15 AM, Ron Bergin wrote:

[snip]

>>
>> If you don't want to use the original UID's, then the
>> first thing that
>> I can think of is to:
>>
>> 1) use useradd to create the new account
>>
>> 2) scp or rsync the original home directory to the new
>> server
>>
>> 3) chown the user's files to reset the user/group id's
>>
>
> That's what I was thinking too Ron, but I was hopeful for
> a more
> automated method of doing them all rather than one user at
> a time.
> There's not so many users that is just out of the
> question, but I'd like
> to avoid it if I can do it simply.
>
> --

A simple Perl script that wraps those 3 steps in a loop
would be an automated solution. At least in my mind.


--
To unsubscribe, e-mail: beginners-unsubscribe@perl.org
For additional commands, e-mail: beginners-help@perl.org
http://learn.perl.org/