Subject: Re: the daily/weekly/monthly scripts
To: Sam Carleton <>
From: Jeremy C. Reed <>
List: tech-security
Date: 07/24/2001 08:38:59
On Tue, 24 Jul 2001, Sam Carleton wrote:

> If so, how do YOU recommend I set the $MAILTO in the crontab file?

NetBSD's crontab(5) has a lot of info about this. It may be different on
other operating systems that use different implementations of
cron. (NetBSD uses Vixie's Cron.)

To set a environment variable simply do:
on a line in your crontab.

> 2: I think the script is REALLY great and I would like to do the same

It is really a few scripts. And /etc/security is also called (if you have

> thing on another machine, not a ?BSD, but a Solaris on SPARC.  Anyone

I also use a similar daily script under Linux.

> know of any pit falls in doing that?  I know that Solaris's normal echo
> is not standard.  Other then that?

The scripts run a lot of outside commands.

Does your find use the same syntax?
For example, this may not work under other operating systems:
        find / \( ! -fstype local -o -fstype rdonly -o -fstype fdesc \
                -o -fstype kernfs -o -fstype procfs \) -a -prune -o \
                -name 'lost+found' -a -prune -o \
                \( -name '*.core' -o -name 'core' \) -a -print

To use security:

It checks /etc/master.passwd; you may need to tweak the code to work with
the format of your's.

You'll need to make sure your system has mtree and you'll need to make an
mtree specification for the special files and system binaries check.

The scripts use commands like iostat, disklabel, netstat and others that
may have different argument syntax and different output results.

My best advice is to simply copy the files over (include /etc/rc.subr and
others) and try them.

   Jeremy C. Reed