Skip site navigation (1)Skip section navigation (2)
Date:      Wed, 19 Jul 2000 22:34:46 +0100
From:      Ben Smithurst <ben@FreeBSD.org>
To:        doc@FreeBSD.org
Subject:   FAQ: "root: not found" messages from cron
Message-ID:  <20000719223446.D75784@strontium.scientia.demon.co.uk>

next in thread | raw e-mail | index | archive | help

--sXc4Kmr5FA7axrvy
Content-Type: text/plain; charset=us-ascii
Content-Disposition: inline
Content-Transfer-Encoding: quoted-printable

This is another question I've seen once too often...  Does anyone have any
objections to my proposed answer?

Index: book.sgml
=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=
=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=
=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D
RCS file: /usr/cvs/doc/en_US.ISO_8859-1/books/faq/book.sgml,v
retrieving revision 1.75
diff -u -r1.75 book.sgml
--- book.sgml	2000/07/19 17:24:48	1.75
+++ book.sgml	2000/07/19 21:31:02
@@ -4317,6 +4317,44 @@
=20
 </answer></qandaentry>
=20
+      <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>
=20

--=20
Ben Smithurst                 / ben@FreeBSD.org / PGP: 0x99392F7D
FreeBSD Documentation Project /

--sXc4Kmr5FA7axrvy
Content-Type: application/pgp-signature
Content-Disposition: inline

-----BEGIN PGP SIGNATURE-----
Version: PGPfreeware 5.0i for non-commercial use
MessageID: QRGgHCIx+gkIBcHY0rve3+eZHZh4I9Sb

iQCVAwUBOXYe9isPVtiZOS99AQFSlgP/SuCgKDecSQEQa/TlaIAyGj2/qbBRuVkK
9esX2qRq+RJ3odb7XC/YlvE/wiLBpnJOclKSfsWDJ8X0cxmSDsNpJO2B2OCYWvOn
zGDWiu95NjXRlAlZYPdTg7rhv6XTEuRx2x1lnmW/yWtFRfekYJoC5XI0180Z/for
NhZg2wMSlIo=
=ma/p
-----END PGP SIGNATURE-----

--sXc4Kmr5FA7axrvy--


To Unsubscribe: send mail to majordomo@FreeBSD.org
with "unsubscribe freebsd-doc" in the body of the message




Want to link to this message? Use this URL: <https://mail-archive.FreeBSD.org/cgi/mid.cgi?20000719223446.D75784>