If you’re like me you have an OSX computer or 3 at home, and a debian file server. If you’re like me you hate samba/nfs on principle and want your debian server to show up in finder. If you’re like me you arent using debian 3 which is what most of the walkthroughs seem to expect… This is how I did it… With Debian Lenny.
What we’re using, and why:
- Avahi handles zeroconf (making it show up in finder) (most howtos involve howl which is no longer in apt)
- netatalk has afpd
- afpd is the fileserver
From: http://blog.damontimm.com/how-to-install-netatalk-afp-on-ubuntu-with-encrypted-authentication/
- apt-get update
- mkdir -p ~/src/netatalk
- cd ~/src/netatalk
- apt-get install cracklib2-dev libssl-dev
- apt-get source netatalk
- apt-get build-dep netatalk
- cd netatalk-2.0.3
From: http://www.sharedknowhow.com/2008/05/installing-netatalk-under-centos-5-with-leopard-support/
- vim bin/cnid/cnid_index.c ## replace “ret = db->stat(db, &sp, 0);” with “ret = db->stat(db, NULL, &sp, 0);” line 277
- vim etc/cnid_dbd/dbif.c ## replace “ret = db->stat(db, &sp, 0);” with “ret = db->stat(db, NULL, &sp, 0);” line 517
Mine
- ./configure –prefix=/usr/local/netatalk
- make
- make install
- vim /etc/rc.local ## add “/usr/local/netatalk/sbin/afpd”
- /usr/local/netatalk/sbin/afpd
- apt-get install avahi-daemon
- vim /etc/nsswitch.conf ## make the hosts line read “hosts: files dns mdns4”
- cd /etc/avahi/services
- wget http://www.disgruntled-dutch.com/media/afpd.service
- /etc/init.d/avahi-daemon restart
in case that file drops off the face of the net, this is its contents (except “< ?” is “<?” and “< !” is “<!”) :
< ?xml version="1.0" standalone='no'?> < !DOCTYPE service-group SYSTEM "avahi-service.dtd">%h _afpovertcp._tcp 548
At this point your server should show up under the network in your finder… and you should be able to connect with any system username/pw combo
Thanks, that's exactly what I was looking for 🙂
Worked great for a week but now i can't access the serveur anymor. It does show up in the finder but i get "access refused" message.
I'd like to try the package version from aptitude. How do you uninstall netatalk installed your way ?
Thanks a lot.. and great work..
Thanks for the post, it was super easy to follow, and I now have an AFP server!
One side note, for your './configure –prefix=/usr/local/netatalk' line, I used –prefix instead.
Great work! Work'd like a charm the second (as usual for me) time. I skipped the -prefix option, although I see the benefits of having all the files under netatalk.
I wonder, is there something the matter with "apt-get install netatalk"
While this article is an interesting read, there is a more updated answer for those who are running debian squeeze and would like to back up the mac osx using time machine. http://bit.ly/fgxzif
@navy-drew well, yeah, newer deb releases with newer packages probably help quite a bit 🙂