LinuxQuestions.org
Download your favorite Linux distribution at LQ ISO.
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 10-29-2004, 02:20 PM   #1
sfwalter
LQ Newbie
 
Registered: Oct 2004
Posts: 12

Rep: Reputation: 0
Hostname change issues


Hi,

I'm new to linux networking so please exuse me, if this is a basic question.

I am a consultant and travel from client to client. When I went to a particular client, I noticed my hostname was changed to "plwstellant.vivare.com", even though my /etc/sysconfig/network say its "localhost.localdomain".

Then when I logged in I got the gnome messaage saying "Could not look up internet address for plwstellant.vivare.com.

I fixed this problem, I believe by setting my /etc/hosts file to:

127.0.0.1 localhost.localdomain localhost plwstellant.vivare.com


First question is: Is this the right solution?

Second question is: If I go to another client's network do I have to keep updating the /etc/hosts file? Is there a better way?

thanks in advance, scott.
 
Old 10-29-2004, 03:50 PM   #2
ugge
Senior Member
 
Registered: Dec 2000
Location: Gothenburg, SWEDEN
Distribution: OpenSUSE 10.3
Posts: 1,028

Rep: Reputation: 45
First lets take a look at why this happened to you. When you connected to this network you got an IP from their DHCP server, but in addition to that you also got sent a hostname to use.
In a file called ifcfg-eth0 (usually found in /etc/sysconfig/network directory) you have a line saying something about USEPEERDNS = Yes, this is what made your hostname change. Setting this to No would have made your linux ignore that hostname info from the DHCP.

I don't know exactly which file is making trouble for you here and now. You should not have to add the plwstellantvivare.com hostname in your hosts file. In this situation I would search the files in the /etc directory for instances of that hostname. As root user run the following command to do that.
Code:
grep -r 'vivare\.com' /etc/*
This would show any lines that contain the word vivare.com along with what file it is in.
Post your findings here.
 
  


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
change hostname mikpos Linux - Networking 1 08-12-2004 12:19 PM
hostname issues diwakergupta Linux - Networking 3 02-01-2004 12:44 AM
Hostname issues drxsmurf Mandriva 1 01-24-2004 01:23 PM
change hostname dincer80 Linux - Networking 3 07-31-2003 01:30 AM
Change Hostname? mikeshn Linux - General 2 01-15-2003 05:18 PM

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

All times are GMT -5. The time now is 02:33 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