You are not logged in.

#1 2014-06-28 08:38:33

lolilolicon
Member
Registered: 2009-03-05
Posts: 1,722

[SOLVED] What's the significance of 14871 (in /etc/shadow)?

In the /etc/shadow shipped with the filesystem package, we have lines like this:

systemd-resolve:x:14871::::::

where the third field is always set to 14871, which is " the date of last password change, expressed as the number of days since Jan 1, 1970."

$ date -d '1970-01-01 +14871 days' -u
Sun Sep 19 00:00:00 UTC 2010

...so what's the significance of this day?

Last edited by lolilolicon (2014-06-28 12:38:05)


This silver ladybug at line 28...

Offline

#2 2014-06-28 09:10:14

karol
Archivist
Registered: 2009-05-06
Posts: 25,440

Re: [SOLVED] What's the significance of 14871 (in /etc/shadow)?

Offline

#3 2014-06-28 09:44:16

lolilolicon
Member
Registered: 2009-03-05
Posts: 1,722

Re: [SOLVED] What's the significance of 14871 (in /etc/shadow)?

ah... karol drops my jaw again.


This silver ladybug at line 28...

Offline

#4 2014-06-28 11:09:39

karol
Archivist
Registered: 2009-05-06
Posts: 25,440

Re: [SOLVED] What's the significance of 14871 (in /etc/shadow)?

<kicks lolilolicon's jaw under the bed while whistling innocently>

Please remember to mark the thread as solved https://bbs.archlinux.org/viewtopic.php?id=130309

Offline

#5 2022-03-26 04:39:03

70m4c
Member
Registered: 2022-03-23
Posts: 1

Re: [SOLVED] What's the significance of 14871 (in /etc/shadow)?

I'm sorry for bumping such an old thread, but the link to the answer above no longer works.

After some digging, I found this link does work: https://github.com/LadueCS/filesystem/c … 6eddc82fea

For the sake of posterity (if GitHub or the repo ever go away):

The link is commit 42436993035fefc110b0dcdbebb7286eddc82fea made by Pierre Schmitz with the message:

Setting last password chagne to future might not be a good idea. Let's set it to "today".

The commit changes user creation dates from 99999 (what existed before the commit) to 14871 (which is the date of the commit).

Essentially, to ensure compatibility with other software, the user creation date has to be some number above 0 (after January 1, 1970), but also in the past. Since 99999 corresponds to October 16, 2243, it was changed to 14871, to make sure it will always represent a date in the past.

Offline

#6 2022-03-26 10:28:55

V1del
Forum Moderator
Registered: 2012-10-16
Posts: 25,285

Re: [SOLVED] What's the significance of 14871 (in /etc/shadow)?

Please don't necrobump an old solved thread just to fix a dead link.

Closing.

Offline

Board footer

Powered by FluxBB