Solved

how to disable crontab?

Posted on 2001-08-05
5
2,968 Views
Last Modified: 2009-02-06
I don't want to allow users to use crontab in linux server.
what can i do?
0
Comment
Question by:stanleyhuen
5 Comments
 
LVL 17

Expert Comment

by:dorward
Comment Utility
The easiest way is to uninstall it!

How you do this depends on which distro you use.
0
 
LVL 40

Accepted Solution

by:
jlevie earned 20 total points
Comment Utility
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
 
LVL 2

Expert Comment

by:olidel
Comment Utility
Hi,

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

Hope this help.

Bye

0
 
LVL 3

Expert Comment

by:mrn060900
Comment Utility
or you could move /usr/bin/crontab to crontab.old

Regards Mike

www.unixonline.co.uk
0
 
LVL 40

Expert Comment

by:jlevie
Comment Utility
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

Featured Post

Why You Should Analyze Threat Actor TTPs

After years of analyzing threat actor behavior, it’s become clear that at any given time there are specific tactics, techniques, and procedures (TTPs) that are particularly prevalent. By analyzing and understanding these TTPs, you can dramatically enhance your security program.

Join & Write a Comment

Suggested Solutions

You ever wonder how to backup Linux system files just like Windows System Restore?  Well you can use Timeshift in Linux to perform those similar action.  This tutorial will show you how to backup your system files and keep regular intervals. Note…
It’s 2016. Password authentication should be dead — or at least close to dying. But, unfortunately, it has not traversed Quagga stage yet. Using password authentication is like laundering hotel guest linens with a washboard — it’s Passé.
Learn several ways to interact with files and get file information from the bash shell. ls lists the contents of a directory: Using the -a flag displays hidden files: Using the -l flag formats the output in a long list: The file command gives us mor…
Get a first impression of how PRTG looks and learn how it works.   This video is a short introduction to PRTG, as an initial overview or as a quick start for new PRTG users.

771 members asked questions and received personalized solutions in the past 7 days.

Join the community of 500,000 technology professionals and ask your questions.

Join & Ask a Question

Need Help in Real-Time?

Connect with top rated Experts

11 Experts available now in Live!

Get 1:1 Help Now