Ken Pizzini wrote in comp.sys.sun.admin:
>>How do I get the 'last' command to not truncate the host (3rd) field.
>>Sometimes DNS names are too long and don't fit in that field. Do I have to
>>go and edit a .h file somewhere to get that field to display on the screen
>>properly? Will a perl script help me here?
>When you log in a file with a fixed-field format (wtmp) is updated;
>this file is consulted by "last". In order to record more information
>you will need to update the utmp.h header file and recompile all
>programs on your system which update/access the wtmp file (including,
>but not limited to: init, login, who, w, last, xterm).
This is true, but if you're dealing with an instance where the ut_host
field in the wtmp/wtmpx file is larger than what last is displaying
(which is the case on Solaris), then all you need to do is modify last.
On Solaris, (utmpx).ut_host is a 257-character field (256 plus a null).
That's large enough to store just about any hostname in its entirety,
all that's needed is a program that can read it. I don't know if
anybody's done this with last for Solaris, though.