Re: cron can't find root or operator

2004-05-22 Thread David Fleck
On Fri, 21 May 2004, carvin5string wrote:
[...]
 It would be nice to see some info about the differance between the
 system and user crontabs and how to properly create and use a user
 crontab, as well as when/why one would want to use a user crontab.

I missed the earlier parts of this exchange, so forgive me if I'm
repeating what's already been said.  User crontabs allow specific users
to run crons that are meaningful to them only, without cluttering up the
system crons (or having to be root to make changes).

Users create crontabs for themselves with the 'crontab -e' command.  The
format is described in the crontab(5) man page.

If you already have a file written in the proper format, you can load it
as your crontab by specifying 'crontab {filename}'. (That's what section
6.6.1 in the handbook is trying to say.  Unfortunately, it is not at all
clear on this.)

For instance, I have the following cron for user dcf on my home system:

dcf$ crontab -l
# run fetchmail, dump results to cronlog
*/15 * * * * /usr/local/bin/fetchmail --ssl -Z,571  /home/dcf/fetch.log
# timestamp fetch.log
0 * * * *date  /home/dcf/fetch.log
# clean tex, lyx files out of home dir
0 1 * * */home/dcf/.clean


--
David Fleck
[EMAIL PROTECTED]

___
[EMAIL PROTECTED] mailing list
http://lists.freebsd.org/mailman/listinfo/freebsd-questions
To unsubscribe, send any mail to [EMAIL PROTECTED]


Re: cron can't find root or operator

2004-05-22 Thread Bill Moran
David Fleck wrote:
If you already have a file written in the proper format, you can load it
as your crontab by specifying 'crontab {filename}'. (That's what section
6.6.1 in the handbook is trying to say.  Unfortunately, it is not at all
clear on this.)
There was an outstanding PR on this ... I made a few additions, and I think
the handbook will explain this much better now.  Sounds like a committer is
going to get this into the tree within the next few days.
http://www.freebsd.org/cgi/query-pr.cgi?pr=docs%2F66963
--
Bill Moran
Potential Technologies
http://www.potentialtech.com
___
[EMAIL PROTECTED] mailing list
http://lists.freebsd.org/mailman/listinfo/freebsd-questions
To unsubscribe, send any mail to [EMAIL PROTECTED]


Re: cron can't find root or operator

2004-05-22 Thread chip
Thanks for all the help. I like the changes so far. What about 
specifically mentioning in the Handbook chapter that when a user runs 
the command
crontab crontab
the user should do this in their own home directory. My problem was I 
ran it in the /etc directory, not knowing any better, probably becuase 
that bit wasn't mentioned in the Handbook, or if I recall correctly, 
even the FAQ. The Handbook text states
Let us take a look at the /etc/crontab file (the system crontab):
Followed by the section on the user crontab and the warning paragraph, 
but no mention of doing this in the user directory, not /etc.

So, now I am trying to run -
crontab crontab
in my non-root user directory, as the non-root user, and it fails with this-
crontab: crontab: No such file or directory
I tried -
crontab -u chip crontab -e 	(with and without the -e)
also and it failed with the same message. So I then su'd and tried again 
and got the same message again. The I tried -
/etc/crontab -u chip crontab 		(with and without the -e)
and get permission denied, as root.
I am running 5.1-Release, and a standard default install.
Regards,
Chip

Bill Moran wrote:
David Fleck wrote:
If you already have a file written in the proper format, you can load it
as your crontab by specifying 'crontab {filename}'. (That's what section
6.6.1 in the handbook is trying to say.  Unfortunately, it is not at all
clear on this.)

There was an outstanding PR on this ... I made a few additions, and I think
the handbook will explain this much better now.  Sounds like a committer is
going to get this into the tree within the next few days.
http://www.freebsd.org/cgi/query-pr.cgi?pr=docs%2F66963
___
[EMAIL PROTECTED] mailing list
http://lists.freebsd.org/mailman/listinfo/freebsd-questions
To unsubscribe, send any mail to [EMAIL PROTECTED]


Re: cron can't find root or operator

2004-05-22 Thread Bill Moran
chip wrote:
Thanks for all the help. I like the changes so far. What about 
specifically mentioning in the Handbook chapter that when a user runs 
the command
crontab crontab
the user should do this in their own home directory. My problem was I 
ran it in the /etc directory, not knowing any better, probably becuase 
that bit wasn't mentioned in the Handbook, or if I recall correctly, 
even the FAQ. The Handbook text states
Let us take a look at the /etc/crontab file (the system crontab):
Followed by the section on the user crontab and the warning paragraph, 
but no mention of doing this in the user directory, not /etc.
Please take another look at that chapter in the handbook.  It was just
updated today with changes provoked by this conversation.  I feel that
it's much better at explaining how things work now, but I'd be interested
to hear feedback from someone like yourself, who is having difficulty.
So, now I am trying to run -
crontab crontab
in my non-root user directory, as the non-root user, and it fails with 
this-
crontab: crontab: No such file or directory
The second crontab in that command is the filename of a file to use as
input when creating the crontab.  It doesn't appear as if you've created
such a file.  If you want to create one from scratch, crontab -e might
work better for you.
I tried -
crontab -u chip crontab -e (with and without the -e)
also and it failed with the same message. So I then su'd and tried again 
and got the same message again. The I tried -
/etc/crontab -u chip crontab (with and without the -e)
and get permission denied, as root.
I am running 5.1-Release, and a standard default install.
Regards,
Chip

Bill Moran wrote:
David Fleck wrote:
If you already have a file written in the proper format, you can load it
as your crontab by specifying 'crontab {filename}'. (That's what section
6.6.1 in the handbook is trying to say.  Unfortunately, it is not at all
clear on this.)

There was an outstanding PR on this ... I made a few additions, and I 
think
the handbook will explain this much better now.  Sounds like a 
committer is
going to get this into the tree within the next few days.

http://www.freebsd.org/cgi/query-pr.cgi?pr=docs%2F66963
___
[EMAIL PROTECTED] mailing list
http://lists.freebsd.org/mailman/listinfo/freebsd-questions
To unsubscribe, send any mail to 
[EMAIL PROTECTED]


--
Bill Moran
Potential Technologies
http://www.potentialtech.com
___
[EMAIL PROTECTED] mailing list
http://lists.freebsd.org/mailman/listinfo/freebsd-questions
To unsubscribe, send any mail to [EMAIL PROTECTED]


Re: cron can't find root or operator

2004-05-22 Thread David Fleck
On Sat, 22 May 2004, chip wrote:
 So, now I am trying to run -
 crontab crontab
 in my non-root user directory, as the non-root user, and it fails with this-
 crontab: crontab: No such file or directory
 I tried -
 crontab -u chip crontab -e(with and without the -e)
 also and it failed with the same message. So I then su'd and tried again
 and got the same message again. The I tried -
 /etc/crontab -u chip crontab  (with and without the -e)
 and get permission denied, as root.

1. Using the information in crontab(5), write a file containing your cron
jobs in your favorite text editor.

2. run 'crontab {filename}' to install the cron.

3. run 'crontab -l' to verify that cron has installed your file.


--
David Fleck
[EMAIL PROTECTED]

___
[EMAIL PROTECTED] mailing list
http://lists.freebsd.org/mailman/listinfo/freebsd-questions
To unsubscribe, send any mail to [EMAIL PROTECTED]


Re: cron can't find root or operator

2004-05-21 Thread carvin5string

--- Bill Moran [EMAIL PROTECTED] wrote:
 What you did was install the system crontab as a user.  Log in as the
 user you executed crontab crontab as, and enter crontab -r.  That
 will remove the crontab for that user.
 
 On a related note.  I'm going to make some changes to that section of
 the handbook in an attempt to clarify it.  Do you mind if I contact
 you
 directly to get your feedback on whether or not my changes make that
 chapter easier to understand?
 
 -- 
 Bill Moran
 Potential Technologies
 http://www.potentialtech.com

Bill,
Thanks for the help. Yeah, you can contact me if you need to. It would
be nice to see some info about the differance between the system and
user crontabs and how to properly create and use a user crontab, as
well as when/why one would want to use a user crontab. Plus the
alternatives, if it is not the appropriate way of handling whatever the
user needs done. Like in my case - I want to have a logrotate script
and webalizer run once a week on sunday nights at midnight. I was
trying to follow the instructions included with webalizer and in the
Handbook, nothing more.

Regards,
Chip W
Simrad, Inc
www.simradusa.com
www.simrad.com





__
Do you Yahoo!?
Yahoo! Domains – Claim yours for only $14.70/year
http://smallbusiness.promotions.yahoo.com/offer 
___
[EMAIL PROTECTED] mailing list
http://lists.freebsd.org/mailman/listinfo/freebsd-questions
To unsubscribe, send any mail to [EMAIL PROTECTED]


cron can't find root or operator

2004-05-20 Thread carvin5string
I have a new server set up and running and am getting a slew of
messages from cron, like this - 

Subject: Cron [EMAIL PROTECTED] root /usr/libexec/atrun 
Body: root: not found 

and 

Cron [EMAIL PROTECTED] operator /usr/libexec/save-entropy 
operator: not found 

What's going on with cron? 
Thanks, 
Chip




__
Do you Yahoo!?
Yahoo! Domains – Claim yours for only $14.70/year
http://smallbusiness.promotions.yahoo.com/offer 
___
[EMAIL PROTECTED] mailing list
http://lists.freebsd.org/mailman/listinfo/freebsd-questions
To unsubscribe, send any mail to [EMAIL PROTECTED]


Re: cron can't find root or operator

2004-05-20 Thread Eric Crist
On Thursday 20 May 2004 09:14, carvin5string wrote:
 I have a new server set up and running and am getting a slew of
 messages from cron, like this -

 Subject: Cron [EMAIL PROTECTED] root /usr/libexec/atrun
 Body: root: not found

 and

 Cron [EMAIL PROTECTED] operator /usr/libexec/save-entropy
 operator: not found

 What's going on with cron?
 Thanks,
 Chip


It would really help if you copied us your crontab.

-- 
It's Like This

Even the samurai
have teddy bears,
and even the teddy bears
get drunk.
___
[EMAIL PROTECTED] mailing list
http://lists.freebsd.org/mailman/listinfo/freebsd-questions
To unsubscribe, send any mail to [EMAIL PROTECTED]


Re: cron can't find root or operator

2004-05-20 Thread Bill Moran
carvin5string wrote:
I have a new server set up and running and am getting a slew of
messages from cron, like this - 

Subject: Cron [EMAIL PROTECTED] root /usr/libexec/atrun 
Body: root: not found 

and 

Cron [EMAIL PROTECTED] operator /usr/libexec/save-entropy 
operator: not found 

What's going on with cron? 
You've got a user's crontab created in the format of the system crontab.
The system crontab has an extra field to designate the user under which
the job should run.  When this field is entered in a user's crontab,
cron interprets it as the command to be run and the errors you describe
generally result.
Keep in mind that the user root has a user crontab that is different
from the system crontab.
If you're still fuzzy as to what went wrong, reading the man pages for
crontab (in addition to my explanation) should help.
good luck.
--
Bill Moran
Potential Technologies
http://www.potentialtech.com
___
[EMAIL PROTECTED] mailing list
http://lists.freebsd.org/mailman/listinfo/freebsd-questions
To unsubscribe, send any mail to [EMAIL PROTECTED]


Re: cron can't find root or operator

2004-05-20 Thread platanthera
On Thursday 20 May 2004 17:47, Bill Moran wrote:
 carvin5string wrote:
  I have a new server set up and running and am getting a slew of
  messages from cron, like this -
 
  Subject: Cron [EMAIL PROTECTED] root /usr/libexec/atrun
  Body: root: not found
 
  and
 
  Cron [EMAIL PROTECTED] operator /usr/libexec/save-entropy
  operator: not found
 
  What's going on with cron?

 You've got a user's crontab created in the format of the system
 crontab.

 The system crontab has an extra field to designate the user under
 which the job should run.  When this field is entered in a user's
 crontab, cron interprets it as the command to be run and the errors
 you describe generally result.

 Keep in mind that the user root has a user crontab that is
 different from the system crontab.

 If you're still fuzzy as to what went wrong, reading the man pages
 for crontab (in addition to my explanation) should help.

additionally you might want to have a look at 
http://www.freebsd.org/doc/en_US.ISO8859-1/books/faq/admin.html#ROOT-NOT-FOUND-CRON-ERRORS

 good luck.
___
[EMAIL PROTECTED] mailing list
http://lists.freebsd.org/mailman/listinfo/freebsd-questions
To unsubscribe, send any mail to [EMAIL PROTECTED]


Re: cron can't find root or operator

2004-05-20 Thread carvin5string

--- Bill Moran [EMAIL PROTECTED] wrote:
 You've got a user's crontab created in the format of the system
 crontab.
 
 The system crontab has an extra field to designate the user under
 which
 the job should run.  When this field is entered in a user's crontab,
 cron interprets it as the command to be run and the errors you
 describe
 generally result.
 
 Keep in mind that the user root has a user crontab that is
 different
 from the system crontab.
 
 If you're still fuzzy as to what went wrong, reading the man pages
 for
 crontab (in addition to my explanation) should help.
 
 good luck.
 
 -- 
 Bill Moran
 Potential Technologies
 http://www.potentialtech.com

Bill,
I see in the Handbook in section 6.6.1 that I should run crontab
crontab to create a new crontab, which I did, in the /etc directory, as
root. Thus the crontab file in /etc looks like this -
After reading the man page and the one page in the manual I don't know
what to do to fix this -

www# crontab -l
# /etc/crontab - root's crontab for FreeBSD
#
# $FreeBSD: src/etc/crontab,v 1.32 2002/11/22 16:13:39 tom Exp $
#
SHELL=/bin/sh
PATH=/etc:/bin:/sbin:/usr/bin:/usr/sbin:/usr/local/bin
HOME=/var/log
#
#minute hourmdaymonth   wdaywho command
#
*/5 *   *   *   *   /usr/libexec/atrun
#
# Save some entropy so that /dev/random can re-seed on boot.
*/11*   *   *   *   /usr/libexec/save-entropy
#
# Rotate log files every hour, if necessary.
0   *   *   *   *   newsyslog
#
# Perform daily/weekly/monthly maintenance.
1   3   *   *   *   periodic daily
15  4   *   *   6   periodic weekly
30  5   1   *   *   periodic monthly
#
# Adjust the time zone if the CMOS clock keeps local time, as opposed
to
# UTC time.  See adjkerntz(8) for details.
1,310-5 *   *   *   adjkerntz -a
#
# Rotate web server logs and run webalizer
0   0   *   *   6   /usr/bin/rotate_weblogs
5   0   *   *   6   /usr/local/bin/webalizer -Q
/usr/local/www/data/weblogs/httpd-access.backup
www#




__
Do you Yahoo!?
Yahoo! Domains – Claim yours for only $14.70/year
http://smallbusiness.promotions.yahoo.com/offer 
___
[EMAIL PROTECTED] mailing list
http://lists.freebsd.org/mailman/listinfo/freebsd-questions
To unsubscribe, send any mail to [EMAIL PROTECTED]


Re: cron can't find root or operator

2004-05-20 Thread platanthera
On Thursday 20 May 2004 22:57, carvin5string wrote:
 --- Bill Moran [EMAIL PROTECTED] wrote:
  You've got a user's crontab created in the format of the system
  crontab.
 
  The system crontab has an extra field to designate the user under
  which
  the job should run.  When this field is entered in a user's
  crontab, cron interprets it as the command to be run and the errors
  you describe
  generally result.
 
  Keep in mind that the user root has a user crontab that is
  different
  from the system crontab.
 
  If you're still fuzzy as to what went wrong, reading the man pages
  for
  crontab (in addition to my explanation) should help.
 
  good luck.
 
  --
  Bill Moran
  Potential Technologies
  http://www.potentialtech.com

 Bill,
 I see in the Handbook in section 6.6.1 that I should run crontab
 crontab to create a new crontab, which I did, in the /etc directory,
 as root. 

Thats's most likely the problem. Do NOT run crontab /etc/crontab
Read the FAQ!!!
___
[EMAIL PROTECTED] mailing list
http://lists.freebsd.org/mailman/listinfo/freebsd-questions
To unsubscribe, send any mail to [EMAIL PROTECTED]


Re: cron can't find root or operator

2004-05-20 Thread Bill Moran
carvin5string wrote:
--- Bill Moran [EMAIL PROTECTED] wrote:
You've got a user's crontab created in the format of the system
crontab.
The system crontab has an extra field to designate the user under
which
the job should run.  When this field is entered in a user's crontab,
cron interprets it as the command to be run and the errors you
describe
generally result.
Keep in mind that the user root has a user crontab that is
different
from the system crontab.
If you're still fuzzy as to what went wrong, reading the man pages
for
crontab (in addition to my explanation) should help.
Bill,
I see in the Handbook in section 6.6.1 that I should run crontab
crontab to create a new crontab, which I did, in the /etc directory, as
root.
Yeah, it does look like it says that, doesn't it?  It doesn't really, and
you shouldn't have done that ...
Thus the crontab file in /etc looks like this -
After reading the man page and the one page in the manual I don't know
what to do to fix this -
What you did was install the system crontab as a user.  Log in as the
user you executed crontab crontab as, and enter crontab -r.  That
will remove the crontab for that user.
On a related note.  I'm going to make some changes to that section of
the handbook in an attempt to clarify it.  Do you mind if I contact you
directly to get your feedback on whether or not my changes make that
chapter easier to understand?
--
Bill Moran
Potential Technologies
http://www.potentialtech.com
___
[EMAIL PROTECTED] mailing list
http://lists.freebsd.org/mailman/listinfo/freebsd-questions
To unsubscribe, send any mail to [EMAIL PROTECTED]