3 Replies Latest reply: Feb 9, 2013 11:22 AM by BDAqua
dave-505 Level 1 (0 points)

I'm trying to get my Login/Logout History working again.  When I type the command: last in a terminal window, logins are shown ok through 3/24/2012, but then there are a few login dates and times on 12/31/00, and one: still logged in on 1/1/01.  If I type: date in the terminal window, the correct time and date are shown.


When I use the Console Utility, I see the same problem under Log Database Query: All Messages and Console Messages, but samba/secure_log looks OK.


I can't find where this login data is stored.  I assume the file is corrupted.  It used to be stored in /var/log/wtmp, but not any more according to http://developer.apple.com/library/mac/#documentation/Darwin/Reference/ManPages/ 10.5/man5/wtmp.5



Mac OS X (10.5.8), MacBook Pro
  • BDAqua Level 10 (122,227 points)

    Hi Dave, found this in a PDF...

    On Unix systems the accounting files provide information on user logins.  Traditionally,

    these have been separated into at least three files: utmp file, which contains information on

    currently logged-in users; the wtmp file, which contains entries about past logins; and lastlog,

    which contains the name, port, and last login time for each user.


    Mac OS X up to version 10.4 also had utmp, wtmp, and lastlog files.  These were

    deprecated, however, in 10.5 and replaced with /var/run/utmpx for currently logged in users

    and asl.db for the functions of wtmp and lastlog

    But, it sounds more like your clock has a problem, I'm thinking it's setting the Date/Time correct once booted because it's set to Automatically updae from the Internet in Date & Time Pref Pane.


    I'd look at the entry before 12/31/00 to see what Date/Time that the MBP may have lost power or Battery went dead, etc.

  • dave-505 Level 1 (0 points)

    Thanks for the help BDAqua.  The time and date seem ok after startup if I have "set date and time automatically" disabled.


    I don' t have an asl.db file on my MBP.  I do have a directory /var/log/asl.  I read the /var/log direcory can be safely cleared at http://superuser.com/questions/246163/on-mac-os-x-how-do-i-clear-out-console-app, but I think I'll try to upgrade OS X first.  Maybe Apple has fixed some bugs associated with the logging changes they made in 10.5.

  • BDAqua Level 10 (122,227 points)

    Good find!


    But I do believe those Date/Time entries were because the Clock was incorrect for whatever reason, maybe just a temporary glitch.