Package: cron
Version: 3.0pl1-137
Severity: important
X-Debbugs-Cc: feedb...@ventrilo.com

Dear Maintainer,

If an entry in the crontab or a file in the cron.d folder has a username that
does not currently exist on the system, the entire crontab file will go
unprocessed. The following 4 lines of example cron script can be used to
prove the problem.

*/1 * * * * root touch /tmp/ct1
*/1 * * * * root touch /tmp/ct2
*/1 * * * * bogus touch /tmp/ct3
*/1 * * * * root touch /tmp/ct4

Add these 4 lines to any location in your /etc/crontab file and wait till the
clock advances to the next minute. If they work you should have 4 files
in the /tmp folder with the names ct1 thru ct4 with the current timestamp.

However, due to the 3rd entry using a bogus username none of the lines will work
implying the entire file is going unprocessed.

If you comment out the line with the bogus username and wait for a minute the
files ct1/2/4 will be touched accordingly each minute. If you uncomment the
bogus entry none of them will update.

I discovered this bug while setting up a test ubuntu web server and then decided
to test it on Debian 10, which did have the same problem. Debian 11 also has the
problem.

Sincerely,
Brian Knapp


-- Package-specific info:
--- EDITOR:


--- /usr/bin/editor:
/usr/bin/nano

--- /usr/bin/crontab:
-rwxr-sr-x 1 root crontab 43568 Feb 22  2021 /usr/bin/crontab

--- /var/spool/cron:
drwxr-xr-x 3 root root 4096 Jan 10 09:51 /var/spool/cron

--- /var/spool/cron/crontabs:
drwx-wx--T 2 root crontab 4096 Feb 22  2021 /var/spool/cron/crontabs

--- /etc/cron.d:
drwxr-xr-x 2 root root 4096 Jan 10 09:55 /etc/cron.d

--- /etc/cron.daily:
drwxr-xr-x 2 root root 4096 Jan 10 09:56 /etc/cron.daily

--- /etc/cron.hourly:
drwxr-xr-x 2 root root 4096 Jan 10 09:51 /etc/cron.hourly

--- /etc/cron.monthly:
drwxr-xr-x 2 root root 4096 Jan 10 09:55 /etc/cron.monthly

--- /etc/cron.weekly:
drwxr-xr-x 2 root root 4096 Jan 10 09:56 /etc/cron.weekly


-- System Information:
Debian Release: 11.2
  APT prefers stable-updates
  APT policy: (500, 'stable-updates'), (500, 'stable-security'), (500, 'stable')
Architecture: amd64 (x86_64)

Kernel: Linux 5.10.0-10-amd64 (SMP w/4 CPU threads)
Locale: LANG=en_US.UTF-8, LC_CTYPE=en_US.UTF-8 (charmap=UTF-8), LANGUAGE not set
Shell: /bin/sh linked to /usr/bin/dash
Init: systemd (via /run/systemd/system)
LSM: AppArmor: enabled

Versions of packages cron depends on:
ii  adduser              3.118
ii  debianutils          4.11.2
ii  init-system-helpers  1.60
ii  libc6                2.31-13+deb11u2
ii  libpam-runtime       1.4.0-9+deb11u1
ii  libpam0g             1.4.0-9+deb11u1
ii  libselinux1          3.1-3
ii  lsb-base             11.1.0
ii  sensible-utils       0.0.14

Versions of packages cron recommends:
pn  default-mta | mail-transport-agent  <none>

Versions of packages cron suggests:
ii  anacron        2.3-30
pn  checksecurity  <none>
ii  logrotate      3.18.0-2

Versions of packages cron is related to:
pn  libnss-ldap   <none>
pn  libnss-ldapd  <none>
pn  libpam-ldap   <none>
pn  libpam-mount  <none>
pn  nis           <none>
pn  nscd          <none>

-- Configuration Files:
/etc/crontab changed [not included]

-- no debconf information

Reply via email to