RHEL Engineering is moving the tracking of its product development work on RHEL 6 through RHEL 9 to Red Hat Jira (issues.redhat.com). If you're a Red Hat customer, please continue to file support cases via the Red Hat customer portal. If you're not, please head to the "RHEL project" in Red Hat Jira and file new tickets here. Individual Bugzilla bugs in the statuses "NEW", "ASSIGNED", and "POST" are being migrated throughout September 2023. Bugs of Red Hat partners with an assigned Engineering Partner Manager (EPM) are migrated in late September as per pre-agreed dates. Bugs against components "kernel", "kernel-rt", and "kpatch" are only migrated if still in "NEW" or "ASSIGNED". If you cannot log in to RH Jira, please consult article #7032570. That failing, please send an e-mail to the RH Jira admins at rh-issues@redhat.com to troubleshoot your issue as a user management inquiry. The email creates a ServiceNow ticket with Red Hat. Individual Bugzilla bugs that are migrated will be moved to status "CLOSED", resolution "MIGRATED", and set with "MigratedToJIRA" in "Keywords". The link to the successor Jira issue will be found under "Links", have a little "two-footprint" icon next to it, and direct you to the "RHEL project" in Red Hat Jira (issue links are of type "https://issues.redhat.com/browse/RHEL-XXXX", where "X" is a digit). This same link will be available in a blue banner at the top of the page informing you that that bug has been migrated.
Bug 1145080 - Jobs won't run; crond states bad username
Summary: Jobs won't run; crond states bad username
Keywords:
Status: CLOSED ERRATA
Alias: None
Product: Red Hat Enterprise Linux 7
Classification: Red Hat
Component: cronie
Version: 7.1
Hardware: Unspecified
OS: Unspecified
unspecified
unspecified
Target Milestone: rc
: ---
Assignee: Tomas Mraz
QA Contact: Robin Hack
URL:
Whiteboard:
Depends On: 1067236
Blocks:
TreeView+ depends on / blocked
 
Reported: 2014-09-22 10:47 UTC by Marcela Mašláňová
Modified: 2017-03-22 14:20 UTC (History)
12 users (show)

Fixed In Version: cronie-1.4.11-14.el7
Doc Type: Bug Fix
Doc Text:
Prior to this update, cron jobs of users whose account information was acquired from the Lightweight Directory Access Protocol (LDAP) server might not run after the system boot, and the "bad username" error was logged. The handling of accounts that are temporarily missing from the system due to loss of contact with the LDAP server has been improved with a patch, and the error no longer occurs in this situation.
Clone Of: 1067236
Environment:
Last Closed: 2015-07-27 09:29:49 UTC
Target Upstream Version:
Embargoed:


Attachments (Terms of Use)


Links
System ID Private Priority Status Summary Last Updated
Red Hat Product Errata RHBA-2015:1501 0 normal SHIPPED_LIVE cronie bug fix and enhancement update 2015-07-27 13:29:40 UTC

Description Marcela Mašláňová 2014-09-22 10:47:51 UTC
+++ This bug was initially created as a clone of Bug #1067236 +++

Description of problem:
I have cron jobs that must run as usernames that only exist in LDAP.  I see the "bad username" error because crond can be started before the LDAP server is reachable.  The LDAP server is distinct from the server with the cron job.  The issue is especially troublesome when both servers are VMs on the same host and booting up together.

Version-Release number of selected component (if applicable):
cronie-1.4.11-4.fc20.x86_64

How reproducible:
always

Steps to Reproduce:
1. create a cron job with a username that only exists in LDAP
2. stop crond and the LDAP server (or otherwise make it unreachable)
3. start crond
4. start the LDAP server (or make it available again)

Actual results:
Logs show "crond[PID]: (CRON) bad username (/etc/cron.d/JOBNAME)


Expected results:
Ideally crond would periodically retry to establish the username identities each time the job comes due again, if they weren't already successfully established.

Additional info:

Patch:
Cronie is missing this in unit file:
After=nss-user-lookup.target

Also sssd should be fixed:
--- Additional comment from Jakub Hrozek on 2014-09-17 10:59:34 CEST ---

We added:

Before=systemd-user-sessions.service nss-user-lookup.target
Wants=nss-user-lookup.target

Very recently to sssd, as a matter of fact I just pushed that build to stable (it's sssd-1.11.6-3).

Comment 4 errata-xmlrpc 2015-07-27 09:29:49 UTC
Since the problem described in this bug report should be
resolved in a recent advisory, it has been closed with a
resolution of ERRATA.

For information on the advisory, and where to find the updated
files, follow the link below.

If the solution does not work for you, open a new bug report.

https://rhn.redhat.com/errata/RHBA-2015-1501.html


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