[Date Prev][Date Next] [Thread Prev][Thread Next] [Date Index] [Thread Index]

Re: wtmp question



On Wed, Apr 04, 2001 at 05:16:45PM -0400, MaD dUCK wrote:
> another question about my non-working system...
> 
> i finger a user to retrieve the following information:
> 
[deleted]
> 
> however, the user has logged in previously.
> 
> if i finger while the user is online through ssh (that's all i ever
> allow, no telnet, no console):
> 
[deleted]
> 
> i would like to be able to see when a user last logged in. this is
> handled by wtmp, right?

no, /var/log/lastlog is used for this, wtmp is a log of ALL user
logins, lastlog is just a log of the last login.  as such lastlog does
not need to be rotated as its a sparse file that is only filled with a
user entry when the user logs in, this way its size stays consistent
(its only as big as you have active users) whereas wtmp bloats as
users login and logout so wtmp must be rotated.  if finger used wtmp
it would give innaccurate information if a user logged in over a month
ago. 

> diamond:~# ls -la /var/log/wtmp
> -rw-rw-r--    1 root     utmp        29568 Apr  4 17:14 /var/log/wtmp
> diamond:~# 
> 
> looks good (another system where this works has the same permissions).
> 
> any clues on how to fix this?

make sure you have a /var/log/lastlog file with permissions root.utmp 0664. 

-- 
Ethan Benson
http://www.alaska.net/~erbenson/

Attachment: pgp4YBqGyuJa9.pgp
Description: PGP signature


Reply to: