Difference between revisions of "Netatalk"

From ArchWiki
Jump to: navigation, search
(Make it work with Lion)
m (codeline -> ic)
Line 5: Line 5:
 
There is a netatalk package available in AUR. But the PKGBUILD should be modified to allow the faster CDB backend to be used.  
 
There is a netatalk package available in AUR. But the PKGBUILD should be modified to allow the faster CDB backend to be used.  
  
Add {{codeline|--with-cnid-cdb-backend}} to the {{codeline|./configure}} line.
+
Add {{Ic|--with-cnid-cdb-backend}} to the {{Ic|./configure}} line.
  
 
Now run makepkg and install the package.
 
Now run makepkg and install the package.
  
 
==Configuration==
 
==Configuration==
Edit the afpd configuration File ({{codeline|/etc/netatalk/afpd.conf}}) and the follwing line to the very end of the file replacing the existing one:
+
Edit the afpd configuration File ({{Ic|/etc/netatalk/afpd.conf}}) and the follwing line to the very end of the file replacing the existing one:
  
 
{{file|name=/etc/netatalk/afpd.conf|content=...<br> - -transall -uamlist uams_randnum.so,uams_dhx2.so -nosavepassword -advertise_ssh<br>...}}
 
{{file|name=/etc/netatalk/afpd.conf|content=...<br> - -transall -uamlist uams_randnum.so,uams_dhx2.so -nosavepassword -advertise_ssh<br>...}}
  
 
==Configure shared volumes==
 
==Configure shared volumes==
To add a shared volume, we have to edit the {{codeline|/etc/netatalk/AppleVolumes.default}}-Configuration file, add a line like this:
+
To add a shared volume, we have to edit the {{Ic|/etc/netatalk/AppleVolumes.default}}-Configuration file, add a line like this:
  
 
{{File|name=/etc/netatalk/AppleVolumes.default|content=...<br><path_to_share> <sharename> allow:<username> cnidscheme:cdb options:usedots,upriv<br>...}}
 
{{File|name=/etc/netatalk/AppleVolumes.default|content=...<br><path_to_share> <sharename> allow:<username> cnidscheme:cdb options:usedots,upriv<br>...}}
Line 21: Line 21:
 
{{Warning|Avoid nesting volumes, do not share directories, which are filed under already shared directories}}
 
{{Warning|Avoid nesting volumes, do not share directories, which are filed under already shared directories}}
  
{{Note|If you you use {{codeline|cnidscheme:cdb}} be sure to start {{codeline|/etc/rc.d/cnid}} with afpd.}}
+
{{Note|If you you use {{Ic|cnidscheme:cdb}} be sure to start {{Ic|/etc/rc.d/cnid}} with afpd.}}
  
 
==Enable Time-Machine Support==
 
==Enable Time-Machine Support==
To enable Time-Machine-Support just add {{codeline|tm}} to the options for the volume in {{codeline|/etc/netatalk/AppleVolumes.default}}.
+
To enable Time-Machine-Support just add {{Ic|tm}} to the options for the volume in {{Ic|/etc/netatalk/AppleVolumes.default}}.
  
 
==Enable Autodiscover==
 
==Enable Autodiscover==
Line 31: Line 31:
 
#pacman -S avahi nss-mdns
 
#pacman -S avahi nss-mdns
  
Now configure the nss service ({{codeline|/etc/nsswitch.conf}}) and add {{codeline|mdns}} to the {{codeline|hosts:}}-line so it looks like this:
+
Now configure the nss service ({{Ic|/etc/nsswitch.conf}}) and add {{Ic|mdns}} to the {{Ic|hosts:}}-line so it looks like this:
  
 
{{File|name=/etc/nsswitch.conf|content=...<br> hosts: files dns mdns4 mdns<br>...}}
 
{{File|name=/etc/nsswitch.conf|content=...<br> hosts: files dns mdns4 mdns<br>...}}
  
Create a new service configuration file ({{codeline|/etc/avahi/services/afpd.service}}):
+
Create a new service configuration file ({{Ic|/etc/avahi/services/afpd.service}}):
  
 
{{File|name=/etc/avahi/services/afpd.service|content=
 
{{File|name=/etc/avahi/services/afpd.service|content=

Revision as of 17:54, 11 December 2011

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:

Template:File

Configure shared volumes

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

Template:File

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:

Template:File

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

Template:File

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.