Fixing Upgrade Problems with Netatalk on Ubuntu 9.04 Jaunty Jackelope

As of Ubuntu 9.04 (aka Jaunty Jackelope), it is no longer necessary to jump through hoops to access files on an Ubuntu (or Debian) server from a Macintosh OS X client via netatalk.  Unfortunately, if you’ve previously gone to the trouble of jumping through those hoops by doing a custom compile of netatalk with openssl support , you are likely to run in to problems once you upgrade to Jaunty (and probably the soon to be released v9.10, aka Karmic Koala).  Fortunately, the fixes are pretty easy if you’ve managed to find this blog post.

There are two issues.  First, in order to support encrypted login, the custom build and configuration of netatalk loads some custom user authentication managers (‘uams’) that aren’t present in the latest packaged version of netatalk.  The /etc/netatalk/afpd.conf file probably ends with a line like this:

- -transall -uamlist uams_randnum.so,uams_dhx.so -nosavepassword -advertise_ssh

This both produces failures when trying to load the nonexistent modules, it also means the default modules fail to load, including a new, prebuilt, module ‘uams_dhx2.so’ which supports encrypted authentication on Mac OS X 10.4 and later.  The simplest solution is to edit /etc/netatalk/afpd.conf to either remove or comment out that line and just use the defaults.  Once you’ve updated the config, restart netatalk with the following command ‘sudo /etc/init.d/netatalk restart’.

The next problem is that the newer versions of netatalk use a newer version of a simple database library to store Apple-specific file information.  They provide a script for updating the db files, but you probably don’t know to look for it to run it manually.  For details, check the README.debian for the netatalk package, which is most likely found in ‘/usr/share/doc/netatalk/README.debian’.

Upgrading Problems
==================
This version of Netatalk use to Berkeley DB 4.7.

Earlier releases used Berkeley DB 4.2.  As Netatalk does not
automatically update its database, you may experience problems like
those described in bug #200373: no files showing up in your folders.

If you have such problems, you may try to upgrade the database using the
script /usr/share/doc/netatalk/examples/netatalk_update.sh
[…]

Before you run the script, run ls -la on the target directory and pay attention to the user and group ownership on the .AppleDB directory because after running the script, it tells you to check the permissions/owernership on the files it updated, and it is really good to know what the correct permissions were.

10 thoughts on “Fixing Upgrade Problems with Netatalk on Ubuntu 9.04 Jaunty Jackelope

  1. Pingback: Fixing Upgrade Problems with Netatalk on Ubuntu 9.04 Jaunty Jackelope | Ubuntu-News - Your one stop for news about Ubuntu

  2. Tom Bartlett

    This guide worked for me. There are several other HowTo’s out there which worked for earlier versions of Ubuntu with OS X 10.5.X. For the most recent versions (9.04 and Snow Leopard), the point is that the process has become much easier. I found that the default /etc/netatalk/afpd.conf file needed to have ‘uams_dhx2.so’ added (w/o quotation marks). Connection had been prevented with a “Wrong user or Password” error. No longer!

    Thanks for this…

  3. john

    Thanks for the guide. Hopefully you can help me out with this problem I’m having.

    I cannot connect to my shared drives by click on on the server in the left hand pane of the finder window. I keep getting “connection failed”

    However If I connect via “connect to server” and type in afp://servername then I am able to mount the drives.

    Any help would be appreciated.

    Thanks again for your guide.

  4. john

    sorry to spam you board here but a few minutes after i left that post it just started to work for me…. except for the folders that I forgot to delete the .AppleDB folders in.

  5. Dan H

    Thanks so much, this worked for me. Another alternative (mentioned in “/usr/share/doc/netatalk/README.Debian”) would be to delete .AppleDB rather than upgrading it.

    .AppleDB is located in the root of the directory being shared (most likely /home/user/.AppleDB, or something like that).

  6. Martijn

    The script mentioned in step 2 only works if you have both the Berkeley DB 4.2 *and* 4.7 utils installed:

    sudo apt-get install db4.2-util db4.7-util

    You need to execute that script on every directory you have defined as an AppleTalk volume (and thus contains an .AppleDB directory that needs to be upgraded from db4.2 to db4.7).

Leave a Reply

Your email address will not be published. Required fields are marked *