truncated device name...

Date: Fri, 2 Oct 1998 19:31:27 -0700
From: John Nemeth <jnemeth@cue.bc.ca>
To: csuite-solaris@chebucto.ns.ca
Precedence: bulk
Return-Path: <csuite-solaris-mml-owner@chebucto.ns.ca>

next message in archive
no next message in thread
previous message in archive
previous message in thread
Index of Subjects

Index of Subjects
On Sep 28,  7:11pm, David Potter wrote:
} 
} login and finger are reporting last login as:
} 
} Last login Mon Sep 28 18:31 on sts/ttyd
} 
} in actually this is ttyd3d or some other such device...
} 
} Anyone know 'off the top of their head' how we can fix this...?

     Hmm, interesting.  The problem is this (from
/usr/include/lastlog.h):

struct lastlog {
        time_t  ll_time;
        char    ll_line[8];
        char    ll_host[16];            /* same as in utmp */
};

As you can see, there is only eight bytes available to store the line.
This was plenty until SVR4 came along and change the way terminals
were handled.  Unfortunately the format of lastlog didn't get changed
(of course that would have caused backwards compatibility problems).

     If you're only interested in a particular account, you could use
'last -1 <account>', which would get the information from wtmpx which
has wider fields.  The problem with this is that it takes a lot longer
to grovel through wtmpx then to look at lastlog, which is indexed by
uid, and if wtmpx has been rotated, then you may be out of luck.

}-- End of excerpt from David Potter

next message in archive
no next message in thread
previous message in archive
previous message in thread
Index of Subjects