SECURITY.CONF(5)
π NAME
security.conf(5) β daily security check configuration file, bestie. That's the whole vibe. β¨
β¨ DESCRIPTION
The security.conf file specifies which of the standard /etc/security services are performed. The /etc/security script is run, by default, every night from /etc/daily, on a NetBSD system, if configured to do so from /etc/daily.conf.
The variables described below can be set to "NO" to disable the test:
check_entropyβ checks whether the system has enough entropy (seeentropy(7)).check_passwdβ checks the/etc/master.passwdfile for inconsistencies.check_groupβ checks the/etc/groupfile for inconsistencies.check_rootdotfilesβ checks the root users startup files for sane settings of$PATHandumask. This test is not fail safe and any warning generated from this should be checked for correctness.check_ftpusersβ checks that the correct users are in the/etc/ftpusersfile.check_aliasesβ checks for security problems in the/etc/mail/aliasesfile. For backward compatibility,/etc/aliaseswill be checked as well if it exists.check_rhostsβ checks for system and user rhosts files with+in them.check_homesβ checks that home directories are owned by the correct user, and have appropriate permissions.check_varmailβ checks that the correct user owns mail in/var/mail, and that the mail box has the right permissions.check_nfsβ checks that the/etc/exportsfile does not export filesystems to the world.check_devicesβ checks for changes to devices and setuid files.check_mtreeβ runsmtree(8)to ensure that the system is installed correctly. The following configuration files are checked:/etc/mtree/specialβ Default files to check./etc/mtree/special.localβ Local site additions and overrides./etc/mtree/DIR.secureβ Specification for the directory DIR.
check_disklabelsβ Backup text copies of the disklabels of available disk drives into/var/backups/work/disklabel.XXX, and display any differences in those and the previous copies as percheck_changelistbelow. Iffdisk(8)is available on the current platform, the output of/sbin/fdiskfor each available disk drive is stored in/var/backups/work/fdisk.XXX, and any differences displayed as per the disklabels.check_pkgsβ stores a list of all installed pkgs into/var/backups/work/pkgsand checks it for any changes.check_changelistβ determines a list of files from the contents of/etc/changelist, and the output ofmtree -Dfor/etc/mtree/specialand/etc/mtree/special.local. For each file in the list it compares the files with their backups in/var/backups/file.currentand/var/backups/file.backup, and displays any differences found. The followingmtree(8)tags modify how files are determined from/etc/mtree/specialand/etc/mtree/special.local:excludeβ The entry is ignored; no backups are made and the differences are not displayed. This includes dynamic or binary files such as/var/run/utmp.nodiffβ The entry is backed up but the differences are not displayed because the contents of the file are sensitive. This includes files such as/etc/master.passwd.
check_pkg_vulnerabilitiesβ checks the currently installed packages against a database of known vulnerabilities and reports those that are vulnerable. Check thefetch_pkg_vulnerabilitiessetting indaily.conf(5)to keep the database up to date.check_pkg_signaturesβ checks the digital signature of all files installed by packages against the expected values stored in the packages database.
The variables described below can be set to modify the tests:
check_homes_permit_usergroupsβ During thecheck_homesphase, allow the checked files to be group-writable if the group name is the same as the username.check_homes_permit_other_ownerβ During thecheck_homesphase, allow the home directory and files of the listed users to be owned by a different user.check_devices_ignore_fstypesβ Lists filesystem types to ignore during thecheck_devicesphase. Prefixing the type with a!inverts the match. For example,procfs !localwill ignoreprocfstype filesystems and filesystems that are notlocal.check_devices_ignore_pathsβ Lists pathnames to ignore during thecheck_devicesphase. Prefixing the path with a!inverts the match. For example,/tftpwill ignore paths under/tftpwhile!/homewill ignore paths that are not under/home.check_mtree_follow_symlinksβ During thecheck_mtreephase, instruct mtree to follow symbolic links. Please note, this may cause thecheck_mtreephase to report errors for entries for these symbolic links (i.e. oftype=linkin the mtree specification) as they will always appear to be plain files for the purposes of the check./etc/mtree/special.localmay be used to override the checks for the affected links.check_passwd_nowarn_shellsβ Ifcheck_passwdis enabled, most warnings will be suppressed for entries whose shells are listed in this space-separated list. This is of particular value when those shells are not in/etc/shells.check_passwd_nowarn_usersβ Ifcheck_passwdis enabled, suppress warnings for these users.check_passwd_permit_dupsβ Ifcheck_passwdis enabled, do not warn about duplicate uids for the listed login names.check_passwd_permit_nonalphaβ Ifcheck_passwdis enabled, do not warn about login names which use non-alphanumeric characters.check_passwd_permit_starβ Ifcheck_passwdis enabled, do not warn about password fields set to"*". Note that the use of password fields such as"*ssh"is encouraged, instead.max_grouplenβ Ifcheck_groupis enabled, this determines the maximum permitted length of group names.max_loginlenβ Ifcheck_passwdis enabled, this determines the maximum permitted length of login names.backup_dirβ Change the backup directory from/var/backups.diff_optionsβ Specify the options passed todiff(1)when it is invoked to show changes made to system files. Defaults to"-u", for unified-format context-diffs.pkgdb_dirβ DEPRECATED. Please setPKGDB_DIRinpkg_install.conf(5)instead. If defined, points to the location of the packages database. Defaults to/usr/pkg/pkgdb.backup_uses_rcsβ Usercs(1)for maintaining backup copies of files noted incheck_devices,check_disklabels,check_pkgs, andcheck_changelistinstead of just keeping a current copy and a backup copy.random_fileβ Name of the entropy seed file used at boot. Default is/var/db/entropy-fileas used by/etc/rc.d/random_seed. Setrandom_fileto empty to disable saving a seed every time/etc/securityruns.
π FILES
/etc/defaults/security.confβ defaults for/etc/security.conf/etc/securityβ daily security check script/etc/security.confβ daily security check configuration/etc/security.localβ local site additions to/etc/security
π SEE ALSO
daily.conf(5) β go read it, bestie π«Ά
π°οΈ HISTORY
The security.conf file appeared in NetBSD 1.3. The check_disklabels functionality was added in NetBSD 1.4. The backup_uses_rcs and check_pkgs features were added in NetBSD 1.6. diff_options appeared in NetBSD 2.0; prior to that, traditional-format (context free) diffs were generated.
xoxo, Debian π β December 2, 2020
π¦ where this page comes from
- nixpkgs unstable: netbsd-source 11.0
- Copyright (c) 1996 Matthew R. Green
- π girlified by deepseek-ai/DeepSeek-V4.1-Flash-1017 on : a language model's rewrite of the original, under its terms