Sponsored Content
Operating Systems BSD NetBSD Accidently deleted crontab for root Post 302767989 by batence on Thursday 7th of February 2013 10:17:47 PM
Old 02-07-2013
NetBSD Accidently deleted crontab for root

Someone can told me where from get the default crontab settings of root for NetBSD 6.0 please Smilie

### SOLVED ###
The default crontab rules are in etc.tgz /var/cron/tabs/root

Code:
#	$NetBSD: crontab,v 1.15 2002/11/27 15:09:17 perry Exp $
#
# /var/cron/tabs/root - root's crontab for NetBSD
#
SHELL=/bin/sh
PATH=/bin:/sbin:/usr/bin:/usr/sbin
HOME=/var/log
CRON_WITHIN=7200
#
#minute	hour	mday	month	wday	command
#
*/10	*	*	*	*	/usr/libexec/atrun
#
# rotate log files every hour, if necessary
0	*	*	*	*	/usr/bin/newsyslog
#
# do daily/weekly/monthly maintenance
15	3	*	*	*	/bin/sh /etc/daily 2>&1 | tee /var/log/daily.out | sendmail -t
30	4	*	*	6	/bin/sh /etc/weekly 2>&1 | tee /var/log/weekly.out | sendmail -t
#30	5	1	*	*	/bin/sh /etc/monthly 2>&1 | tee /var/log/monthly.out | sendmail -t


Last edited by batence; 02-08-2013 at 06:16 AM..
This User Gave Thanks to batence For This Post:
 

9 More Discussions You Might Find Interesting

1. UNIX for Advanced & Expert Users

crontab entries deleted !!

Hi all, A friend of mine accidently erased all crontab entries by typing crontab -r. Can anyone pls. help me on this. Is it possible that a backup file is available other than files from the backup tape. Or is it retrievable ??? Thnx, MK (6 Replies)
Discussion started by: minazk
6 Replies

2. UNIX for Dummies Questions & Answers

crontab deleted accidently

I issued crontab -r accidently instead of crontab -e..n the crontab file got deleted.. is there a way to retrive it?:-( thank you:( (3 Replies)
Discussion started by: unisam
3 Replies

3. UNIX for Advanced & Expert Users

only root's crontab gets not saved

Hi, Something funny is happening over here: when a regular user edits his cron-file (crontab -e) saves and exits vi the correct new cron-file gets installed and saved to disk. But if root does the same, vi saves it but if I then check the cron-file it has the previous contents! I did strace (==... (1 Reply)
Discussion started by: flok
1 Replies

4. AIX

Crontab cannot run by non-root user

Good morning everybody. I have just receiedv a complaint from our DBA saying that if he create a scripts to run some Oracle performance scripts using crontab and the scheduling part is ok but the job is failed when I checked on /var/adm/cron/log. I have tried his scripts using Oracle id directly... (4 Replies)
Discussion started by: kwliew999
4 Replies

5. BSD

Netbsd root device not found

Hello there. I installed NetBSD yesterday on an older system to try it out. Everytime I boot, I have to enter in the root device (disk) manually wd0 which then proceeds into asking to define the dump device: is the default then, the sbin/init My question is where am I supposed to... (1 Reply)
Discussion started by: septima.pars
1 Replies

6. Shell Programming and Scripting

Who deleted crontab?

We are using SunOS 5.10 and Korn Shell. If we need to figure out who deleted our crontab file for a particular user what do we do. Thanks in Advance!! ---------- Post updated at 08:08 AM ---------- Previous update was at 07:19 AM ---------- Friends, Please help.... (5 Replies)
Discussion started by: mehimadri
5 Replies

7. Solaris

crontab -e as root

So I'm having a problem with crontab -e. It seems like it should work. And it seems like I should know the answer to this question. $ su - # echo $SHELL /bin/sh # crontab -e 372 Any thoughts? (2 Replies)
Discussion started by: adelsin
2 Replies

8. UNIX for Dummies Questions & Answers

Deleted the scripts in Crontab by mistake

hi, instead of typing crontab -e i gave crontab -r and hit enter. So i lost all my scripts. Is there any way to restore the deleted scripts? Please help me out Thanks Ajay (3 Replies)
Discussion started by: ajayakunuri
3 Replies

9. Shell Programming and Scripting

Accidently deleted /usr contents.

Hi I have the following code which was supposed to clean up a directory when the number of files in that directory exeeded 2.The code is given below. #!/usr/bin/ksh dir_num=`/usr/bin/find /var/.audit -type d | /usr/bin/wc -l` if then oldest_file=`/usr/bin/ls -1t | /usr/bin/tail... (19 Replies)
Discussion started by: chacko193
19 Replies
cron(1M)						  System Administration Commands						  cron(1M)

NAME
cron - clock daemon SYNOPSIS
/usr/sbin/cron DESCRIPTION
cron starts a process that executes commands at specified dates and times. You can specify regularly scheduled commands to cron according to instructions found in crontab files in the directory /var/spool/cron/crontabs. Users can submit their own crontab file using the crontab(1) command. Commands which are to be executed only once can be submitted using the at(1) command. cron only examines crontab or at command files during its own process initialization phase and when the crontab or at command is run. This reduces the overhead of checking for new or changed files at regularly scheduled intervals. As cron never exits, it should be executed only once. This is done routinely by way of the svc:/system/cron:default service. The file /etc/cron.d/FIFO file is used as a lock file to prevent the execution of more than one instance of cron. cron captures the output of the job's stdout and stderr streams, and, if it is not empty, mails the output to the user. If the job does not produce output, no mail is sent to the user. An exception is if the job is an at(1) job and the -m option was specified when the job was submitted. cron and at jobs are not executed if your account is locked. Jobs and processses execute. The shadow(4) file defines which accounts are not locked and will have their jobs and processes executed. Setting cron Jobs Across Timezones The timezone of the cron daemon sets the system-wide timezone for cron entries. This, in turn, is by set by default system-wide using /etc/default/init. If some form of daylight savings or summer/winter time is in effect, then jobs scheduled during the switchover period could be executed once, twice, or not at all. Setting cron Defaults To keep a log of all actions taken by cron, you must specify CRONLOG=YES in the /etc/default/cron file. If you specify CRONLOG=NO, no log- ging is done. Keeping the log is a user configurable option since cron usually creates huge log files. You can specify the PATH for user cron jobs by using PATH= in /etc/default/cron. You can set the PATH for root cron jobs using SUPATH= in /etc/default/cron. Carefully consider the security implications of setting PATH and SUPATH. Example /etc/default/cron file: CRONLOG=YES PATH=/usr/bin:/usr/ucb: This example enables logging and sets the default PATH used by non-root jobs to /usr/bin:/usr/ucb:. Root jobs continue to use /usr/sbin:/usr/bin. The cron log file is periodically rotated by logadm(1M). FILES
/etc/cron.d Main cron directory /etc/cron.d/FIFO Lock file /etc/default/cron cron default settings file /var/cron/log cron history information /var/spool/cron Spool area /etc/cron.d/queuedefs Queue description file for at, batch, and cron /etc/logadm.conf Configuration file for logadm ATTRIBUTES
See attributes(5) for descriptions of the following attributes: +-----------------------------+-----------------------------+ | ATTRIBUTE TYPE | ATTRIBUTE VALUE | +-----------------------------+-----------------------------+ |Availability |SUNWcsu | +-----------------------------+-----------------------------+ SEE ALSO
svcs(1), at(1), crontab(1), sh(1), logadm(1M), svcadm(1M), queuedefs(4), shadow(4), attributes(5), smf(5) NOTES
The cron service is managed by the service management facility, smf(5), under the service identifier: svc:/system/cron:default Administrative actions on this service, such as enabling, disabling, or requesting restart, can be performed using svcadm(1M). The ser- vice's status can be queried using the svcs(1) command. DIAGNOSTICS
A history of all actions taken by cron is stored in /var/cron/log and possibly in /var/cron/olog. SunOS 5.10 5 Aug 2004 cron(1M)
All times are GMT -4. The time now is 12:39 PM.
Unix & Linux Forums Content Copyright 1993-2022. All Rights Reserved.
Privacy Policy