Last commmand showing resolved hostname

Chuck Swiger cswiger at mac.com
Sat Jan 17 13:08:49 PST 2009


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



More information about the freebsd-questions mailing list