An odd DNS conundrum?

Don Levey lug at the-leveys.us
Tue Dec 19 11:17:15 EST 2006


discuss-bounces at blu.org wrote:
> Don Levey wrote:
>> I've got a machine here at work running Fedora Core 2.  Now, while
>> I'm turning blue waiting for the opportunity to upgrade the
>> hardware/OS I've run into a strange DNS self-identification problem.
>> 
>> Normally, I expect 'hostname' to return the FQDN of the machine
>> (machine1.example.com), and 'hostname -s' to return just the short
>> name (machine1).  It works like that on all my other machines of
>> various vintages.  However, in this case, 'hostname' also returns
>> just the short name, and this is causing some problems for things
>> which are tied to the full machine name.
> 
> This sounds like an issue with /etc/hosts. If I recall correctly, the
> system's notion of the hostname is based on the first name in
> /etc/hosts corresponding to its ip address. So if /etc/hosts says
> 
>      192.168.1.10     foo foo.bar.com
> 
> then the hostname is "foo", whereas if /etc/hosts says
> 
>      192.168.1.10     foo.bar.com foo
> 
> then the hostname is "foo.bar.com".

Hmm... I would have expected the hostname to come up properl;y, then:

	/u/dlevey> cat /etc/hosts
	# Do not remove the following line, or various programs
	# that require network functionality will fail.
	127.0.0.1       rialto.example.com rialto localhost.localdomain localhost

Since the FQDN is the first entry on the list.
 -DOn

-- 
This message has been scanned for viruses and
dangerous content by MailScanner, and is
believed to be clean.




More information about the Discuss mailing list