From owner-freebsd-questions Tue Sep 22 17:04:37 1998 Return-Path: Received: (from majordom@localhost) by hub.freebsd.org (8.8.8/8.8.8) id RAA05016 for freebsd-questions-outgoing; Tue, 22 Sep 1998 17:04:37 -0700 (PDT) (envelope-from owner-freebsd-questions@FreeBSD.ORG) Received: from lucy.bedford.net (lucy.bedford.net [206.99.145.54]) by hub.freebsd.org (8.8.8/8.8.8) with ESMTP id RAA04875 for ; Tue, 22 Sep 1998 17:04:04 -0700 (PDT) (envelope-from listread@lucy.bedford.net) Received: (from listread@localhost) by lucy.bedford.net (8.8.8/8.8.8) id UAA11322; Tue, 22 Sep 1998 20:03:24 -0400 (EDT) (envelope-from listread) Message-Id: <199809230003.UAA11322@lucy.bedford.net> Subject: Re: "invalid hostname" on "last" In-Reply-To: <199809221645.JAA15029@pau-amma.whistle.com> from David Wolfskill at "Sep 22, 98 09:45:59 am" To: dhw@whistle.com (David Wolfskill) Date: Tue, 22 Sep 1998 20:03:24 -0400 (EDT) Cc: FreeBSD-Questions@FreeBSD.ORG, jfrodo42@hotmail.com X-no-archive: yes Reply-to: djv@bedford.net From: "Woodchuck" X-Mailer: ELM [version 2.4ME+ PL38 (25)] MIME-Version: 1.0 Content-Type: text/plain; charset=US-ASCII Content-Transfer-Encoding: 7bit Sender: owner-freebsd-questions@FreeBSD.ORG Precedence: bulk X-Loop: FreeBSD.ORG David Wolfskill wrote: > >From: "Jane Frodo" > >Date: Mon, 21 Sep 1998 17:21:17 PDT > > > We have a user who always shows "invalid hostname" when > >we "last ". The problem is it looks ok on nslookup! > >One of the ip's you can look at is 209.63.23.76. This IP has > >no DNS errors I can _see_, but last _hates_ it! > > > What is last trying to tell me about this IP? > > I suspect the following (from "man logwtmp"): > > DESCRIPTION > The function logwtmp() tries to append a new record to the wtmp(5) file, > using the provided arguments line, name, and host, and the current time. > > If the length of the hostname string host is longer than what would fit > into the hostname field of the wtmp(5) file, it will first be attempted > to convert it into a numerical IP address using gethostbyname(3). Fail- > ing this, the hostname will be recorded as "invalid hostname". > > david host 209.63.23.76 belongs to that strange class of hosts for which a lame dns server has configured a reverse lookup, but no forward lookup, so gethostbyname(3) will puke, as you point out. from nslookup... > set type=any > 76.23.63.209.in-addr.arpa Server: localhost Address: 127.0.0.1 Non-authoritative answer: 76.23.63.209.in-addr.arpa name = ip76.castlenet.com Authoritative answers can be found from: 23.63.209.in-addr.arpa nameserver = screwtape.redrock.net 23.63.209.in-addr.arpa nameserver = ns1.castlenet.com screwtape.redrock.net internet address = 209.63.22.2 ns1.castlenet.com internet address = 209.63.23.2 > ip76.castlenet.com Server: localhost Address: 127.0.0.1 *** localhost can't find ip76.castlenet.com: Non-existent host/domain > So Jane needs to talk to the dns admins of screwtape.r.n and ns1.castlenet.com. They both appear hosed. Dave -- Will hack for cabbages! Every day is Groundhog Day! To Unsubscribe: send mail to majordomo@FreeBSD.org with "unsubscribe freebsd-questions" in the body of the message