[Date Prev][Date Next] [Thread Prev][Thread Next] [Date Index] [Thread Index]

Bug#327024: 127.000.000.001 is dead, long live 127.0.0.1, or "hostname: Unknown host"



Package: libc6
Version: 2.3.5-6
Severity: serious


Hallo,

I have the (bad, it seems) habitude of putting leading zeroes in the
IP-addresses in /etc/hosts.

eg.

127.000.000.001 localhost.localdomain localhost
192.168.001.002 ghp-medp4.ghp.be  ghp-medp4

Since I ran aptitude last weekend (3/9/2005), and libc6 was upgraded (amongst
others!), I have the following problem:

# hostname
ghp-medp4
# hostname -v -f
gethostname()=`ghp-medp4'
Resolving `ghp-medp4' ...
hostname: Unknown host

This system could not send mail anymore, using sendmail, which reported
"stat=Data format error", so I started looking for the cause.

It took me a couple of hours before I was so desperate that I removed the
leading zeroes from the ip-addresses in /etc/hosts, and lo and behold:

# hostname -v -f
gethostname()=`ghp-medp4'
Resolving `ghp-medp4' ...
Result: h_name=`ghp-medp4.ghp.be'
Result: h_aliases=`ghp-medp4'
Result: h_addr_list=`192.168.1.52'
ghp-medp4.ghp.be

-- System Information:
Debian Release: testing/unstable
  APT prefers testing
  APT policy: (500, 'testing')
Architecture: i386 (i686)
Shell:  /bin/sh linked to /bin/bash
Kernel: Linux 2.6.13
Locale: LANG=C, LC_CTYPE=C (charmap=ANSI_X3.4-1968)

-- no debconf information

______________________________________________________________________
This email has been scanned by the MessageLabs Email Security System.
For more information please visit http://www.messagelabs.com/email 
______________________________________________________________________



Reply to: