Today we are going to set up a proxmoxVE Ubuntu openVZ container to allow AFP connections from your Mac.
You will need proxmoxVE already installed, and a 64bit Ubuntu 10.10 openVZ template. I had to rename this image to something like ubuntu-10.10-server_x86_amd64.tar.gz in order to import it into proxmoxVE.
Create a new VM:
Type: container
Network Type: Bridged Ethernet (veth)
If you don’t use this type of network you will not have the benefits of the bonjour service.
Now start up the VM and then SSH into your new system.  We need to make sure we are up to date on everything, so go ahead and issue the following to upgrade anything that needs it:
apt-get update apt-get upgrade |
Now we can install netatalk
apt-get install netatalk |
Next we will need to configure afpd.  Open the conf file in your favorite editor:
vi /etc/netatalk/afpd.conf |
Comment out the line at the bottom, and add this at the bottom:
- -transall -uamlist uams_randnum.so,uams_dhx2.so -nosavepassword -advertise_ssh |
Next we need to set up the volumes that we will share. Open this config file in your favorite editor:
vi /etc/netatalk/AppleVolumes.default |
Comment out the default line at the bottom and add this, and put real users names instead of username1 and username2.  These users need to exist on the linux box. (use adduser to add them)
~/ "$u" allow:username1,username2 cnidscheme:dbd |
Add a line like this for each user to allow them to have an individual TimeMachine mount point also:
/home/username/TimeMachine     TimeMachine allow:username1,username2 cnidscheme:dbd options:usedots,upriv |
If you are using OS X Tiger or lower you will need to remove the options upriv from the end
Next we have to install and set up cracklib to allow the authentication to work correctly:
apt-get install cracklib2 cracklib-runtime wamerican update-cracklib /var/cache/cracklib/cracklib_dict |
Finally, you must restart netalk to get all of this working:
/etc/init.d/netatalk restart |
At this point you could stop and click on the Go menu in the Finder, and select connect to server and put in your URI to the afp mount you’ve added, but there is one final step to configure bonjour services so your Macs will just “see” your new service instead of having to specify it for each connection.  We start with installing avahi and mdns:
apt-get install avahi-daemon libnss-mdns |
Next we need to turn it on.  Again, with your favorite editor, open the conf file:
vi /etc/nsswitch.conf |
And make the hosts line look like this:
hosts: files mdns4_minimal [NOTFOUND=return] dns mdns4 mdns |
Create the following file to put some specific configurations around the afpd service:
vi /etc/avahi/services/afpd.service |
And add the following:
<?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> |
The following models are acceptable and all this really does is change the icon on your Mac desktop when you mount the fielsystem.
- RackMac (same as Xserve)
- PowerBook
- PowerMac
- Macmini
- iMac
- MacBook
- MacBookPro
- MacBookAir
- MacPro
- AppleTV1,1
- AirPort
Now we need to restart avahi:
/etc/init.d/avahi-daemon restart |
To add support for TimeMachine to each mac, you will need to issue to following on the terminal:
defaults write com.apple.systempreferences TMShowUnsupportedNetworkVolumes 1 |
This allows the Mac to use this unsupported network volume as a TimeMachine volume.  I hope this helps someone out there, I found a few tutorials and none of them seemed to work out of the box, so I decided to post this one.








Thanks… but you missed to enable CNID_METAD
vi /etc/default/netatalk
“CNID_METAD_RUN=yes”
I’ll take a look at my set up as it may already be on, but I haven’t needed to set it specifically on my system yet.
I took a look at my configs, if you follow my directions step by step then that gets set automagically.