When /etc/crontab is used, cron only skips over a single whitespace
character between the username and -n/-s/-q flags; more than one and
the flag is taken as part of the command:

printf '*\t*\t*\t*\t*\tnobody\t-n true 1\n' | doas tee -a /etc/crontab
printf '*\t*\t*\t*\t*\tnobody\t\t-n true 2\n' | doas tee -a /etc/crontab

2023-07-19T15:39:01.316Z symphytum cron[96294]: (nobody) CMD (  -n true 2)
2023-07-19T15:39:01.317Z symphytum cron[81012]: (nobody) CMD (true 1)

Is this a "so don't do that then", or is it expected to work?
(There's no problem with "per-user crontab" files).

Reply via email to