DaemonForums  

Go Back   DaemonForums > OpenBSD > OpenBSD Installation and Upgrading

OpenBSD Installation and Upgrading Installing and upgrading OpenBSD.

Reply
 
Thread Tools Display Modes
  #1   (View Single Post)  
Old 12th September 2010
fbroce fbroce is offline
Port Guard
 
Join Date: Oct 2009
Posts: 11
Thanked 0 Times in 0 Posts
Default default crontab

Maybe I am missing something. Openbsd's default crontab is supposed to be in /etc according to docs. There is no crontab in /etc by default. There is a copy of the standard system crontab file in /usr/etc.

I can install that one however, cron seems to be executing newsyslog periodically (despite the fact that I see no crontabs for root).

Should the default crontab be installed in /etc ?
Reply With Quote
  #2   (View Single Post)  
Old 12th September 2010
jggimi's Avatar
jggimi jggimi is offline
More noise than signal
 
Join Date: May 2008
Location: USA
Posts: 3,695
Thanked 214 Times in 189 Posts
Default

What "docs" tell you the crontab should be in /etc?

The definitive documentation, crontab(1), describes the file structure in /var/cron.
Reply With Quote
  #3   (View Single Post)  
Old 13th September 2010
fbroce fbroce is offline
Port Guard
 
Join Date: Oct 2009
Posts: 11
Thanked 0 Times in 0 Posts
Default

I'm sorry. I mean cron. /etc/crontab is the system crontab file. There is a copy if it
in /usr/etc which seems to be correct.

My question is should this be installed as a root cron process or does the system have other scripts that handle housekeeping for the system..ie like log rotation (newsyslog), etc.?
Reply With Quote
  #4   (View Single Post)  
Old 13th September 2010
ocicat ocicat is offline
Administrator
 
Join Date: Apr 2008
Posts: 2,886
Thanked 190 Times in 160 Posts
Default

Quote:
Originally Posted by fbroce View Post
...or does the system have other scripts that handle housekeeping for the system..ie like log rotation (newsyslog), etc.?
Take a look at root's settings at /var/cron/tabs/root.
Reply With Quote
  #5   (View Single Post)  
Old 13th September 2010
jggimi's Avatar
jggimi jggimi is offline
More noise than signal
 
Join Date: May 2008
Location: USA
Posts: 3,695
Thanked 214 Times in 189 Posts
Default

Quote:
Originally Posted by fbroce View Post
There is a copy if it in /usr/etc which seems to be correct.
That's not a directory structure OpenBSD users ever expect to see. Please do me a favor and post the output of "sysctl kern.version" here.
Reply With Quote
  #6   (View Single Post)  
Old 13th September 2010
ocicat ocicat is offline
Administrator
 
Join Date: Apr 2008
Posts: 2,886
Thanked 190 Times in 160 Posts
Default

I agree with jggimi. Everything mentioned matches FreeBSD, not OpenBSD:

http://tim.oreilly.com/pub/a/bsd/200...SD_Basics.html
Reply With Quote
  #7   (View Single Post)  
Old 13th September 2010
fbroce fbroce is offline
Port Guard
 
Join Date: Oct 2009
Posts: 11
Thanked 0 Times in 0 Posts
Default re output

Quote:
Originally Posted by jggimi View Post
That's not a directory structure OpenBSD users ever expect to see. Please do me a favor and post the output of "sysctl kern.version" here.
kern.version=OpenBSD 4.7-stable (GENERIC.MP) #3: Sat Aug 21 17:17:28 EDT 2010
troot@corky31.fbroce.local:/usr/src/...ile/GENERIC.MP
Reply With Quote
  #8   (View Single Post)  
Old 13th September 2010
fbroce fbroce is offline
Port Guard
 
Join Date: Oct 2009
Posts: 11
Thanked 0 Times in 0 Posts
Default re root file

Quote:
Originally Posted by ocicat View Post
Take a look at root's settings at /var/cron/tabs/root.
I have added the default crontab to root. It was empty before that.
The implication is that this runs by default however by default root shows no crontab files. I installed this as the root crontab file however, I am wondering if it runs silently in the background?
-------------------------------------------------------------------------------
# DO NOT EDIT THIS FILE - edit the master and reinstall.
# (/tmp/crontab.SYHFZW1Oui installed on Sun Sep 12 10:48:37 2010)
# (Cron version V5.0)
# $OpenBSD: crontab,v 1.18 2009/05/09 17:15:49 schwarze Exp $
#
# /var/cron/tabs/root - root's crontab
#
SHELL=/bin/sh
PATH=/bin:/sbin:/usr/bin:/usr/sbin
HOME=/var/log
#
#minute hour mday month wday command
#
# sendmail clientmqueue runner
#*/30 * * * * /usr/sbin/sendmail -L sm-msp-queue -Ac -q
#
# rotate log files every hour, if necessary
0 * * * * /usr/bin/newsyslog
# send log file notifications, if necessary
#1-59 * * * * /usr/bin/newsyslog -m
#
# do daily/weekly/monthly maintenance
30 1 * * * /bin/sh /etc/daily
30 3 * * 6 /bin/sh /etc/weekly
30 5 1 * * /bin/sh /etc/monthly
#0 * * * * /usr/libexec/spamd-setup
Reply With Quote
  #9   (View Single Post)  
Old 13th September 2010
jggimi's Avatar
jggimi jggimi is offline
More noise than signal
 
Join Date: May 2008
Location: USA
Posts: 3,695
Thanked 214 Times in 189 Posts
Default

1. You have told us this system has a "/usr/etc" structure. OpenBSD doesn't. So this must have been added by you or another admin.

2. If I understood what you have posted here -- and I may not -- there was no root crontab, but one is included in the standard installation of OpenBSD. It must have been deleted by you or another admin.

It is only a guess, of course, but if both of these things are true, the questions you raise indicate a system which has has been customized or reconfigured. If not by you, then by a predecessor. If the latter, you should consider the value of a re-installation, in order to eliminate any unknowns, and any non-standard structures and software.

What is the history of this system?
Reply With Quote
Old 13th September 2010
fbroce fbroce is offline
Port Guard
 
Join Date: Oct 2009
Posts: 11
Thanked 0 Times in 0 Posts
Default re /usr/etc

Thanks for setting me straight!

There is no other user or admin of this system. I think I know what happened. I must have updated the source with cvs and specified the wrong path and created the /usr/etc/ instead of /usr/src/etc.

I have another identical server and it does not have the /usr/etc directory.
Sorry for all the confusion.

I still don't think either of the systems enabled the default crontab file in /etc as a root crontab. Should that be part of the standard setup?
Reply With Quote
Old 13th September 2010
ocicat ocicat is offline
Administrator
 
Join Date: Apr 2008
Posts: 2,886
Thanked 190 Times in 160 Posts
Default

Quote:
Originally Posted by fbroce View Post
Should that be part of the standard setup?
Yes, it is included in the default installation.
Reply With Quote
Old 13th September 2010
jggimi's Avatar
jggimi jggimi is offline
More noise than signal
 
Join Date: May 2008
Location: USA
Posts: 3,695
Thanked 214 Times in 189 Posts
Default

To highlight what ocicat has stated -- if you look at the etc47.tgz fileset used during installation, you will see version 1.18 of root's crontab file in that tarball, in var/cron/tabs/root.

You might have done some damage to your system, if the file was not there.
Reply With Quote
Old 13th September 2010
BSDfan666 BSDfan666 is offline
Real Name: N/A, this is the interweb.
Helpful companion
 
Join Date: Apr 2008
Location: Ontario, Canada
Posts: 2,223
Thanked 193 Times in 184 Posts
Default

This looks to be quite the mess, I'd urge you to reinstall cleanly.. most definitely a support nightmare.
Reply With Quote
Old 13th September 2010
fbroce fbroce is offline
Port Guard
 
Join Date: Oct 2009
Posts: 11
Thanked 0 Times in 0 Posts
Default re 4.7

I did an upgrade from 4.6. It's possible that I mishandled mergemaster. Looks like it was my error in any case.

The system really is behaving well. I just noticed that some of the logs were growing more than I thought they should and realized that the root crontab was not installed.

Last edited by fbroce; 14th September 2010 at 05:15 PM.
Reply With Quote
Reply

Thread Tools
Display Modes

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is On
HTML code is Off

Forum Jump

Similar Threads
Thread Thread Starter Forum Replies Last Post
Default terminal color disappearedng FreeBSD General 5 21st February 2012 01:28 AM
Security by default bettyblue OpenBSD Security 4 30th May 2010 08:30 PM
Default message coloration cyril OpenBSD Installation and Upgrading 5 6th June 2009 02:13 PM
Crontab won't run script Petrocelli08 FreeBSD General 4 7th March 2009 04:19 AM
Crontab not working beandip FreeBSD General 6 6th August 2008 08:33 PM


All times are GMT. The time now is 12:00 PM.


Powered by vBulletin® Version 3.8.4
Copyright ©2000 - 2014, Jelsoft Enterprises Ltd.
Content copyright © 2007-2010, the authors
Daemon image copyright ©1988, Marshall Kirk McKusick