geekvenue.net

Welcome to Chucktips Hardware HELP WITH DEAD OS Installing FreeBSD Miscellaneous
 faq
 search
 add article
 cool-stuff
 how-to
 main
 tips


HOWTO: Share Files with Macintosh Users
NetATALK Posted by Jason on Monday April 09, @11:10PM
from the Apples-And-Oranges dept.
If you have a Macintosh workstation or Mac users on your LAN, you can easily share files and even printers with them.

The port you want to use is netatalk-asun.

The first thing you will need to do before installing the netatalk application, is compile the appletalk protocol into your kernel. This allows your FreeBSD machine to use appletalk to communicate natively with your Macintosh clients. The protocol is sometimes referred to as EtherTalk. (see the, HOW-TO: Compile a Custom Kernel., if you have never done this before).

[Add the AppleTalk Protocol to your kernel]
To add the appletalk protocol, login as root and edit your kernel configuration file in the editor of your choice (I like to use ee, but you may prefer vi).

Login: root
Password: ********

# cd /usr/src/sys/i386/conf
# ee MYKERNEL

Add this option to your kernel
options     NETATALK    #AppleTalk

Exit and save the file, then compile and install the new kernel. Here is a quick reminder of how to compile your kernel.

# config MYKERNEL
# cd ../../compile/MYKERNEL
# make depend
# make
# make install
# reboot

[Install the netatalk-asun port]
There are two different netatalk applications in the ports tree- plain old netatalk and netatalk-asun. Netatalk-asun is the same as netatalk, but provides some extra features. Here is an exerpt from the package description.

Adrian Sun has added these improvements:
  o Access to the file server via AFP-over-TCP.
  o Support for volumes larger that 2GB.
  o Randnum- and 2-Way Randnum authentication methods (courtesy S.Hirsch)
  o Support for Apple II ProDOS.
  o A number of bug fixes.

  Don't install this port in parallel to net/netatalk; this will break both.

  Requires AppleTalk support in the kernel (FreeBSD 2.2 or newer).


I installed netatalk-asun. It was easy to install and hassle free to use. Here is what I did:

Login: root
Password: ********

# cd /usr/ports/net/netatalk-asun
# make install && make clean

Before I restarted my machine, I checked the config files to see what shares (if any) were setup by default.

# cd /usr/local/etc/
# ee AppleVolumes.default

I noticed that the entire file was commented out except for a lonely tilde (~) at the bottom of the file, an indication that it must be sharing the user's home directories only. I decided to reboot and see what happens.

While the machine what rebooting, it paused for about 30 seconds while it loaded netatalk. I thought this might mean trouble, but it turned out to be okay. I think it was discovering it's address (appletalk is a dynamic protocol).

[Logging in from a Macintosh]
After the FreeBSD box rebooted successfully. I went to a Macintosh on my network and tried to determine if my FreeBSD computer could be seen- and it was! Here's how I did it:

Make sure your mac is using the ethernet interface for the AppleTalk Protocol. Use the AppleTalk Control Panel to do this like so:

(APPLE)
Control Panels
AppleTalk
Connect via: Ethernet
close the window

To login to a server from a Mac, you must use the AppleShare icon in the System Chooser.

(APPLE)
Chooser
Click on AppleShare
(you should see your server name)
Click on Server Name (your freebsd host name)
Click OK button

The Macintosh Login Screen should now appear:
    name: regular_user
    password: users_password
Click OK

You should now see a mounted volume on your Macintosh desktop labeled with the name of the user you logged in with. By double-clicking on the volume, you will see the contents of that users home directory. You can now copy files to and from that directory share.

(note: to learn more about NetATALK and the appletalk protocol suite, try these man pages)

man atalkd
man papd


You may also want to look at the sample files in the /usr/local/share/examples/netatalk/ directory.

<  |  >

 

Related Links
  • Articles on NetATALK
  • Also by Jason
  • Contact author

    Lilliput Mini USB Computer Monitor

    If you have ever wanted to learn about Cisco Routers, check out my new book "Cisco Routers for the Small Business" - it's Cisco CLI for the Regular Guy!

  • Sponsors

    The Fine Print: The following comments are owned by whoever posted them.
    ( Add a Reply )

    Over 10 comments listed. Printing out index only.
    Re: HOWTO: Share Files with Macintosh Users
    by Jason on Friday September 07, @10:13AM
    While looking through my current ports tree I noticed that netatalk+asun has been merged with netatalk, and thus the name of the port is now just plain /usr/ports/net/netatalk.
    [ Add a Reply to this ]
    Re: HOWTO: Share Files with Macintosh Users
    by Jeff Butler on Thursday April 11, @02:05PM
    i don't know if did it automatically for you but i had to rename /usr/local/etc/rc.d/netatalk.sh.sample to netatalk.sh before it would start netatalk on boot.

    jb
    [ Add a Reply to this ]
    Re: HOWTO: Share Files with Macintosh Users
    by Walter McGinnis on Tuesday April 08, @05:53PM
    Thanks for this article. It was almost exactly what I was looking for. One little detail that I had to search for was how AppleShare and by extension NetaTalk handle security of passwords.

    If I haven't misread my various sources, although the AFP protocal doesn't encrypt normal traffic, it does encrypt passwords! Since I plan on using my NetaTalk on a LAN only at this point, this will do. I'll block outside AFP and AppleTalk traffic using my firewall, or more accurately, I'll open it up for my LAN.

    Oh yeah, I'm going to try it with FreeBSD 5 and HFS(+) support.

    Thanks again,

    Walter
    [ Add a Reply to this ]
    Re: HOWTO: Share Files with Macintosh Users
    by Jennifer zhao on Friday May 02, @11:47PM
    Just show thanks for your detail instructions. and it works nicely on my machine. Well, one quick words. You mentioned in your article:

    # cd /usr/local/etc/
    # ee Apple.Volumes.default

    Howevery, in my machine, it is
    AppleVolumes.default
    # no dot between Apple and Volumes. Anyway, it is not big deal.

    And also, I added some shared dirctories at the end of the file of AppleVolumes.default, which workds.

    Jennifer
    [ Add a Reply to this ]
    Re: HOWTO: Share Files with Macintosh Users
    by Jennifer zhao on Sunday May 04, @04:15PM
    Hi, Jason

    I did what your above article (HOWTO: Share Files with Macintosh Users) says on my FreeBSD4.3 box, and then I went to a iMac machine, it seems the connection to the shard volume went OK, except:
    That is in some folders in this shared volume, some documents do not appear there. And those documents are definitely there.
    Those documents were writen in PC Excel documents.
    Can any one advice on that?

    Thanks a lot
    Jennifer
    [ Add a Reply to this ]
    Re: HOWTO: Share Files with Macintosh Users
    by Squeeb on Wednesday July 09, @03:49AM
    Ok, I have both macs seeing the linux machine. But only if i type the server's IP Directly into the chooser or the connect dialog (max os X) .. The Linux machine is not "just there" in the chooser menu .. how can I fix this.. Chris :X
    [ Add a Reply to this ]
    Re: HOWTO: Share Files with Macintosh Users
    by Kent on Thursday August 12, @01:49PM
    Is your Netatalk server on the same subnet of your Mac client?
    [ Add a Reply to this ]
    Re: HOWTO: Share Files with Macintosh Users
    by Ben on Tuesday November 28, @10:38PM

    Thanks very much for the tutorial. One thing, in FreeBSD 6.0 I've had to change the 'cd ../../compile/MYKERNEL' entry to 'cd ../compile/MYKERNEL'. Not sure if others won't work it out, as I did, but might be worth a mention.

    Thanks again,

    Ben


    [ Add a Reply to this ]
    The Fine Print: The following comments are owned by whoever posted them.
    ( Article Reply )

    "You never know how many friends you have until you own a Condo on the beach." -- Jason's Postulate

    Powered by Zope  Powered by Apache  Squishdot Powered
    All trademarks and copyrights on this page are owned by their respective companies. Comments are owned by the Poster. The Rest ©2001 Jason Neumann.
    [ main | post article | search ]