[Pkg-shadow-devel] Bug#219321: Should we rotate /var/log/lastlog

Nicolas François Nicolas François <nicolas.francois@centraliens.net>, 219321@bugs.debian.org
Fri, 22 Apr 2005 22:55:29 +0200


retitle 219321 [POST-SARGE] [DOC] [NICOLAS] lastlog man page should mention /var/log/lastlog is a sparse file
severity 219321 wishlist
thanks

Hi,

You reported a while ago a bug against the login package:
Need logrotate def for lastlog
(http://bugs.debian.org/219321)


I suppose you reported it after seeing the size of this file using, for
example, "ls -l /var/log/lastlog".

However, lastlog is a sparse file, so its size on the disk is much
smaller.

For example on my box, "ls -lh" shows a 300k file, and "ls -sh" (which
indicates the amount of space used on the disk) shows 16k.

The first size is proportional to the higher UID on the system.
The second one is proportional to the number of users in the system.

This file should not be logrotated.

As this issue may disturb other people, I consider adding the following
note on the lastlog(8) man page:

NOTES
      The lastlog file is a database which contains info on the last login
      of each user.  You should not rotate it.  It is a sparse file, so its
      size on the disk is much smaller than the one shown by ls -l (which
      can indicate a really big file if you have an high UID).  You can
      display its real size with ls -s.

Matt, do you think this note would have helped you?
Should we add something else?

Kind Regards,
-- 
Nekral