Information Technology Reference
In-Depth Information
The crontab -l command can be used to display the contents of the user's
crontab , and the crontab -r command can be used to delete the user's
crontab .
When the cron daemon starts, it reads all existing crontab s. Because it normally
does not re-read the crontab s, it will not be aware of any changes made unless they
are made using the crontab command. The crontab command notifies the cron
daemon that a crontab has changed or been added. The cron daemon then updates
its information.
The superuser can specify a user account name after the crontab command
argument to control the crontab of another user account. This can be used
with the -l or -r command-line arguments to list or delete the crontab of
another user account; however, do not specify a user account name with the
-e command-line argument.
If the superuser attempts to modify the crontab of another user account using the
crontab -e command and specifying the user account name as a command-line
argument, the results will be unpredictable. Instead, use the su(1) command to
become the other user account and then use the crontab -e command.
Access Control
Access to the crontab command is controlled by two files—cron.allow and
cron.deny—both of which reside under the /etc/cron.d directory. These
text files contain lists of user account names (one per line) that are allowed
or denied access.
Users are allowed access to the crontab command if their user account name
is listed in the /etc/cron.d/cron.allow file. If the cron.allow file does not
exist, users will be allowed access if their user account name is not listed in
the /etc/cron.d/cron.deny file. In addition, users will be denied access if
neither file exists.
These access rules also apply to the root account if either the cron.allow or
the cron.deny file exists. By default, the /etc/cron.d/cron.deny file is creat-
ed and contains all initial non-administrative user accounts. If neither file
exists, only the superuser can submit jobs.
Note that the /usr/lib/cron directory is symbolically linked to the
/etc/cron.d directory. Therefore, the crontab control files can be accessed
using either pathname.
Search WWH ::




Custom Search