0

suppose user tom is having bunch of scheduled jobs and if add this user in cron.deny. Will this kill any running jobs for that user ?

I know it will deny to schedule jobs but will it stop the running jobs as well ?

ctrl-alt-delor
  • 27,473
  • 9
  • 58
  • 102
Kunal
  • 1

1 Answers1

0

Adding a user to cron.deny will not stop/kill the running job for that user. Adding a user to cron.deny will only blocks that user from being able to use crontab command only.

from man crontab:

If the /etc/cron.allow file exists, then you must be listed (one user per line) therein in order to be allowed to use this command. If the /etc/cron.allow file does not exist but the /etc/cron.deny file does exist, then you must not be listed in the /etc/cron.deny file in order to use this command.

this command meaning at above is refer to crontab command itself.

αғsнιη
  • 40,939
  • 15
  • 71
  • 114
  • Which brings up an interesting situation. If a user has existing crontab entries and is then added to `cron.deny`, the existing entries will continue to be run and cannot be deleted by the user. – doneal24 Dec 07 '20 at 21:34
  • @doneal24 usually user do not block itself, [that's most probably a sysadmin that can also delete them](https://unix.stackexchange.com/q/119598/72456) – αғsнιη Dec 07 '20 at 22:29