Bug 1374264

Summary: error message for wrong or non specified user in /etc/crontab
Product: [Fedora] Fedora Reporter: Stefan Dordevic <sdordevi>
Component: cronieAssignee: Ondřej Pohořelský <opohorel>
Status: CLOSED CURRENTRELEASE QA Contact: Fedora Extras Quality Assurance <extras-qa>
Severity: low Docs Contact:
Priority: low    
Version: 34CC: hhorak, mmaslano, mmuzila, tmraz, vondruch
Target Milestone: ---   
Target Release: ---   
Hardware: Unspecified   
OS: Unspecified   
Whiteboard:
Fixed In Version: Doc Type: If docs needed, set a value
Doc Text:
Story Points: ---
Clone Of: Environment:
Last Closed: 2022-06-01 10:18:31 UTC Type: Bug
Regression: --- Mount Type: ---
Documentation: --- CRM:
Verified Versions: Category: ---
oVirt Team: --- RHEL 7.3 requirements from Atomic Host:
Cloudforms Team: --- Target Upstream Version:

Description Stefan Dordevic 2016-09-08 11:22:15 UTC
Description of problem:

Error message "ERROR (getpwnam() failed)" when no user specified for jobs in /etc/crontab is not
so helpful at the first.
Maybe it will be more nice to have something like "no/wrong user-name specified for this job", or similar.

Steps to Reproduce:
Put some job in /etc/crontab without "user-name"

*/1 * * * * echo "bla" > /tmp/bla

Actual results:

Error message : Error message "ERROR (getpwnam() failed)

Expected results:

Error message : no/wrong user-name specified for this job

Comment 2 Tomas Mraz 2016-09-08 12:56:43 UTC
You've actually specified an user - user 'echo'.

And the user name is part of the message - see the 'echo' here:
Sep  8 14:53:01 vespa crond[1023]: (echo) ERROR (getpwnam() failed)

The reason why the getpwnam() failed can be various, it can be also that remote user identity server does not answer to queries.

So the message could be:
getpwnam() failed - user unknown or user identity resolution failure

Comment 3 Stefan Dordevic 2016-09-08 13:13:33 UTC
(In reply to Tomas Mraz from comment #2)
> You've actually specified an user - user 'echo'.
> 
> And the user name is part of the message - see the 'echo' here:
> Sep  8 14:53:01 vespa crond[1023]: (echo) ERROR (getpwnam() failed)
> 

Yes, exactly. 

> The reason why the getpwnam() failed can be various, it can be also that
> remote user identity server does not answer to queries.
> 
> So the message could be:
> getpwnam() failed - user unknown or user identity resolution failure

It makes sense to me.

Comment 4 Marcel Plch 2020-01-28 09:59:22 UTC
As this bug doesn't seem to conform to RHEL-7 bug threshold, but is still an issue in RHEL-8, this bug will be evaluated for a fix in RHEL-8.

Comment 9 Honza Horak 2020-10-26 13:54:50 UTC
Moving this bug to Fedora, as it's been lacking enough priority for inclusion into RHEL for long time. While it still is a valid issue to be fixed, it's not probable it gains enough priority soon, so rather moving to Fedora and also porting it to upstream as https://github.com/cronie-crond/cronie/issues/68.

If there are some more significant business reasons why we should prioritize it more, let us know, please.

Comment 10 Ben Cotton 2021-02-09 16:25:38 UTC
This bug appears to have been reported against 'rawhide' during the Fedora 34 development cycle.
Changing version to 34.

Comment 11 Ben Cotton 2022-05-12 16:53:59 UTC
This message is a reminder that Fedora Linux 34 is nearing its end of life.
Fedora will stop maintaining and issuing updates for Fedora Linux 34 on 2022-06-07.
It is Fedora's policy to close all bug reports from releases that are no longer
maintained. At that time this bug will be closed as EOL if it remains open with a
'version' of '34'.

Package Maintainer: If you wish for this bug to remain open because you
plan to fix it in a currently maintained version, change the 'version' 
to a later Fedora Linux version.

Thank you for reporting this issue and we are sorry that we were not 
able to fix it before Fedora Linux 34 is end of life. If you would still like 
to see this bug fixed and are able to reproduce it against a later version 
of Fedora Linux, you are encouraged to change the 'version' to a later version
prior to this bug being closed.

Comment 12 Ondřej Pohořelský 2022-06-01 10:18:31 UTC
This bug has already been fixed in upstream[0]. We have it in Fedora since F29.

[0]https://github.com/cronie-crond/cronie/commit/b836b5789cae7d608346d64e64ade121d8608518