SECURITY(8)
π SECURITY(8) β the manual page, but make it cute
okay so bestie, buckle up, this is security from section 8 of the manual (the sysadmin one, not the "call the cops" one π) β and it's literally the vibe check your server runs on itself every single day. let's get into it β¨
π‘οΈ NAME
security β the periodic system security check, a.k.a. your machine's daily selfie to make sure nothing sketchy is going on πΈ
π DESCRIPTION
security is a command script that examines the system for some signs of security weaknesses. think of it as a little detective π΅οΈββοΈ that goes through your box looking for red flags. but real talk: it is only a security aid and does not offer complete protection. it's not a bodyguard, it's a friend going "hmm girl that permission looks a little sus π".
security is run by daily(8), which mails any output to root on a daily basis. so yes, root gets a little daily newsletter about your system's drama π
The security script carries out the following list of simple checks:
- Check the
master.passwd(5)andgroup(5)files for syntax, empty passwords, partially closed accounts, suspicious UIDs, suspicious GIDs, and duplicate entries. π΅οΈββοΈ - Check root's home directory and login environment for insecure permissions, suspicious paths, and
umaskcommands in the dotfiles. π - Check for suspicious commands in
/etc/mail/aliases. π§ - Check for insecurities in
/etc/hosts.lpd. π¨οΈ - Check user
.rhostsand.shostsfiles for open access. πͺ - Check user home directory permissions. π
- Check many user dotfile permissions. π
- Check user mailbox permissions. π¬
- Check NFS
exports(5)file for global export entries. π - Check for changes in setuid/setgid files and devices. π§
- Check disk ownership and permissions. πΎ
- Check for changes in the device file list. ποΈ
- Check for permission changes in special files and system binaries listed in
/etc/mtree/special.securityalso provides hooks for administrators to create their own lists. These lists should be kept in/etc/mtree/and filenames must have the suffix β.secureβ. The following example shows how to create such a list, to protect the programs in/bin:
# mtree -cx -p /bin -K sha256digest,type > /etc/mtree/bin.secure
# chown root:wheel /etc/mtree/bin.secure
# chmod 600 /etc/mtree/bin.secure
Note: These checks do not provide complete protection against Trojan horse binaries, as the miscreant can modify the tree specification to match the replaced binary. For details on really protecting yourself against modified binaries, see mtree(8). π΄π (yes, that's a real caveat β no cap, read it twice)
- Check for changes in files listed in
/etc/changelist. Files being created or deleted, as well as content change in the files themselves, are reported. Seechangelist(5)for further details. π - Check for changes to the disklabels and partition tables of mounted disks. πΏ
- Report on the installation or removal of any system
package(5). π¦ - Check
hostname.if(5)file permissions. π
The intent of the security script is to point out some obvious holes to the system administrator. it's not doing a full forensic audit, it's pointing at the obvious stuff like "bestie. that file is writable by everyone. please." π«Ά
πΈ ENVIRONMENT
The following variables can be set in /etc/daily.local:
PASSWDSKIPβ a whitespace-separated list ofname:shellpairs allowed to have empty passwords. for example, a machine running both CVS andgotdfor anonymous access might set:
PASSWDSKIP="anoncvs:/usr/local/bin/anoncvssh
anonymous:/usr/local/bin/gotsh"
SUIDSKIPβ a whitespace-separated list of absolute paths to be skipped in setuid/setgid file checks and in device special file checks. Avoid trailing slashes. (the script gets confused, and honestly same π)
π FILES
/etc/changelist/etc/daily/etc/mtree/usr/libexec/security/var/backups
π¦ SEE ALSO
changelist(5), daily(8), mtree(8)
β HISTORY
A security shell script appeared in 4.3BSD-Reno, but most functionality only came with 4.4BSD. so it's giving old money, new features π
π AUTHORS
The present manual was written by David Leonard for OpenBSD 2.9. Andrew Fresh <afresh1@openbsd.org> and Ingo Schwarze <schwarze@openbsd.org> rewrote security from scratch in perl(1) for OpenBSD 5.0. iconic behaviour, honestly π«Ά
π BUGS
The name of this script may provide a false sense of security. π¬ like... the name is doing a LOT of heavy lifting here.
There are perhaps an infinite number of ways the system can be compromised without this script noticing. infinity. bestie. INFINITY. π₯
and that's the whole page, bestie β this one shipped with Debian, dated March 31, 2025 π go forth and let your server tattle on itself daily πβ¨
π¦ where this page comes from
- nixpkgs unstable: cvs-export
- π girlified by deepseek-ai/DeepSeek-V4.1-Flash-1017 on : a language model's rewrite of the original, under its terms