Ubuntu – connecting to Ubuntu file share from Mac OS X

mac-osxnetatalksambaUbuntu

I have a headless Ubuntu server running on my network. Initially I had configured it for SAMBA for use with my windows machines and that seemed to work ok. I've just bought a Mac and am trying to access the server – it appears in Finder without me doing anything but when I log in, I can't see any files or write to it or anything.

I tried running through this tutorial to set up netatalk and avahi but it fails at the first step – I can't get the source files because I get an error:

Package libcupsys2-dev is a virtual package provided by:
  libcups2-dev 1.4.2-8
You should explicitly select one to install.
E: Package libcupsys2-dev has no installation candidate
E: Failed to satisfy Build-Depends dependency for netatalk: libcupsys2-dev

and I don't know what to do next. I tried going through the steps just using the basic version from the repos which gets me as far as the server appearing in Finder, but when I try to log on, I just get an invalid username/password error (and I've tried so many times I am certain I have the right ones!)

Does anyone have any tips for setting up an Ubuntu server so I can use it with my Mac?

For the Bounty:
I'd like the server broadcast via Bonjour so I can see it in finder, and I'd like the option to set it up as a TimeMachine backup if possible.

Thanks

Best Answer

As Gionn said, you don't strictly need AFP, but using it is a lot easier (especially if you also install avahi to advertise your server).

The error you have is due to CUPS, by default netatalk depends on it.
So you should try to install CUPS or disable the dependency (as I am a Gentoo user, I don't know how to do this on Ubuntu).

Then install the latest version Netatalk (2.0.5-r1 at this time), then configure it :

In /etc/default/netatalk.conf or edit as follow :

ATALKD_RUN=no
PAPD_RUN=no
CNID_METAD_RUN=yes
AFPD_RUN=yes
TIMELORD_RUN=no
A2BOOT_RUN=no

In /etc/netatalk/afpd.conf edit as follow :

- -noddp -uamlist uams_dhx.so,uams_dhx2.so -nosavepassword -advertise_ssh

Let /etc/netatalk/AppleVolumes.default intact to log in with the ubuntu server user.


If you want a bonjour advertising, install the latest version of Avahi (0.6.25-r1), then just create or edit /etc/avahi/services/afpd.service like this example.


EDIT :

Netatalk 2.1 (even beta versions) should solve your problem.

I installed Gentoo on my old computer, then I tried Netatalk 2.0.5-r1 (same version I have at work) and I got the same error as you have and I solved it by using version 2.1 beta, which works like a charm.

As rjewell said for TimeMachine support, do the following in Mac OS X terminal :

defaults write com.apple.systempreferences TMShowUnsupportedNetworkVolumes 1