From owner-freebsd-questions Tue Nov 28 13: 0:28 2000 Delivered-To: freebsd-questions@freebsd.org Received: from smtp2.cybersurf.net (smtp2.cybersurf.net [209.197.145.112]) by hub.freebsd.org (Postfix) with ESMTP id D455337B402 for ; Tue, 28 Nov 2000 13:00:24 -0800 (PST) Received: from [209.197.157.160] ([209.197.157.160]) by smtp2.cybersurf.net (Netscape Messaging Server 4.15) with SMTP id G4R6CE00.AB0; Tue, 28 Nov 2000 14:00:14 -0700 From: "Duke Normandin" <01031149@3web.net> To: dima@unixfreak.org (Dima Dorfman) Date: Tue, 28 Nov 2000 10:08:23 mst7mst MIME-Version: 1.0 Content-type: text/plain; charset=US-ASCII Content-transfer-encoding: 7BIT Subject: Re: DNS problems Reply-To: 01031149@3web.net Cc: questions@freebsd.org X-mailer: Pegasus Mail v3.50 Message-Id: <20001128210024.D455337B402@hub.freebsd.org> Sender: owner-freebsd-questions@FreeBSD.ORG Precedence: bulk X-Loop: FreeBSD.ORG 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) >> > >> >> 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