Skip to content

Instantly share code, notes, and snippets.

@SuperShinyEyes
Last active March 15, 2018 14:05
Show Gist options
  • Save SuperShinyEyes/de17c8092df2ed525930e339235d624e to your computer and use it in GitHub Desktop.
Save SuperShinyEyes/de17c8092df2ed525930e339235d624e to your computer and use it in GitHub Desktop.
Netatalk 3 install & debugging

For better debugging I will elaborate my process and status. I installed Netatalk 3.1.11 by self-build from source. We DO NOT have Avahi installed as the module is prohibited in the system.

sudo apt-get install autoconf \
  libtool-bin \
  libtool \
  automake \
  build-essential \
  libssl-dev \
  libgcrypt11-dev \
  libkrb5-dev \
  libpam0g-dev \
  libwrap0-dev \
  libdb-dev \
  libmysqlclient-dev \
  libavahi-client-dev \
  libacl1-dev \
  libldap2-dev \
  libcrack2-dev \
  systemtap-sdt-dev \
  libdbus-1-dev \
  libdbus-glib-1-dev \
  libglib2.0-dev \
  tracker \
  libtracker-miner-1.0-dev \
  libtracker-sparql-1.0-dev \
  libevent-dev

./bootstrap

./configure \
  --with-init-style=debian-sysv \
  --without-libevent \
  --with-cracklib \
  --with-kerberos \
  --enable-krbV-uam \
  --with-pam-confdir=/etc/pam.d \
  --with-dbus-sysconf-dir=/etc/dbus-1/system.d \
  --with-tracker-pkgconfig-version=1.0

./configure \
  --with-init-style=debian-sysv \
  --without-libevent \
  --with-cracklib \
  --with-pam-confdir=/etc/pam.d \
  --with-dbus-sysconf-dir=/etc/dbus-1/system.d \
  --with-tracker-pkgconfig-version=1.0


./configure \
  --with-init-style=debian-sysv \
  --with-cracklib \
  --with-pam-confdir=/etc/pam.d \
  --with-dbus-sysconf-dir=/etc/dbus-1/system.d \
  --with-tracker-pkgconfig-version=1.0


./configure \
	--prefix=/usr/local \
	--with-init-style=systemd \
	--without-kerberos \
	--without-ldap \
	--without-dtrace

./configure \
	--prefix=/usr/local \
	--with-init-style=systemd \
	--without-kerberos \
	--without-ldap \
	--without-dtrace \
	--with-cracklib \
	--with-tdbj

./configure \
	--prefix=/usr/local \
	--with-init-style=systemd \
	--without-kerberos \
	--without-ldap \
	--without-dtrace \
	--with-cracklib \
	--with-tdb

./configure \
	--prefix=/usr/local \
	--enable-dependency-tracking \
	--enable-debug \
	--with-init-style=systemd \
	--disable-krbV-uam \
	--with-pam-confdir=/etc/pam.d

./configure \
	--prefix=/usr/local \
	--enable-dependency-tracking \
	--enable-debug \
	--with-init-style=debian-systemd \
	--disable-krbV-uam \
	--with-pam-confdir=/etc/pam.d

./configure \
	--prefix=/usr/local \
	--enable-dependency-tracking \
	--enable-debug \
	--with-init-style=debian-systemd \
	--disable-krbV-uam \
	--with-pam-confdir=/etc/pam.d \
	--without-shadow \
	--without-kerberos \
	--without-ldap \
	--without-dtrace

./configure \
	--prefix=/usr/local \
	--enable-dependency-tracking \
	--enable-debug \
	--with-init-style=debian-systemd \
	--disable-krbV-uam \
	--with-pam-confdir=/etc/pam.d \
	--without-shadow \
	--without-kerberos \
	--without-ldap \
	--without-dtrace \
	--disable-randnum-uam \
	--disable-clrtxt-uam \
	--disable-dhx-uam

./configure \
	--prefix=/usr/local \
	--enable-dependency-tracking \
	--enable-debug \
	--with-init-style=debian-systemd \
	--disable-krbV-uam \
	--with-pam-confdir=/etc/pam.d \
	--without-shadow \
	--without-kerberos \
	--without-ldap \
	--without-dtrace \
	--disable-randnum-uam \
	--disable-clrtxt-uam \
	--disable-dhx-uam \
	--with-tracker-pkgconfig-version=1.0

./configure \
	--prefix=/usr/local \
	--enable-dependency-tracking \
	--enable-debug \
	--with-init-style=debian-systemd \
	--disable-krbV-uam \
	--with-pam-confdir=/etc/pam.d \
	--without-shadow \
	--without-kerberos \
	--without-ldap \
	--without-dtrace \
	--disable-randnum-uam \
	--disable-clrtxt-uam \
	--disable-dhx-uam \
	--with-tracker-pkgconfig-version=1.0

./configure \
	--prefix=/usr/local \
	--enable-dependency-tracking \
	--enable-debug \
	--with-init-style=debian-systemd \
	--disable-krbV-uam \
	--with-pam-confdir=/etc/pam.d \
	--without-shadow \
	--without-kerberos \
	--without-ldap \
	--without-dtrace \
	--disable-randnum-uam \
	--disable-clrtxt-uam \
	--disable-dhx-uam \
	--with-tracker-pkgconfig-version=1.0 \
	--without-tdb \
	--disable-shell-check \
	--without-mysql \
	--without-last

./configure \
	--prefix=/usr/local \
	--enable-dependency-tracking \
	--enable-debug \
	--with-init-style=debian-systemd \
	--disable-krbV-uam \
	--with-pam-confdir=/etc/pam.d \
	--without-shadow \
	--without-kerberos \
	--without-ldap \
	--without-dtrace \
	--disable-randnum-uam \
	--disable-clrtxt-uam \
	--disable-dhx-uam \
	--with-tracker-pkgconfig-version=1.0 \
	--without-tdb \
	--disable-shell-check \
	--without-mysql \
	--without-last

./configure \
	--prefix=/usr/local \
	--enable-dependency-tracking \
	--enable-debug \
	--with-init-style=debian-systemd \
	--disable-krbV-uam \
	--with-pam-confdir=/etc/pam.d \
	--without-shadow \
	--without-kerberos \
	--without-ldap \
	--without-dtrace \
	--disable-randnum-uam \
	--disable-clrtxt-uam \
	--disable-dhx-uam \
	--with-tracker-pkgconfig-version=1.0 \
	--disable-shell-check \
	--without-cnid-mysql-backend

./configure \
	--prefix=/usr/local \
	--enable-dependency-tracking \
	--enable-debug \
	--with-init-style=debian-systemd \
	--disable-krbV-uam \
	--with-pam-confdir=/etc/pam.d \
	--without-shadow \
	--without-kerberos \
	--without-ldap \
	--without-dtrace \
	--disable-randnum-uam \
	--disable-clrtxt-uam \
	--disable-dhx-uam \
	--with-tracker-pkgconfig-version=1.0 \
	--disable-shell-check \
	--without-cnid-mysql-backend \
	--disable-mysql

./configure \
	--prefix=/usr/local \
	--enable-dependency-tracking \
	--enable-debug \
	--with-init-style=debian-systemd \
	--disable-krbV-uam \
	--with-pam-confdir=/etc/pam.d \
	--without-shadow \
	--without-kerberos \
	--without-ldap \
	--without-dtrace \
	--disable-randnum-uam \
	--disable-clrtxt-uam \
	--disable-dhx-uam \
	--with-tracker-pkgconfig-version=1.0 \
	--disable-shell-check \
	--without-cnid-mysql-backend \
	--disable-mysql

# https://github.com/cptactionhank/docker-netatalk/blob/master/Dockerfile
./configure \
        --prefix=/usr \
        --sysconfdir=/etc \
        --with-init-style=debian-systemd \
        --without-libevent \
        --without-tdb \
        --with-cracklib \
        --enable-krbV-uam \
        --with-pam-confdir=/etc/pam.d \
        --with-dbus-sysconf-dir=/etc/dbus-1/system.d \
        --with-tracker-pkgconfig-version=1.0
	
make

sudo make install

afpd -V outputs

          AFP versions: 2.2 3.0 3.1 3.2 3.3 3.4
         CNID backends: dbd last tdb mysql
      Zeroconf support: Avahi
  TCP wrappers support: Yes
         Quota support: Yes
   Admin group support: Yes
    Valid shell checks: Yes
      cracklib support: Yes
            EA support: ad | sys
           ACL support: Yes
          LDAP support: Yes
         D-Bus support: Yes
     Spotlight support: Yes
         DTrace probes: Yes

              afp.conf: /usr/local/etc/afp.conf
           extmap.conf: /usr/local/etc/extmap.conf
       state directory: /usr/local/var/netatalk/
    afp_signature.conf: /usr/local/var/netatalk/afp_signature.conf
      afp_voluuid.conf: /usr/local/var/netatalk/afp_voluuid.conf
       UAM search path: /usr/local/lib/netatalk//
  Server messages path: /usr/local/var/netatalk/msg/

which afpd

/usr/local/sbin/afpd

which netatalk

/usr/local/sbin/netatalk

netatalk -V

Zeroconf support: Avahi
     Spotlight support: Yes

                  afpd: /usr/local/sbin/afpd
            cnid_metad: /usr/local/sbin/cnid_metad
       tracker manager: /usr/bin/tracker daemon
           dbus-daemon: /bin/dbus-daemon
              afp.conf: /usr/local/etc/afp.conf
     dbus-session.conf: /usr/local/etc/dbus-session.conf
    netatalk lock file: /var/lock/netatalk

cat /usr/local/etc/afp.conf

;
; Netatalk 3.x configuration file
;

[Global]
; Global server settings
log file = /var/log/afpd.log
log level = default:severe, default:error, default:warning, default:info, uamsdaemon:demon
uam list = uams_dhx2.so
vol preset = default_for_all_vol
save password = no
afp listen = 130.233.96.246
;ldap auth method = simple
;ldap auth dn= cn=Manager,dc=archsystem,dc=com
;ldap auth pw=password
;ldap server=ldap-server
;ldap userbase=ou=users,dc=example,dc=com
;ldap userscope = sub
;ldap groupbase = ou=groups,dc=example,dc=com
;ldap groupscope = sub
;ldap uuid attr = apple-generateduid
;ldap name attr = uid
;ldap group attr = cn

[default_for_all_vol]
file perm = 0660
directory perm = 0770
;cnid scheme = dbd

[user]
path = /timemachine_pool/user
time machine = yes
valid users = user

cat /etc/pamd.n/netatalk

#%PAM-1.0
auth     include common-auth
account  include common-account
password include common-password
session  include common-session

For /etc/pamd.n/netatalk I tried different settings.

auth       include      system-auth
account    required     pam_nologin.so
account    include      system-auth
password   include      system-auth
session    include      system-auth

and

auth       required     pam_winbind.so
account    required     pam_winbind.so
session    required     pam_unix.so

They all failed.

service netatalk status outputs

● netatalk.service
   Loaded: loaded (/etc/init.d/netatalk; bad; vendor preset: enabled)
   Active: active (running) since Sun 2018-03-04 22:28:54 EET; 7min ago
     Docs: man:systemd-sysv-generator(8)
  Process: 17299 ExecStop=/etc/init.d/netatalk stop (code=exited, status=0/SUCCESS)
  Process: 17336 ExecStart=/etc/init.d/netatalk start (code=exited, status=0/SUCCESS)
    Tasks: 4
   Memory: 8.1M
      CPU: 453ms
   CGroup: /system.slice/netatalk.service
           ├─17342 /usr/local/sbin/netatalk
           ├─17343 /usr/local/sbin/afpd -d -F /usr/local/etc/afp.conf
           └─17344 /usr/local/sbin/cnid_metad -d -F /usr/local/etc/afp.conf

This is about it. Sorry for being verbose but I think this will lead to better conversation.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment