Subject: Re: Last users today
To: Steven M. Bellovin <smb@research.att.com>
From: Lubomir Sedlacik <salo@Xtrmntr.org>
List: netbsd-users
Date: 01/23/2002 02:53:26
--pWyiEgJYm5f9v55/
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).

regards,

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

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

-----BEGIN PGP SIGNATURE-----
Version: GnuPG v1.0.6 (NetBSD)
Comment: For info see http://www.gnupg.org

iD8DBQE8TheWWc63C347cOIRAkuEAJ0TEs0KOIVaBMmLjAzSUSJqOpLoewCdFF5J
fN93my6w5VpZNY8bzb66DGI=
=cm4P
-----END PGP SIGNATURE-----

--pWyiEgJYm5f9v55/--