For some reason, a line to set HOME was added to the default
crontab back in revision 1.2 (back in July 1994!) This
breaks any scripts or programs that use HOME to reference
the home directory of the current account.
I did a little investigation as to why this wasn't a problem
in my older 6.2-RELEASE systems; it looks like there is
some code to prevent HOME in the crontab from overriding
the value derived from the passwd file that is not in the
7.1-RELEASE version of cron.
In the end, I checked with Paul Vixie and he said, "yes
that's a bug in freebsd's default crontab."
Fix: The attached patch removes the offending line.
===================================================================
RCS file: RCS/crontab,v
retrieving revision 1.1
How-To-Repeat: Add a crontab entry similar to this:
* * * * * leres echo $USER HOME is $HOME
and then wait for email that says:
leres HOME is /var/log
which is clearly wrong.