Ubuntu: Mac file server with Netatalk

From ReceptiveIT
Jump to: navigation, search


Netatalk is the Linux implementation of the Apple Macintosh server services. I have set up a few of these, so I thought it would be a good idea to document the common steps here.


First we need to install the base packages.

penguin:# apt-get install netatalk


Add this to the bottom of /etc/netatalk/afpd.conf

- -transall -uamlist uams_dhx2.so -nosavepassword -advertise_ssh

Edit /etc/netatalk/AppleVolumes.default. This will give users access to their home directories, and allow member of the users group to access /data

~/                      "Home Directory"        options:usedots,upriv
/data      "Data share"        cnidscheme:cdb dperm:0770 fperm:0660 options:usedots,upriv,noadouble allow:@users

Time Machine

Since OSX 10.5 Leopard, Apple has included the best bundled out-of-the-box backup solutions in the known universe. It is designed to work with a local backup hard drive (separate to your data/os drive) or an Apple Time Capsule. Since Netatalk v2.0.5, we can also back up to a netatalk share.

Lets assume that you want to share a directory called /timemachine for the purpose of Time Machine backups over the network.

We need to edit /etc/netatalk/AppleVolume.default and add the share with the time machine extensions

/timemachine       "TimeMachine Backups"         cnidscheme:cdb dperm:0770 fperm:0660 options:usedots,tm allow:@users

We need to create a hidden magic file that the OSX client will look for

penguin:# touch /timemachine/.com.apple.timemachine.supported

You may need to connect to the afp share on your OSX client so time machine will see the share

* Finder
* Go
* Connect to server
* afp://penguin (substitute your server name)
* Authenticate
* Set up Time Machine