Re: [gentoo-user] dcron problem on new install

2015-11-26 Thread Jeremi Piotrowski
On Wed, Nov 25, 2015 at 10:29:52PM -0500, waltd...@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.



[gentoo-user] dcron problem on new install

2015-11-25 Thread waltdnes
  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 
I don't run "desktop environments"; I run useful applications



Re: [gentoo-user] dcron problem on new install

2015-11-25 Thread J. Roeleveld
On Wednesday, November 25, 2015 10:29:52 PM waltd...@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



Re: [gentoo-user] dcron problem on new install

2015-11-25 Thread Marc Joliet
On Wednesday 25 November 2015 22:29:52 waltd...@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


signature.asc
Description: This is a digitally signed message part.