afpd.conf: (updated August 3rd)
- -transall -nouservol -setuplog "default log_info /var/log/afpd.log" -defaultvol /opt/etc/netatalk/AppleVolumes.default -systemvol /opt/etc/netatalk/AppleVolumes.system -passwdfile /opt/etc/netatalk/afppasswd -uamlist uams_clrtxt.so,uams_guest.so,uams_randnum.so,uams_dhx.so,uams_dhx2.so -nosavepassword -advertise_ssh
AppleVolumes.default:
/path/to/Volume "TimeMachine" cnidscheme:cdb options:tm
netatalk.conf:
# Appletalk configuration
# Change this to increase the maximum number of clients that can connect:
AFPD_MAX_CLIENTS=50
# Change this to set the machine's atalk name and zone, the latter containing
# the '@' sign as first character -- compare with nbp_name(3) if in doubt
#
# NOTE: If Netatalk should register AppleTalk services in the standard zone
# then you need not to specify a zone name here.
#
# If your zone has spaces in it, you're better off specifying
# it in afpd.conf if you realize that your distribution doesn't
# handle spaces correctly in the startup script. Remember to use
# quotes here if the zone name contains spaces.
#
#ATALK_ZONE="@some zone"
ATALK_NAME=`echo ${HOSTNAME}|cut -d. -f1`
# specify the Mac and unix charsets to be used
ATALK_MAC_CHARSET='MAC_ROMAN'
ATALK_UNIX_CHARSET='LOCALE'
# specify this if you don't want dhx and dhx2
# available options: uams_guest.so, uams_clrtxt.so,
# uams_dhx.so, uams_dhx2.so,
# uams_randnum.so
#AFPD_UAMLIST="-U uams_dhx.so,uams_dhx2.so"
# Change this to set the id of the guest user
AFPD_GUEST=nobody
# Set which daemons to run (papd is dependent upon atalkd):
ATALKD_RUN=no
PAPD_RUN=no
CNID_METAD_RUN=yes
AFPD_RUN=yes
TIMELORD_RUN=no
A2BOOT_RUN=no
# Control whether the daemons are started in the background
ATALK_BGROUND=no
# export the charsets, read form ENV by apps
export ATALK_MAC_CHARSET
export ATALK_UNIX_CHARSET
Also if you want to get the netatalk service to be advertised you need install the avahi-daemon and edit its settings. The settings reside in /opt/etc/avahi/
avahi-daemon.conf:
[server]
host-name=TimeMachine
use-ipv4=yes
use-ipv6=no
allow-interfaces=br0
enable-dbus=no
Also create a file in /opt/etc/avahi/services
Mine is called afpd.service:
<?xml version="1.0" standalone='no'?><!--*-nxml-*-->
<!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>
Last but not least issue the command 'adduser avahi' then 'avahi-daemon &'. Now you are set to start the service by typing 'afpd'. You should now be able to see 'TimeMachine' in the shared section of your Finder window. After mounting it is available in the Time Machine preferences.
Thanks to myopenrouter - their tutorial initially got me started fiddling around with Time Machine and dd-wrt afpd/netatalk half a year ago. I found some more settings using www.google.com. My configurations are most certainly not the best there is but for me they worked. I hope they do the same for you.
what do you exactly mean with /path/to/volume
AntwortenLöschenwhich path sould i enter here?
The /path/to/volume points to the directory you would like to share. In my case it points to /mnt/BackupHD where my Backup partition is mounted in.
AntwortenLöschen@nGotme
AntwortenLöschenI installed the netatalk 2.2.2 from your latest post. But I always got this error when I connect the afp from my mac.
"Something wrong with the volume's CNID DB, using temporary CNID DB instead.Check server messages for details!"
Here is my log:
If I set cnidscheme:bdb I got:
Aug 02 21:23:12.643222 afpd[3201] {cnid_dbd.c:88} (E:Default): tsock_getfd: getaddrinfo: CNID server localhost:4700 : Bad value for ai_flags
If I set cnidscheme:cdb I got:
Aug 02 21:17:45.664637 afpd[3106] {cnid.c:110} (E:AFPDaemon): Cannot find module named [cbd] in registered module list!
Can you help me?
Thanks!
Hao
Hey Hao,
Löschendid you try to use dbd instead? Also did you add uams_dhx2.so in the list of modules in afpd.conf?
YES! I follow the steps as same as this post. So I have uams_dhx2.so in my afpd.conf
LöschenI got these errors when I use cdb/dbd --- https://gist.github.com/3247901 (this snippet included both cdb/dbd logs)
Looks like your cdb module has been registered but is not in the module directory.
Löschen1) Did you try did instead?
2) Where does your configuration reside (absolute path)?
3) What are the directory attributes?
4) Are you starting the client as root?
Answers:
Löschen1. What is "did"?
2. I am using optware. So all my stuff is in /opt. (/opt/etc/netatalk/*)
3. My Time Machine dir's attributes is 777.
4. start which client? afpd? or cnid server?
OK. I always got this error:
tsock_getfd: getaddrinfo: CNID server localhost:4700 : Bad value for ai_flags
Seems the afpd server need to request localhost:4700 (cnid server). Can you tell me how can I launch this server on 4700port.
Thanks,
Hao.
1) dbd instead of cdb was meant
Löschen2) ok
3) ok - what are the privilges on the /opt/etc/netatalk/uams directory?
4) the afpd server (not client of course) - I do not start the cnid server manually
Hmm. How about this. I am using the same router as yours.(3500L). Can you share me your firmware. So I can reinstall all these. Thanks
LöschenNo problem. I use the recommended firmware 14929 mini-usb-ftp, which can be found here: ftp://dd-wrt.com/others/eko/BrainSlayer-V24-preSP2/2010/08-12-10-r14929/broadcom_K26/
LöschenFantastic! It works! I reinstall the DD-WRT firmware. And reinstall netatalk-2.2.1(I am not using the latest one). And everything works.
LöschenThanks for your help!!!
Congratulations and good to know that it works with the reinstall!
LöschenHello, I'm trying to set up my NAS as a time machine volume for my Macbook Pro running OS X 10.8.0. So far I'm having no luck, I used the configurations given in this post with netatalk-2.2.2. I can see the volume on my MBP but cannot connect using what should be guest access. (U::nobody" P:"") It appears to time out but I don't know how to troubleshoot this. My MDD G4 running Mac OS X 10.4.11 doesn't see it, but I can punch in the path to the volume manually and it'll run into the same problem. Any ideas?
AntwortenLöschenHey Parker,
Löschenwhat system are you using for the NAS? Also I do not have OS X 10.8 installed I can only give you advice based on 10.7 and the DD-WRT setup I described in this blog. Are avahi and afpd running on the NAS or do they exit? Did you have a look at the log files?
It's an external hard drive attached to an ASUS router running DD-WRT. Avahi and afpd are both running. I just found the log file for afpd, I don't know where the other log files are. I'm basically running the network attached file systems via an optware installation on the external hard drive, which has partitions for optware, swap, and a larger partition for sharing files on the network.
LöschenHere's afpd.log.
Did you set a password in /etc/passwd? Is the nobody account and group present also?
LöschenThis is the entry for nobody in /etc/passwd;
AntwortenLöschennobody:*:65534:65534:nobody:/var:/bin/false
I don't know enough about this format to know if a password has been set or not.
As for a nobody account and group, how would I go about doing that? Is it the same as using adduser for avahi or is there a different process involved?
That looks good. The group can be defined using the same way it was done for avahi - addgroup should do the trick when the nobody user is already present.
LöschenAdded a group for nobody and confirmed that there is a nobody user, still no dice.
LöschenI can see the volume in my Osx 10.6.8 but it is read only....log-in as Guest as per written in Finder.....any idea why? Do I need to config the netatalk to add the user and password of the Osx user?
AntwortenLöschen