Skip site navigation (1)Skip section navigation (2)
Date:      Sun, 5 Apr 1998 23:33:51 +0300 (EEST)
From:      Alexander Litvin <archer@lucky.net>
To:        Hrvoje husic <H.Husic@Uni-Koeln.DE>
Cc:        current@FreeBSD.ORG
Subject:   Re: lastlogs 'invalid hostname'
Message-ID:  <199804052033.XAA09862@grape.carrier.kiev.ua>
In-Reply-To: <Pine.A32.3.96.980405171459.52011A-100000@rs3.rrz.Uni-Koeln.DE>

next in thread | previous in thread | raw e-mail | index | archive | help
In article <Pine.A32.3.96.980405171459.52011A-100000@rs3.rrz.Uni-Koeln.DE> 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 <H.Husic@Uni-Koeln.de>

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



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