• Advertisement

CentOS 6.x - NetAtalk - Installation and setup for Macintosh and Apple II

Any software title released with a GNU/Linux distribution. Articles are posted in "Linux Distribution - Software Title - Subject" format.

CentOS 6.x - NetAtalk - Installation and setup for Macintosh and Apple II

Postby lmmtux » Wed Mar 12, 2014 10:36 pm

NetAtalk is a suite for Linux that provides native Apple protocols and services, including file and print services. It is fully compatible with all versions of Mac OS, OS X, and even Apple II computers including the IIGS with an AppleTalk bridge. NetAtalk is known for being very stable and offering very reliable services for Apple computers while maintaining backwards compatibility. This article will focus on setting up NetAtalk on CentOS 6.x as a file server and AppleTalk zone seed (initiator), however many of the steps may apply for similar distributions.


NetAtalk Installation on CentOS 6.x

Note: All commands shown in the steps below should be run as root (open a root shell and run the commands in it). If you cannot open a root shell, use "sudo" before each command to run them as root.

  1. Enable the CentOSPlus repository to install a kernel that is capable of handling the AppleTalk protocol.
    • Edit the file: /etc/yum.repos.d/CentOS-Base.repo
    • Look for the line under “[centosplus]” and add/edit the lines:
      Code: Select all
      enabled=1
      includepkgs=kernel*
    • Under the section “[base]”, add the line:
      Code: Select all
      exclude=kernel kernel-devel kernel-PAE-*
    • Install the CentOSPlus kernel by running the command as root: “yum install kernel”. Yum will download the CentOSPlus kernel however verify it before pressying 'Y' at the prompt to confirm.
  2. If you do not have the CentOS EPEL repository enabled, enable it:
    • Navigate to the URL: http://download.fedoraproject.org/pub/epel/6. Navigate to the "i386" or "x86_64" directory depending on your running kernel.
    • Download the "epel-release-6-5.noarch.rpm" RPM package or newer version if it is available.
    • Install the epel RPM package above, with the command "rpm -i epel-release-6-5.noarch.rpm" or equivalent.
    • Install the NetAtalk package from the EPEL repository with the command "yum install netatalk".
  3. If you have the software firewall running on your server, make sure you open port TCP 548 (with the command "system-config-firewall").


NetAtalk Configuration

Note: All commands shown in the steps below should be run as root (open a root shell and run the commands in it). If you cannot open a root shell, use "sudo" before each command to run them as root.

  1. Edit the file: "/etc/atalk/netatalk.conf", and configure the following lines:
    • Define your AppleTalk zone (put in your desired zone name for "Yourzone":
      Code: Select all
      ATALK_ZONE=@Yourzone
    • Set the AppleTalk daemon to run:
      Code: Select all
      ATALKD_RUN=yes
  2. Edit the file: "/etc/atalk/atalkd.conf", and configure the following lines:
    • Seed the AppleTalk zone (only if there are no other zones present on your network):
      Code: Select all
      eth0 -router -phase 2 -net 1-2 -addr 1.35 -zone "Yourzone"

      Note: Make sure to use the same AppleTalk zone name for "Yourzone" as used in the previous step. The parameters in this example will seed an AppleTalk network named "Yourzone". Read the NetAtalk documentation for more information on these options.
  3. Edit the file: "/etc/atalk/afpd.conf", and configure the following lines:
    • Set the default options for the AFP (Apple File Protocol) file server.
      Code: Select all
      - -tcp -ddp -uamlist uams_dhx2.so,uams_clrtxt.so,uams_guest.so -nosavepassword -uservolfirst

      Read the NetAtalk documentation for more information on these options. The options above add backward compatibility for classic Macintosh and Apple II clients.
  4. Edit the file: "/etc/atalk/AppleVolumes.default", and configure the following lines:
    • Set up the shares that will be published for the file server. Add one line for each share.
      Code: Select all
      /etc/yourfolder yourshare options:prodos,noadouble

      Read the NetAtalk documentation for more information on these options. The options above add backward compatibility for classic Macintosh and Apple II clients.
  5. Ensure the NetAtalk services are all set to start on boot, by running the command "ntsysv", and making sure there is a star ( * ) in the "netatalk" service (use space bar to add/remove the star). You may see a service called "atalkd" instead of "netatalk", which is normal depending on how the package was created. The two services are the same thing.


Connecting to the NetAtalk file server

The focus of this article is to allow MacOS and Apple II clients to connect to your NetAtalk server. To connect a Macintosh MacOS client:

  1. Make sure that AppleTalk is configured.
    • Go to Apple menu / Control Panels / Appletalk.
    • Select the appropriate port to use AppleTalk on. Normally, this will be "Ethernet". If it is currently set to "Ethernet" and you see the message "<no zones available>", change the drop-down to another port, then back to "Ethernet". IF you continue to see "<no zones available>", check the Troubleshooting section below.
      appletalkcp.jpg
      appletalkcp.jpg (9.81 KiB) Viewed 4083 times
    • After selecting the appropriate port, your zone name should show up as it is found.
    • Close the dialog box and click "Save" when prompted to save changes.
  2. Mount a file share.
    • Go to Apple menu / Chooser.
    • Click on AppleShare.
  3. In the right pane, you should see your NetAtalk file server listed. Double-click or click it and then OK.
  4. Next you should be prompted for your username and password. Note: You must have a user account set up on your NetAtalk server.
  5. Enter in the credentials of your user account on the NetAtalk server.
  6. You should then see at least one file share available, with your username as its name. This is your home directory (stored as /home/youraccount on the server itself). Additional shares should also appear. Click on each one to select it (with shift+click) and click OK to mount them to the desktop.
  7. Congratulations! You now have an Apple file server set up for use. Enjoy!


Troubleshooting

  • If you have issues using the latest NetAtalk package from the EPEL repository such as missing binaries (such as "/usr/bin/nbprgstr") which can cause your NetAtalk server to not initialize and show up correctly on your network, you can download the "netatalk-2.1.5" package from the EPEL repository directly - https://fedoraproject.org/wiki/EPEL - and install it with "rpm -i netatalk-2.1.5.rpm". The "netatalk-2.1.5" package is a known good working package. If using this package, additional fixes may be necessary:
    • Run the command "chkconfig –add netatalk" after installing the "netatalk-2.1.5" RPM package. This corrects an issue where the file /etc/rc.d/init.d/netatalk exists, but the RPM script tries to register the service "atalkd", not "netatalk".
    • Edit the file: "/etc/rc.d/init.d/netatalk", and remove the backward slash ( \ ) on the lines so that they look like this:
      Code: Select all
      action "  Registering ${ATALK_NAME}:Workstation${ATALK_ZONE}:" ${ATALK_BIN}/nbprgstr -p 4 ${ATALK_NAME}:Workstation${ATALK_ZONE}
      action "  Registering ${ATALK_NAME}:netatalk${ATALK_ZONE}:" ${ATALK_BIN}/nbprgstr -p 4 ${ATALK_NAME}:netatalk${ATALK_ZONE}
      action "  Unregistering ${ATALK_NAME}:Workstation${ATALK_ZONE}:" ${ATALK_BIN}/nbpunrgstr ${ATALK_NAME}:Workstation${ATALK_ZONE}
      action "  Unregistering ${ATALK_NAME}:netatalk${ATALK_ZONE}:" ${ATALK_BIN}/nbpunrgstr ${ATALK_NAME}:netatalk${ATALK_ZONE}
lmmtux
 
Posts: 55
Joined: Mon Jul 30, 2012 9:40 pm
Reputation: 0

Return to Linux

cron