Skip site navigation (1)Skip section navigation (2)
Date:      Sat, 17 Jan 2009 12:08:36 -0800
From:      Chuck Swiger <cswiger@mac.com>
To:        troy@twisted.net
Cc:        freebsd-questions@freebsd.org
Subject:   Re: Last commmand showing resolved hostname
Message-ID:  <5ABF38EC-4D4A-41A8-8CD1-4B731037D707@mac.com>
In-Reply-To: <20090117192043.GA13219@twisted.net>
References:  <20090117192043.GA13219@twisted.net>

Next in thread | Previous in thread | Raw E-Mail | Index | Archive | Help
On Jan 17, 2009, at 11:20 AM, Troy wrote:
> I have a question.  Is there a way that you can make the 'last'  
> command
> display the DNS resolved name of the users that have logged into a  
> machine
> rather than the IP address.  Showing both name and IP address would be
> even better.

The issue is that DNS hostnames can change between the time the wtmp  
entry was made and the time you run last and try to perform DNS  
resolution, so the wtmp database keeps IP addresses only.

This being said, you can get what you've asked for by installing the / 
usr/ports/dns/adns port, and running "last | adnsresfilter".

Regards,
-- 
-Chuck




Want to link to this message? Use this URL: <http://docs.FreeBSD.org/cgi/mid.cgi?5ABF38EC-4D4A-41A8-8CD1-4B731037D707>