Quesion about the crontab utillity

hi,

i just discovered something really strange,- at least i don’t understand it:

The manpage of crontab(1) says


 If the cron.allow file exists, then you must be listed therein in order to be allowed to use this command.  If the cron.allow file does not exist but the cron.deny file does exist, then you must not be  listed  in  the  cron.deny
 file  in  order to use this command.  If neither of these files exists, only the super user will be allowed to use this command.

neither of these files does exist and i am still able as user to use the command crontab -e. can somebody explain this to me, please?

I’ve seen controversies in man pages for years and never fully understood why. It’s not limited to the cron man page, but includes many system services. My best guess is that man pages are global to all Linux and not always maintained by each individual distro. I’ve used lots of distros, and never found a cron.allow/deny on the system, so I’d say it’s not the first line of configuration options in many distros.

I’m sure someone has a better and more technical explanation, but I just wanted to submitt my observation.

On 2010-10-20 19:06, l1zard wrote:

> neither of these files does exist and i am still able as user to use
> the command crontab -e. can somebody explain this to me, please?
>

I have an /etc/cron.deny installed from rpm “cron”. I looked on two installs and it is there.

Telcontar:~ # cat /etc/cron.deny
guest
gast


Cheers / Saludos,

Carlos E. R.
(from 11.2 x86_64 “Emerald” at Telcontar)

On 2010-10-20 20:46, Carlos E. R. wrote:
> On 2010-10-20 19:06, l1zard wrote:
>
>> neither of these files does exist and i am still able as user to use
>> the command crontab -e. can somebody explain this to me, please?
>>
>
> I have an /etc/cron.deny installed from rpm “cron”. I looked on two installs and it is there.
>
> Telcontar:~ # cat /etc/cron.deny
> guest
> gast
>

More.

Telcontar:~ # mv /etc/cron.deny /etc/cron.tmp
Telcontar:~ #

cer@Telcontar:~> crontab -e
You (cer) are not allowed to use this program (crontab)
See crontab(1) for more information
cer@Telcontar:~>

Telcontar:~ # mv /etc/cron.tmp /etc/cron.deny
Telcontar:~ #

And crontab -e works as user again.


Cheers / Saludos,

Carlos E. R.
(from 11.2 x86_64 “Emerald” at Telcontar)

man crontab on Ubuntu (10.10) :

If neither of these files exists, then depending on site-dependent configuration parameters, only the super user will be allowed to use this command, or all users will be able to use this command.

/etc/cron.deny does exist on my system and is empty. As an experiment, I renamed it and tried to run crontab -e as myself, and crontab told me I was not allowed to use it. So it’s working as advertised.

By default, users are allowed to use crontab -e because the file /etc/cron.deny exists by default. On my system it has the following content (that I didn’t write myself):

guest
gast