Skip site navigation (1)Skip section navigation (2)
Date:      Tue, 28 Nov 2000 10:08:23 mst7mst
From:      "Duke Normandin" <01031149@3web.net>
To:        dima@unixfreak.org (Dima Dorfman)
Cc:        questions@freebsd.org
Subject:   Re: DNS problems
Message-ID:  <20001128210024.D455337B402@hub.freebsd.org>

next in thread | raw e-mail | index | archive | help
On 27 Nov 00 at 22:36, Dima Dorfman wrote:

>Mike Ekholm wrote:
>> 
>> hello,
>> I am running in to some odd problems with name resolution. Here is what I am
>> seeing:
>> 
>> ekholm@zeus:/home/ekholm> w
>> 10:42PM  up 106 days, 23:24, 14 users, load averages: 0.75, 1.08, 0.94
>> USER             TTY      FROM              LOGIN@  IDLE WHAT
>> ekholm           p0       bigone           Sun09PM    33 -ksh (ksh)
>> ekholm           p1       bigone           20Nov00     - -ksh (ksh)
>>
><snip who(1) output>
>> 
>> ekholm@zeus:/home/ekholm> last|more
>> ekholm           ttyp0    192.168.0.17     Sun Nov 26 21:46   still logged in
>> ekholm           ttyp1    192.168.0.17     Mon Nov 20 19:00   still logged in
>> ekholm           ttypc    isis.XXXX.XXX    Mon Nov 27 22:26   still logged in
>> ekholm           ttyp8    j1xsfw01.XXXX.XXX Mon Nov 27 08:05   still logged in
>> 
>> 
>> The question is, why does w show the name I am from, but who and
>> last do not.
>
>w(1) does a DNS lookup on all the hostnames it gets from the utmp
>file.  last(1) and who(1) don't.
>
>> This happens with almsot any host in my 192.168.0/24, but does NOT happen
>> with IPs in other blocks (as shown in the last).
>
>When who(1) and last(1) show hostnames, it is because whatever program
>wrote to the utmp/wtmp files recorded the DNS entry in ut_host rather
>than a numeric address.  As stated before, w(1) always does a DNS
>lookup, so you always get a hostname from it if it can find it.
>
>As to why some of your connections get recorded with numeric address
>and others with DNS names, perhaps you're using different methods to
>log in?  For example, IIRC, ftp records the DNS name in ut_host, while
>telnetd records the numeric address.
>
>> 
>> Another problem is, this machine is running a IRC server, for some reeason
>> connecting clients are not resolving, shows user@ip instead od
>> user@dom.com
>
>Can you resolve the name manually using host(1)?  Can you telnet or
>ping the hostname?  If you answered yes to the former but no the
>latter, you may want to check out /etc/resolv.conf or resolver(5).

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?

/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?

/etc/resolv.conf is empty - I think that this is correct.
odie[v0]:root@/etc# hostname
odie.rockingd.calgary.ab.ca

Tia....

-duke
Calgary,Alberta, Canada


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?20001128210024.D455337B402>