# configure netatalk as file/print server to OS X client

## ogive

I'm trying to configure netatalk as a file and print server to a Mac OS X 10.2 client on my lan.  I merged netatalk successfully, but my attempts to configure the several daemons in the netatalk suite have failed.

The printer is an HP Office Jet (USB) multi-function device connected to CUPS via hpoj/hpijs.  It works normally for printing from my gentoo box ($HOSTNAME=lenny).  I want the netatalk file server to share/export the ~/files directory for each of my users.  Here are my config files:

/etc/netatalk/netatalk.conf

```

AFPD_MAX_CLIENTS=5

#ATALK_ZONE=@zone

ATALK_NAME=`echo ${HOSTNAME}|cut -d. -f1`

#AFPD_UAMLIST="-U uams_clrtxt.so,uams_randnum.so"

#AFPD_GUEST=nobody

# Set which daemons to run (papd is dependent upon atalkd):

ATALKD_RUN=yes

PAPD_RUN=yes

AFPD_RUN=yes

TIMELORD_RUN=no

ATALK_BGROUND=no

```

/etc/netatalk/atalkd.conf

```

eth0 -phase 2 -net 0-65534 -addr 65280.83

```

/etc/netatalk/papd.conf

```

HPOJ:HPOJ@lenny:\ 

 :pr=|ptal:/mlc:usb:OfficeJet_V40:\

 :op=daemon:\

 :pd=/etc/cups/ppd/HPOJ.ppd:

```

/etc/netatalk/afpd.conf

```

"lenny" -uamlist uams_clrtxt.so,uams_dhx.so -nosavepassword -loginmsg "Hello" -tcp

```

/etc/netatalk/AppleVolumes.default

```

~/files

```

I haven't revised /etc/netatalk/AppleVolume.system from the originally installed version.  Following a tip from another post, I used afppasswd to set up an entry in /etc/netatalk/afppasswd for each of my users.  When I try to start the daemons, I get the following:

```

# /etc/init.d/atalk start

 * Starting atalkd...                                                     [ ok ]

 *   Registering lenny:Workstation...                                     [ ok ]

 *   Registering lenny:netatalk...                                        [ ok ]

 *   Starting papd...                                                     [ ok ]

 * Starting afpd...                                                       [ !! ]

Usage:  afpd [ -dpDTIt ] [ -n nbpname ] [ -f defvols ]                  [ -P pidfile ] [ -s sysvols ]

        [ -u ] [ -c maxconn ] [ -g guest ]                  [ -S port ] [ -L loginmesg ] [ -F configfile ] [ -U uamlist ]

```

Running ps shows that atalkd and papd are running, but afpd is not.  Does anyone have any helpful hints?

Tia,

ogive

----------

## ogive

In case the information is helpful to others, I'll post the configuration that satisfied my needs.

/etc/netatalk/netatalk.conf

```

AFPD_MAX_CLIENTS=5

ATALK_NAME=`echo ${HOSTNAME}|cut -d. -f1`

AFPD_UAMLIST="-U uams_clrtxt.so,uams_randnum.so,uams_dhx.so"

AFPD_GUEST=nobody

ATALKD_RUN=yes

PAPD_RUN=yes

AFPD_RUN=yes

TIMELORD_RUN=no

ATALK_BGROUND=no

```

Configuring the print server went smoothly once I figured out that I needed to specify the name of the printer destination (from /etc/printcap) on the ':pr=' line.  Also, it's 'op=lp' because lp is the user that CUPS runs as.

/etc/netatalk/papd.conf

```

HPOJ:\

  :pr=|/usr/bin/lp -d HPOJ:op=lp:pd=/etc/cups/ppd/HPOJ.ppd:

```

The atalkd daemon will add appropriate details to this line once you get it started.  When I started the daemon, atalkd.conf included only one line that read 'eth0'.

/etc/netatalk/atalkd.conf

```

eth0 -phase 2 -net 0-65534 -addr 65280.206

```

This config file just accepts the defaults.

/etc/netatalk/afpd.conf

```

-

```

/etc/netatalk/AppleVolumes.defaults

```

/home/myusername/files "My Files"

```

Once I succeeded in starting all of the netatalk daemons on the linux box, I found helpful instructions for configuring the OS X client at http://web.mit.edu/is/help/macos/macosx/OSXfilesharing/.

ogive

----------

## bld

Thank you mate! Without this post I would never achive to make this work! Now file sharing AND printing works fine! However, I keep watching the metalog directories for error and I get this one, I cant understand what this error is about, but I'd like to fix it, if you can help me, I'd be thankfull  :Very Happy: 

 *Quote:*   

> 
> 
> Aug  6 23:16:59 [afpd] DSIConfigInit: Error registering afp://10.0.0.1/?NAME=beast&ZONE= with SRVLOC

 

----------

