Red Hat Bugzilla – Bug 15439
finger and w show numerical IPs instead of hosts
Last modified: 2008-05-01 11:37:57 EDT
finger and w show numerical IPs instead of hosts on my system, when logging
in on this machine from other hosts.
This system is on a private net so I can't try to log in from a
DNS-resolvable host, but I think my /etc/hosts file is ok. I'll attach it
Could this be a bug in glibc?
Created attachment 2035 [details]
Created attachment 2036 [details]
What are you using to log on? If I use openssh (from redhat.de) to with
'UseLogin Yes' enabled, entries in 'w' show numerically too. With UseLogin No,
it works fine.
This might be a problem in login.
I too use openssh from redhat.de with the default settings (e.g. UseLogin yes).
I tested it with "no" and then I also get a host instead of an IP.
Moving this to "util-linux", the package containing /bin/login.
ssh (as opposed to openssh) does not show this behaviour.
This is probably partly an OpenSSH problem, because FreeBSD-4.1's login also
shows this (actually worse) behaviour.
There are some other issues regarding UseLogin and OpenSSH, but I don't think
this forum should be used for them (possible legal issues?)
This difference of ssh vs openssh is that ssh probably passes the user's source
address as a hostname to login, not as an IP address as openssh does. This is
deliberate (IP addresses are
more reliable in ways).
Should login(1) do some resolving of its own if necessary ?
My guess is that hostnames only should be passed to login, as tying login
into gethostbyaddr et al needlessly exposes login to more libraries with the
of exploits, as well as further complicating a critical piece of code. The real
is simply the utmp handling for a login process, and what should be put in the
Marking DEFERRED to collect other opinions.
I tend to agree. This also might create some timeouts and other problems
if your DNS server isn't responding at the time you're logging in w/ SSH,
telnet or whatever...