Merge branch 'vendor/OPENSSH'
[dragonfly.git] / share / man / man5 / periodic.conf.5
1 .\"-
2 .\" Copyright (c) 2000 Brian Somers <brian@Awfulhak.org>
3 .\" All rights reserved.
4 .\"
5 .\" Redistribution and use in source and binary forms, with or without
6 .\" modification, are permitted provided that the following conditions
7 .\" are met:
8 .\" 1. Redistributions of source code must retain the above copyright
9 .\"    notice, this list of conditions and the following disclaimer.
10 .\" 2. Redistributions in binary form must reproduce the above copyright
11 .\"    notice, this list of conditions and the following disclaimer in the
12 .\"    documentation and/or other materials provided with the distribution.
13 .\"
14 .\" THIS SOFTWARE IS PROVIDED BY THE AUTHOR AND CONTRIBUTORS ``AS IS'' AND
15 .\" ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE
16 .\" IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE
17 .\" ARE DISCLAIMED.  IN NO EVENT SHALL THE AUTHOR OR CONTRIBUTORS BE LIABLE
18 .\" FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL
19 .\" DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS
20 .\" OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION)
21 .\" HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT
22 .\" LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY
23 .\" OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF
24 .\" SUCH DAMAGE.
25 .\"
26 .\" $FreeBSD: src/share/man/man5/periodic.conf.5,v 1.8.2.22 2003/02/08 21:42:01 gshapiro Exp $
27 .\"
28 .Dd January 24, 2010
29 .Dt PERIODIC.CONF 5
30 .Os
31 .Sh NAME
32 .Nm periodic.conf
33 .Nd periodic job configuration information
34 .Sh DESCRIPTION
35 The file
36 .Nm
37 contains a description of how daily, weekly and monthly system maintenance
38 jobs should run.
39 It resides in the
40 .Pa /etc/defaults
41 directory and parts may be overridden by a file of the same name in
42 .Pa /etc ,
43 which itself may be overridden by the
44 .Pa /etc/periodic.conf.local
45 file.
46 .Pp
47 .Nm
48 is actually sourced as a shell script from each of the periodic scripts
49 and is intended to simply provide default configuration variables.
50 .Pp
51 The following variables are used by
52 .Xr periodic 8
53 itself:
54 .Bl -tag -offset 4n -width 2n
55 .It Va local_periodic
56 .Pq Vt str
57 List of directories to search for periodic scripts.
58 This list is always prefixed with
59 .Pa /etc/periodic ,
60 and is only used when an argument to
61 .Xr periodic 8
62 is not an absolute directory name.
63 .It Va dir Ns No _output
64 .Pq Vt path No or Vt list
65 What to do with the output of the scripts envoked from
66 the directory
67 .Ar dir .
68 If this variable is set to an absolute path name, output is logged to
69 that file, otherwise it is taken as one or more space separated email
70 addresses and mailed to those users.
71 If this variable is not set or is empty, output is sent to standard output.
72 .Pp
73 For an unattended machine, suitable values for
74 .Va daily_output ,
75 .Va weekly_output ,
76 and
77 .Va monthly_output
78 might be
79 .Pa /var/log/daily.log ,
80 .Pa /var/log/weekly.log ,
81 and
82 .Pa /var/log/monthly.log
83 respectively, as
84 .Xr newsyslog 8
85 will rotate these files (if they exists) at the appropriate times.
86 .It Va dir Ns No _show_success
87 .It Va dir Ns No _show_info
88 .It Va dir Ns No _show_badconfig
89 .Pq Vt bool
90 These variables control whether
91 .Xr periodic 8
92 will mask the output of the envoked scripts based on their return code
93 (where
94 .Ar dir
95 is the base directory name in which each script resides).
96 If the return code of a script is
97 .Sq 0
98 and
99 .Va dir Ns No _show_success
100 is set to
101 .Dq NO ,
102 .Xr periodic 8
103 will mask the script's output.
104 If the return code of a script is
105 .Sq 1
106 and
107 .Va dir Ns No _show_info
108 is set to
109 .Dq NO ,
110 .Xr periodic 8
111 will mask the script's output.
112 If the return code of a script is
113 .Sq 2
114 and
115 .Va dir Ns No _show_badconfig
116 is set to
117 .Dq NO ,
118 .Xr periodic 8
119 will mask the script's output.
120 If these variables are set to neither
121 .Dq YES
122 nor
123 .Dq NO ,
124 they default to
125 .Dq YES ,
126 .Dq YES
127 and
128 .Dq NO
129 respectively.
130 .Pp
131 Refer to the
132 .Xr periodic 8
133 man page for how script return codes are interpreted.
134 .El
135 .Pp
136 The following variables are used by the standard scripts that reside in
137 .Pa /etc/periodic/daily :
138 .Bl -tag -offset 4n -width 2n
139 .It Va daily_clean_disks_enable
140 .Pq Vt bool
141 Set to
142 .Dq YES
143 if you want to remove all files matching
144 .Va daily_clean_disks_files
145 daily.
146 .It Va daily_clean_disks_files
147 .Pq Vt str
148 Set to a list of file names to match.
149 Wild cards are permitted.
150 .It Va daily_clean_disks_days
151 .Pq Vt num
152 When
153 .Va daily_clean_disks_enable
154 is set to
155 .Dq YES ,
156 this must also be set to the number of days old that a file's access
157 and modification times must be before it's deleted.
158 .It Va daily_clean_disks_verbose
159 .Pq Vt bool
160 Set to
161 .Dq YES
162 if you want the removed files to be reported in your daily output.
163 .It Va daily_clean_tmps_enable
164 .Pq Vt bool
165 Set to
166 .Dq YES
167 if you want to clear temporary directories daily.
168 .It Va daily_clean_tmps_dirs
169 .Pq Vt str
170 Set to the list of directories to clear if
171 .Va daily_clean_tmps_enable
172 is set to
173 .Dq YES .
174 .It Va daily_clean_tmps_days
175 .Pq Vt num
176 When
177 .Va daily_clean_tmps_enable
178 is set, this must also be set to the number of days old that a file's access
179 and modification times must be before it's deleted.
180 .It Va daily_clean_tmps_ignore
181 .Pq Vt str
182 Set to the list of files that should not be deleted when
183 .Va daily_clean_tmps_enable
184 is set to
185 .Dq YES .
186 Wild card characters are permitted.
187 .It Va daily_clean_tmps_verbose
188 .Pq Vt bool
189 Set to
190 .Dq YES
191 if you want the removed files to be reported in your daily output.
192 .It Va daily_clean_preserve_enable
193 .Pq Vt bool
194 Set to
195 .Dq YES
196 if you wish to remove old files from
197 .Pa /var/preserve .
198 .It Va daily_clean_preserve_days
199 .Pq Vt num
200 Set to the number of days that files must not have been modified before
201 they are deleted.
202 .It Va daily_clean_preserve_verbose
203 .Pq Vt bool
204 Set to
205 .Dq YES
206 if you want the removed files to be reported in your daily output.
207 .It Va daily_clean_msgs_enable
208 .Pq Vt bool
209 Set to
210 .Dq YES
211 if you wish old system messages to be purged.
212 .It Va daily_clean_msgs_days
213 .Pq Vt num
214 Set to the number of days that files must not have been modified before
215 they are deleted.
216 If this variable is left blank, the
217 .Xr msgs 1
218 default is used.
219 .It Va daily_clean_rwho_enable
220 .Pq Vt bool
221 Set to
222 .Dq YES
223 if you wish old files in
224 .Pa /var/who
225 to be purged.
226 .It Va daily_clean_rwho_days
227 .Pq Vt num
228 Set to the number of days that files must not have been modified before
229 they are deleted.
230 .It Va daily_clean_rwho_verbose
231 .Pq Vt bool
232 Set to
233 .Dq YES
234 if you want the removed files to be reported in your daily output.
235 .It Va daily_clean_hoststat_enable
236 .Pq Vt bool
237 Set to
238 .Dq YES
239 to run
240 .Nm sendmail Fl bH
241 to automatically purge stale entries from
242 .Xr sendmail 8 Ns 's
243 host status cache.
244 Files will be deleted using the same criteria as
245 .Xr sendmail 8
246 would normally use when determining whether to believe the cached information,
247 as configured in
248 .Pa /etc/mail/sendmail.cf .
249 .It Va daily_clean_hammer_enable
250 .Pq Vt bool
251 Set to
252 .Dq YES
253 if you want
254 .Xr HAMMER 5
255 file systems to be snapshot, pruned and reblocked.
256 .It Va daily_clean_hammer_verbose
257 .Pq Vt bool
258 Set to
259 .Dq YES
260 if you wish more verbose output.
261 .It Va daily_backup_passwd_enable
262 .Pq Vt bool
263 Set to
264 .Dq YES
265 if you want the
266 .Pa /etc/master.passwd
267 and
268 .Pa /etc/group
269 files backed up and reported on.
270 Reporting consists of checking both files for modifications and running
271 .Xr chkgrp 8
272 on the
273 .Pa group
274 file.
275 .It Va daily_backup_aliases_enable
276 .Pq Vt bool
277 Set to
278 .Dq YES
279 if you want the
280 .Pa /etc/mail/aliases
281 file backed up and modifications to be displayed in your daily output.
282 .It Va daily_backup_distfile_enable
283 .Pq Vt bool
284 Set to
285 .Dq YES
286 if you want the
287 .Pa /etc/Distfile
288 file backed up and modifications to be displayed in your daily output.
289 .It Va daily_calendar_enable
290 .Pq Vt bool
291 Set to
292 .Dq YES
293 if you want to run
294 .Ic calendar -a
295 daily.
296 .It Va daily_accounting_enable
297 .Pq Vt bool
298 Set to
299 .Dq YES
300 if you want to rotate your daily accounting files.
301 No rotations are necessary unless
302 .Va accounting_enable
303 is enabled in
304 .Xr rc.conf 5 .
305 .It Va daily_accounting_compress
306 .Pq Vt bool
307 Set to
308 .Dq YES
309 if you want your daily accounting files to be compressed using
310 .Xr gzip 1 .
311 .It Va daily_accounting_save
312 .Pq Vt num
313 When
314 .Va daily_accounting_enable
315 is set, this may also be set to the number of daily accounting files that are
316 to be saved.
317 The default is
318 .Dq 3 .
319 .It Va daily_accounting_flags
320 .Pq Vt str
321 Set to the arguments to pass to the
322 .Xr sa 8
323 utility (in addition to
324 .Fl s )
325 when
326 .Va daily_accounting_enable
327 is set to
328 .Dq YES .
329 The default is
330 .Fl q .
331 .It Va daily_distfile_enable
332 .Pq Vt bool
333 Set to
334 .Dq YES
335 if you want to run
336 .Xr rdist 1
337 daily.
338 The
339 .Pa /etc/Distfile
340 file must also exist.
341 .It Va daily_news_expire_enable
342 .Pq Vt bool
343 Set to
344 .Dq YES
345 if you want to run
346 .Pa /etc/news.expire .
347 .It Va daily_status_disks_enable
348 .Pq Vt bool
349 Set to
350 .Dq YES
351 if you want to run
352 .Xr df 1
353 (with the arguments supplied in
354 .Va daily_status_disks_df_flags )
355 and
356 .Ic dump -W .
357 .It Va daily_status_disks_df_flags
358 .Pq Vt str
359 Set to the arguments for the
360 .Xr df 1
361 utility when
362 .Va daily_status_disks_enable
363 is set to
364 .Dq YES .
365 .It Va daily_status_network_enable
366 .Pq Vt bool
367 Set to
368 .Dq YES
369 if you want to run
370 .Ic netstat -i .
371 .It Va daily_status_network_usedns
372 .Pq Vt bool
373 Set to
374 .Dq YES
375 if you want to run
376 .Xr netstat 1
377 without the
378 .Fl n
379 option (to do DNS lookups).
380 .It Va daily_status_rwho_enable
381 .Pq Vt bool
382 Set to
383 .Dq YES
384 if you want to run
385 .Xr uptime 1
386 (or
387 .Xr ruptime 1
388 if
389 .Va rwhod_enable
390 is set to
391 .Dq YES
392 in
393 .Pa /etc/rc.conf ) .
394 .It Va daily_status_mailq_enable
395 .Pq Vt bool
396 Set to
397 .Dq YES
398 if you want to run
399 .Xr mailq 1 .
400 .It Va daily_status_mailq_shorten
401 .Pq Vt bool
402 Set to
403 .Dq YES
404 if you want to shorten the
405 .Nm mailq
406 output when
407 .Va daily_status_mailq_enable
408 is set to
409 .Dq YES .
410 .It Va daily_status_include_submit_mailq
411 .Pq Vt bool
412 Set to
413 .Dq YES
414 if you also want to run
415 .Xr mailq 1
416 on the submit mail queue when
417 .Va daily_status_mailq_enable
418 is set to
419 .Dq YES .
420 This may not work with MTAs other than
421 .Xr sendmail 8 .
422 .It Va daily_status_security_enable
423 .Pq Vt bool
424 Set to
425 .Dq YES
426 if you want to run the security check.
427 The security check is another set of
428 .Xr periodic 8
429 scripts.
430 The system defaults are in
431 .Pa /etc/periodic/security .
432 Local scripts should be placed in
433 .Pa /usr/local/etc/periodic/security .
434 See the
435 .Xr periodic 8
436 manual page for more information.
437 .It Va daily_status_security_inline
438 .Pq Vt bool
439 Set to
440 .Dq YES
441 if you want the security check output inline.
442 The default is to either mail or log the output according to the value of
443 .Va daily_status_security_output .
444 .It Va daily_status_security_logdir
445 .Pq Vt str
446 The directory where the security scripts expect the system's log files.
447 .It Va daily_status_security_output
448 .Pq Vt str
449 Where to send the output of the security check if
450 .Va daily_status_security_inline
451 is set to
452 .Dq NO .
453 This variable behaves in the same way as the
454 .Va *_output
455 variables above, namely it can be set either to one or more email addresses
456 or to an absolute file name.
457 .It Va daily_status_security_diff_flags
458 .Pq Vt str
459 Set to the arguments to pass to the
460 .Xr diff 1
461 utility when generating differences.
462 The default is
463 .Fl u .
464 .It Va daily_status_security_chksetuid_enable
465 .Pq Vt bool
466 Set to
467 .Dq YES
468 to compare the modes and modification times of setuid executables with
469 the previous day's values.
470 .It Va daily_status_security_chkmounts_enable
471 .Pq Vt bool
472 Set to
473 .Dq YES
474 to check for changes in mounted filesystems to the previous day's values.
475 .It Va daily_status_security_chkmounts_ignore
476 Set to the list of filesystem types that should not be checked when
477 .Va daily_status_security_chkmounts_enable
478 is set to
479 .Dq YES .
480 .It Va daily_status_security_noamd
481 .Pq Vt bool
482 Set to
483 .Dq YES
484 if you want to ignore
485 .Xr amd 8
486 mounts when comparing against yesterdays filesystem mounts in the
487 .Va daily_status_security_chkmounts_enable
488 check.
489 .It Va daily_status_security_nomfs
490 .Pq Vt bool
491 Set to
492 .Dq YES
493 if you want to ignore
494 .Xr mfs 8
495 mounts when comparing against yesterdays filesystem mounts in the
496 .Va daily_status_security_chkmounts_enable
497 check.
498 .It Va daily_status_security_chkuid0_enable
499 .Pq Vt bool
500 Set to
501 .Dq YES
502 to check
503 .Pa /etc/master.passwd
504 for accounts with uid 0.
505 .It Va daily_status_security_passwdless_enable
506 .Pq Vt bool
507 Set to
508 .Dq YES
509 to check
510 .Pa /etc/master.passwd
511 for accounts with empty passwords.
512 .It Va daily_status_security_logincheck_enable
513 .Pq Vt bool
514 Set to
515 .Dq Li YES
516 to check
517 .Pa /etc/login.conf
518 ownership, see
519 .Xr login.conf 5
520 for more information.
521 .It Va daily_status_security_ipfwdenied_enable
522 .Pq Vt bool
523 Set to
524 .Dq YES
525 to show log entries for packets denied by
526 .Xr ipfw 8
527 since yesterday's check.
528 .It Va daily_status_security_pfdenied_enable
529 .Pq Vt bool
530 Set to
531 .Dq YES
532 to show log entries for packets denied by
533 .Xr pf 4
534 since yesterday's check.
535 .It Va daily_status_security_ipfwlimit_enable
536 .Pq Vt bool
537 Set to
538 .Dq YES
539 to display
540 .Xr ipfw 8
541 rules that have reached their verbosity limit.
542 .It Va daily_status_security_ip6fwdenied_enable
543 .Pq Vt bool
544 Set to
545 .Dq YES
546 to show log entries for packets denied by
547 .Xr ip6fw 8
548 since yesterday's check.
549 .It Va daily_status_security_ip6fwlimit_enable
550 .Pq Vt bool
551 Set to
552 .Dq YES
553 to display
554 .Xr ip6fw 8
555 rules that have reached their verbosity limit.
556 .It Va daily_status_pkgsrc_audit_enable
557 .Pq Vt bool
558 Set to
559 .Dq YES
560 to check the currently installed packages against a database of known
561 vulnerabilities and report those that are vulnerable.
562 .It Va daily_status_pkgsrc_check_signatures
563 .Pq Vt bool
564 Set to
565 .Dq YES
566 to check the digital signature of all files installed by packages against
567 the expected values stored in the packages database.
568 .It Va daily_status_pkgsrc_fetch_vulnerabilities
569 .Pq Vt bool
570 Set to
571 .Dq YES
572 to refresh the local database of package vulnerabilities.
573 .It Va daily_status_security_kernelmsg_enable
574 .Pq Vt bool
575 Set to
576 .Dq YES
577 to show new
578 .Xr dmesg 8
579 entries since yesterday's check.
580 .It Va daily_status_security_loginfail_enable
581 .Pq Vt bool
582 Set to
583 .Dq YES
584 to display failed logins from
585 .Pa /var/log/messages
586 in the previous day.
587 .It Va daily_status_security_tcpwrap_enable
588 .Pq Vt bool
589 Set to
590 .Dq YES
591 to display connections denied by tcpwrappers (see
592 .Xr hosts_access 5 )
593 from
594 .Pa /var/log/messages
595 during the previous day.
596 .It Va daily_status_mail_rejects_enable
597 .Pq Vt bool
598 Set to
599 .Dq YES
600 if you want to summarise mail rejections logged to
601 .Pa /var/log/maillog
602 for the previous day.
603 .It Va daily_status_mail_rejects_logs
604 .Pq Vt num
605 Set to the number of maillog files that should be checked
606 for yesterday's mail rejects.
607 .It Va daily_status_named_enable
608 .Pq Vt bool
609 Set to
610 .Dq YES
611 if you want to summarise denied zone transfers (AXFR and IXFR)
612 for the previous day.
613 .It Va daily_status_named_usedns
614 .Pq Vt bool
615 Set to
616 .Dq YES
617 if you want to enable reverse DNS lookups.
618 .It Va daily_queuerun_enable
619 .Pq Vt bool
620 Set to
621 .Dq YES
622 if you want to manually run the mail queue at least once a day.
623 .It Va daily_submit_queuerun
624 .Pq Vt bool
625 Set to
626 .Dq YES
627 if you also want to manually run the submit mail queue at least once a day
628 when
629 .Va daily_queuerun_enable
630 is set to
631 .Dq YES .
632 .It Va daily_local
633 .Pq Vt str
634 Set to a list of extra scripts that should be run after all other
635 daily scripts.
636 All scripts must be absolute path names.
637 .El
638 .Pp
639 The following variables are used by the standard scripts that reside in
640 .Pa /etc/periodic/weekly :
641 .Bl -tag -offset 4n -width 2n
642 .It Va weekly_clean_kvmdb_enable
643 .Pq Vt bool
644 Set to
645 .Dq YES
646 if you want to purge old
647 .Pa /var/db/kvm_*.db
648 files.
649 The kvm file for the current kernel will not be purged.
650 .It Va weekly_clean_kvmdb_days
651 .Pq Vt num
652 Set to the number of days that the file must not have been accessed
653 before being deleted.
654 .It Va weekly_clean_kvmdb_verbose
655 .Pq Vt bool
656 Set to
657 .Dq YES
658 if you want the removed files to be reported in your weekly output.
659 .It Va weekly_locate_enable
660 .Pq Vt bool
661 Set to
662 .Dq YES
663 if you want to run
664 .Pa /usr/libexec/locate.updatedb .
665 This script is run using
666 .Ic nice -5
667 as user
668 .An nobody ,
669 and generates the table used by the
670 .Xr locate 1
671 command.
672 .It Va weekly_whatis_enable
673 .Pq Vt bool
674 Set to
675 .Dq YES
676 if you want to run
677 .Pa /usr/libexec/makewhatis.local .
678 This script regenerates the database used by the
679 .Xr apropos 1
680 command.
681 .It Va weekly_catman_enable
682 .Pq Vt bool
683 Set to
684 .Dq YES
685 if you want to run
686 .Pa /usr/libexec/catman.local .
687 This script processes all out of date man pages, speeding up the
688 .Xr man 1
689 command at the expense of disk space.
690 .It Va weekly_noid_enable
691 .Pq Vt bool
692 Set to
693 .Dq YES
694 if you want to locate orphaned files on the system.
695 An orphaned file is one with an invalid owner or group.
696 .It Va weekly_noid_dirs
697 .Pq Vt str
698 A list of directories under which orphaned files are searched for.
699 This would usually be set to
700 .Pa / .
701 .It Va weekly_local
702 .Pq Vt str
703 Set to a list of extra scripts that should be run after all other
704 weekly scripts.
705 All scripts must be absolute path names.
706 .El
707 .Pp
708 The following variables are used by the standard scripts that reside in
709 .Pa /etc/periodic/monthly :
710 .Bl -tag -offset 4n -width 2n
711 .It Va monthly_accounting_enable
712 .Pq Vt bool
713 Set to
714 .Dq YES
715 if you want to do login accounting using the
716 .Xr ac 8
717 command.
718 .It Va monthly_statistics_enable
719 .Pq Vt bool
720 Set to
721 .Dq YES
722 if you want to report non-identifying information about the OS to the
723 .Pa http://www.bsdstats.org
724 community site on the internet.
725 .It Va monthly_statistics_report_devices
726 .Pq Vt bool
727 When
728 .Va monthly_statistics_report_devices
729 is set, this may also be set to report additional device statistics.
730 .It Va monthly_local
731 .Pq Vt str
732 Set to a list of extra scripts that should be run after all other
733 monthly scripts.
734 All scripts must be absolute path names.
735 .El
736 .Sh FILES
737 .Bl -tag -width /etc/defaults/periodic.conf
738 .It Pa /etc/defaults/periodic.conf
739 The default configuration file.
740 This file contains all default variables and values.
741 .It Pa /etc/periodic.conf
742 The usual system specific variable override file.
743 .It Pa /etc/periodic.conf.local
744 An additional override file, useful when
745 .Pa /etc/periodic.conf
746 is shared or distributed.
747 .El
748 .Sh SEE ALSO
749 .Xr apropos 1 ,
750 .Xr calendar 1 ,
751 .Xr df 1 ,
752 .Xr diff 1 ,
753 .Xr gzip 1 ,
754 .Xr locate 1 ,
755 .Xr man 1 ,
756 .Xr msgs 1 ,
757 .Xr netstat 1 ,
758 .Xr nice 1 ,
759 .Xr rdist 1 ,
760 .Xr rc.conf 5 ,
761 .Xr ac 8 ,
762 .Xr amd 8 ,
763 .Xr chkgrp 8 ,
764 .Xr dump 8 ,
765 .Xr mfs 8 ,
766 .Xr newsyslog 8 ,
767 .Xr periodic 8 ,
768 .Xr sendmail 8
769 .Sh HISTORY
770 The
771 .Nm
772 file appeared in
773 .Fx 4.1 .
774 .Sh AUTHORS
775 .An Brian Somers Aq brian@Awfulhak.org .