]> CyberLeo.Net >> Repos - FreeBSD/FreeBSD.git/blob - share/man/man5/periodic.conf.5
MFV: xz 5.4.3.
[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 March 9, 2022
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_gmirror_enable
261 .Pq Vt bool
262 Set to
263 .Dq Li YES
264 to create backup of gmirror information (i.e., output of
265 .Nm gmirror Cm list ) ,
266 see
267 .Xr gmirror 8 .
268 .It Va daily_backup_gmirror_verbose
269 .Pq Vt bool
270 Set to
271 .Dq Li YES
272 to report a diff between the new backup and the existing backup
273 in the daily output.
274 .It Va daily_backup_gpart_enable
275 .Pq Vt bool
276 Set to
277 .Dq Li YES
278 to create backups of partition tables, and bootcode partition contents.
279 .It Va daily_backup_gpart_verbose
280 .Pq Vt bool
281 Set to
282 .Dq Li YES
283 to be verbose if existing backups for kern.geom.conftxt or the partition tables differ
284 from the new backups.
285 .It Va daily_backup_passwd_enable
286 .Pq Vt bool
287 Set to
288 .Dq Li YES
289 if you want the
290 .Pa /etc/master.passwd
291 and
292 .Pa /etc/group
293 files backed up and reported on.
294 Reporting consists of checking both files for modifications and running
295 .Xr chkgrp 8
296 on the
297 .Pa group
298 file.
299 .It Va daily_backup_aliases_enable
300 .Pq Vt bool
301 Set to
302 .Dq Li YES
303 if you want the
304 .Pa /etc/mail/aliases
305 file backed up and modifications to be displayed in your daily output.
306 .It Va daily_backup_zfs_enable
307 .Pq Vt bool
308 Set to
309 .Dq Li YES
310 to create backup of the output generated from the
311 .Xr zfs-list 8
312 and
313 .Xr zpool-list 8
314 utilities.
315 .It Va daily_backup_zfs_list_flags
316 .Pq Vt str
317 Set to the arguments for the
318 .Xr zfs-list 8
319 utility.
320 The default is standard behavior.
321 .It Va daily_backup_zpool_list_flags
322 .Pq Vt str
323 Set to the arguments for the
324 .Xr zpool-list 8
325 utility.
326 The default is
327 .Fl v .
328 .It Va daily_backup_zfs_props_enable
329 .Pq Vt bool
330 Set to
331 .Dq Li YES
332 to create backup of the output generated from the
333 .Xr zfs-get 8
334 and
335 .Xr zpool-get 8
336 utilities.
337 .It Va daily_backup_zfs_get_flags
338 .Pq Vt str
339 Set to the arguments for the
340 .Xr zfs-get 8
341 utility.
342 The default is
343 .Cm all .
344 .It Va daily_backup_zpool_get_flags
345 .Pq Vt str
346 Set to the arguments for the
347 .Xr zpool-get 8
348 utility.
349 The default is
350 .Cm all .
351 .It Va daily_backup_zfs_verbose
352 .Pq Vt bool
353 Set to
354 .Dq Li YES
355 to report a diff between the new backup and the existing backup
356 in the daily output.
357 .It Va daily_calendar_enable
358 .Pq Vt bool
359 Set to
360 .Dq Li YES
361 if you want to run
362 .Nm calendar Fl a
363 daily.
364 .It Va daily_accounting_enable
365 .Pq Vt bool
366 Set to
367 .Dq Li YES
368 if you want to rotate your daily process accounting files.
369 No rotations are necessary unless
370 .Va accounting_enable
371 is enabled in
372 .Xr rc.conf 5 .
373 .It Va daily_accounting_compress
374 .Pq Vt bool
375 Set to
376 .Dq Li YES
377 if you want your daily accounting files to be compressed using
378 .Xr gzip 1 .
379 .It Va daily_accounting_save
380 .Pq Vt num
381 When
382 .Va daily_accounting_enable
383 is set, this may also be set to the number of daily accounting files that are
384 to be saved.
385 The default is
386 .Dq Li 3 .
387 .It Va daily_accounting_flags
388 .Pq Vt str
389 Set to the arguments to pass to the
390 .Xr sa 8
391 utility (in addition to
392 .Fl s )
393 when
394 .Va daily_accounting_enable
395 is set to
396 .Dq Li YES .
397 The default is
398 .Fl q .
399 .It Va daily_status_disks_enable
400 .Pq Vt bool
401 Set to
402 .Dq Li YES
403 if you want to run
404 .Xr df 1
405 (with the arguments supplied in
406 .Va daily_status_disks_df_flags )
407 and
408 .Nm dump Fl W .
409 .It Va daily_status_disks_df_flags
410 .Pq Vt str
411 Set to the arguments for the
412 .Xr df 1
413 utility when
414 .Va daily_status_disks_enable
415 is set to
416 .Dq Li YES .
417 The default is
418 .Fl l Fl h .
419 .It Va daily_status_zfs_enable
420 .Pq Vt bool
421 Set to
422 .Dq Li YES
423 if you want to run
424 .Nm zpool Cm status
425 on your
426 .Xr zfs 8
427 pools.
428 .It Va daily_status_zfs_zpool_list_enable
429 .Pq Vt bool
430 Set to
431 .Dq Li YES
432 if you want to run
433 .Nm zpool Cm list
434 on your
435 .Xr zfs 8
436 pools.
437 Requires
438 .Va daily_status_zfs_enable
439 to be set to
440 .Li YES .
441 .It Va daily_status_gmirror_enable
442 .Pq Vt bool
443 Set to
444 .Dq Li YES
445 if you want to run
446 .Nm gmirror Cm status
447 on your
448 .Xr gmirror 8
449 devices.
450 .It Va daily_status_graid3_enable
451 .Pq Vt bool
452 Set to
453 .Dq Li YES
454 if you want to run
455 .Nm graid3 Cm status
456 on your
457 .Xr graid3 8
458 devices.
459 .It Va daily_status_gstripe_enable
460 .Pq Vt bool
461 Set to
462 .Dq Li YES
463 if you want to run
464 .Nm gstripe Cm status
465 on your
466 .Xr gstripe 8
467 devices.
468 .It Va daily_status_gconcat_enable
469 .Pq Vt bool
470 Set to
471 .Dq Li YES
472 if you want to run
473 .Nm gconcat Cm status
474 on your
475 .Xr gconcat 8
476 devices.
477 .It Va daily_status_mfi_enable
478 .Pq Vt bool
479 Set to
480 .Dq Li YES
481 if you want to run
482 .Nm mfiutil Cm status
483 on your
484 .Xr mfi 4
485 devices.
486 .It Va daily_status_network_enable
487 .Pq Vt bool
488 Set to
489 .Dq Li YES
490 if you want to run
491 .Nm netstat Fl i .
492 .It Va daily_status_network_netstat_flags
493 .Pq Vt str
494 Set to additional arguments for the
495 .Xr netstat 1
496 utility when
497 .Va daily_status_network_enable
498 is set to
499 .Dq Li YES .
500 The default is
501 .Fl d W .
502 .It Va daily_status_network_usedns
503 .Pq Vt bool
504 Set to
505 .Dq Li YES
506 if you want to run
507 .Xr netstat 1
508 without the
509 .Fl n
510 option (to do DNS lookups).
511 .It Va daily_status_uptime_enable
512 .Pq Vt bool
513 Set to
514 .Dq Li YES
515 if you want to run
516 .Xr uptime 1
517 (or
518 .Xr ruptime 1
519 if
520 .Va rwhod_enable
521 is set to
522 .Dq Li YES
523 in
524 .Pa /etc/rc.conf ) .
525 .It Va daily_status_mailq_enable
526 .Pq Vt bool
527 Set to
528 .Dq Li YES
529 if you want to run
530 .Xr mailq 1 .
531 .It Va daily_status_mailq_shorten
532 .Pq Vt bool
533 Set to
534 .Dq Li YES
535 if you want to shorten the
536 .Xr mailq 1
537 output when
538 .Va daily_status_mailq_enable
539 is set to
540 .Dq Li YES .
541 .It Va daily_status_include_submit_mailq
542 .Pq Vt bool
543 Set to
544 .Dq Li YES
545 if you also want to run
546 .Xr mailq 1
547 on the submit mail queue when
548 .Va daily_status_mailq_enable
549 is set to
550 .Dq Li YES .
551 This may not work with MTAs other than
552 .Xr sendmail 8 .
553 .It Va daily_status_security_enable
554 .Pq Vt bool
555 Set to
556 .Dq Li YES
557 if you want to run the security check.
558 The security check is another set of
559 .Xr periodic 8
560 scripts.
561 The system defaults are in
562 .Pa /etc/periodic/security .
563 Local scripts should be placed in
564 .Pa /usr/local/etc/periodic/security .
565 See the
566 .Xr periodic 8
567 manual page for more information.
568 .It Va daily_status_security_inline
569 .Pq Vt bool
570 Set to
571 .Dq Li YES
572 if you want the security check output inline.
573 The default is to either mail or log the output according to the value of
574 .Va daily_status_security_output .
575 .It Va daily_status_security_output
576 .Pq Vt str
577 Where to send the output of the security check if
578 .Va daily_status_security_inline
579 is set to
580 .Dq Li NO .
581 This variable behaves in the same way as the
582 .Va *_output
583 variables above, namely it can be set either to one or more email addresses
584 or to an absolute file name.
585 .It Va daily_status_mail_rejects_enable
586 .Pq Vt bool
587 Set to
588 .Dq Li YES
589 if you want to summarise mail rejections logged to
590 .Pa /var/log/maillog
591 for the previous day.
592 .It Va daily_status_mail_rejects_logs
593 .Pq Vt num
594 Set to the number of maillog files that should be checked
595 for yesterday's mail rejects.
596 .It Va daily_status_ntpd_enable
597 .Pq Vt bool
598 Set to
599 .Dq Li YES
600 if you want to enable NTP status check.
601 .It Va daily_status_world_kernel
602 .Pq Vt bool
603 Set to
604 .Dq Li YES
605 to check the running userland and kernel are in sync.
606 .It Va daily_queuerun_enable
607 .Pq Vt bool
608 Set to
609 .Dq Li YES
610 if you want to manually run the mail queue at least once a day.
611 .It Va daily_submit_queuerun
612 .Pq Vt bool
613 Set to
614 .Dq Li YES
615 if you also want to manually run the submit mail queue at least once a day
616 when
617 .Va daily_queuerun_enable
618 is set to
619 .Dq Li YES .
620 .It Va daily_scrub_zfs_enable
621 .Pq Vt bool
622 Set to
623 .Dq Li YES
624 if you want to run a zfs scrub periodically.
625 .It Va daily_scrub_zfs_pools
626 .Pq Vt str
627 A space separated list of names of zfs pools to scrub.
628 If the list is empty or not set, all zfs pools are scrubbed.
629 .It Va daily_scrub_zfs_default_threshold
630 .Pq Vt int
631 Number of days between a scrub if no pool-specific threshold is set.
632 If not set, the default value is 35, corresponding to 5 weeks.
633 .It Va daily_scrub_zfs_ Ns Ao Ar poolname Ac Ns Va _threshold
634 .Pq Vt int
635 The same as
636 .Va daily_scrub_zfs_default_threshold
637 but specific to the pool
638 .Ao Ar poolname Ac Ns .
639 .It Va daily_local
640 .Pq Vt str
641 Set to a list of extra scripts that should be run after all other
642 daily scripts.
643 All scripts must be absolute path names.
644 .El
645 .Pp
646 The following variables are used by the standard scripts that reside in
647 .Pa /etc/periodic/weekly :
648 .Bl -tag -offset 4n -width 2n
649 .It Va weekly_locate_enable
650 .Pq Vt bool
651 Set to
652 .Dq Li YES
653 if you want to run
654 .Pa /usr/libexec/locate.updatedb .
655 This script is run using
656 .Nm nice Fl 5
657 as user
658 .Dq Li nobody ,
659 and generates the table used by the
660 .Xr locate 1
661 command.
662 .It Va weekly_whatis_enable
663 .Pq Vt bool
664 Set to
665 .Dq Li YES
666 if you want to run
667 .Pa /usr/libexec/makewhatis.local .
668 This script regenerates the database used by the
669 .Xr apropos 1
670 command.
671 .It Va weekly_noid_enable
672 .Pq Vt bool
673 Set to
674 .Dq Li YES
675 if you want to locate orphaned files on the system.
676 An orphaned file is one with an invalid owner or group.
677 .It Va weekly_noid_dirs
678 .Pq Vt str
679 A list of directories under which orphaned files are searched for.
680 This would usually be set to
681 .Pa / .
682 .It Va weekly_status_security_enable
683 .Pq Vt bool
684 Weekly counterpart of
685 .Va daily_status_security_enable .
686 .It Va weekly_status_security_inline
687 .Pq Vt bool
688 Weekly counterpart of
689 .Va daily_status_security_inline .
690 .It Va weekly_status_security_output
691 .Pq Vt str
692 Weekly counterpart of
693 .Va daily_status_security_output .
694 .It Va weekly_status_pkg_enable
695 .Pq Vt bool
696 Set to
697 .Dq Li YES
698 if you want to use
699 .Xr pkg-version 8
700 to list installed packages which are out of date.
701 .It Va pkg_version
702 .Pq Vt str
703 When
704 .Va weekly_status_pkg_enable
705 is set to
706 .Dq Li YES ,
707 this variable specifies the program that is used to determine the out of
708 date packages.
709 If unset, the
710 .Xr pkg-version 8
711 program is used.
712 As an example, this variable might be set to
713 .Dq Li portversion
714 if the
715 .Pa ports/sysutils/portupgrade
716 port has been installed.
717 .It Va pkg_version_index
718 .Pq Vt str
719 This variable specifies the
720 .Pa INDEX
721 file from
722 .Pa /usr/ports
723 that should be used by
724 .Xr pkg-version 8 .
725 Because the dependency tree may be substantially different between versions of
726 .Fx ,
727 there may be more than one
728 .Pa INDEX
729 file in
730 .Pa /usr/ports .
731 .Pp
732 Note, if the
733 .Va pkg_version
734 variable is set to
735 .Dq Li portversion ,
736 it will also be necessary to arrange that the correct
737 .Pa INDEX
738 file is specified
739 using environment variables and that
740 .Va pkg_version_index
741 is cleared in
742 .Pa /etc/periodic.conf
743 .Pq Dq Li pkg_version_index= .
744 .It Va weekly_local
745 .Pq Vt str
746 Set to a list of extra scripts that should be run after all other
747 weekly scripts.
748 All scripts must be absolute path names.
749 .El
750 .Pp
751 The following variables are used by the standard scripts that reside in
752 .Pa /etc/periodic/monthly :
753 .Bl -tag -offset 4n -width 2n
754 .It Va monthly_accounting_enable
755 .Pq Vt bool
756 Set to
757 .Dq Li YES
758 if you want to do login accounting using the
759 .Xr ac 8
760 command.
761 .It Va monthly_status_security_enable
762 .Pq Vt bool
763 Monthly counterpart of
764 .Va daily_status_security_enable .
765 .It Va monthly_status_security_inline
766 .Pq Vt bool
767 Monthly counterpart of
768 .Va daily_status_security_inline .
769 .It Va monthly_status_security_output
770 .Pq Vt str
771 Monthly counterpart of
772 .Va daily_status_security_output .
773 .It Va monthly_local
774 .Pq Vt str
775 Set to a list of extra scripts that should be run after all other
776 monthly scripts.
777 All scripts must be absolute path names.
778 .El
779 .Pp
780 The following variables are used by the standard scripts that reside in
781 .Pa /etc/periodic/security .
782 Those scripts are usually run from daily
783 .Pq Va daily_status_security_enable ,
784 weekly
785 .Pq Va weekly_status_security_enable ,
786 and monthly
787 .Pq Va monthly_status_security_enable
788 periodic hooks.
789 The
790 .Va ..._period
791 of each script can be configured as
792 .Dq daily ,
793 .Dq weekly ,
794 .Dq monthly
795 or
796 .Dq NO .
797 Note that when periodic security scripts are run from
798 .Xr crontab 5 ,
799 they will be always run unless their
800 .Va ..._enable
801 or
802 .Va ..._period
803 variable is set to
804 .Dq NO .
805 .Bl -tag -offset 4n -width 2n
806 .It Va security_status_diff_flags
807 .Pq Vt str
808 Set to the arguments to pass to the
809 .Xr diff 1
810 utility when generating differences.
811 The default is
812 .Fl b u .
813 .It Va security_status_chksetuid_enable
814 .Pq Vt bool
815 Set to
816 .Dq Li YES
817 to compare the modes and modification times of setuid executables with
818 the previous day's values.
819 .It Va security_status_chksetuid_period
820 .Pq Vt str
821 Set to either
822 .Dq Li daily ,
823 .Dq Li weekly ,
824 .Dq Li monthly
825 or
826 .Dq Li NO .
827 .It Va security_status_chkportsum_enable
828 .Pq Vt bool
829 Set to
830 .Dq Li YES
831 to verify checksums of all installed packages against the known checksums in
832 .Pa /var/db/pkg .
833 .It Va security_status_chkportsum_period
834 .Pq Vt str
835 Set to either
836 .Dq Li daily ,
837 .Dq Li weekly ,
838 .Dq Li monthly
839 or
840 .Dq Li NO .
841 .It Va security_status_neggrpperm_enable
842 .Pq Vt bool
843 Set to
844 .Dq Li YES
845 to check for files where the group of a file has less permissions than
846 the world at large.
847 When users are in more than 14 supplemental groups these negative
848 permissions may not be enforced via NFS shares.
849 .It Va security_status_neggrpperm_period
850 .Pq Vt str
851 Set to either
852 .Dq Li daily ,
853 .Dq Li weekly ,
854 .Dq Li monthly
855 or
856 .Dq Li NO .
857 .It Va security_status_chkmounts_enable
858 .Pq Vt bool
859 Set to
860 .Dq Li YES
861 to check for changes mounted file systems to the previous day's values.
862 .It Va security_status_chkmounts_period
863 .Pq Vt str
864 Set to either
865 .Dq Li daily ,
866 .Dq Li weekly ,
867 .Dq Li monthly
868 or
869 .Dq Li NO .
870 .It Va security_status_noamd
871 .Pq Vt bool
872 Set to
873 .Dq Li YES
874 if you want to ignore
875 .Xr amd 8
876 mounts when comparing against yesterday's file system mounts in the
877 .Va security_status_chkmounts_enable
878 check.
879 .It Va security_status_chkuid0_enable
880 .Pq Vt bool
881 Set to
882 .Dq Li YES
883 to check
884 .Pa /etc/master.passwd
885 for accounts with UID 0.
886 .It Va security_status_chkuid0_period
887 .Pq Vt str
888 Set to either
889 .Dq Li daily ,
890 .Dq Li weekly ,
891 .Dq Li monthly
892 or
893 .Dq Li NO .
894 .It Va security_status_passwdless_enable
895 .Pq Vt bool
896 Set to
897 .Dq Li YES
898 to check
899 .Pa /etc/master.passwd
900 for accounts with empty passwords.
901 .It Va security_status_passwdless_period
902 .Pq Vt str
903 Set to either
904 .Dq Li daily ,
905 .Dq Li weekly ,
906 .Dq Li monthly
907 or
908 .Dq Li NO .
909 .It Va security_status_logincheck_enable
910 .Pq Vt bool
911 Set to
912 .Dq Li YES
913 to check
914 .Pa /etc/login.conf
915 ownership, see
916 .Xr login.conf 5
917 for more information.
918 .It Va security_status_logincheck_period
919 .Pq Vt str
920 Set to either
921 .Dq Li daily ,
922 .Dq Li weekly ,
923 .Dq Li monthly
924 or
925 .Dq Li NO .
926 .It Va security_status_ipfwdenied_enable
927 .Pq Vt bool
928 Set to
929 .Dq Li YES
930 to show log entries for packets denied by
931 .Xr ipfw 8
932 since yesterday's check.
933 .It Va security_status_ipfwdenied_period
934 .Pq Vt str
935 Set to either
936 .Dq Li daily ,
937 .Dq Li weekly ,
938 .Dq Li monthly
939 or
940 .Dq Li NO .
941 .It Va security_status_ipfdenied_enable
942 .Pq Vt bool
943 Set to
944 .Dq Li YES
945 to show log entries for packets denied by
946 .Xr ipf 8
947 since yesterday's check.
948 .It Va security_status_ipfdenied_period
949 .Pq Vt str
950 Set to either
951 .Dq Li daily ,
952 .Dq Li weekly ,
953 .Dq Li monthly
954 or
955 .Dq Li NO .
956 .It Va security_status_pfdenied_enable
957 .Pq Vt bool
958 Set to
959 .Dq Li YES
960 to show log entries for packets denied by
961 .Xr pf 4
962 since yesterday's check.
963 .It Va security_status_pfdenied_additionalanchors
964 .Pq Vt str
965 Space-separated list of additional anchors whose denied packets log entries to
966 show.
967 The main ruleset (i.e., the empty-string anchor) and any
968 .Xr blacklistd 8
969 anchors, if present, are always shown.
970 .It Va security_status_pfdenied_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_ipfwlimit_enable
979 .Pq Vt bool
980 Set to
981 .Dq Li YES
982 to display
983 .Xr ipfw 8
984 rules that have reached their verbosity limit.
985 .It Va security_status_ipfwlimit_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_kernelmsg_enable
994 .Pq Vt bool
995 Set to
996 .Dq Li YES
997 to show new
998 .Xr dmesg 8
999 entries since yesterday's check.
1000 .It Va security_status_kernelmsg_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_loginfail_enable
1009 .Pq Vt bool
1010 Set to
1011 .Dq Li YES
1012 to display failed logins from
1013 .Pa /var/log/messages
1014 in the previous day.
1015 .It Va security_status_loginfail_period
1016 .Pq Vt str
1017 Set to either
1018 .Dq Li daily ,
1019 .Dq Li weekly ,
1020 .Dq Li monthly
1021 or
1022 .Dq Li NO .
1023 .It Va security_status_tcpwrap_enable
1024 .Pq Vt bool
1025 Set to
1026 .Dq Li YES
1027 to display connections denied by tcpwrappers (see
1028 .Xr hosts_access 5 )
1029 from
1030 .Pa /var/log/messages
1031 during the previous day.
1032 .It Va security_status_tcpwrap_period
1033 .Pq Vt str
1034 Set to either
1035 .Dq Li daily ,
1036 .Dq Li weekly ,
1037 .Dq Li monthly
1038 or
1039 .Dq Li NO .
1040 .El
1041 .Sh FILES
1042 .Bl -tag -width ".Pa /etc/defaults/periodic.conf"
1043 .It Pa /etc/defaults/periodic.conf
1044 The default configuration file.
1045 This file contains all default variables and values.
1046 .It Pa /etc/periodic.conf
1047 The usual system specific variable override file.
1048 .It Pa /etc/periodic.conf.local
1049 An additional override file, useful when
1050 .Pa /etc/periodic.conf
1051 is shared or distributed.
1052 .El
1053 .Sh SEE ALSO
1054 .Xr apropos 1 ,
1055 .Xr calendar 1 ,
1056 .Xr df 1 ,
1057 .Xr diff 1 ,
1058 .Xr gzip 1 ,
1059 .Xr locate 1 ,
1060 .Xr man 1 ,
1061 .Xr msgs 1 ,
1062 .Xr netstat 1 ,
1063 .Xr nice 1 ,
1064 .Xr login.conf 5 ,
1065 .Xr rc.conf 5 ,
1066 .Xr ac 8 ,
1067 .Xr chkgrp 8 ,
1068 .Xr dump 8 ,
1069 .Xr newsyslog 8 ,
1070 .Xr periodic 8 ,
1071 .Xr pkg-version 8 ,
1072 .Xr sendmail 8
1073 .Sh HISTORY
1074 The
1075 .Nm
1076 file appeared in
1077 .Fx 4.1 .
1078 .Sh AUTHORS
1079 .An Brian Somers Aq Mt brian@Awfulhak.org