macos-smb-serverlisted
Install: claude install-skill soulmachine/skills
# macOS SMB server (com.apple.smb.server)
Validated on macOS 26 (Darwin 25.6), Mac mini M2, 2026-08. Two facts drive everything here:
- **Virtual shares**: beyond the explicit sharepoints, smbd automatically offers every mounted
volume to admin users ("Macintosh HD", external drives) and each authenticating user's own home
folder. They never appear in System Settings or `sharing -l`, so they can't be removed there.
- **Commit, don't write**: smbd never reads
`/Library/Preferences/SystemConfiguration/com.apple.smb.server.plist` off disk. A `defaults
write` there is invisible until reboot. Changes apply only when committed through the
SCPreferences API, whose commit fires the `com.apple.smb.preferences` launchd event that runs
`/usr/libexec/smb-sync-preferences`.
## 1 — Classify what clients see
`sharing -l` lists the explicit sharepoints and their per-share guest flags. Anything a client
sees beyond that list is a virtual share. Done when every share visible from a client is
classified as sharepoint or virtual — the two are fixed by different mechanisms.
## 2 — Change settings
Sharepoints use the `sharing` tool directly, effective immediately: `sudo sharing -r <name>`
removes one, `sudo sharing -e <name> -g 000` turns off its guest access, `-a <path>` adds one.
Server-level keys go through an SCPreferences commit, then a restart:
sudo swift scripts/smb-prefs.swift VirtualAdminShares=false VirtualHomeShares=false AllowGuestAccess=false
sudo launchctl