1 .\" $NetBSD: security.conf.5,v 1.32 2008/04/08 14:51:02 sborrill Exp $
3 .\" Copyright (c) 1996 Matthew R. Green
4 .\" All rights reserved.
6 .\" Redistribution and use in source and binary forms, with or without
7 .\" modification, are permitted provided that the following conditions
9 .\" 1. Redistributions of source code must retain the above copyright
10 .\" notice, this list of conditions and the following disclaimer.
11 .\" 2. Redistributions in binary form must reproduce the above copyright
12 .\" notice, this list of conditions and the following disclaimer in the
13 .\" documentation and/or other materials provided with the distribution.
15 .\" THIS SOFTWARE IS PROVIDED BY THE AUTHOR ``AS IS'' AND ANY EXPRESS OR
16 .\" IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES
17 .\" OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE DISCLAIMED.
18 .\" IN NO EVENT SHALL THE AUTHOR BE LIABLE FOR ANY DIRECT, INDIRECT,
19 .\" INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING,
20 .\" BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES;
21 .\" LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED
22 .\" AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY,
23 .\" OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY
24 .\" OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF
32 .Nd daily security check configuration file
36 file specifies which of the standard
38 services are performed.
41 script is run, by default, every night from
45 system, if configured do to so from
48 The variables described below can be set to "NO" to disable the test:
49 .Bl -tag -width check_network
52 .Pa /etc/master.passwd
53 file for inconsistencies.
57 file for inconsistencies.
58 .It Sy check_rootdotfiles
59 This checks the root users startup files for sane settings of $PATH
61 This test is not fail safe and any warning generated from
62 this should be checked for correctness.
64 This checks that the correct users are in the
68 This checks for security problems in the
71 For backward compatibility,
73 will be checked as well if exists.
75 This checks for system and user rhosts files with "+" in them.
77 This checks that home directories are owned by the correct user,
78 and have appropriate permissions.
80 This checks that the correct user owns mail in
82 and that the mail box has the right permissions.
86 file does not export filesystems to the world.
88 This checks for changes to devices and setuid files.
92 to ensure that the system is installed correctly.
93 The following configuration files are checked:
95 .It Pa /etc/mtree/special
96 Default files to check.
97 .It Pa /etc/mtree/special.local
98 Local site additions and overrides.
99 .It Pa /etc/mtree/DIR.secure
100 Specification for the directory
103 .It Sy check_disklabels
104 Backup text copies of the disklabels of available disk drives into
105 .Pa /var/backups/work/disklabel.XXX ,
106 and display any differences in those and the previous copies
112 is available on the current platform, the output of
114 for each available disk drive is stored in
115 .Pa /var/backups/work/fdisk.XXX ,
116 and any differences displayed as per the disklabels.
118 This stores a list of all installed pkgs into
119 .Pa /var/backups/work/pkgs
120 and checks it for any changes.
121 .It Sy check_changelist
122 This determines a list of files from the contents of
123 .Pa /etc/changelist ,
127 .Pa /etc/mtree/special
129 .Pa /etc/mtree/special.local .
130 For each file in the list it compares the files with their backups in
131 .Pa /var/backups/file.current
133 .Pa /var/backups/file.backup ,
134 and displays any differences found.
138 modify how files are determined from
139 .Pa /etc/mtree/special
141 .Pa /etc/mtree/special.local :
142 .Bl -tag -width exclude -offset indent
144 The entry is ignored; no backups are made and the differences are not
146 This includes dynamic or binary files such as
149 The entry is backed up but the differences are not displayed because
150 the contents of the file are sensitive.
151 This includes files such as
152 .Pa /etc/master.passwd .
156 The variables described below can be set to modify the tests:
157 .Bl -tag -width check_network
158 .It Sy check_homes_permit_usergroups
161 phase, allow the checked files to be group-writable if the group name is
162 the same as the username.
163 .It Sy check_devices_ignore_fstypes
164 Lists filesystem types to ignore during the
167 Prefixing the type with a
174 type filesystems and filesystems that are not
176 .It Sy check_devices_ignore_paths
177 Lists pathnames to ignore during the
180 Prefixing the path with a
185 will ignore paths under
189 will ignore paths that are not under
191 .It Sy check_mtree_follow_symlinks
194 phase, instruct mtree to follow symbolic links.
195 Please note, this may cause the
197 phase to report errors for entries for these symbolic links (i.e. of
198 type=link in the mtree specification) as they will always appear to be plain
199 files for the purposes of the check.
200 .Pa /etc/mtree/special.local
201 may be used to override the checks for the affected links.
202 .It Sy check_passwd_nowarn_shells
205 is enabled, most warnings will be suppressed for entries whose shells
206 are listed in this space-separated list.
207 This is of particular value when those shells are not in
209 .It Sy check_passwd_nowarn_users
212 is enabled, suppress warnings for these users.
213 .It Sy check_passwd_permit_nonalpha
216 is enabled, do not warn about login names which use non-alphanumeric
218 .It Sy check_passwd_permit_star
221 is enabled, do not warn about password fields set to
223 Note that the use of password fields such as
225 is encouraged, instead.
229 is enabled, this determines the maximum permitted length of group names.
233 is enabled, this determines the maximum permitted length of login names.
235 Change the backup directory from
238 Specify the options passed to
240 when it is invoked to show changes made to system files.
243 for unified-format context-diffs.
245 Change the pkg database directory from
250 .It Sy backup_uses_rcs
253 for maintaining backup copies of files noted in
255 .Sy check_disklabels ,
259 instead of just keeping a current copy and a backup copy.
262 .Bl -tag -width /etc/defaults/security.conf -compact
263 .It Pa /etc/defaults/security.conf
264 defaults for /etc/security.conf
266 daily security check script
267 .It Pa /etc/security.conf
268 daily security check configuration
269 .It Pa /etc/security.local
270 local site additions to
282 functionality was added in
288 features were added in
293 prior to that, traditional-format (context free) diffs were generated.