Bug 1967150 - pam_unix(crond:account): expired password for user wwwcron (root enforced)
Summary: pam_unix(crond:account): expired password for user wwwcron (root enforced)
Keywords:
Status: CLOSED ERRATA
Alias: None
Product: Fedora
Classification: Fedora
Component: libxcrypt
Version: 33
Hardware: Unspecified
OS: Unspecified
unspecified
unspecified
Target Milestone: ---
Assignee: Björn Esser (besser82)
QA Contact: Fedora Extras Quality Assurance
URL:
Whiteboard:
Depends On:
Blocks:
TreeView+ depends on / blocked
 
Reported: 2021-06-02 13:58 UTC by Harald Reindl
Modified: 2021-06-26 01:07 UTC (History)
9 users (show)

Fixed In Version: libxcrypt-4.4.22-2.fc34 libxcrypt-4.4.22-2.fc33
Clone Of:
Environment:
Last Closed: 2021-06-26 01:00:44 UTC
Type: Bug
Embargoed:
fedora-admin-xmlrpc: mirror+


Attachments (Terms of Use)

Description Harald Reindl 2021-06-02 13:58:21 UTC
why at all?
why only on one machine?
why suddenly 10 years later?

99999 / 365 = 273 years

Jun  2 00:45:01 fileserver crond[121859]: pam_unix(crond:account): expired password for user wwwcron (root enforced)
Jun  2 01:00:01 fileserver crond[121864]: pam_unix(crond:account): expired password for user wwwcron (root enforced)
Jun  2 01:45:01 fileserver crond[233446]: pam_unix(crond:account): expired password for user wwwcron (root enforced)

[root@fileserver:~]$ cat /etc/passwd | grep cron
wwwcron:x:4500:48:User fuer www-cronjobs:/mnt/storage/users/wwwcron:/usr/bin/bash

[root@fileserver:~]$ chage -l wwwcron
Last password change                                    : Feb 01, 2011
Password expires                                        : never
Password inactive                                       : never
Account expires                                         : never
Minimum number of days between password change          : 0
Maximum number of days between password change          : 99999
Number of days of warning before password expires       : 7

Comment 1 Tomáš Mráz 2021-06-02 15:34:08 UTC
Reassigning tentatively to libxcrypt as there was a recent regression seen in bug 1965345

Comment 2 Harald Reindl 2021-06-02 16:23:02 UTC
interesting that it only seems to affect crond, "su - wwwcron" from a root ssh shell works just fine

Comment 3 Björn Esser (besser82) 2021-06-05 23:17:24 UTC
@h.reindl 

> wwwcron:x:4500:48:User fuer www-cronjobs:/mnt/storage/users/wwwcron:/usr/bin/bash

The 'x' is the actual value for the password hash or is it something different?  If so, then please give me at least the first five characters, please.

Which version of libxcrypt are you using on the F33 machine?

Comment 4 Harald Reindl 2021-06-05 23:19:50 UTC
>> wwwcron:x:4500:48:User fuer www-cronjobs:/mnt/storage/users/wwwcron:/usr/bin/bash

> The 'x' is the actual value for the password hash or is it something different?

this is the *complete* unaltered line

> Which version of libxcrypt are you using on the F33 machine?

[root@fileserver:~]$ rpm -q libxcrypt
libxcrypt-4.4.22-1.fc33.x86_64

Comment 5 Björn Esser (besser82) 2021-06-05 23:38:38 UTC
Okay, thanks for the info.

How does crond use the wwwcron user?  How does it try log into it?

Comment 6 Björn Esser (besser82) 2021-06-05 23:47:36 UTC
@h.reindl 

Are there any password hashes in /etc/shadow, that start with '$1$', '$5$', or [0-9a-zA-Z./]{2}?

Comment 7 Harald Reindl 2021-06-05 23:52:29 UTC
> How does crond use the wwwcron user?  How does it try log into it?

frankly god knows given that there are only 48 events per day

> Are there any password hashes in /etc/shadow, that start with '$1$', '$5$', or [0-9a-zA-Z./]{2}?

[root@fileserver:~]$ cat /etc/shadow | grep wwwcron
wwwcron:$1$YsbrPS1F$w2N72/y7LQl6XVntSzysc.:15006:0:99999:7:::

(yes, that is obfuscated by replacing radmon chars by different ones and the same for numbers)

Comment 8 Björn Esser (besser82) 2021-06-06 00:49:10 UTC
There we have the cause.  The user has been setup at some point before 2009, and never got it's password changed.

Does the user really need to login directly?

* If yes: Give it a new password, e.g. with mkpass and copy the output into shadow.
* If no: replace the password hash in shadow with an asterisk '*'.

Comment 9 Harald Reindl 2021-06-06 06:50:47 UTC Comment hidden (abuse)
Comment 10 Harald Reindl 2021-06-06 06:54:42 UTC Comment hidden (abuse)
Comment 11 Tomáš Mráz 2021-06-07 07:13:11 UTC
I have to say that this "forcibly expire passwords on accounts with old hash" misfeature was not well thought. And I very much agree with Harald here that this should have been an official Fedora 35 System Wide Change if anything. Please revert this on released Fedoras!

Comment 12 Tomáš Mráz 2021-06-07 07:16:21 UTC
For example: Instead of doing this change in this ruthless way there could be a cron/systemd job that would sweep through the hashes and reported in the syslog or through a mail to the sysadmin that this and that user in the /etc/passwd /etc/shadow has an old hash.

Comment 13 Tomáš Mráz 2021-06-10 16:10:45 UTC
Linux PAM upstream decided to revert the trigger of expiration check by the crypt_checksalt() return value. Please see https://github.com/linux-pam/linux-pam/pull/368. 

Iker, please consider backporting that change to pam in Fedora. This is really breaking change in libxcrypt unless this revert is done.

Comment 14 Björn Esser (besser82) 2021-06-10 19:10:29 UTC
(In reply to Tomáš Mráz from comment #13)
> Linux PAM upstream decided to revert the trigger of expiration check by the
> crypt_checksalt() return value. Please see
> https://github.com/linux-pam/linux-pam/pull/368. 
> 
> Iker, please consider backporting that change to pam in Fedora. This is
> really breaking change in libxcrypt unless this revert is done.


@t8m:

I've taken care of it as a co-maintainer of pam.  Update will follow in a short time.

Comment 15 Fedora Update System 2021-06-10 19:29:24 UTC
FEDORA-2021-e6916d6758 has been submitted as an update to Fedora 34. https://bodhi.fedoraproject.org/updates/FEDORA-2021-e6916d6758

Comment 16 Fedora Update System 2021-06-10 19:29:28 UTC
FEDORA-2021-e6916d6758 has been submitted as an update to Fedora 34. https://bodhi.fedoraproject.org/updates/FEDORA-2021-e6916d6758

Comment 17 Fedora Update System 2021-06-10 19:36:42 UTC
FEDORA-2021-fed63bd217 has been submitted as an update to Fedora 33. https://bodhi.fedoraproject.org/updates/FEDORA-2021-fed63bd217

Comment 18 Fedora Update System 2021-06-10 19:36:44 UTC
FEDORA-2021-fed63bd217 has been submitted as an update to Fedora 33. https://bodhi.fedoraproject.org/updates/FEDORA-2021-fed63bd217

Comment 19 Fedora Update System 2021-06-11 01:42:19 UTC
FEDORA-2021-fed63bd217 has been pushed to the Fedora 33 testing repository.
Soon you'll be able to install the update with the following command:
`sudo dnf upgrade --enablerepo=updates-testing --advisory=FEDORA-2021-fed63bd217`
You can provide feedback for this update here: https://bodhi.fedoraproject.org/updates/FEDORA-2021-fed63bd217

See also https://fedoraproject.org/wiki/QA:Updates_Testing for more information on how to test updates.

Comment 20 Fedora Update System 2021-06-11 02:07:22 UTC
FEDORA-2021-e6916d6758 has been pushed to the Fedora 34 testing repository.
Soon you'll be able to install the update with the following command:
`sudo dnf upgrade --enablerepo=updates-testing --advisory=FEDORA-2021-e6916d6758`
You can provide feedback for this update here: https://bodhi.fedoraproject.org/updates/FEDORA-2021-e6916d6758

See also https://fedoraproject.org/wiki/QA:Updates_Testing for more information on how to test updates.

Comment 21 Iker Pedrosa 2021-06-11 07:10:24 UTC
> 
> I've taken care of it as a co-maintainer of pam.  Update will follow in a
> short time.

Thanks for taking care of it!

Comment 22 Fedora Update System 2021-06-26 01:00:44 UTC
FEDORA-2021-e6916d6758 has been pushed to the Fedora 34 stable repository.
If problem still persists, please make note of it in this bug report.

Comment 23 Fedora Update System 2021-06-26 01:07:37 UTC
FEDORA-2021-fed63bd217 has been pushed to the Fedora 33 stable repository.
If problem still persists, please make note of it in this bug report.


Note You need to log in before you can comment on or make changes to this bug.