X
Tech

Linux support for Macs still strong (as usual)

Recently I've had the pleasure of digging out a couple of old Mac computers to demonstrate to a few family members out of curiosity. I am definitely a believer in educating the next generation on computing of the past, and how we got from there to where we are today.
Written by Chris Clay Clay, Contributor

Recently I've had the pleasure of digging out a couple of old Mac computers to demonstrate to a few family members out of curiosity. I am definitely a believer in educating the next generation on computing of the past, and how we got from there to where we are today. So one of the computers I fired up is a Macintosh Quadra 900. As usual, it booted right up without problems after sitting for probably close to 8 years. Everybody was amused and it was actually a lot of fun showing them the Mac OS 8 operating system on it.

The next day, I remembered at one time I had a GNU/Linux server that had Netatalk running on it, so that I could connect from this Mac to the server and back up and transfer files. That server has since been upgraded, and I never really put in the time to get Netatalk running on it again until now. The server is a Pentium III 667 MHz system running CentOS 6.0, with X11 and all of the bells and whistles. The system runs good despite the fact that it is only a Pentium III. It also houses two 2 TB drives with the ext4 filesystem and runs very well.

What is Netatalk you may ask? It's a suite of programs that run on GNU/Linux that support Apple's proprietary protocols. It is commonly used to route AppleTalk networks and also serve as a file server for Macs. It is very stable, and I've used it for well over 13 years and found it to be excellent. Nothing outside of a real Mac server can compare. In fact, Netatalk can do in GNU/Linux what many different (and expensive) hardware boxes can do (such as route AppleTalk traffic). Just a side note, Microsoft completely dropped Mac server and AppleTalk support with Server 2008. Not a big deal for me, as I don't use Windows on my servers anyway.

After a short while I discovered that I would have to install the CentOSPlus Repository packages to enable Netatalk on my CentOS 6.0 server, in order to get AppleTalk support in the kernel. After enabling the CentOSPlus repository per the instructions on the Wiki page above, simply run "yum install kernel" which will automatically download the latest CentOSPlus supplied kernel and install it, which will include AppleTalk support.

After this step, the next is to install Netatalk. To do this, you must first enable the EPEL Repository, then run the command "yum install netatalk". The current version of Netatalk in the EPEL Repository is 2.2.0. For some reason, the package was missing some binaries and the startup script was not correct. Rather than messing with compiling binaries, I removed the "netatalk-2.2.0-1" package and downloaded the "netatalk-2.1.5" package instead and installed it. Much better, now all the binaries were present and accounted for.

I did have to do a couple of things though, to get this version of Netatalk working that seemed to be related to how the package was compiled:

1. Run "chkconfig -add netatalk" to register the Netatalk service on the system.

2. Edit the file /etc/rc.d/init.d/netatalk, and remove the \" on the lines that run the "nbprgstr" and "nbpunrgstr" commands. In the end, the following lines were corrected as follows:

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}

Next, configuring Netatalk. This part is not as easy, as Netatalk has a lot of options and some require intermediate knowledge of AppleTalk and how Macs communicate. I will provide examples below to get up and running. I edited each file as follows:

1. /etc/atalk/netatalk.conf Uncomment the line "ATALKD_RUN=yes"

2. /etc/atalk/atalkd.conf Add a line: "eth0 -router -phase 2 -net 1-2 -addr 1.35 -zone "MyZone"

3. /etc/atalk/afpd.conf Add a line: "- -tcp -ddp -uamlist uams_dhx2.so,uams_clrtxt.so,uams_guest.so -nosavepassword -uservolfirst"

4. /etc/atalk/AppleVolumes.default Add a line similar to this to share out folders: "/yourvolume/yourfolder sharename options:prodos,noadouble"

Step 2 is only necessary if you want to seed an AppleTalk zone as "MyZone", feel free to substitute your own zone name there. I highly recommend seeding a zone as long as you don't have other zones on your network already.

These settings will allow clear text authentication and as you can see also Prodos volumes which are compatible with Macs all the way down to the Apple IIGS line of computers as well. Amazing that even the latest version of GNU/Linux can support the Apple IIGS.

And finally, run the Firewall program and add an allowed port for TCP 548 (for AFP -- the Apple file protocol over TCP/IP).

Now, restart the Netatalk service and it should come up and start your file server as well. Note the share in Step 4, this will allow the share name you specify to show up in the Chooser on the Macs. You can authenticate from the Macs with your Linux username/password, and it will show you both you home drive as well as the additional share you set up. Permissions on the filesystem will apply to the users that connect with their credentials.

There are a LOT of additional options and things you can do with Netatalk. I strongly advise reading the Netatalk documentation on the Netatalk website. If you use old Macs, or even new ones running OS X, having an Apple file server is a great thing to have on your network. Netatalk provides this and more, and is one of many great pieces of software on GNU/Linux. Now that Microsoft dropped support for Mac services, Netatalk is a very appealing solution and as I mention, Netatalk "just works".

Editorial standards