Skip site navigation (1)Skip section navigation (2)
Date:      Tue, 28 Nov 2000 16:24:09 -0800 (PST)
From:      dima@unixfreak.org (Dima Dorfman)
To:        01031149@3web.net
Cc:        questions@freebsd.org
Subject:   Re: DNS problems
Message-ID:  <20001129002409.827C73E0A@bazooka.unixfreak.org>
In-Reply-To: <20001128210030.3D0913E09@bazooka.unixfreak.org> from "Duke Normandin" at Nov 28, 2000 10:08:23 AM

next in thread | previous in thread | raw e-mail | index | archive | help
Duke Normandin wrote:
> Just lurking & learning.....;)
> 
> Seems that I'm having a similar problem, I think. With "w" and "who" show 
> nothing in the FROM field except when I ftp/telnet from my win9x box I 
> see mandy or 10.0.0.2 in there. Is this correct behavior?

When you're logged in from a local terminal, the host field is empty.
This is correct behavior.  It'd be redundant to put 'localhost' in
there since that's the only possible value if you're on a local
terminal.

As to why it alternates between 'mandy' and '10.0.0.2', as I said
before, different programs write either a hostname or numeric address
to the ut_host field (what shows up as the "from" field in w(1)).  I
believe ftp writes a hostname, while telnet writes a numeric address.

While this particular case could probably be fixed, there are simply
too many programs which cause a write to utmp/wtmp to make them all
consistent.  w(1) sort of works around this problem by
indiscriminately performing DNS lookups on everything it sees in
ut_host.  The drawback of this approach is that if the hostname can't
be resolved, or latency to the authoritative server is high, it
blocks.  This means that if you have a user logged in on a
low-numbered terminal--one that w(1) would show at the top of the
list--ttyp0, for example--whose IP address doesn't resolve, it may
take a bit--about a minute--for w(1) to display the rest of the list.

> 
> /etc/hosts
> 
> 127.0.0.1   localhost
> 127.0.0.1   odie.rockingd.calgary.ab.ca     odie
> 10.0.0.1    odie.rockingd.calgary.ab.ca     odie
> 10.0.0.2    mandy.rockingd.calgary.ab.ca     mandy
> 
> Do I have the correct format/syntax for /etc/hosts?

Yes.

> 
> /etc/resolv.conf is empty - I think that this is correct.

If you're using DNS, it shouldn't be empty.  See resolver(5) for details.

-- 
Dima Dorfman <dima@unixfreak.org>
Finger dima@unixfreak.org for PGP public key.


To Unsubscribe: send mail to majordomo@FreeBSD.org
with "unsubscribe freebsd-questions" in the body of the message




Want to link to this message? Use this URL: <https://mail-archive.FreeBSD.org/cgi/mid.cgi?20001129002409.827C73E0A>