Improve company productivity with a Business Account.Sign Up

x
  • Status: Solved
  • Priority: Medium
  • Security: Public
  • Views: 2983
  • Last Modified:

how to disable crontab?

I don't want to allow users to use crontab in linux server.
what can i do?
0
stanleyhuen
Asked:
stanleyhuen
1 Solution
 
dorwardCommented:
The easiest way is to uninstall it!

How you do this depends on which distro you use.
0
 
jlevieCommented:
Easy, only list the users that should be able to have crontabs in /etc/cron.allow. If that file exists and has one or more names in it any users not listed in the file will not be allowed to create crontab files. For more information see "man crontab".
0
 
olidelCommented:
Hi,

    Another way not very elegant but ...   If you don' run the crond daemon, nothing will happen.

Hope this help.

Bye

0
 
mrn060900Commented:
or you could move /usr/bin/crontab to crontab.old

Regards Mike

www.unixonline.co.uk
0
 
jlevieCommented:
The problem with removing crond or otherwise inactivating it is that you break other things, like log file rolling and other cleanup activities. The preferred solution is simply to restrict access. That's why there are cron.allow and cron.deny files.
0
Question has a verified solution.

Are you are experiencing a similar issue? Get a personalized answer when you ask a related question.

Have a better answer? Share it in a comment.

Join & Write a Comment

Featured Post

A proven path to a career in data science

At Springboard, we know how to get you a job in data science. With Springboard’s Data Science Career Track, you’ll master data science  with a curriculum built by industry experts. You’ll work on real projects, and get 1-on-1 mentorship from a data scientist.

Tackle projects and never again get stuck behind a technical roadblock.
Join Now