Samba Guest config with ZFS
This configuration allows anonymous "Guest" access to a specific folder while ensuring all files are owned by a restricted local service account. This is ideal for media libraries (audiobooks, movies) on a trusted home network. 1. FreeBSD System Identity (User & Group) Create a dedicated group and a "no-login" service account to handle guest traffic. bash # Create the shared group sudo pw groupadd smbgrp # Create the guest user (no home directory, no shell access) sudo pw useradd smbguest -c "Samba Guest Account" -d /nonexistent -s /usr/sbin/nologin -g smbgrp # Add your primary administrative user to the group sudo pw groupmod smbgrp -m <YOUR_ADMIN_USER> Use code with caution. 2. ZFS Dataset Tuning Set these properties to ensure ZFS manages permissions via inheritance rather than letting individual apps strip them. bash # Replace 'zpool/dataset' with your actual ZFS dataset path sudo zfs set aclinherit=passthrough zpool/dataset sudo zfs s...