How to deny user's from using cron Print

  • 0

Introduction

If you need to disable cron for a user completely, you can use the file /etc/cron.deny

 

Procedure

To deny a user from using cron, add them to the file /etc/cron.deny using your favorite text editor.

 

Please note that this does not prevent existing cron jobs from running. If the user already had a cron job before being added to /etc/cron.deny the existing cron jobs would still run.

 

By default, it already contains nobody. If your user is cpaneluser, it will look like this:

 

# cat /etc/cron.deny
nobody
cpaneluser

 

You would need to add all of the users you want to deny from using cron.


Was this answer helpful?

« Back