Understanding the Automatons, Part Two
Pages: 1, 2
The status-named script can be disabled if you are not running a DNS server. If you are running a DNS server, check the output of this script, as it will let you know if your DNS server denied any zone transfers. A zone transfer request from a machine that is not one of your secondary DNS servers may indicate that someone is trying to gather information about your network. For more information on setting up a secure DNS server, you can read the security chapter of DNS and Bind, 4th Edition.
# 470.status-named daily_status_named_enable="YES" daily_status_named_usedns="YES" # DNS lookups are ok
The next script ensures that
sendmail's queue is processed at least once
per day. You don't have to run this script, as by default
check its queue every 30 minutes for undeliverable mail and will try to
resend any messages at that point.
# 500.queuerun daily_queuerun_enable="YES" # Run mail queue
That's it for the built-in daily scripts; let's move on to the weekly scripts. You'll note that you're once again given the option to specify where to send the weekly output, and again, the default is to email it to root.
# Weekly options # These options are used by periodic(8) itself to # determine what to do with the output of the sub-programs # that are run, and where to send that output. $weekly_output # might be set to /var/log/weekly.log if you wish to log the # weekly output and have the files rotated by newsyslog(8) # weekly_output="root" # user or /file weekly_show_success="YES" # scripts returning 0 weekly_show_info="YES" # scripts returning 1 weekly_show_badconfig="NO" # scripts returning 2
The first script cleans out any
kvm* files in
/var/db. Since I don't
have any of these files on my system, I've disabled this script.
# 120.clean-kvmdb weekly_clean_kvmdb_enable="YES" # Clean kvmdb weekly weekly_clean_kvmdb_days=7 # If not accessed for weekly_clean_kvmdb_verbose="YES" # Mention files deleted
The next two scripts update the
whatis databases; if you've
ever heard your hard drive churning around 4:00 on a Saturday morning,
this is the reason why. Since
apropos are two of my
favorite commands, I keep these scripts enabled.
# 310.locate weekly_locate_enable="YES" # Update locate weekly # 320.whatis weekly_whatis_enable="YES" # Update whatis weekly
The next script is disabled by default; if you have lots of disk space and
read a lot of
man pages, you may find that enabling this script speeds up using
# 330.catman weekly_catman_enable="NO" # Preformat man pages
The next script is also disabled. Enable it if you want to be aware of any files on your system that don't have a valid owner or group.
# 340.noid weekly_noid_enable="NO" # Find unowned files weekly_noid_dirs="/" # Look here
The last built-in weekly script is interesting, and may be worth enabling
if you like to keep up-to-date with the ports tree. It will compare your
already installed ports with
/usr/ports/INDEX and make a list of which ports
have a newer version number and should be updated.
# 400.status-pkg weekly_status_pkg_enable="NO" # Find out-of-date pkgs
There is only one built-in monthly script and you are again given the option of where to send its output.
# Monthly options # These options are used by periodic(8) itself to # determine what to do with the output of the sub-programs # that are run, and where to send that output. $monthly_output # might be set to /var/log/monthly.log if you # wish to log the monthly output and have the files rotated # by newsyslog(8) # monthly_output="root" # user or /file monthly_show_success="YES" # scripts returning 0 monthly_show_info="YES" # scripts returning 1 monthly_show_badconfig="NO" # scripts returning 2 # 200.accounting monthly_accounting_enable="YES" # Login accounting
This script will show the accounting statistics gathered by the
ac command. If these statistics aren't useful to you, disable this script.
We took a look at the
ac command in Monitoring Unix Logins.
I hope this article helped to de-mystify the scripts that came with your FreeBSD system. Until next time, happy BSDing.
Dru Lavigne is a network and systems administrator, IT instructor, author and international speaker. She has over a decade of experience administering and teaching Netware, Microsoft, Cisco, Checkpoint, SCO, Solaris, Linux, and BSD systems. A prolific author, she pens the popular FreeBSD Basics column for O'Reilly and is author of BSD Hacks and The Best of FreeBSD Basics.
Read more FreeBSD Basics columns.
Return to the BSD DevCenter.