* [gentoo-user] dcron problem on new install
@ 2015-11-26 3:29 waltdnes
2015-11-26 7:09 ` Marc Joliet
` (2 more replies)
0 siblings, 3 replies; 4+ messages in thread
From: waltdnes @ 2015-11-26 3:29 UTC (permalink / raw
To: Gentoo Users List
I'm getting a bunch of messages like...
> Subject: cron for user root root [ ! -x /etc/cron.hourly/0anacron ] && { test -x /usr/sbin/run-crons && /usr/sbin/run-crons ; }
>
> /bin/sh: root: command not found
/bin/sh does exist...
[d531][waltdnes][~] ll /bin/sh
lrwxrwxrwx 1 root root 4 Nov 24 12:10 /bin/sh -> bash
/etc/ cron.hourly cron.weekly cron.monthly are empty except for a
dummy file .keep_sys-process_cronbase-0
--
Walter Dnes <waltdnes@waltdnes.org>
I don't run "desktop environments"; I run useful applications
^ permalink raw reply [flat|nested] 4+ messages in thread
* Re: [gentoo-user] dcron problem on new install
2015-11-26 3:29 [gentoo-user] dcron problem on new install waltdnes
@ 2015-11-26 7:09 ` Marc Joliet
2015-11-26 7:49 ` J. Roeleveld
2015-11-26 10:47 ` Jeremi Piotrowski
2 siblings, 0 replies; 4+ messages in thread
From: Marc Joliet @ 2015-11-26 7:09 UTC (permalink / raw
To: gentoo-user
[-- Attachment #1: Type: text/plain, Size: 1100 bytes --]
On Wednesday 25 November 2015 22:29:52 waltdnes@waltdnes.org wrote:
> I'm getting a bunch of messages like...
>
>> Subject: cron for user root root [ ! -x /etc/cron.hourly/0anacron ]
>> && { test -x /usr/sbin/run-crons && /usr/sbin/run-crons ; }
>>
>> /bin/sh: root: command not found
>
>/bin/sh does exist...
>
>[d531][waltdnes][~] ll /bin/sh
>lrwxrwxrwx 1 root root 4 Nov 24 12:10 /bin/sh -> bash
>
>/etc/ cron.hourly cron.weekly cron.monthly are empty except for a
>dummy file .keep_sys-process_cronbase-0
I remember from experience that those messages are misleading. It's not dcron
complaining about /bin/sh not existing, it's /bin/sh complaining about some
command not existing. In fact, bash's error message format indicates that
something is trying to execute "root":
% bash -c "echl"
bash: echl: Kommando nicht gefunden.
(dash's error message would look like this:
% dash -c "echl"
dash: 1: echl: not found)
HTH
--
Marc Joliet
--
"People who think they know everything really annoy those of us who know we
don't" - Bjarne Stroustrup
[-- Attachment #2: This is a digitally signed message part. --]
[-- Type: application/pgp-signature, Size: 819 bytes --]
^ permalink raw reply [flat|nested] 4+ messages in thread
* Re: [gentoo-user] dcron problem on new install
2015-11-26 3:29 [gentoo-user] dcron problem on new install waltdnes
2015-11-26 7:09 ` Marc Joliet
@ 2015-11-26 7:49 ` J. Roeleveld
2015-11-26 10:47 ` Jeremi Piotrowski
2 siblings, 0 replies; 4+ messages in thread
From: J. Roeleveld @ 2015-11-26 7:49 UTC (permalink / raw
To: gentoo-user
On Wednesday, November 25, 2015 10:29:52 PM waltdnes@waltdnes.org wrote:
> I'm getting a bunch of messages like...
>
> > Subject: cron for user root root [ ! -x /etc/cron.hourly/0anacron ]
> > && { test -x /usr/sbin/run-crons && /usr/sbin/run-crons ; }
> >
> > /bin/sh: root: command not found
>
> /bin/sh does exist...
>
> [d531][waltdnes][~] ll /bin/sh
> lrwxrwxrwx 1 root root 4 Nov 24 12:10 /bin/sh -> bash
>
> /etc/ cron.hourly cron.weekly cron.monthly are empty except for a
> dummy file .keep_sys-process_cronbase-0
What do you get when you run:
# crontab -l
as root?
--
Joost
^ permalink raw reply [flat|nested] 4+ messages in thread
* Re: [gentoo-user] dcron problem on new install
2015-11-26 3:29 [gentoo-user] dcron problem on new install waltdnes
2015-11-26 7:09 ` Marc Joliet
2015-11-26 7:49 ` J. Roeleveld
@ 2015-11-26 10:47 ` Jeremi Piotrowski
2 siblings, 0 replies; 4+ messages in thread
From: Jeremi Piotrowski @ 2015-11-26 10:47 UTC (permalink / raw
To: gentoo-user
On Wed, Nov 25, 2015 at 10:29:52PM -0500, waltdnes@waltdnes.org wrote:
> I'm getting a bunch of messages like...
>
> > Subject: cron for user root root [ ! -x /etc/cron.hourly/0anacron ] && { test -x /usr/sbin/run-crons && /usr/sbin/run-crons ; }
> >
> > /bin/sh: root: command not found
>
> /bin/sh does exist...
>
> [d531][waltdnes][~] ll /bin/sh
> lrwxrwxrwx 1 root root 4 Nov 24 12:10 /bin/sh -> bash
>
> /etc/ cron.hourly cron.weekly cron.monthly are empty except for a
> dummy file .keep_sys-process_cronbase-0
>
What /bin/sh actually means is "root: command not found". This is caused
by the difference between the system-wide crontab and the per-user
crontab.
The system-wide crontab /etc/crontab needs to know as which user to
execute the command so it has a column for the username right before the
command. The per-user crontabs which are at /var/spool/cron/crontabs (but
which should be edited with crontab -e) know as which user to run the
commands so they treat everything after the time as the command.
You got the two mixed up. Run crontab -e as the root user and remove
the word 'root' part right before the command. Should fix things right
away.
^ permalink raw reply [flat|nested] 4+ messages in thread
end of thread, other threads:[~2015-11-26 10:48 UTC | newest]
Thread overview: 4+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2015-11-26 3:29 [gentoo-user] dcron problem on new install waltdnes
2015-11-26 7:09 ` Marc Joliet
2015-11-26 7:49 ` J. Roeleveld
2015-11-26 10:47 ` Jeremi Piotrowski
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox