Netatalk

From ArchWiki
Revision as of 20:37, 4 January 2012 by Kynikos (Talk | contribs) (update templates, see Help:Style)

Jump to: navigation, search

Netatalk is a free, open-source implementation of the AppleTalk (AFP) suite of protocols. It allows Unix-like operating systems to serve as file, print and time servers for Macintosh computers.

Installation

There is a netatalk package available in AUR. But the PKGBUILD should be modified to allow the faster CDB backend to be used.

Add --with-cnid-cdb-backend to the ./configure line.

Now run makepkg and install the package.

Configuration

Edit the afpd configuration File (/etc/netatalk/afpd.conf) and the follwing line to the very end of the file replacing the existing one:

/etc/netatalk/afpd.conf
...
- -transall -uamlist uams_randnum.so,uams_dhx2.so -nosavepassword -advertise_ssh
...

Configure shared volumes

To add a shared volume, we have to edit the /etc/netatalk/AppleVolumes.default-Configuration file, add a line like this:

/etc/netatalk/AppleVolumes.default
...
<path_to_share> <sharename> allow:<username> cnidscheme:cdb options:usedots,upriv
...
Warning: Avoid nesting volumes, do not share directories, which are filed under already shared directories
Note: If you you use cnidscheme:cdb be sure to start /etc/rc.d/cnid with afpd.

Enable Time-Machine Support

To enable Time-Machine-Support just add tm to the options for the volume in /etc/netatalk/AppleVolumes.default.

Enable Autodiscover

To enable Autodiscover (your osx systems see your netatalk-server in the finder), we have to install avahi and nss-mdns

  1. pacman -S avahi nss-mdns

Now configure the nss service (/etc/nsswitch.conf) and add mdns to the hosts:-line so it looks like this:

/etc/nsswitch.conf
...
hosts: files dns mdns4 mdns
...

Create a new service configuration file (/etc/avahi/services/afpd.service):

/etc/avahi/services/afpd.service
<?xml version="1.0" standalone='no'?>
 <!DOCTYPE service-group SYSTEM "avahi-service.dtd">
 <service-group>
    <name replace-wildcards="yes">%h</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>

Make it work with Lion

When you try to mount a shared drive with Lion, if you get the message "The version of the server you are trying to connect to is not supported", it's because AFP DHX2 Authentication is not supported, which Lion requires. It can be configured when building pre-2.2 versions of netatalk, or you can just install netatalk-git instead.