Yet another question I've seen asked once too often on -questions:

"why do I keep getting messages like ``root: not found'' from
cron?".  (I haven't seen it for a while actually, but hopefully
with this I'll never see it again. :-)
This commit is contained in:
Ben Smithurst 2000-07-20 00:16:26 +00:00
parent 7047aab304
commit 61c51e4134
Notes: svn2git 2020-12-08 03:00:23 +00:00
svn path=/head/; revision=7686
2 changed files with 78 additions and 2 deletions
en_US.ISO8859-1/books/faq
en_US.ISO_8859-1/books/faq

View file

@ -15,7 +15,7 @@
</author>
</authorgroup>
<pubdate>$FreeBSD: doc/en_US.ISO_8859-1/books/faq/book.sgml,v 1.75 2000/07/19 17:24:48 ben Exp $</pubdate>
<pubdate>$FreeBSD: doc/en_US.ISO_8859-1/books/faq/book.sgml,v 1.76 2000/07/19 19:20:26 ben Exp $</pubdate>
<abstract>
<para>This is the FAQ for FreeBSD versions 2.X, 3.X, and 4.X. All entries
@ -4358,6 +4358,44 @@ future:</para>
</answer></qandaentry>
<qandaentry>
<question>
<para>Why do I keep getting messages like <quote>root: not
found</quote> after editing my crontab file?</para>
</question>
<answer>
<para>This is normally caused by editing the system crontab
(<filename>/etc/crontab</filename>) and then using
&man.crontab.1; to install it:</para>
<screen>&prompt.root; <userinput>crontab /etc/crontab</userinput></screen>
<para>This is not the correct way to do things. The system
crontab has a different format to the per-user crontabs
which &man.crontab.1; updates (the &man.crontab.5; manual
page explains the differences in more detail).</para>
<para>If this is what you did, you should delete the
<filename>/var/cron/tabs/root</filename>, since it will
simply be a copy of <filename>/etc/crontab</filename>,
in the wrong format. Next time, when you edit
<filename>/etc/crontab</filename>, you should not do
anything to inform &man.cron.8; of the changes, since it
will notice them automatically.</para>
<para>The actual reason for the error is that the system
crontab has an extra field, specifying which user to run the
command as. In the default system crontab provided with
FreeBSD, this is <username>root</username> for all entries.
When this crontab is used as the <username>root</username>
user's crontab (which is <emphasis>not</emphasis> the
same as the system crontab), &man.cron.8; assumes the string
<literal>root</literal> is the first word of the command to
execute, but no such command exists.</para>
</answer>
</qandaentry>
<qandaentry><question>
<para>How do I mount a secondary DOS partition?</para></question><answer>

View file

@ -15,7 +15,7 @@
</author>
</authorgroup>
<pubdate>$FreeBSD: doc/en_US.ISO_8859-1/books/faq/book.sgml,v 1.75 2000/07/19 17:24:48 ben Exp $</pubdate>
<pubdate>$FreeBSD: doc/en_US.ISO_8859-1/books/faq/book.sgml,v 1.76 2000/07/19 19:20:26 ben Exp $</pubdate>
<abstract>
<para>This is the FAQ for FreeBSD versions 2.X, 3.X, and 4.X. All entries
@ -4358,6 +4358,44 @@ future:</para>
</answer></qandaentry>
<qandaentry>
<question>
<para>Why do I keep getting messages like <quote>root: not
found</quote> after editing my crontab file?</para>
</question>
<answer>
<para>This is normally caused by editing the system crontab
(<filename>/etc/crontab</filename>) and then using
&man.crontab.1; to install it:</para>
<screen>&prompt.root; <userinput>crontab /etc/crontab</userinput></screen>
<para>This is not the correct way to do things. The system
crontab has a different format to the per-user crontabs
which &man.crontab.1; updates (the &man.crontab.5; manual
page explains the differences in more detail).</para>
<para>If this is what you did, you should delete the
<filename>/var/cron/tabs/root</filename>, since it will
simply be a copy of <filename>/etc/crontab</filename>,
in the wrong format. Next time, when you edit
<filename>/etc/crontab</filename>, you should not do
anything to inform &man.cron.8; of the changes, since it
will notice them automatically.</para>
<para>The actual reason for the error is that the system
crontab has an extra field, specifying which user to run the
command as. In the default system crontab provided with
FreeBSD, this is <username>root</username> for all entries.
When this crontab is used as the <username>root</username>
user's crontab (which is <emphasis>not</emphasis> the
same as the system crontab), &man.cron.8; assumes the string
<literal>root</literal> is the first word of the command to
execute, but no such command exists.</para>
</answer>
</qandaentry>
<qandaentry><question>
<para>How do I mount a secondary DOS partition?</para></question><answer>