A Linux share that Macs actually see
What it took for a Go TUI to make Samba Time Machine targets, NFS exports and client mounts behave across six Linux families and macOS.
A file share is three config files and a prayer. smb.conf for Samba, /etc/exports for NFS, /etc/fstab for whatever you mount from elsewhere. Each has its own syntax, its own way of being reloaded, and its own way of failing silently. Do it on Debian and Fedora and a Mac and you have nine files and three prayers.
The specific thing that pushed me to write a tool was Time Machine. Backing a Mac up to a Linux box over Samba works, and has for years. But it only works if you set about a dozen options that nothing tells you about, and only if the box advertises itself in a way that makes the Mac’s Time Machine preferences list it at all. Get one wrong and the share mounts fine in Finder and never appears as a backup destination.
So I wrote sambo: a Go command-line tool with an interactive menu, for creating shares, exports and mounts, with the Time Machine recipe baked in. It validates with testparm, backs up before every write, and writes atomically. This is what it taught me.

The Time Machine recipe
Here is the block sambo writes for a Time Machine share. Every line is load-bearing:
[TimeMachine]
vfs objects = catia fruit streams_xattr
fruit:metadata = stream
fruit:model = MacSamba
fruit:veto_appledouble = no
fruit:posix_rename = yes
fruit:zero_file_id = yes
fruit:wipe_intentionally_left_blank_rfork = yes
fruit:delete_empty_adfiles = yes
fruit:nfs_aces = no
fruit:aapl = yes
fruit:time machine = yes
durable handles = yes
kernel oplocks = no
kernel share modes = no
Plus, globally, min protocol = SMB2. The fruit module is Samba’s Apple compatibility layer, and streams_xattr stores the resource forks macOS insists on. fruit:time machine = yes is the line that makes the Mac treat the share as a sparsebundle host. fruit:nfs_aces = no arrived later, after a backup that mounted but would not complete. The last three lines are reliability settings for a backup that gets interrupted, which, on a laptop, is every backup.
None of that makes the share appear in Time Machine’s list. That takes Bonjour. The box has to advertise an _adisk._tcp service with a TXT record describing each Time Machine share, and it helps a great deal if it also claims to be a model the Mac recognises:
<service>
<type>_device-info._tcp</type>
<port>0</port>
<txt-record>model=TimeCapsule8,119</txt-record>
</service>
<service>
<type>_adisk._tcp</type>
<port>9</port>
<txt-record>sys=waMa=0,adVF=0x100</txt-record>
<txt-record>dk0=adVN=TimeMachine,adVF=0x82</txt-record>
</service>
sambo writes that as an Avahi service file. adVF=0x82 is two flags: 0x02 for Time Machine, 0x80 for mounted. The TimeCapsule8,119 model string makes the Mac recognise the box as a Time Machine host and draw the right icon.
The last piece is ownership. A Time Machine share whose directory is owned by root and written to as a Samba user produces a backup that half-works. sambo has a FixPermissions step for exactly that, because I got tired of explaining it.
The mounts you cannot see
The client side had its own lesson. sambo mount list originally read /proc/mounts, which is the kernel’s list of what is mounted right now. It is complete and it is live. It also knows nothing about /etc/fstab, so a share that is declared in fstab but failed to mount at boot, which on Debian is a normal Tuesday, was simply absent from the list. The user saw nothing wrong because there was nothing to see.
The list now reads both sources and shows two columns. Active means the kernel has it mounted. Persistent means fstab will bring it back. A row that is active and not persistent is a mount someone did by hand and will lose on reboot. A row that is persistent and not active is the one that needs looking at.

The filesystem type names are the small print. The kernel reports nfs, nfs3 or nfs4 depending on how the mount was negotiated, and cifs, smb or smbfs depending on the platform and the decade. Detection is now a prefix match, and the display normalises to nfs and cifs so the user is not asked to care.
macOS is a different operating system
This sounds obvious. It was not obvious enough. On a Mac, mount lists autofs trigger points alongside real mounts, and a trigger is not a mount; it is a promise to mount if anyone looks. sambo skips any line containing (autofs. Persistent NFS on a Mac is not an fstab line at all but an automount map entry, and for a Linux server it wants vers=3 and resvport, which took a while to find.
The service model is different too. Samba on a Mac comes from Homebrew and is managed by launchctl; you reload it with pkill -HUP smbd. NFS is built in and managed by nfsd enable, nfsd start and nfsd update, not systemctl and exportfs. sambo has a platform layer that hides all of that, and the platform layer is where most of the macOS commits went.
Six Linux families, six sets of package names
Installing Samba and Avahi on behalf of the user sounds like one apt install. It is one apt install on Debian and Ubuntu. On Fedora, smbpasswd lives in samba-common-tools, which is not pulled in by samba. On Alpine, avahi-daemon needs dbus, which is not a dependency, and will start and do nothing without it. Arch, openSUSE and Void each have their own spelling. The package-name table is now a tested matrix with several hundred assertions, and I expect it to be wrong again by the time you read this.
Things I did to myself
A one-path NFS export shared with four clients showed up in the list as four exports, because /etc/exports has one line per client and I was displaying lines. It is now grouped by path.
Early on, “modify a share” was implemented as delete-then-create, which has a window where the share does not exist and a failure mode where it never comes back. It now writes to a temporary file and swaps. CIFS credentials used to go into fstab in plain text, visible to every user on the system; they go in a 0600 credentials file now. Network mounts get _netdev so systemd does not try to mount them before the network exists. Destructive commands ask first unless you pass -y.
And a confession: the first release included the compiled binaries in the repository, about six megabytes of them, which stayed there until version 1.8.1. There is a lesson in there about looking at git status before pushing.
The terminal has opinions too
The menu originally used emoji for status markers. They rendered at different widths in different terminals and broke the alignment of every table. They are now [x], [+] and [!], and the cursor is › rather than ▶, which is ugly and consistent. The sparklines are Braille characters, which are monospaced everywhere and look better than they have any right to.
Where it is
Version 1.8.1, with binaries for Linux on amd64 and arm64, and a signed package for macOS. The CI builds the macOS package after the Linux release job, because the two used to race to create the GitHub release and one of them would lose. The repository is at github.com/winterweken/sambo.
The Time Machine block above is the thing I wish someone had handed me. Copy it. Then run Avahi.