From owner-freebsd-current Sun Apr 5 13:49:38 1998 Return-Path: Received: (from majordom@localhost) by hub.freebsd.org (8.8.8/8.8.8) id NAA09654 for freebsd-current-outgoing; Sun, 5 Apr 1998 13:49:38 -0700 (PDT) (envelope-from owner-freebsd-current@FreeBSD.ORG) Received: from burka.carrier.kiev.ua (root@burka.carrier.kiev.ua [193.193.193.107]) by hub.freebsd.org (8.8.8/8.8.8) with ESMTP id NAA09647 for ; Sun, 5 Apr 1998 13:49:06 -0700 (PDT) (envelope-from archer@grape.carrier.kiev.ua) Received: from unicorn.carrier.kiev.ua (unicorn.carrier.kiev.ua [193.193.193.113]) by burka.carrier.kiev.ua (8.8.8/8.Who.Cares) with ESMTP id XAA28315 for ; Sun, 5 Apr 1998 23:48:38 +0300 (EEST) Received: from kozlik.carrier.kiev.ua (kozlik.carrier.kiev.ua [193.193.193.111]) by unicorn.carrier.kiev.ua (8.8.8/8.8.7) with ESMTP id XAA01196; Sun, 5 Apr 1998 23:48:37 +0300 (EEST) Received: (from uucp@localhost) by kozlik.carrier.kiev.ua (8.8.8/8.8.8/8.Who.Cares) with UUCP id XAA13780; Sun, 5 Apr 1998 23:45:54 +0300 (EEST) Received: (from archer@localhost) by grape.carrier.kiev.ua (8.8.8/8.8.8) id XAA09862; Sun, 5 Apr 1998 23:33:51 +0300 (EEST) (envelope-from archer) Date: Sun, 5 Apr 1998 23:33:51 +0300 (EEST) From: Alexander Litvin Message-Id: <199804052033.XAA09862@grape.carrier.kiev.ua> To: Hrvoje husic Cc: current@FreeBSD.ORG Subject: Re: lastlogs 'invalid hostname' In-Reply-To: Organization: Lucky Grape User-Agent: tin/pre-1.4-980202 (UNIX) (FreeBSD/3.0-CURRENT (i386)) Sender: owner-freebsd-current@FreeBSD.ORG Precedence: bulk X-Loop: FreeBSD.ORG In article you wrote: > I have a decent problem with a 3.0-CURRENT machine here. > [hhusic@dvpraktikum hhusic]$ w > 5:13PM up 6:25, 9 users, load averages: 1.01, 1.03, 0.98 > USER TTY FROM LOGIN@ IDLE WHAT > [...] > rstevens p8 invalid hostname 5:11PM 1 -bash (bash) > [...] > [hhusic@dvpraktikum hhusic]$ > The same entry goes into the lastlig, so the users originating host is > hidden in the logfiles. "netstat" and "netstat -n" does not have problems > resolving the hostname, but as there are quite a lot of connections I > can't really tell, which one is THE one. (but I'd guess it might be > pool3-82.netcologne.de [195.14.235.82]) In our case I found that "invalid hostname" is written by /usr/bin/login when user comes from some address which resolves to some hostname which in turn doesn't resolve. And additionally the hostname should be long enough to not fit into 'struct utmp'. In that case login is invoked by, e.g. rlogind, with '-h long.not.resolvable.host.name'. When login finds that it cannot write 'long.not.resolvable.host.name' to utmp/wtmp, it tries to resolve it to get IP, and fails. Then it just logs "invalid hostname". You may try just to run 'login -h long.not.resolvable.host.name' to see it yourself. I patched login not to write 'invalid hostname', but rather to write as much of 'long.not.resolvable.host.name' as possible. The patch is trivial. > -- > Hrvoje Husic -- Litvin Alexander No SIGNATURE available at this run-level To Unsubscribe: send mail to majordomo@FreeBSD.org with "unsubscribe freebsd-current" in the body of the message