Sunday, February 27, 2011

Netatalk - File sharing

Well I started playing around with WordPerfect and thought, "gee wouldn't it be nice to be able to save files to my file server"! Well, it turns out that it's simple to create some Apple compatible shares to do just that! Netatalk to the rescue! I'm running Ubuntu server on my file server (9.10 - whoa that's older than I thought!), so with a quick;

sudo apt-get install netatalk

I had everything I needed to start sharing! By default the system shared out my home directory on the server, but I decided to add to that and share out a dedicated space for the Mac. And with NFS and Samba I did the same for the other Windows and Unix machines in the house at the same time!

To set this up for the mac, you need to edit the file /etc/netatalk/AppleVolumes.default. Here is how mine looks after editing;

~/ "Home Directory"
/opt/share/mac "macusers" options:upriv dperm:0770 fperm:0660

So now the directory /opt/share/mac will be shared out as "macusers" and available in the chooser. To make these changes active either restart your machine or hit the command line and do the following as root on the Linux machine (or sudo will work fine too!);

/etc/init.d/netatalk restart

Restarting Netatalk Daemons (this will take a while)
Stopping Netatalk Daemons: afpd cnid_metad papd timelord atalkd.
..
Starting Netatalk services (this will take a while): atalkd afpd papd.
done.

Afterwards on the Mac I fired up the chooser, selected AppleShare and picked my server "Atlantis" from the list. After a quick authentication with my Linux userid and password - I was in!!

Security-wise I'm pretty sure this isn't that tough to break, so I wouldn't do this on an untrusted network, but at home, I'm not too worried. Next up, a bigger challenge, printing!! And I'm going to upgrade my Ubuntu server version as well!








No comments:

Post a Comment