Basic BSD System Administration
Basic BSD System Administration tests day-to-day operation: boot-time service control, accounts, scheduled jobs, logging and privilege escalation, with FreeBSD/OpenBSD/NetBSD differences treated as first-class knowledge.
Services and the rc system
The base rc system reads /etc/defaults/rc.conf for defaults (never edit), /etc/rc.conf for local settings, and /etc/rc.conf.d/ fragments. sysrc is the safe editor: sysrc sshd_enable=YES writes the line and validates the variable name. service sshd start, stop, restart and status act on rc.d scripts. OpenBSD replaces this with rcctl enable sshd and rcctl start sshd, writing /etc/rc.conf.local.
Accounts and groups
adduser is interactive; pw is scriptable: pw useradd -n alice -u 1001 -s /bin/sh -m -c Alice, then pw groupmod wheel -m alice. Manual edits belong in vipw, which locks the file; if you patch /etc/master.passwd by hand, rebuild the databases with pwd_mkdb -p /etc/master.passwd. OpenBSD uses useradd, usermod and groupadd.
Scheduled and periodic jobs
crontab -e edits your own table with six fields: minute, hour, day, month, weekday, command. /etc/crontab has a seventh field naming the user. FreeBSD runs periodic(8) scripts from /etc/periodic/daily and its siblings, tuned through /etc/periodic.conf.
Worked example
Create alice with a home directory and wheel membership, then verify: pw useradd -n alice -s /bin/sh -m; pw groupmod wheel -m alice; id alice. Reasoning: -m builds the home directory from /etc/skel, groupmod appends rather than replaces secondary groups, and id confirms both uid and group list without reading master.passwd.
Traps
Writing straight into /etc/passwd without pwd_mkdb leaves stale database files and broken logins. Setting a service to YES in /etc/defaults/rc.conf has no lasting effect after an upgrade. cron silently drops jobs whose command it cannot find, so use absolute paths. On OpenBSD, sudo may not be installed; doas with /etc/doas.conf is the default escalation path.