Appletalk File Server on Fedora Linux

How can I use apples afp protocol to connect to my linux box ?

Configure your linux box to be a Mac file server using netatalk afpd and avahi-daemon

This install was done on a Fedora 11 system

Install Netatalk Afpd and Avahi-Daemon

# yum install netatalk avahi

Configure Appletalk Netatalk

# vi /etc/atalk/afpd.conf

Add the following to the end of the file:

- -noddp -tcp -uamlist uams_randnum.so,uams_dhx.so,uams_dhx2.so -nosavepassword -advertise_ssh

Configure Netatalk to only start the services we need

# vi /etc/atalk/netatalk.conf

Change the following values:

ATALKD_RUN=no
PAPD_RUN=no
CNID_METAD_RUN=yes
AFPD_RUN=yes
TIMELORD_RUN=no
A2BOOT_RUN=no

Configure Netatalk to share our folders

# vi /etc/atalk/AppleVolumes.default

Syntax:

allow: users and groups allowed to access share

rwlist: users and groups allowed read and write access

Change <Users> to your users separated by commas jim.bob.doug

Change <@group> to your groups separated by commas @accounting, @marketing (keep the @ infront of the group name)

* Users and Groups must already exist in Linux

Add for Users Home Folders:

~/ "$u" allow:<Users> rwlist:<User>,<@group> cnidscheme:cdb

Add a folder:

/home/folder <Share_Name> allow:<Users>,<@group> rwlist:<Users>,<@group> cnidscheme:cdb options:usedots,upriv

Configure Avahi and mDNS (linux version of bonjour)

We need to configure Avahi and mDNS so the Mac computers on the network can find our Appletalk file server

We need to create a service file for our afpd service:

# vi /etc/avahi/services/afpd.service

Add the following:

<?xml version="1.0" standalone='no'?>
<!DOCTYPE service-group SYSTEM "avahi-service.dtd">
<service-group>
<name replace-wildcards="yes">%h Xserve</name>
<service>
<type>_afpovertcp._tcp</type>
<port>548</port>
</service>
<service>
<type>_device-info._tcp</type>
<port>0</port>
<txt-record>model=Xserve</txt-record>
</service>
</service-group>

Add mDNS to nsswitch

# vi /etc/nsswitch.conf

Add mdns to the line hosts:

hosts:      files dns mdns

Configure Appletalk to start at system startup

# chkconfig atalk
# chkconfig avahi-daemon

Start Appletalk and Avahi (Bonjour)

# service atalk start
# service avahi-daemon start

Open Firewall Ports

port: 548 tcp

Check that Netatalk service started properly:

# nbplkup
                      localhost:AFPServer                          65280.31:128
                     "localhost:netatalk"                          65280.31:4
                     "localhost:Workstation"                       65280.31:4

Special Thanks to:

http://wiki.amahi.org/index.php/AFP

http://www.kremalicious.com/2008/06/ubuntu-as-mac-file-server-and-time-machine-volume/

http://book.chinaunix.net/special/ebook/RedHat_Linux_Bible/8140final/LiB0228.html

# nbplkup
localhost:AFPServer                          65280.31:128
“localhost:netatalk”                          65280.31:4
“localhost:Workstation”                       65280.31:4
Fabio Milano has written 80 articles for us. Fabio Milano is a certified RHCE, MCP, and CFOI. He runs an IT consulting and services company called RDS Support inc. Website:http://www.rdssupport.com
The information provided is for educational purposes only. All content including links and comments is provided "as is" with no warranty, expressed or implied. Use is at your own risk and you are solely responsible for what you do with it.

4 Comments so far

  1. Eric on December 23rd, 2010

    Awesome! Thanks! I tried a bunch of other HOWTO’s before finding yours. The above steps worked pretty much the first time. Well, except for nbplkup. I get:

    # nbplkup
    nbp_lookup: Cannot assign requested address

    Oherwise afp wrks fine after following these steps on Fedora Core 14.

  2. Peter on June 4th, 2011

    Thanks for the great instructions. I am making through them but have run into a couple of snags.

    The first is that in my Fedora install the configuration files such as afpd.conf, AppleVolumes.default, and netatalk.conf are all stored in the /etc/netatalk folder and not in the /etc/atalk folder that you reference. Something to note for others.

    The other one that I am having is that the”service atalk start” returns a error of “atalk: unrecognized service” for me. Should this be “service netatalk start” instead?

  3. Peter on June 4th, 2011

    I also had the same issue as Eric and found an Ubuntu post at http://ubuntuforums.org/showthread.php?t=1534378 that appears to have a solution for the “nbp_lookup: Cannot assign requested address” error. The setting changes from that post could be made here to set in the netatalk.conf file:

    ATALKD_RUN=yes
    PAPD_RUN=yes

  4. Robert on January 29th, 2013

    If you’re running F18 this instruction needs to change slightly to change the afpd.conf file to contain:
    - -tcp -noddp -uamlist uams_dhx_passwd.so,uams_dhx2_passwd.so

    You can restart using:
    systemctl stop netatalk.service
    systemctl start netatalk.service

Leave a reply