Results 1 to 7 of 7

Thread: Quesion about the crontab utillity

  1. #1
    Join Date
    Jun 2009
    Location
    Berlin
    Posts
    158

    Default 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
    Code:
     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?

  2. #2
    Join Date
    Jan 2009
    Location
    43.009 N, 73.172 W
    Posts
    189

    Default Re: Quesion about the crontab utillity

    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.
    Box: Home Built | Intel Core2 @2.4 GHz | 6 GB | OpenSUSE 11.4| KDE 4.6.0 r6| nVidia GeForce 7300 GT

  3. #3
    Join Date
    Feb 2009
    Location
    Spain
    Posts
    25,547

    Default Re: Quesion about the crontab utillity

    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)

  4. #4
    Join Date
    Feb 2009
    Location
    Spain
    Posts
    25,547

    Default Re: Quesion about the crontab utillity

    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)

  5. #5

    Default Re: Quesion about the crontab utillity

    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.

  6. #6
    Join Date
    Jun 2008
    Location
    UTC+10
    Posts
    9,686
    Blog Entries
    4

    Default Re: Quesion about the crontab utillity

    Quote Originally Posted by l1zard View Post
    hi,

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

    The manpage of crontab(1) says
    Code:
     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?
    /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.

  7. #7

    Default Re: Quesion about the crontab utillity

    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):
    Code:
    guest
    gast

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts
  •