> >> The default setup enables "cron" and attempts to run several things from
> >> /etc/crontab including scripts named "daily", "weekly", and "monthly"
> >> which, by default, do not exist. When that time rolls around and cron
> >> tries and fails to run these scripts, it sends mail to root.
> > Aside from the fact that cron is enabled by default, this is
> > incorrect. There used (*years* ago) to be scripts by those names, but
> > they have not been called by the default crontab since they were
> > removed.
> You're wrong. I found these calls in crontab on my own system, installed
> in January from the 3.3-RELEASE CDs.
With all due respect (a quantity that, to be honest, your actions are
not causing to increase), I was correct and you were wrong. While I
don't have the 3.3-RELEASE crontab at hand, I have the one from 3.1,
and it is in no way substantially different from the one in -STABLE.
The entry in question is as follows (I take the weekly one as a
demonstration, but the daily and monthly examples are precisely
analogous):
30 3 * * 6 root periodic weekly 2>&1 | sendmail root
The
"30 3 * * 6"
part means that this runs at 3:30 on Saturday morning.
The
"root"
part means that it runs as root.
The rest is the command line that is executed as the root user at
3:30AM every Saturday.
"periodic weekly 2>&1 | sendmail root"
This means that a command called "periodic" is executed with a
parameter of "weekly", its standard error is redirected to standard
output, and the standard output is mailed to the root user. Note that
the word "weekly" in there is not the name of a script, or any other
kind of "call" as you put it, but is rather a "parameter" (that is,
it's information that is provided to the command, rather than a
command itself).
"periodic" is implemented as a script in /usr/sbin, and the way it
uses the parameter is to find a subdirectory within the /etc/periodic
directory of that name. There is no script called "weekly" anywhere
on the system, nor is there any "call" to such a script in the crontab.
Quote:> > What *is* called is a script called "periodic" (which has
> > its own man page, incidentally), and which is called with *parameters*
> > of "daily", "weekly", and "monthly" (as appropriate). In a default
> > installation, the periodic script *does* exist as called from the
> > default crontab, and it in turn invokes scripts in
> > /etc/periodic/{daily,weekly,monthly} as appropriate.
> Maybe that's where the scripts are supposed to be, but crontab does not
> include any paths, just "daily", "weekly", and "monthly".
That's incorrect, as I explained above. The *path* to the command is
set up at the top of the crontab, in a line that begins "PATH=" and
which sets the search path that will be used to find commands within
the crontab. The path to the scripts that are run on a daily, weekly,
and monthly basis is found in /usr/sbin/periodic, although additional
ones can also be specified in rc.conf.
Quote:> >> Comment them out in /etc/crontab.
> > I can't go along with this. If the problem is that the cron entries
> > are broken, the right answer is to fix them -- this problem has not
> > been widely reported, and is presumably a unique case of pilot error.
> This is like blaming Netscape's security holes on "user error". In both
> cases the software, when first installed, should do nothing the user
> hasn't explicitly told it to do. Any other default setting is a bug in
> the release, not a user error.
That's a philosophical point, and one that makes a lot of sense on a
machine that does not support remote access (for example, MS-DOS, or
an Etch-a-Sketch). I happen to disagree, for systems like FreeBSD
that offer networked services by default, but there's room for
argument on this one. [For example, there could be an installation
option that doesn't run *any* daemons at startup -- no crontab, no
inetd, etc. But I think more people would be confused about why they
couldn't FTP to this system than would be happy about the security
implications.]
However, your original explanation of how these things were, in your
words, "broken," was completely incorrect, and you are attempting to
change the topic here off of your misguided factual claims. Because
many novices read this newsgroup, you are doing a grave disservice to
FreeBSD by continuing to post responses to other peoples' questions
that have been sufficiently offbase as to mislead novices and require
correction from more experienced people.
- Lowell Gilbert