I recently upgraded my server to a new machine running Ubuntu 11.10. With the Macs in our house I’ve always used Samba for file sharing – it works, it’s stable and there’s no problems really. The fact every file is reported as being at least 1MB in size is a minor irritation, as is the confusing mash of UNIX and Windows file permissions. Getting ‘public’ folders where anyone can write is a bit of a tricky farce.
I decided it’d be worth installing Netatalk instead for our Macs (and the OS9 Mac that I sometimes boot for amusement), however my usual trick of simply installing the package and waiting for it to start didn’t work this time.
While trawling through Google I found many many out of date howto documents that all seemed to focus on making an Ubuntu server pretend to be a TimeMachine backup. I found the following site which contains actual working instructions so, in case that site goes away, here is a short summary of what to do.
First, completely remove any failed attempts at hacking Netatalk from your system
sudo apt-get remove netatalk --purge sudo rm -rf /etc/netatalk
If you mangled your system trying to compile your own package you’ll have to fix that mess yourself.
Now add the following lines to your /etc/apt/sources.list
deb http://ppa.launchpad.net/jstrunk-math/ppa/ubuntu oneiric main deb-src http://ppa.launchpad.net/jstrunk-math/ppa/ubuntu oneiric main
Next you reinstall Netatalk…
sudo apt-get update sudo apt-get install netatalk
And edit /etc/netatalk/afpd.conf since it appears nobody bothers to ship working default configurations any more. Find the end of the file, add this
- -tcp -noddp -uamlist uams_dhx.so,uams_dhx2_passwd.so -nosavepassword -setuplog "default log_info /var/log/afpd.log"
Then go and edit /etc/netatalk/AppleVolumes.default to your liking and finally
sudo service netatalk restart
If it works, you should be able to tell your Mac to Go -> Connect to server -> then type in afp://linux-machine or afp://ip-address-of-linux-machine and log in.
I also followed this outdated howto (don’t follow the first bit, it doesn’t work any more) from sections 4 to 5 to configure and install Avahi. I don’t know if this is really needed since I’ve not found Bonjour to be that reliable anyway – half the time my Mac mini fails to find the other Mac or Windows PCs on the network anyway.