Debian/Ubuntu and MacOS X. Sharing files using netatalk

Intro

If you are trying to share files using a fast protocol (that’s not samba) which fits into debian and MacOS you should install netatalk package.

You will find the trap only if you are using netatalk from the usual Debian apt-source and if you have altered MacOS X default to do not use clear text passwords.

You’ve 2 solutions:

  • MacOS X won’t connect to the Debian Linux server, just saying that the access name or password wasn’t right, but has never asked for one. Just enable clear text passwords in MacOS X when you connect to an afp server and it will work like a charm.
  • OpenSSL support is currently disabled, because of licensing issues: The Free Software Foundation and Debian consider the GNU General Public License (GPL) under which Netatalk is licensed to be incompatible with the OpenSSL license.You can build locally with OpenSSL using the following commands

Using netatalk you can use any Debian server as a time machine backup, just read some manuals to know how.

Quick reference

To be up to date, look into /usr/share/doc/netatalk/README.Debian
usuario@LOCAL:~/$ sudo aptitude install devscripts
usuario@LOCAL:~/$ sudo aptitude build-dep netatalk
usuario@LOCAL:~/$ apt-get source netatalk
usuario@LOCAL:~/$ cd netatalk-*
usuario@LOCAL:~/$ dch -l +ssl -D local –force-distribution “Local build with OpenSSL.”
usuario@LOCAL:~/$ DEB_AUTO_UPDATE_DEBIAN_CONTROL=1 DEB_BUILD_OPTIONS=openssl debuild -us -uc
(You my need additional build-dependencies not resolved automatically.)
usuario@LOCAL:~/$ dpkg -i ../netatalk*.deb

Alternatively you can subscribe to unofficial(!) precompiled packages by adding the following to your /etc/apt/sources.list:

usuario@LOCAL:~/$ cat /etc/apt/sources.list
….
#where following $DIST=stable, testing, unstable, wheezy, …
#look into http://debian.jones.dk/dists/ to know which one are available
deb http://debian.jones.dk/ $DIST netatalk

Here are my config files

usuario@LOCAL:~/$ cat /etc/netatalk/afpd.conf
# default:
# – -tcp -noddp -uamlist uams_dhx.so,uams_dhx2.so -nosavepassword
– -transall -uamlist uams_dhx.so -nosavepassword -advertise_ssh
.
usuario@LOCAL:~/$ cat /etc/netatalk/AppleVolumes.default
# The line below sets some DEFAULT, starting with Netatalk 2.1.
: DEFAULT: options:upriv,usedots
/PATH/TO/MY/disk MYDISKNAME allow:myselecteduser cnidscheme:dbd options:usedots,upriv
# End of File

Links and references