Netatalk

Netatalk
Netatalk is an implementation of the Apple Filesharing Protocol for UNIX. It also supports other AppleTalk functions, such as AppleShare print server, but those protocols are considered deprecated by Apple.

License Incompatibility
The Debian version os Netatalk has no support for encrypted passwords. That is caused by license issues.

Netatalk is released under the GPL, the GNU General Public License. It can be combined with OpenSSL, which is released under an (old-style) 4-clause BSD license. While both licenses are considered "Open Source", they are incompatible. You can distributed the source code freely, but not combine them in a single product, particularly not a pre-compiled version of Netatalk with support for the OpenSSL library. Even not if it is dynamically linked.

This is bad, and both licenses are to blame. I tried to add an "exception" in the Netatalk GPL license, but this was impossible, since that would require permission of all upstream authors. Too many to count. The result is that in Debian, Netatalk is not combined with OpenSSL, and has thus no support for encrypted passwords. An alternative would be to not use OpenSSL, but an other library, like GnuTLS. However, GnuTLS is missing the functions used by Netatalk. So the most practical alternative is to simply do a manual install of netatalk under Debian.

Installation Guide
This short guide explains how to install netatalk version 2.x under Debian.

Requirements
Before you start, install these packages: libwrap0-dev libslp-dev libcupsys2-dev heimdal-dev fakeroot. e.g. apt-get install libwrap0-dev libslp-dev libcupsys2-dev heimdal-dev fakeroot

Manual Installation
Download from netatalk.sf.net:

curl http://sourceforge.net/project/showfiles.php?group_id=8642 tar xzf netatalk-2.0.3.tar.gz

Optionally: apply patch netatalk-2.0.1-logpatch.diff (see below) which only logs notes (warnings) and higher instead of debug and higher.

cd netatalk-2.0.1/ patch -p1 < ../netatalk-2.0.1-logpatch.diff

Optionally: determine options with ./configure --help or http://netatalk.sourceforge.net/2.0/htmldocs/

./configure --prefix=/usr/local --sysconfdir=/etc \ --with-uams-path=/usr/local/lib/netatalk \ --with-pam --with-shadow --with-ssl \ --enable-afp3 --enable-srvloc --without-logfile

Verify that the configuration as reported by configure is:

Using libraries: LIBS = -lnsl -ldl -L$(top_srcdir)/libatalk CFLAGS = -I$(top_srcdir)/include -g -O2 -I$(top_srcdir)/sys SSL: LIBS  =  -lcrypto CFLAGS = -I/usr/include/openssl PAM: LIBS  =  -lpam CFLAGS = WRAP: LIBS  = -lwrap CFLAGS = BDB: LIBS  =  -ldb-4.2 CFLAGS = Configure summary: Install style: AFP: AFP 3.x calls activated: yes Large file support (>2GB) for AFP3: yes DDP enabled: yes CNID: backends: cdb dbd last UAMS: DHX    (PAM SHADOW) RANDNUM (PAM SHADOW) passwd (PAM SHADOW) guest Options: CUPS support:          no          SLP support:            no          tcp wrapper support:    yes quota support:         yes admin group support:   yes valid shell check:     yes cracklib support:      no          dropbox kludge:         no          force volume uid/gid:   no          Apple 2 boot support:   no

make

Optionally: remove previous installation. To so by removing the installed files listed below. Make sure **not** to remove: /etc/init.d/netatalk /etc/netatalk/ /etc/pam.d/netatalk /usr/local/share/aclocal/netatalk.m4

make install

Patch File
Patch for netatalk to only logs notes (warnings) and higher instead of debug and higher.

diff -U 2 -r netatalk-2.0.1-orig/contrib/a2boot/a2boot.c netatalk-2.0.1-logpatch/contrib/a2boot/a2boot.c --- netatalk-2.0.1-orig/contrib/a2boot/a2boot.c 2003-01-15 07:24:28.000000000 +0100 +++ netatalk-2.0.1-logpatch/contrib/a2boot/a2boot.c    2005-01-03 01:55:56.000000000 +0100 @@ -180,5 +180,5 @@ #else /* ultrix */ set_processname(p); -   syslog_setup(log_debug, logtype_default, logoption_ndelay|logoption_pid, logfacility_daemon ); +   syslog_setup(log_note, logtype_default, logoption_ndelay|logoption_pid, logfacility_daemon ); #endif /* ultrix */ diff -U 2 -r netatalk-2.0.1-orig/contrib/timelord/timelord.c netatalk-2.0.1-logpatch/contrib/timelord/timelord.c --- netatalk-2.0.1-orig/contrib/timelord/timelord.c    2002-01-04 05:45:47.000000000 +0100 +++ netatalk-2.0.1-logpatch/contrib/timelord/timelord.c 2005-01-03 01:56:33.000000000 +0100 @@ -174,5 +174,5 @@ #else /* ultrix */ set_processname(p); -   syslog_setup(log_debug, logtype_default, logoption_ndelay|logoption_pid, logfacility_daemon ); +   syslog_setup(log_note, logtype_default, logoption_ndelay|logoption_pid, logfacility_daemon ); #endif /* ultrix */ diff -U 2 -r netatalk-2.0.1-orig/etc/afpd/afp_dsi.c netatalk-2.0.1-logpatch/etc/afpd/afp_dsi.c --- netatalk-2.0.1-orig/etc/afpd/afp_dsi.c     2004-05-04 17:38:24.000000000 +0200 +++ netatalk-2.0.1-logpatch/etc/afpd/afp_dsi.c 2005-01-03 01:57:35.000000000 +0100 @@ -67,5 +67,5 @@     /* UAM had syslog control; afpd needs to reassert itself */ set_processname("afpd"); -   syslog_setup(log_debug, logtype_default, logoption_ndelay | logoption_pid, logfacility_daemon); +   syslog_setup(log_note, logtype_default, logoption_ndelay | logoption_pid, logfacility_daemon); LOG(log_info, logtype_afpd, "%.2fKB read, %.2fKB written",         dsi->read_count/1024.0, dsi->write_count/1024.0); diff -U 2 -r netatalk-2.0.1-orig/etc/afpd/afp_options.c netatalk-2.0.1-logpatch/etc/afpd/afp_options.c --- netatalk-2.0.1-orig/etc/afpd/afp_options.c 2004-09-28 15:19:12.000000000 +0200 +++ netatalk-2.0.1-logpatch/etc/afpd/afp_options.c     2005-01-03 01:57:03.000000000 +0100 @@ -618,5 +618,5 @@ #else /* ultrix */ set_processname(p); -   syslog_setup(log_debug, logtype_default, logoption_ndelay|logoption_pid, logfacility_daemon); +   syslog_setup(log_note, logtype_default, logoption_ndelay|logoption_pid, logfacility_daemon); #endif /* ultrix */ diff -U 2 -r netatalk-2.0.1-orig/etc/afpd/auth.c netatalk-2.0.1-logpatch/etc/afpd/auth.c --- netatalk-2.0.1-orig/etc/afpd/auth.c 2004-07-01 03:27:34.000000000 +0200 +++ netatalk-2.0.1-logpatch/etc/afpd/auth.c    2005-01-03 01:57:19.000000000 +0100 @@ -221,5 +221,5 @@     /* UAM had syslog control; afpd needs to reassert itself */ set_processname("afpd"); -   syslog_setup(log_debug, logtype_default, logoption_ndelay|logoption_pid, logfacility_daemon); +   syslog_setup(log_note, logtype_default, logoption_ndelay|logoption_pid, logfacility_daemon); if ( pwd->pw_uid == 0 ) { /* don't allow root login */ diff -U 2 -r netatalk-2.0.1-orig/etc/papd/main.c netatalk-2.0.1-logpatch/etc/papd/main.c --- netatalk-2.0.1-orig/etc/papd/main.c 2004-06-09 03:25:53.000000000 +0200 +++ netatalk-2.0.1-logpatch/etc/papd/main.c    2005-01-03 01:57:51.000000000 +0100 @@ -288,5 +288,5 @@ #else /* ultrix */ set_processname(p); -   syslog_setup(log_debug, logtype_default, logoption_ndelay|logoption_pid, logfacility_lpr ); +   syslog_setup(log_note, logtype_default, logoption_ndelay|logoption_pid, logfacility_lpr ); #endif /* ultrix */
 * 1) cd netatalk-2.0.1/
 * 2) patch -p1 < ../netatalk-2.0.1-logpatch.diff

Installed files
/usr/local/bin/achfile /usr/local/bin/acleandir.rc /usr/local/bin/add_netatalk_printer /usr/local/bin/adv1tov2 /usr/local/bin/aecho /usr/local/bin/afile /usr/local/bin/afpd-mtab.pl /usr/local/bin/afppasswd /usr/local/bin/apple_cp /usr/local/bin/apple_mv /usr/local/bin/apple_rm /usr/local/bin/binheader@ /usr/local/bin/cleanappledouble.pl /usr/local/bin/cnid2_create /usr/local/bin/cnid_maint /usr/local/bin/getzones /usr/local/bin/hqx2bin@ /usr/local/bin/lp2pap.sh /usr/local/bin/macbinary@ /usr/local/bin/macusers /usr/local/bin/megatron /usr/local/bin/nadheader@ /usr/local/bin/nbplkup /usr/local/bin/nbprgstr /usr/local/bin/nbpunrgstr /usr/local/bin/netatalk-config /usr/local/bin/netatalkshorternamelinks.pl /usr/local/bin/nu /usr/local/bin/pap /usr/local/bin/papstatus /usr/local/bin/psorder /usr/local/bin/single2bin@ /usr/local/bin/timeout /usr/local/bin/unbin@ /usr/local/bin/unhex@ /usr/local/bin/uniconv /usr/local/bin/unsingle@ /usr/local/include/atalk/ /usr/local/include/netatalk/ /usr/local/lib/libatalk.a /usr/local/lib/libatalk.la /usr/local/libexec/etc2ps.sh /usr/local/libexec/ifmpap@ /usr/local/libexec/ifmpaprev@ /usr/local/libexec/ifpap@ /usr/local/libexec/ifpaprev@ /usr/local/libexec/ifwmpap@ /usr/local/libexec/ifwmpaprev@ /usr/local/libexec/ifwpap@ /usr/local/libexec/ifwpaprev@ /usr/local/libexec/ofmpap@ /usr/local/libexec/ofpap@ /usr/local/libexec/ofwmpap@ /usr/local/libexec/ofwpap@ /usr/local/libexec/psa /usr/local/libexec/psf /usr/local/libexec/tfmpap@ /usr/local/libexec/tfmpaprev@ /usr/local/libexec/tfpap@ /usr/local/libexec/tfpaprev@ /usr/local/libexec/tfwmpap@ /usr/local/libexec/tfwmpaprev@ /usr/local/libexec/tfwpap@ /usr/local/libexec/tfwpaprev@ /usr/local/sbin/afpd /usr/local/sbin/atalkd /usr/local/sbin/cnid_dbd /usr/local/sbin/cnid_metad /usr/local/sbin/papd /usr/local/man/man1/achfile.1 /usr/local/man/man1/acleandir.1 /usr/local/man/man1/aecho.1 /usr/local/man/man1/afile.1 /usr/local/man/man1/afppasswd.1 /usr/local/man/man1/apple_cp.1 /usr/local/man/man1/apple_mv.1 /usr/local/man/man1/apple_rm.1 /usr/local/man/man1/getzones.1 /usr/local/man/man1/hqx2bin.1 /usr/local/man/man1/macbinary.1 /usr/local/man/man1/megatron.1 /usr/local/man/man1/nbp.1 /usr/local/man/man1/nbplkup.1 /usr/local/man/man1/nbprgstr.1 /usr/local/man/man1/nbpunrgstr.1 /usr/local/man/man1/netatalk-config.1 /usr/local/man/man1/pap.1 /usr/local/man/man1/papstatus.1 /usr/local/man/man1/psorder.1 /usr/local/man/man1/single2bin.1 /usr/local/man/man1/timeout.1 /usr/local/man/man1/unbin.1 /usr/local/man/man1/unhex.1 /usr/local/man/man1/unsingle.1 /usr/local/man/man3/atalk_aton.3 /usr/local/man/man3/nbp_name.3 /usr/local/man/man4/atalk.4 /usr/local/man/man5/afpd.conf.5 /usr/local/man/man5/AppleVolumes.default.5 /usr/local/man/man5/atalkd.conf.5 /usr/local/man/man5/netatalk.conf.5 /usr/local/man/man5/papd.conf.5 /usr/local/man/man8/afpd.8 /usr/local/man/man8/atalkd.8 /usr/local/man/man8/cnid_dbd.8 /usr/local/man/man8/cnid_metad.8 /usr/local/man/man8/papd.8 /usr/local/man/man8/papstatus.8 /usr/local/man/man8/psf.8 /usr/local/man/man8/timelord.8 /usr/local/share/netatalk/ /etc/netatalk/
 * 1) Don't remove these configuration files: