Review your favorite Linux distribution.
Go Back > Forums > Linux Forums > Linux - Networking
User Name
Linux - Networking This forum is for any issue related to networks or networking.
Routing, network cards, OSI, etc. Anything is fair game.


  Search this Thread
Old 10-29-2004, 03:20 PM   #1
LQ Newbie
Registered: Oct 2004
Posts: 12

Rep: Reputation: 0
Hostname change issues


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 "", 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

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

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, 04:50 PM   #2
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 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.
grep -r 'vivare\.com' /etc/*
This would show any lines that contain the word along with what file it is in.
Post your findings here.


Thread Tools Search this Thread
Search this Thread:

Advanced Search

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

All times are GMT -5. The time now is 04:59 PM.

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