LinuxQuestions.org
Help answer threads with 0 replies.
Home Forums Tutorials Articles Register
Go Back   LinuxQuestions.org > Forums > Linux Forums > Linux - Networking
User Name
Password
Linux - Networking This forum is for any issue related to networks or networking.
Routing, network cards, OSI, etc. Anything is fair game.

Notices


Reply
  Search this Thread
Old 04-03-2002, 02:42 PM   #1
magyartoth
Member
 
Registered: Feb 2002
Location: Pittsburgh, PA, USA
Posts: 73

Rep: Reputation: 15
Question Simple(hopefully) question


I know this seems like a lame question, but what changes need to be made when moving a server from an old machine to a new machine?

We just bought a brand spanking new PC and installed Red Hat 7.2 to put our email server on to replace the old circa 1995 Compaq(with Red hat 6.2).

First, I shutdown the old machine, configured the new machines networking to have the same IP addy, hostname, DNS, gateway, and subnet mask as the old machine, and rebooted just to make sure.

It starts up, starts up all the services, sets the hostname correctly, starts sendmail, yet I can't ping it, ping from it, or telnet out from it. It appears to be unconnected to the network. I know it's not the eth card or cable because if I setup the networking to use DHCP, it works fine and I can telnet from it, ping, etc. But it needs to use the IP address and hostname of the old machine to comply with the DNS MX records. I checked ifconfig and in /etc/sysconfig/network-scripts/ and everything seems to be set correctly. But it just sits there.

Any idea?

-M
:smash:
 
Old 04-03-2002, 05:53 PM   #2
finegan
LQ Guru
 
Registered: Aug 2001
Location: Dublin, Ireland
Distribution: Slackware
Posts: 5,700

Rep: Reputation: 72
To make sure you're setting the information right, here's how to do everything manually instead of relying on the scripts in /etc/sysconfig/

edit /etc/resolv.conf to have:
nameserver 123.123.123.123
nameserver 123.123.123.123

With the real IPs of your nameserver. Then set the IP with:

/sbin/ifconfig eth0 123.123.123.123 up

and then add the gateway with:

/sbin/route add default gw 123.123.123.1

That's the hand way to add all three. If it still can't ping out... its possible if your gateway is your dhcp server, or even if not, that you have some funky filtering by MAC address, but I really doubt it.

Also, post back if you need some help swapping out the accounts really quickly. I had to do just this kind of thing about six months ago.

Luck,

Finegan
 
Old 04-03-2002, 11:42 PM   #3
Gladiator
LQ Newbie
 
Registered: Jun 2001
Posts: 23

Rep: Reputation: 15
for finnegan

I am having a similar problem (sorta).

Anyway my question is, when I connect to my ISP through ppp, I am given through DHCP an IP, gateway and my nameservers. However my IP and my gateway are identical. It works with windows but nothing happens when I connect with Linux. I mean it connects fine but goes nowhere and when I ping my IP I only get 50 percent of the packets back?? Nothing else can be pinged or resolved.

My nameservers are passed into /etc/resolv.conf and my routing table looks fine.

Any ideas?

Jason
 
Old 04-04-2002, 02:16 AM   #4
finegan
LQ Guru
 
Registered: Aug 2001
Location: Dublin, Ireland
Distribution: Slackware
Posts: 5,700

Rep: Reputation: 72
pppoe, or point-to-point protocol over ethernet and dhcp are two different demons really. The port request that occurs in a dhcp lease transaction isn't the same as pppoe, which I've never really understood and is more of a throwback from the dialup days and a cheaper way for ISPs to keep from changing around a warehouse full of servers.

The problem is probably from client configuration. What ppp client are you using to connect to the ISP?

Cheers,

Finegan
 
Old 04-04-2002, 08:01 AM   #5
magyartoth
Member
 
Registered: Feb 2002
Location: Pittsburgh, PA, USA
Posts: 73

Original Poster
Rep: Reputation: 15
finegan

Thanks for the tips. I'll give them a try.

How did you transfer your users quickly? I'd love to hear how you did because that's my next task.

M
 
Old 04-04-2002, 08:46 AM   #6
Gladiator
LQ Newbie
 
Registered: Jun 2001
Posts: 23

Rep: Reputation: 15
Kppp

I am using the KDE dialer. Kppp

Jason
 
Old 04-04-2002, 09:35 AM   #7
magyartoth
Member
 
Registered: Feb 2002
Location: Pittsburgh, PA, USA
Posts: 73

Original Poster
Rep: Reputation: 15
Hey Gladiator...you hi-jacked my thread!
 
Old 04-04-2002, 11:07 AM   #8
Gladiator
LQ Newbie
 
Registered: Jun 2001
Posts: 23

Rep: Reputation: 15
LOL

lol... Sorry man. I thought maybe we would stumble onto both of our solutions..
 
Old 04-04-2002, 11:12 AM   #9
Gladiator
LQ Newbie
 
Registered: Jun 2001
Posts: 23

Rep: Reputation: 15
magy

Did you install a linux firewall when you installed linux?

Perhaps try this if you did:

Go into your firewall setting from the desktop and click deactivate then ok.

I know this stopped me once before and it took me a while to figure out that even though the firewall appears to have not been set up it is activated.

Hope this helps. Maybe I can give back to your thread??

Later
Jason
 
Old 04-04-2002, 11:45 AM   #10
finegan
LQ Guru
 
Registered: Aug 2001
Location: Dublin, Ireland
Distribution: Slackware
Posts: 5,700

Rep: Reputation: 72
Gladiator, best to start a whole new thread so it will get eyeballed by the regulars off the main list. I would help, but I've used kpppd exactly once. I mean one time, and the headache was actually in getting my modem to work. :P

Mag, like Gladiator said, I thought firewall first off too, but when I sussed out the initial post twice more everything works on dhcp, but not on a static, so yeah... its one of the big three: DNS, route, or IP.

Luckily you're going from redhat to redhat. Copy the files from the Paq to some out of the way spot: /etc/shadow, /etc/passwd, and /etc/group. In each of them edit out every non-real user, i.e. all of the UIDs and GIDs for the system daemons. The users should start with 500.

Make sure you haven't created a normal user account on the new RH box. If you have, you may want to remove the user, or simply change their user ID to something like 1000, and then chgrp and chown their home directory as they're going to stay with 501.

Then take the files you have with just the user information from the Paq and copy to some BS directory on the new machine. Then cat their contents into the existing /etc/passwd, shadow, and group on the new box with:

cat /root/choppedpasswd >> /etc/passwd

Do that for all three and now all the groups, passwd's, and users exist on the new machine. No one even has to change their passwords.

You'll also need to copy over the home directories with:

tar cvzf home.tar.gz /home

Copy that from the Paq on to the new box and unpack it with:

cd /
tar xvzf home.tar.gz

Now, go into the /home dir and ls -l a few directories to make sure that you have stuff in /home/fin like:

16 -rw-r--r-- 1 fin fin 13694 Jul 15 2001 trace.log
1444 -rw-r--r-- 1 fin fin 1474560 Feb 14 02:29 withCD.img
4 drwxr-xr-x 8 fin fin 4096 Mar 14 20:18 work/

Instead of:

16 -rw-r--r-- 1 501 501 13694 Jul 15 2001 trace.log
1444 -rw-r--r-- 1 501 501 1474560 Feb 14 02:29 withCD.img
4 drwxr-xr-x 8 501 501 4096 Mar 14 20:18 work/

The second would indicate that the users are doinked up. Post Back.

Last, you're going to have to snag the mail spool. It should be, but check ahead: /var/spool/mail

cd /var/spool
tar czvf mail.tar.gz mail/

Then unpack one the other side with: (Making certain that the spool is still in /var/spool/mail)

cd /var/spool
tar xzvf mail.tar.gz


I assume this machine is using either pop or imap to deliver throughout the office, so check to see if those daemons are working before slinging the mail.

Sorry if some of that was Mickey Mouse, I was guessing down. Post back if there was another service you needed switched.

Luck,

Finegan
 
Old 04-04-2002, 12:13 PM   #11
magyartoth
Member
 
Registered: Feb 2002
Location: Pittsburgh, PA, USA
Posts: 73

Original Poster
Rep: Reputation: 15
Super! Thanks guys!

M
 
Old 04-04-2002, 01:01 PM   #12
magyartoth
Member
 
Registered: Feb 2002
Location: Pittsburgh, PA, USA
Posts: 73

Original Poster
Rep: Reputation: 15
Finegan:

Do I need to worry about turning off the encryption? I remember searching through google groups and someone said make sure you use the commands 'pwunconv' and 'grpunconv' on both the old and new machine before you copy the the 'passwd' and 'shadow' files. Or does it matter?

Thanks,
M
 
Old 04-04-2002, 02:01 PM   #13
magyartoth
Member
 
Registered: Feb 2002
Location: Pittsburgh, PA, USA
Posts: 73

Original Poster
Rep: Reputation: 15
finegan :

One more question: What's the best way to copy the shadow file? I copied the group and password file using a windows sftp client to my windows box(which I'll then transfer to the new machine). But the shadow file won't transfer...permission denied. Even though I copied it first to another directory out of /etc, then gave it all permissions and it still won't copy. Any ideas?

Thanks,
M
 
Old 04-04-2002, 02:24 PM   #14
finegan
LQ Guru
 
Registered: Aug 2001
Location: Dublin, Ireland
Distribution: Slackware
Posts: 5,700

Rep: Reputation: 72
The encryption scheme should be the same. Recently I took everything from a RedHat 6.2 machine to a Slackware 8 box, a much more dramatic shift is systems, and all of the passwords were fine.

You might have to chmod the shadow file wide open, the copy I mean, not the real one. After this is all done make certain to rm all copies of the chopped version as 777 is read/write/exec by machine users and world.

chmod 777 /root/chopshadow

RH6.2 doesn't have ssh so no scp or sftp... Is the new box running an ftp daemon? 3.5 floppy? anything'll do really.

Cheers,

Finegan
 
  


Reply



Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is Off
HTML code is Off



Similar Threads
Thread Thread Starter Forum Replies Last Post
Ubuntu Fluxbox simple question, simple answer? generallimptoes Linux - Software 3 09-26-2005 02:03 PM
Installing Programs - A simple question from my simple mind jmp875 Linux - Newbie 6 02-18-2004 09:03 PM
Hopefully a Simple Question Arcane Kidd Linux - Newbie 5 01-17-2003 04:27 PM
Really Simple Question -- Please help! Cia420 Linux - General 3 05-07-2002 06:42 AM
simple question seeking simple answer enzo250gto Linux - Newbie 1 10-27-2001 04:08 AM

LinuxQuestions.org > Forums > Linux Forums > Linux - Networking

All times are GMT -5. The time now is 06:54 AM.

Main Menu
Advertisement
My LQ
Write for LQ
LinuxQuestions.org is looking for people interested in writing Editorials, Articles, Reviews, and more. If you'd like to contribute content, let us know.
Main Menu
Syndicate
RSS1  Latest Threads
RSS1  LQ News
Twitter: @linuxquestions
Open Source Consulting | Domain Registration