NetAFP, the single largest contributor to the netatalk project, announced that they have made netatalk 2.2.0-p6 available to it’s paying customers.
These are the guys such as QNAP, Netgear, Belkin, Buffalo etc. who use netatalk as part of their embedded linux distributions for their NAS appliances.
This version of netatalk will work perfectly with Mac OS X 10.7’s new DHX2 authentication methods.
It will also work perfectly with time machine.
I found that the project had appeared on github before it had on freshmeat so here’s how to get it working in a few easy steps.
The systems I have tried this on were both Debian systems (Debian 5 and Debian 6).
- Remove previous installation of netatalk
If you’ve installed netatalk previously (most probably by recompiling the source obtained from apt to include SSL support), then you’ll need to remove it.
Hopefully you’ve kept your compiled .deb file just incase.dpkg -r netatalk
- Install git if you haven’t already
apt-get install git-core
- Make a build directory and git clone the netatalk 2.2.0-p6 project from github
mkdir ~/build cd ~/build git clone git://github.com/jrmithdobbs/netatalk-2-2-0-p6.git cd netatalk-2-2-0-p6
- Configure and compile the project (assuming you already have build tools installed)
I found that on certain systems, it wouldn’t compile without the OpenLDAP headers. You can simply disable LDAP support by appending –without-ldap to your configure command:./configure --without-ldap make sudo make install
This will place the new version of netatalk under the /usr/local $PREFIX. I left this as the default because I didn’t want to interfere with my previous netatalk installation which placed files where you’d expect them to be from a .deb, IE in /usr/bin:/usr/sbin and /etc
- Copy your previous configuration
sudo cp /etc/netatalk/* /usr/local/etc/netatalk/
You’ll notice I omitted -R, I don’t want to overwrite the
uams
directory
- Edit your /usr/local/etc/netatalk/AppleVolumes.default
For each one of your defined shares, make sure you addcnidscheme:dbd
as your preferred cnidscheme. cdb was the previous default and appears to play havock with Lion.
For example:~/ "$u" cnidscheme:dbd /var/data/files "Files" allow:@staff cnidscheme:dbd options:upriv,usedots dperm:0775 fperm:0664
- Edit your /usr/local/etc/netatalk/afpd.conf
Make sure you have uams_dhx2.so listed in your uamlist:- -transall --uamlist uams_randnum.so,uams_dhx.so,uams_dhx2.so -nosavepassword -advertise_ssh
- Edit your /etc/default/netatalk
- Edit your init.d/netatalk file
This bit’s annoying. The included init.d/netatalk file has hardcoded paths and does not use the $PATH variable, despite it being set.
Personally I just went through it and deleted all hardcoded /usr/bin and /usr/sbin’s and then set the $PATH variable at the top to include /usr/local/bin and /usr/local/sbin.
This seems to work. - Delete your old CNID metadata databases
For each share you have defined, cd to the root of it and eithermv
(safer) or
rm -Rf
the
.AppleDB
folder.
This will cause the CNID database to be rebuilt using the dbd format and not the cdb format. - Start netatalk again
sudo /etc/init.d/netatalk start
Also, for the share you’ve defined for your Time Machine backups, you’ll need to add “tm” to your options list. This will enable Time Machine support that Lion now relies on.
For example:
/var/data/backup "Backup" allow:@staff cnidscheme:dbd options:tm,upriv,usedots dperm:0770 fperm:0660
This file should have been left by your previous netatalk installation. Make sure it contains the following:
# Set which daemons to run (papd is dependent upon atalkd): ATALKD_RUN=no PAPD_RUN=no CNID_METAD_RUN=yes AFPD_RUN=yes TIMELORD_RUN=no A2BOOT_RUN=no # Control whether the daemons are started in the background ATALK_BGROUND=no
OK so this should now have you working in Lion.
This was a rushed post so please comment if you know something I don’t. I hope it’s been of help to some at least as a helpful point in the right direction