2

My understanding is that the last change date(in /etc/shadow) is the number of days since 01/01/1970 that the password was changed, but I'm seeing numbers like 19708 which translate to 17/12/2023 (future). How is it so?

5
  • 4
    You changed your password when the clock was not set properly?
    – cjm
    Commented Sep 20, 2013 at 14:47
  • @slm That just confirms the time zone used is UTC, it doesn't explain 2023 which is the question here...
    – derobert
    Commented Sep 20, 2013 at 15:28
  • @derobert - That post confirms the number of days since 01/01/1970 in /etc/shadow file. As to why, cjm's comment would seem to be what happened.
    – slm
    Commented Sep 20, 2013 at 15:33
  • @slm yes, cjm's comment is one possibility—and he really ought to have posted that as an answer—but if we close it, its going to get a big banner saying "an answer to your question can be found over here", and that won't be true.
    – derobert
    Commented Sep 20, 2013 at 15:35
  • @derobert - agreed, we get a fair amount of comments that are really answers. As I've been going through the list of Q's that don't have an answer it's pretty apparent. I've been thinking that maybe would could make it a game of some sort amoungst ourselves to see if we can't close more of those out.
    – slm
    Commented Sep 20, 2013 at 15:37

1 Answer 1

3

Your understanding is correct, at least on Linux. And I've confirmed that my accounts show sane dates. Two possibilities come to mind:

  1. You—or a prior admin—used chage -d (or direct editing) to change the expire date. Possibly this was done to prevent password expiration, by making the last change date (and thus expiry date) in the distant future. (Why admin didn't use chage -M, I can't say)
  2. As cjm said, the password was changed when the clock was set very wrong. Somewhat unlikely, as wrong clocks seem to be in the past more often than the future. (Because a BIOS battery dies, and sets the clock to the minimum date the BIOS authors thought reasonable.)

You must log in to answer this question.

Not the answer you're looking for? Browse other questions tagged .