Ok. I've had time to do a lot of experimenting.
So the goal again is to get Time Machine shares working on OS X Monterey. I can get it to work with with my older Catalina machine, but Apple seems to have made a lot of changes between Catalina and Monterey, some of which others have helped with in this thread.
So in various attempts, I have gotten it as far as Monterey seeing the shares and not being able to mount them, or being able to mount them via Command-K but not by browsing. Neither will work automatically as a Time Machine so neither will work for me.
So.... Here I *THINK* is the best path and the furthest I can get. This method tries to use the newest available versions of samba and avahi. Netatalk is no longer required as this version of samba has that functionality built in.
Summary:
- In Packages->Alt-F, disable samba-small
- In Packages->Alt-F, remove dbus, netatalk, and avahi.
- ssh to the box, and use the command line to install Entware. (Not Entware-ng, which is the older version built into the firmware).
- When Entware is installed, do "opkg update" and "opkg upgrade"
- Use opkg to install "dbus" and "avahi-dbus-daemon". That should also grab all the dependencies.
- Reboot (maybe not required but...)
- Ensure dbus and avahi are not running (ps ax | grep dbus; ps ax | grep avahi) If they are running they are probably Alt-F remnants.
- Start the new daemons. I didn't have much luck with the Entware init scripts so I crufted my own, see below. You can just type them out to test, but if it works you can add this to the User script or create something in /etc/init.d/
- Note that we are running the new Entware stuff in /opt. We seem to have to specify paths to config files as the default is to look in / and it will either fail or find older versions.
#!/bin/sh
/opt/etc/init.d/S91smb start
rm /opt/var/run/dbus/pid
/opt/bin/dbus-daemon --config-file=/opt/etc/dbus.conf
# You might need this sleep here so dbus is running when avahi tries to connect to itsleep 5
/opt/sbin/avahi-daemon --file=/opt/etc/avahi/avahi-daemon.conf
If dbus doesn't start, it might want a user named dbus. You can create it in the Alt-F UI and save settings so that it will persist through configuration changes.
So that works and sms productive, except I'm stuck here starting avahi-daemon:
Found user 'nobody' (UID 99) and group 'nogroup' (GID 99).
Successfully dropped root privileges.
avahi-daemon 0.8 starting up.
WARNING: No NSS support for mDNS detected, consider installing nss-mdns!
dbus_bus_request_name(): Connection ":1.0" is not allowed to own the service "org.freedesktop.Avahi" due to security policies in the configuration file
WARNING: Failed to contact D-Bus daemon.
avahi-daemon 0.8 exiting.
Google finds a few people asking about this error but their problems seem to be packaging errors. I haven't figured out what configuration tweaks are needed to solve this one. It seems to be a fight between avahi and dbus arguing about whether avahi should be allowed to be service.
Can anyone crack that nut? Or am I going down a dead end?
Cheers.