I upgraded to Leopard a day early, but in that day I have already found a new feature that required a change on my Linux server to make everything work peachy.
Leopard’s new Finder now lists computers under the “Shared” section on the left hand panel. This is pretty snazzy. Not only can you manually mount a server via Apple + K (Connect to server), all local servers show up here. However it seems that if your Mac and/or Linux based machine doesn’t have some sort of zeroconf (aka Bonjour) service advertising AFP, then it shows up as a Samba (aka PC Server) under Shared.
Assumption:
I assume you have netatalk configured correctly, as in your rebuild it correctly with dhx support (not by default in Debian). . You can read more about that here.
So under Debian the fix is as follows:
1. sudo su - or su -
2. aptitude install avahi-daemon
3. echo “- -noddp -uamlist uams_randnum.so,uams_dhx.so” > /etc/netatalk/afpd.conf
4. vi /etc/nsswitch
change your hosts line to be like this:
hosts: files dns mdns4
5. paste in (no quotes):
‘cd /etc/avahi/services; wget http://www.disgruntled-dutch.com/media/afpd.service’
6. /etc/init.d/netatalk restart && /etc/init.d/avahi-daemon restart && tail -n70 /var/log/syslog
Check if it started up like for example:
Oct 26 11:03:42 thenas afpd[26279]: Registering CNID module [last]
Oct 26 11:03:42 thenas afpd[26279]: Registering CNID module [cdb]
Oct 26 11:03:42 thenas afpd[26279]: Registering CNID module [dbd]
Oct 26 11:03:42 thenas afpd[26279]: Loading ConfigFile
Oct 26 11:03:42 thenas afpd[26279]: main: atp_open: Cannot assign requested address
Oct 26 11:03:42 thenas afpd[26279]: dsi_tcp: hostname 'thenas' resolves to loopback address
Oct 26 11:03:42 thenas afpd[26279]: dsi_tcp: '192.168.1.250' on interface 'eth1' will be used instead.
Oct 26 11:03:42 thenas afpd[26279]: ASIP started on 192.168.1.250:548(5) (2.0.3)
Oct 26 11:03:42 thenas afpd[26279]: Sucessfully registered afp://192.168.1.250/?NAME=thenas&ZONE= with SRVLOC
Oct 26 11:03:42 thenas afpd[26279]: uam: loading (/usr/lib/netatalk/uams_dhx.so)
Oct 26 11:03:42 thenas afpd[26279]: uam: uams_dhx.so loaded
Oct 26 11:03:42 thenas afpd[26279]: uam: loading (/usr/lib/netatalk/uams_guest.so)
Oct 26 11:03:42 thenas afpd[26279]: uam: uams_guest.so loaded
Oct 26 11:03:42 thenas afpd[26279]: uam: loading (/usr/lib/netatalk/uams_clrtxt.so)
Oct 26 11:03:42 thenas afpd[26279]: uam: uams_clrtxt.so loaded
Oct 26 11:03:42 thenas afpd[26279]: uam: loading (/usr/lib/netatalk/uams_passwd.so)
Oct 26 11:03:42 thenas afpd[26279]: uam_load(uams_passwd.so): mod_symbol error for symbol uams_passwd
Oct 26 11:03:42 thenas afpd[26279]: uam: uams_passwd.so load failure
Oct 26 11:03:42 thenas afpd[26279]: uam: loading (/usr/lib/netatalk/uams_gss.so)
Oct 26 11:03:42 thenas avahi-daemon[26246]: Got SIGTERM, quitting.
Oct 26 11:03:42 thenas avahi-daemon[26246]: Leaving mDNS multicast group on interface eth1.IPv4 with address 192.168.1.250.
Oct 26 11:03:42 thenas afpd[26279]: uam: uams_gss.so loaded
Oct 26 11:03:42 thenas afpd[26279]: uam: "Client Krb v2" available
Oct 26 11:03:42 thenas afpd[26279]: uam: "Cleartxt Passwrd" available
Oct 26 11:03:42 thenas afpd[26279]: uam: "No User Authent" available
Oct 26 11:03:42 thenas afpd[26279]: uam: "DHCAST128" available
Oct 26 11:03:42 thenas afpd[26279]: main: dsi_init: Address already in use
Oct 26 11:03:42 thenas afpd[26279]: uam: loading (/usr/lib/netatalk/uams_randnum.so)
Oct 26 11:03:42 thenas afpd[26279]: uam: uams_randnum.so loaded
Oct 26 11:03:42 thenas afpd[26279]: uam: loading (/usr/lib/netatalk/uams_dhx.so)
Oct 26 11:03:42 thenas afpd[26279]: uam: uams_dhx.so loaded
Oct 26 11:03:42 thenas afpd[26279]: Finished parsing Config File
Oct 26 11:03:42 thenas avahi-daemon[26290]: Found user 'avahi' (UID 107) and group 'avahi' (GID 106).
Oct 26 11:03:42 thenas avahi-daemon[26290]: Successfully dropped root privileges.
Oct 26 11:03:42 thenas avahi-daemon[26290]: avahi-daemon 0.6.21 starting up.
Oct 26 11:03:42 thenas avahi-daemon[26290]: Successfully called chroot().
Oct 26 11:03:42 thenas avahi-daemon[26290]: Successfully dropped remaining capabilities.
Oct 26 11:03:42 thenas avahi-daemon[26290]: Loading service file /services/afpd.service.
Oct 26 11:03:42 thenas avahi-daemon[26290]: Joining mDNS multicast group on interface eth1.IPv4 with address 192.168.1.250.
Oct 26 11:03:42 thenas avahi-daemon[26290]: New relevant interface eth1.IPv4 for mDNS.
Oct 26 11:03:42 thenas avahi-daemon[26290]: Network interface enumeration completed.
Oct 26 11:03:42 thenas avahi-daemon[26290]: Registering new address record for fe80::213:d4ff:fe0a:2da8 on eth1.*.
Oct 26 11:03:42 thenas avahi-daemon[26290]: Registering new address record for 192.168.1.250 on eth1.IPv4.
Oct 26 11:03:42 thenas avahi-daemon[26290]: Registering HINFO record with values 'I686'/'LINUX'.
Oct 26 11:03:43 thenas avahi-daemon[26290]: Server startup complete. Host name is thenas.local. Local service cookie is 962578462.
Oct 26 11:03:44 thenas avahi-daemon[26290]: Service "thenas" (/services/afpd.service) successfully established.
You are good to go!
EDIT: Had to escape the XML code.
EDIT2: added a ‘wget step’ due to mangled XML code on this blog.







Hi Yvo! Thanks for writing this up — it’s exactly what I was looking for. I knew there had to be a Zeroconf daemon for Debian, but I had no idea what it was called, or how to make it work if I did. I also had to build netatalk from the source package in order to use DHX authentication, as you suggested. I was just using the cleartext UAM in Tiger, because it’s just on my secure local network. But Leopard apparently no longer allows cleartext AFP passwords at all, because I could no longer connect to any netatalk shares with just the cleartext UAM. There were some issues building the UAM, but, now that it’s all working, it’s so great to be able to have my file server show up in Finder’s sidebar now!
The XML you posted for
afpd.servicelooks like it got a little mangled by the blog formatting. I wrote up a blog post about my issues, and I posted the XML I used:Making
netatalkWork on Debian with LeopardAh yes. Wordpress and its code mangling :-). I changed the step to instead download the file from this web server. Thanks for letting me know about that and glad that my article was able to help!
Alas, it didn’t work for me. I get an Error Code -5002 when I try to connect to my netatalk server.
I got this error in log:
DSIConfigInit: Error registering afp://127.0.1.1/?NAME=server&ZONE= with SRVLOC
And I don’t know what this is about. Can anyone please help me with this issue?
Indeed a professional summary. I works much better. Maybe a bit too good: I have three (3) servers in Shared, although I only have two (2) enabled on my Ubuntu 7.10 Linux server: AFP and SMB. Both also configured in avahi.
Somehow I get two instances of SMB - one with PC icon and one with Mac icon. What to do?