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

Re: localhost.localdomain

Pierre Machard <pmachard@debian.org> writes:

> Anyway I do not understand why this issue is a problem since we
> simply add an alias to localhost. Nobody say that we will remove
> localhost and exchange it by localhost.localdomain.

If what you wanted to do was to add an alias, you should have read the
documentation on how to add an alias without changing the canonical
hostname for  This documentation is available in hosts(5).

# This manual page describes the format of the /etc/hosts file.  This
# file is a simple text file that associates IP addresses with
# hostnames, one line per IP address. For each host a single line
# should be present with the following information:
#     IP_address canonical_hostname aliases

Changing the canonical hostname changes the output of everything that
resolves IP address, including "lsof" and "netstat".

Any script or program dependent on this output need to be checked and
possibly changed if it is to behave as it should.  This includes local
scripts created by our users.

It should also be consistent with bind9, and I do _not_ think that
changing bind is the correct way to do things.

iostat:~# getent hosts       localhost.localdomain localhost iostat

iostat:~# dig -x @localhost

; <<>> DiG 9.2.4 <<>> -x @localhost
;; global options:  printcmd
;; Got answer:
;; ->>HEADER<<- opcode: QUERY, status: NOERROR, id: 11671
;; flags: qr aa rd ra; QUERY: 1, ANSWER: 1, AUTHORITY: 1, ADDITIONAL: 1

;                IN      PTR

;; ANSWER SECTION: 604800  IN      PTR     localhost.

127.in-addr.arpa.       604800  IN      NS      localhost.

localhost.              604800  IN      A

;; Query time: 3 msec
;; WHEN: Fri Oct  7 07:19:19 2005
;; MSG SIZE  rcvd: 93

Stig Sandbeck Mathisen

Reply to: