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

Re: hosts, resolv setup?



On Thu, Feb 22, 2001 at 01:56:01PM +0100, Norbert Nemec wrote:

> In the same way, the name in /etc/hostname should not be used for
> identification either. On a plain unix machine without additional software
> for authentification etc., there simply is no way to identify a "machine".
> You can only speak of IP-Adresses, DNS-Names and the like.

You are correct in that /etc/hostname should not be used by most programs, as
it is not the authoritative source for the system hostname.  However, you are
incorrect in asserting that unix-like systems do not have a concept of a
single, canonical hostname.  There is one, accessed via the gethostname(2) and
sethostname(2) system calls.  That hostname, unqualified, should generally
resolve to one or more addresses that may be used to contact this host.

-- 
 - mdz



Reply to: