[Pkg-shadow-devel] lastlog feature request: there is not a way to see full symbolic host names

Antonio Bonifati antonio.bonifati at gmail.com
Wed Nov 18 12:24:23 UTC 2009


Hi, I'm trying to use lastlog(8) to get the full hostname of each user last
connection, but because up to only 16 characters are printed from
this string sometimes the domain part is truncated.

(code taken from lastlog.c, shadow-4.1.4)

#ifdef HAVE_LL_HOST
        printf ("%-16s %-8.8s %-16.16s %s\n",
                pw->pw_name, ll.ll_line, ll.ll_host, cp);
#else
        printf ("%-16s\t%-8.8s %s\n",
                pw->pw_name, ll.ll_line, cp);
#endif

I think a configuration switch or alternative method (e.g. support for
current terminal width setting, detect if output goes to the terminal or a
file, etc.) should be introduced to allow an administrator to either see the
full name or show numerical addresses only (a sort of -n option).

How do you think will be the best way to achieve this? I am willing to help
with implementation it once we decide what to do.

Thanks,
--
Antonio Bonifati (programmer, sysadmin), Italy
http://monitor.deis.unical.it/ant
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://lists.alioth.debian.org/pipermail/pkg-shadow-devel/attachments/20091118/097ec598/attachment.htm>


More information about the Pkg-shadow-devel mailing list