]> CyberLeo.Net >> Repos - FreeBSD/FreeBSD.git/blob - share/man/man5/periodic.conf.5
Add a periodic script to backup output generated from `zfs list`, `zfs get`,
[FreeBSD/FreeBSD.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$
27 .\"
28 .Dd November 6, 2020
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 The
48 .Nm
49 file
50 is actually sourced as a shell script from each of the periodic scripts
51 and is intended to simply provide default configuration variables.
52 .Pp
53 The following variables are used by
54 .Xr periodic 8
55 itself:
56 .Bl -tag -offset 4n -width 2n
57 .It Va local_periodic
58 .Pq Vt str
59 List of directories to search for periodic scripts.
60 This list is always prefixed with
61 .Pa /etc/periodic ,
62 and is only used when an argument to
63 .Xr periodic 8
64 is not an absolute directory name.
65 .It Ao Ar dir Ac Ns Va _output
66 .Pq Vt path No or Vt list
67 What to do with the output of the scripts executed from
68 the directory
69 .Ar dir .
70 If this variable is set to an absolute path name, output is logged to
71 that file, otherwise it is taken as one or more space separated email
72 addresses and mailed to those users.
73 If this variable is not set or is empty, output is sent to standard output.
74 .Pp
75 For an unattended machine, suitable values for
76 .Va daily_output ,
77 .Va weekly_output ,
78 and
79 .Va monthly_output
80 might be
81 .Dq Li /var/log/daily.log ,
82 .Dq Li /var/log/weekly.log ,
83 and
84 .Dq Li /var/log/monthly.log
85 respectively, as
86 .Xr newsyslog 8
87 will rotate these files (if they exists) at the appropriate times.
88 .It Ao Ar dir Ac Ns Va _show_success
89 .It Ao Ar dir Ac Ns Va _show_info
90 .It Ao Ar dir Ac Ns Va _show_badconfig
91 .Pq Vt bool
92 These variables control whether
93 .Xr periodic 8
94 will mask the output of the executed scripts based on their return code
95 (where
96 .Ar dir
97 is the base directory name in which each script resides).
98 If the return code of a script is
99 .Sq 0
100 and
101 .Ao Ar dir Ac Ns Va _show_success
102 is set to
103 .Dq Li NO ,
104 .Xr periodic 8
105 will mask the script's output.
106 If the return code of a script is
107 .Sq 1
108 and
109 .Ao Ar dir Ac Ns Va _show_info
110 is set to
111 .Dq Li NO ,
112 .Xr periodic 8
113 will mask the script's output.
114 If the return code of a script is
115 .Sq 2
116 and
117 .Ao Ar dir Ac Ns Va _show_badconfig
118 is set to
119 .Dq Li NO ,
120 .Xr periodic 8
121 will mask the script's output.
122 If these variables are set to neither
123 .Dq Li YES
124 nor
125 .Dq Li NO ,
126 they default to
127 .Dq Li YES ,
128 .Dq Li YES
129 and
130 .Dq Li NO
131 respectively.
132 .Pp
133 Refer to the
134 .Xr periodic 8
135 manual page for how script return codes are interpreted.
136 .It Va anticongestion_sleeptime
137 .Pq Vt int
138 The maximum number of seconds to randomly sleep in order to smooth bursty loads
139 on a shared resource, such as a download mirror.
140 .El
141 .Pp
142 The following variables are used by the standard scripts that reside in
143 .Pa /etc/periodic/daily :
144 .Bl -tag -offset 4n -width 2n
145 .It Va daily_clean_disks_enable
146 .Pq Vt bool
147 Set to
148 .Dq Li YES
149 if you want to remove all files matching
150 .Va daily_clean_disks_files
151 daily.
152 .It Va daily_clean_disks_files
153 .Pq Vt str
154 Set to a list of file names to match.
155 Wild cards are permitted.
156 .It Va daily_clean_disks_days
157 .Pq Vt num
158 When
159 .Va daily_clean_disks_enable
160 is set to
161 .Dq Li YES ,
162 this must also be set to the number of days old that a file's access
163 and modification times must be before it is deleted.
164 .It Va daily_clean_disks_verbose
165 .Pq Vt bool
166 Set to
167 .Dq Li YES
168 if you want the removed files to be reported in your daily output.
169 .It Va daily_clean_tmps_enable
170 .Pq Vt bool
171 Set to
172 .Dq Li YES
173 if you want to clear temporary directories daily.
174 .It Va daily_clean_tmps_dirs
175 .Pq Vt str
176 Set to the list of directories to clear if
177 .Va daily_clean_tmps_enable
178 is set to
179 .Dq Li YES .
180 .It Va daily_clean_tmps_days
181 .Pq Vt num
182 When
183 .Va daily_clean_tmps_enable
184 is set, this must also be set to the number of days old that a file's access
185 and modification times must be before it is deleted.
186 .It Va daily_clean_tmps_ignore
187 .Pq Vt str
188 Set to the list of files that should not be deleted when
189 .Va daily_clean_tmps_enable
190 is set to
191 .Dq Li YES .
192 Wild card characters are permitted.
193 .It Va daily_clean_tmps_verbose
194 .Pq Vt bool
195 Set to
196 .Dq Li YES
197 if you want the removed files to be reported in your daily output.
198 .It Va daily_clean_preserve_enable
199 .Pq Vt bool
200 Set to
201 .Dq Li YES
202 if you wish to remove old files from
203 .Pa /var/preserve .
204 .It Va daily_clean_preserve_days
205 .Pq Vt num
206 Set to the number of days that files must not have been modified before
207 they are deleted.
208 .It Va daily_clean_preserve_verbose
209 .Pq Vt bool
210 Set to
211 .Dq Li YES
212 if you want the removed files to be reported in your daily output.
213 .It Va daily_clean_msgs_enable
214 .Pq Vt bool
215 Set to
216 .Dq Li YES
217 if you wish old system messages to be purged.
218 .It Va daily_clean_msgs_days
219 .Pq Vt num
220 Set to the number of days that files must not have been modified before
221 they are deleted.
222 If this variable is left blank, the
223 .Xr msgs 1
224 default is used.
225 .It Va daily_clean_rwho_enable
226 .Pq Vt bool
227 Set to
228 .Dq Li YES
229 if you wish old files in
230 .Pa /var/who
231 to be purged.
232 .It Va daily_clean_rwho_days
233 .Pq Vt num
234 Set to the number of days that files must not have been modified before
235 they are deleted.
236 .It Va daily_clean_rwho_verbose
237 .Pq Vt bool
238 Set to
239 .Dq Li YES
240 if you want the removed files to be reported in your daily output.
241 .It Va daily_clean_hoststat_enable
242 .Pq Vt bool
243 Set to
244 .Dq Li YES
245 to run
246 .Nm sendmail Fl bH
247 to automatically purge stale entries from
248 .Xr sendmail 8 Ns 's
249 host status cache.
250 Files will be deleted using the same criteria as
251 .Xr sendmail 8
252 would normally use when determining whether to believe the cached information,
253 as configured in
254 .Pa /etc/mail/sendmail.cf .
255 .It Va daily_backup_efi_enable
256 .Pq Vt bool
257 Set to
258 .Dq Li YES
259 to create backup of EFI System Partition (ESP).
260 .It Va daily_backup_gpart_enable
261 .Pq Vt bool
262 Set to
263 .Dq Li YES
264 to create backups of partition tables, and bootcode partition contents.
265 .It Va daily_backup_gpart_verbose
266 .Pq Vt bool
267 Set to
268 .Dq Li YES
269 to be verbose if existing backups for kern.geom.conftxt or the partition tables differ
270 from the new backups.
271 .It Va daily_backup_passwd_enable
272 .Pq Vt bool
273 Set to
274 .Dq Li YES
275 if you want the
276 .Pa /etc/master.passwd
277 and
278 .Pa /etc/group
279 files backed up and reported on.
280 Reporting consists of checking both files for modifications and running
281 .Xr chkgrp 8
282 on the
283 .Pa group
284 file.
285 .It Va daily_backup_aliases_enable
286 .Pq Vt bool
287 Set to
288 .Dq Li YES
289 if you want the
290 .Pa /etc/mail/aliases
291 file backed up and modifications to be displayed in your daily output.
292 .It Va daily_backup_zfs_enable
293 .Pq Vt bool
294 Set to
295 .Dq Li YES
296 to create backup of the output generated from the
297 .Xr zfs-list 8
298 and
299 .Xr zpool-list 8
300 utilities.
301 .It Va daily_backup_zfs_list_flags
302 .Pq Vt str
303 Set to the arguments for the
304 .Xr zfs-list 8
305 utility.
306 The default is standard behavior.
307 .It Va daily_backup_zpool_list_flags
308 .Pq Vt str
309 Set to the arguments for the
310 .Xr zpool-list 8
311 utility.
312 The default is
313 .Fl v .
314 .It Va daily_backup_zfs_props_enable
315 .Pq Vt bool
316 Set to
317 .Dq Li YES
318 to create backup of the output generated from the
319 .Xr zfs-get 8
320 and
321 .Xr zpool-get 8
322 utilities.
323 .It Va daily_backup_zfs_get_flags
324 .Pq Vt str
325 Set to the arguments for the
326 .Xr zfs-get 8
327 utility.
328 The default is
329 .Cm all .
330 .It Va daily_backup_zpool_get_flags
331 .Pq Vt str
332 Set to the arguments for the
333 .Xr zpool-get 8
334 utility.
335 The default is
336 .Cm all .
337 .It Va daily_backup_zfs_verbose
338 .Pq Vt bool
339 Set to
340 .Dq Li YES
341 to report a diff between the new backup and the existing backup
342 in the daily output.
343 .It Va daily_calendar_enable
344 .Pq Vt bool
345 Set to
346 .Dq Li YES
347 if you want to run
348 .Nm calendar Fl a
349 daily.
350 .It Va daily_accounting_enable
351 .Pq Vt bool
352 Set to
353 .Dq Li YES
354 if you want to rotate your daily accounting files.
355 No rotations are necessary unless
356 .Va accounting_enable
357 is enabled in
358 .Xr rc.conf 5 .
359 .It Va daily_accounting_compress
360 .Pq Vt bool
361 Set to
362 .Dq Li YES
363 if you want your daily accounting files to be compressed using
364 .Xr gzip 1 .
365 .It Va daily_accounting_save
366 .Pq Vt num
367 When
368 .Va daily_accounting_enable
369 is set, this may also be set to the number of daily accounting files that are
370 to be saved.
371 The default is
372 .Dq Li 3 .
373 .It Va daily_accounting_flags
374 .Pq Vt str
375 Set to the arguments to pass to the
376 .Xr sa 8
377 utility (in addition to
378 .Fl s )
379 when
380 .Va daily_accounting_enable
381 is set to
382 .Dq Li YES .
383 The default is
384 .Fl q .
385 .It Va daily_news_expire_enable
386 .Pq Vt bool
387 Set to
388 .Dq Li YES
389 if you want to run
390 .Pa /etc/news.expire .
391 .It Va daily_status_disks_enable
392 .Pq Vt bool
393 Set to
394 .Dq Li YES
395 if you want to run
396 .Xr df 1
397 (with the arguments supplied in
398 .Va daily_status_disks_df_flags )
399 and
400 .Nm dump Fl W .
401 .It Va daily_status_disks_df_flags
402 .Pq Vt str
403 Set to the arguments for the
404 .Xr df 1
405 utility when
406 .Va daily_status_disks_enable
407 is set to
408 .Dq Li YES .
409 The default is
410 .Fl l Fl h .
411 .It Va daily_status_zfs_enable
412 .Pq Vt bool
413 Set to
414 .Dq Li YES
415 if you want to run
416 .Nm zpool Cm status
417 on your
418 .Xr zfs 8
419 pools.
420 .It Va daily_status_zfs_zpool_list_enable
421 .Pq Vt bool
422 Set to
423 .Dq Li YES
424 if you want to run
425 .Nm zpool Cm list
426 on your
427 .Xr zfs 8
428 pools.
429 Requires
430 .Va daily_status_zfs_enable
431 to be set to
432 .Li YES .
433 .It Va daily_status_gmirror_enable
434 .Pq Vt bool
435 Set to
436 .Dq Li YES
437 if you want to run
438 .Nm gmirror Cm status
439 on your
440 .Xr gmirror 8
441 devices.
442 .It Va daily_status_graid3_enable
443 .Pq Vt bool
444 Set to
445 .Dq Li YES
446 if you want to run
447 .Nm graid3 Cm status
448 on your
449 .Xr graid3 8
450 devices.
451 .It Va daily_status_gstripe_enable
452 .Pq Vt bool
453 Set to
454 .Dq Li YES
455 if you want to run
456 .Nm gstripe Cm status
457 on your
458 .Xr gstripe 8
459 devices.
460 .It Va daily_status_gconcat_enable
461 .Pq Vt bool
462 Set to
463 .Dq Li YES
464 if you want to run
465 .Nm gconcat Cm status
466 on your
467 .Xr gconcat 8
468 devices.
469 .It Va daily_status_mfi_enable
470 .Pq Vt bool
471 Set to
472 .Dq Li YES
473 if you want to run
474 .Nm mfiutil Cm status
475 on your
476 .Xr mfi 4
477 devices.
478 .It Va daily_status_network_enable
479 .Pq Vt bool
480 Set to
481 .Dq Li YES
482 if you want to run
483 .Nm netstat Fl i .
484 .It Va daily_status_network_netstat_flags
485 .Pq Vt str
486 Set to additional arguments for the
487 .Xr netstat 1
488 utility when
489 .Va daily_status_network_enable
490 is set to
491 .Dq Li YES .
492 The default is
493 .Fl d W .
494 .It Va daily_status_network_usedns
495 .Pq Vt bool
496 Set to
497 .Dq Li YES
498 if you want to run
499 .Xr netstat 1
500 without the
501 .Fl n
502 option (to do DNS lookups).
503 .It Va daily_status_uptime_enable
504 .Pq Vt bool
505 Set to
506 .Dq Li YES
507 if you want to run
508 .Xr uptime 1
509 (or
510 .Xr ruptime 1
511 if
512 .Va rwhod_enable
513 is set to
514 .Dq Li YES
515 in
516 .Pa /etc/rc.conf ) .
517 .It Va daily_status_mailq_enable
518 .Pq Vt bool
519 Set to
520 .Dq Li YES
521 if you want to run
522 .Xr mailq 1 .
523 .It Va daily_status_mailq_shorten
524 .Pq Vt bool
525 Set to
526 .Dq Li YES
527 if you want to shorten the
528 .Xr mailq 1
529 output when
530 .Va daily_status_mailq_enable
531 is set to
532 .Dq Li YES .
533 .It Va daily_status_include_submit_mailq
534 .Pq Vt bool
535 Set to
536 .Dq Li YES
537 if you also want to run
538 .Xr mailq 1
539 on the submit mail queue when
540 .Va daily_status_mailq_enable
541 is set to
542 .Dq Li YES .
543 This may not work with MTAs other than
544 .Xr sendmail 8 .
545 .It Va daily_status_security_enable
546 .Pq Vt bool
547 Set to
548 .Dq Li YES
549 if you want to run the security check.
550 The security check is another set of
551 .Xr periodic 8
552 scripts.
553 The system defaults are in
554 .Pa /etc/periodic/security .
555 Local scripts should be placed in
556 .Pa /usr/local/etc/periodic/security .
557 See the
558 .Xr periodic 8
559 manual page for more information.
560 .It Va daily_status_security_inline
561 .Pq Vt bool
562 Set to
563 .Dq Li YES
564 if you want the security check output inline.
565 The default is to either mail or log the output according to the value of
566 .Va daily_status_security_output .
567 .It Va daily_status_security_output
568 .Pq Vt str
569 Where to send the output of the security check if
570 .Va daily_status_security_inline
571 is set to
572 .Dq Li NO .
573 This variable behaves in the same way as the
574 .Va *_output
575 variables above, namely it can be set either to one or more email addresses
576 or to an absolute file name.
577 .It Va daily_status_mail_rejects_enable
578 .Pq Vt bool
579 Set to
580 .Dq Li YES
581 if you want to summarise mail rejections logged to
582 .Pa /var/log/maillog
583 for the previous day.
584 .It Va daily_status_mail_rejects_logs
585 .Pq Vt num
586 Set to the number of maillog files that should be checked
587 for yesterday's mail rejects.
588 .It Va daily_status_ntpd_enable
589 .Pq Vt bool
590 Set to
591 .Dq Li YES
592 if you want to enable NTP status check.
593 .It Va daily_status_world_kernel
594 .Pq Vt bool
595 Set to
596 .Dq Li YES
597 to check the running userland and kernel are in sync.
598 .It Va daily_queuerun_enable
599 .Pq Vt bool
600 Set to
601 .Dq Li YES
602 if you want to manually run the mail queue at least once a day.
603 .It Va daily_submit_queuerun
604 .Pq Vt bool
605 Set to
606 .Dq Li YES
607 if you also want to manually run the submit mail queue at least once a day
608 when
609 .Va daily_queuerun_enable
610 is set to
611 .Dq Li YES .
612 .It Va daily_scrub_zfs_enable
613 .Pq Vt bool
614 Set to
615 .Dq Li YES
616 if you want to run a zfs scrub periodically.
617 .It Va daily_scrub_zfs_pools
618 .Pq Vt str
619 A space separated list of names of zfs pools to scrub.
620 If the list is empty or not set, all zfs pools are scrubbed.
621 .It Va daily_scrub_zfs_default_threshold
622 .Pq Vt int
623 Number of days between a scrub if no pool-specific threshold is set.
624 If not set, the default value is 35, corresponding to 5 weeks.
625 .It Va daily_scrub_zfs_ Ns Ao Ar poolname Ac Ns Va _threshold
626 .Pq Vt int
627 The same as
628 .Va daily_scrub_zfs_default_threshold
629 but specific to the pool
630 .Ao Ar poolname Ac Ns .
631 .It Va daily_local
632 .Pq Vt str
633 Set to a list of extra scripts that should be run after all other
634 daily scripts.
635 All scripts must be absolute path names.
636 .El
637 .Pp
638 The following variables are used by the standard scripts that reside in
639 .Pa /etc/periodic/weekly :
640 .Bl -tag -offset 4n -width 2n
641 .It Va weekly_locate_enable
642 .Pq Vt bool
643 Set to
644 .Dq Li YES
645 if you want to run
646 .Pa /usr/libexec/locate.updatedb .
647 This script is run using
648 .Nm nice Fl 5
649 as user
650 .Dq Li nobody ,
651 and generates the table used by the
652 .Xr locate 1
653 command.
654 .It Va weekly_whatis_enable
655 .Pq Vt bool
656 Set to
657 .Dq Li YES
658 if you want to run
659 .Pa /usr/libexec/makewhatis.local .
660 This script regenerates the database used by the
661 .Xr apropos 1
662 command.
663 .It Va weekly_noid_enable
664 .Pq Vt bool
665 Set to
666 .Dq Li YES
667 if you want to locate orphaned files on the system.
668 An orphaned file is one with an invalid owner or group.
669 .It Va weekly_noid_dirs
670 .Pq Vt str
671 A list of directories under which orphaned files are searched for.
672 This would usually be set to
673 .Pa / .
674 .It Va weekly_status_security_enable
675 .Pq Vt bool
676 Weekly counterpart of
677 .Va daily_status_security_enable .
678 .It Va weekly_status_security_inline
679 .Pq Vt bool
680 Weekly counterpart of
681 .Va daily_status_security_inline .
682 .It Va weekly_status_security_output
683 .Pq Vt str
684 Weekly counterpart of
685 .Va daily_status_security_output .
686 .It Va weekly_status_pkg_enable
687 .Pq Vt bool
688 Set to
689 .Dq Li YES
690 if you want to use
691 .Xr pkg-version 8
692 to list installed packages which are out of date.
693 .It Va pkg_version
694 .Pq Vt str
695 When
696 .Va weekly_status_pkg_enable
697 is set to
698 .Dq Li YES ,
699 this variable specifies the program that is used to determine the out of
700 date packages.
701 If unset, the
702 .Xr pkg-version 8
703 program is used.
704 As an example, this variable might be set to
705 .Dq Li portversion
706 if the
707 .Pa ports/sysutils/portupgrade
708 port has been installed.
709 .It Va pkg_version_index
710 .Pq Vt str
711 This variable specifies the
712 .Pa INDEX
713 file from
714 .Pa /usr/ports
715 that should be used by
716 .Xr pkg-version 8 .
717 Because the dependency tree may be substantially different between versions of
718 .Fx ,
719 there may be more than one
720 .Pa INDEX
721 file in
722 .Pa /usr/ports .
723 .Pp
724 Note, if the
725 .Va pkg_version
726 variable is set to
727 .Dq Li portversion ,
728 it will also be necessary to arrange that the correct
729 .Pa INDEX
730 file is specified
731 using environment variables and that
732 .Va pkg_version_index
733 is cleared in
734 .Pa /etc/periodic.conf
735 .Pq Dq Li pkg_version_index= .
736 .It Va weekly_local
737 .Pq Vt str
738 Set to a list of extra scripts that should be run after all other
739 weekly scripts.
740 All scripts must be absolute path names.
741 .El
742 .Pp
743 The following variables are used by the standard scripts that reside in
744 .Pa /etc/periodic/monthly :
745 .Bl -tag -offset 4n -width 2n
746 .It Va monthly_accounting_enable
747 .Pq Vt bool
748 Set to
749 .Dq Li YES
750 if you want to do login accounting using the
751 .Xr ac 8
752 command.
753 .It Va monthly_status_security_enable
754 .Pq Vt bool
755 Monthly counterpart of
756 .Va daily_status_security_enable .
757 .It Va monthly_status_security_inline
758 .Pq Vt bool
759 Monthly counterpart of
760 .Va daily_status_security_inline .
761 .It Va monthly_status_security_output
762 .Pq Vt str
763 Monthly counterpart of
764 .Va daily_status_security_output .
765 .It Va monthly_local
766 .Pq Vt str
767 Set to a list of extra scripts that should be run after all other
768 monthly scripts.
769 All scripts must be absolute path names.
770 .El
771 .Pp
772 The following variables are used by the standard scripts that reside in
773 .Pa /etc/periodic/security .
774 Those scripts are usually run from daily
775 .Pq Va daily_status_security_enable ,
776 weekly
777 .Pq Va weekly_status_security_enable ,
778 and monthly
779 .Pq Va monthly_status_security_enable
780 periodic hooks.
781 The
782 .Va ..._period
783 of each script can be configured as
784 .Dq daily ,
785 .Dq weekly ,
786 .Dq monthly
787 or
788 .Dq NO .
789 Note that when periodic security scripts are run from
790 .Xr crontab 5 ,
791 they will be always run unless their
792 .Va ..._enable
793 or
794 .Va ..._period
795 variable is set to
796 .Dq NO .
797 .Bl -tag -offset 4n -width 2n
798 .It Va security_status_diff_flags
799 .Pq Vt str
800 Set to the arguments to pass to the
801 .Xr diff 1
802 utility when generating differences.
803 The default is
804 .Fl b u .
805 .It Va security_status_chksetuid_enable
806 .Pq Vt bool
807 Set to
808 .Dq Li YES
809 to compare the modes and modification times of setuid executables with
810 the previous day's values.
811 .It Va security_status_chksetuid_period
812 .Pq Vt str
813 Set to either
814 .Dq Li daily ,
815 .Dq Li weekly ,
816 .Dq Li monthly
817 or
818 .Dq Li NO .
819 .It Va security_status_chkportsum_enable
820 .Pq Vt bool
821 Set to
822 .Dq Li YES
823 to verify checksums of all installed packages against the known checksums in
824 .Pa /var/db/pkg .
825 .It Va security_status_chkportsum_period
826 .Pq Vt str
827 Set to either
828 .Dq Li daily ,
829 .Dq Li weekly ,
830 .Dq Li monthly
831 or
832 .Dq Li NO .
833 .It Va security_status_neggrpperm_enable
834 .Pq Vt bool
835 Set to
836 .Dq Li YES
837 to check for files where the group of a file has less permissions than
838 the world at large.
839 When users are in more than 14 supplemental groups these negative
840 permissions may not be enforced via NFS shares.
841 .It Va security_status_neggrpperm_period
842 .Pq Vt str
843 Set to either
844 .Dq Li daily ,
845 .Dq Li weekly ,
846 .Dq Li monthly
847 or
848 .Dq Li NO .
849 .It Va security_status_chkmounts_enable
850 .Pq Vt bool
851 Set to
852 .Dq Li YES
853 to check for changes mounted file systems to the previous day's values.
854 .It Va security_status_chkmounts_period
855 .Pq Vt str
856 Set to either
857 .Dq Li daily ,
858 .Dq Li weekly ,
859 .Dq Li monthly
860 or
861 .Dq Li NO .
862 .It Va security_status_noamd
863 .Pq Vt bool
864 Set to
865 .Dq Li YES
866 if you want to ignore
867 .Xr amd 8
868 mounts when comparing against yesterday's file system mounts in the
869 .Va security_status_chkmounts_enable
870 check.
871 .It Va security_status_chkuid0_enable
872 .Pq Vt bool
873 Set to
874 .Dq Li YES
875 to check
876 .Pa /etc/master.passwd
877 for accounts with UID 0.
878 .It Va security_status_chkuid0_period
879 .Pq Vt str
880 Set to either
881 .Dq Li daily ,
882 .Dq Li weekly ,
883 .Dq Li monthly
884 or
885 .Dq Li NO .
886 .It Va security_status_passwdless_enable
887 .Pq Vt bool
888 Set to
889 .Dq Li YES
890 to check
891 .Pa /etc/master.passwd
892 for accounts with empty passwords.
893 .It Va security_status_passwdless_period
894 .Pq Vt str
895 Set to either
896 .Dq Li daily ,
897 .Dq Li weekly ,
898 .Dq Li monthly
899 or
900 .Dq Li NO .
901 .It Va security_status_logincheck_enable
902 .Pq Vt bool
903 Set to
904 .Dq Li YES
905 to check
906 .Pa /etc/login.conf
907 ownership, see
908 .Xr login.conf 5
909 for more information.
910 .It Va security_status_logincheck_period
911 .Pq Vt str
912 Set to either
913 .Dq Li daily ,
914 .Dq Li weekly ,
915 .Dq Li monthly
916 or
917 .Dq Li NO .
918 .It Va security_status_ipfwdenied_enable
919 .Pq Vt bool
920 Set to
921 .Dq Li YES
922 to show log entries for packets denied by
923 .Xr ipfw 8
924 since yesterday's check.
925 .It Va security_status_ipfwdenied_period
926 .Pq Vt str
927 Set to either
928 .Dq Li daily ,
929 .Dq Li weekly ,
930 .Dq Li monthly
931 or
932 .Dq Li NO .
933 .It Va security_status_ipfdenied_enable
934 .Pq Vt bool
935 Set to
936 .Dq Li YES
937 to show log entries for packets denied by
938 .Xr ipf 8
939 since yesterday's check.
940 .It Va security_status_ipfdenied_period
941 .Pq Vt str
942 Set to either
943 .Dq Li daily ,
944 .Dq Li weekly ,
945 .Dq Li monthly
946 or
947 .Dq Li NO .
948 .It Va security_status_pfdenied_enable
949 .Pq Vt bool
950 Set to
951 .Dq Li YES
952 to show log entries for packets denied by
953 .Xr pf 4
954 since yesterday's check.
955 .It Va security_status_pfdenied_period
956 .Pq Vt str
957 Set to either
958 .Dq Li daily ,
959 .Dq Li weekly ,
960 .Dq Li monthly
961 or
962 .Dq Li NO .
963 .It Va security_status_ipfwlimit_enable
964 .Pq Vt bool
965 Set to
966 .Dq Li YES
967 to display
968 .Xr ipfw 8
969 rules that have reached their verbosity limit.
970 .It Va security_status_ipfwlimit_period
971 .Pq Vt str
972 Set to either
973 .Dq Li daily ,
974 .Dq Li weekly ,
975 .Dq Li monthly
976 or
977 .Dq Li NO .
978 .It Va security_status_kernelmsg_enable
979 .Pq Vt bool
980 Set to
981 .Dq Li YES
982 to show new
983 .Xr dmesg 8
984 entries since yesterday's check.
985 .It Va security_status_kernelmsg_period
986 .Pq Vt str
987 Set to either
988 .Dq Li daily ,
989 .Dq Li weekly ,
990 .Dq Li monthly
991 or
992 .Dq Li NO .
993 .It Va security_status_loginfail_enable
994 .Pq Vt bool
995 Set to
996 .Dq Li YES
997 to display failed logins from
998 .Pa /var/log/messages
999 in the previous day.
1000 .It Va security_status_loginfail_period
1001 .Pq Vt str
1002 Set to either
1003 .Dq Li daily ,
1004 .Dq Li weekly ,
1005 .Dq Li monthly
1006 or
1007 .Dq Li NO .
1008 .It Va security_status_tcpwrap_enable
1009 .Pq Vt bool
1010 Set to
1011 .Dq Li YES
1012 to display connections denied by tcpwrappers (see
1013 .Xr hosts_access 5 )
1014 from
1015 .Pa /var/log/messages
1016 during the previous day.
1017 .It Va security_status_tcpwrap_period
1018 .Pq Vt str
1019 Set to either
1020 .Dq Li daily ,
1021 .Dq Li weekly ,
1022 .Dq Li monthly
1023 or
1024 .Dq Li NO .
1025 .El
1026 .Sh FILES
1027 .Bl -tag -width ".Pa /etc/defaults/periodic.conf"
1028 .It Pa /etc/defaults/periodic.conf
1029 The default configuration file.
1030 This file contains all default variables and values.
1031 .It Pa /etc/periodic.conf
1032 The usual system specific variable override file.
1033 .It Pa /etc/periodic.conf.local
1034 An additional override file, useful when
1035 .Pa /etc/periodic.conf
1036 is shared or distributed.
1037 .El
1038 .Sh SEE ALSO
1039 .Xr apropos 1 ,
1040 .Xr calendar 1 ,
1041 .Xr df 1 ,
1042 .Xr diff 1 ,
1043 .Xr gzip 1 ,
1044 .Xr locate 1 ,
1045 .Xr man 1 ,
1046 .Xr msgs 1 ,
1047 .Xr netstat 1 ,
1048 .Xr nice 1 ,
1049 .Xr login.conf 5 ,
1050 .Xr rc.conf 5 ,
1051 .Xr ac 8 ,
1052 .Xr chkgrp 8 ,
1053 .Xr dump 8 ,
1054 .Xr newsyslog 8 ,
1055 .Xr periodic 8 ,
1056 .Xr pkg-version 8 ,
1057 .Xr sendmail 8
1058 .Sh HISTORY
1059 The
1060 .Nm
1061 file appeared in
1062 .Fx 4.1 .
1063 .Sh AUTHORS
1064 .An Brian Somers Aq Mt brian@Awfulhak.org