First, create a user on the Linux system to which the Mac will login:
$ sudo useradd -m macbook $ sudo passwd macbook
Next, install the necessary servers and libraries. Most sites I looked at showed
downloading and source code for
netatalk specifically to compile in encryption support (which may
have be required by OSX). On Ubuntu 16.04 right now, the current version of
compatible with OSX; no download and compilation required.
$ sudo apt install netatalk libc6-dev avahi-daemon libnss-mdns
$ sudo vim /etc/nsswitch.conf
hosts line to read as such:
hosts: files mdns4_minimal [NOTFOUND=return] dns mdns4 mdns
Dump the following into
$ sudo vim /etc/avahi/services/afpd.service <?xml version="1.0" standalone='no'?><!--*-nxml-*--> <!DOCTYPE service-group SYSTEM "avahi-service.dtd"> <service-group> <name replace-wildcards="yes">%h</name> <service> <type>_afpovertcp._tcp</type> <port>548</port> </service> <service> <type>_device-info._tcp</type> <port>0</port> <txt-record>model=Xserve</txt-record> </service> </service-group>
Note that the firewall will need to accept connections on TCP port 458.
The main configuration for the file server appears to be in
seems to have a generous number of knobs. For now, I’ll create two shares, one for Time Machine
backups and another for miscellaneous file sharing.
$ sudo vim /etc/netatalk/AppleVolumes.default /home/$u "Home Directory" /archive/TimeMachine/$u "Time Machine" options:tm
$u is a parameter that resolves to the user that has logged into the file sharing service.
Since I created the
macbook user above, the
macbook user will get two file shares customized to
Restart the services:
$ sudo service avahi-daemon restart $ sudo service netatalk restart
AppleVolumes.default require a restart (or possibly just a reload?) of