Subject: Re: Last users today
To: Steven M. Bellovin <>
From: Lubomir Sedlacik <>
List: netbsd-users
Date: 01/23/2002 02:53:26
Content-Type: text/plain; charset=us-ascii
Content-Disposition: inline
Content-Transfer-Encoding: quoted-printable

hi steven,

On Tue, Jan 22, 2002 at 08:20:53PM -0500, Steven M. Bellovin wrote:
> How far back do you need login records?  You might want to add some=20
> code to /etc/daily.local to rename /var/log/wtmp daily instead of=20
> weekly, in which case 'last' would give you what you want.

there is a tool called newsyslog(8) for this purpose.
it is executed from root's crontab every hour by default.

  # crontab -l
  #rotate log files every hour, if necessary
  0       *       *       *       *       /usr/bin/newsyslog

you can easily setup it to rotate your wtmp daily, without compression
(as greg said already).


-- Lubomir Sedlacik <>   ASCII Ribbon campaign against  /"\=
--                  <>   e-mail in gratuitous HTML and  \ /=
--                                       Microsoft proprietary formats   X =
-- PGPkey:                                  / \=
-- Key Fingerprint: DBEC 8BEC 9A90 ECEC 0FEF  716E 59CE B70B 7E3B 70E2     =

Content-Type: application/pgp-signature
Content-Disposition: inline

Version: GnuPG v1.0.6 (NetBSD)
Comment: For info see