Sonntag, 31. Juli 2011

Netatalk 2.2 for DD-WRT

I successfully compiled netatalk 2.2.0 for opt ware DD-WRT build environment. It is compiled against Berkeley DB 4.7.25.

I tested it with OS X 10.6.8 aka Snow Leopard and OS X 10.7 aka Lion. Both worked with Apples Time Machine. My router is a Netgear WNR3500L with Firmware: DD-WRT v24-sp2 (08/12/10) mini-usb-ftp installed.

libdb 4.7 ipk
netatalk 2.2 ipk (updated August 3rd - added uams_dhx2.so)

Make a backup of your existing afpd/netatalk settings! (/opt/etc/netatalk in my case)
Install the packages on your machine in the following order:

ipkg install libdb_4.7.25-3_mipsel.ipk
ipkg install netatalk_2.2.0-2_mipsel.ipk

make sure that you use

ipkg install libdb_4.7.25-3_mipsel.ipk -force-downgrade

in case your libdb version is newer than 4.7.25.

Also in case you have not already done so - install libgcrypt which is necessary to get dhx2 authentication to work:

ipkg-opt install libgcrypt (updated August 22nd - thanks newton)

Please donate by PayPal Button if you appreciate the work!

Be aware: both packages are not guaranteed to work. They may break your system!

28 Kommentare:

  1. Thanks a lot for that build!

    Works like a charm for me with OSX Lion and Time Machine!!!

    btw. I'm using Netgear WNR3500L with DD-WRT Kong Mod

    AntwortenLöschen
  2. Hi,

    I'm running the WNR3500L w/ DD-WRT Kong Mod too and installed via ipkg-opt. afpd -v says it's 2.2.0 so it was successfully installed.

    Even though I used your config files and modified them to my needs my Lion machine still tells me I'm running a not supported server version.
    Your libdb is installed too (of course).

    Do you have any hint?

    AntwortenLöschen
  3. My configs don't use the uams_dhx2.so - maybe try to add it to the line in afpd.conf.

    AntwortenLöschen
  4. Thanks.
    I already tried that, but it looks like your package is missing uams_dhx2_passwd.so and the symlink to it (uams_dhx2.so).
    As I see in your config files you're not using any authentication..?
    Without it works for me too!
    If you could make another ipkg with the missing files it would be amazing!

    AntwortenLöschen
  5. I was wondering if you had the bins for DD-WRT k26 kernel. Thanks!

    AntwortenLöschen
  6. @wb thx for that hint - uams_dhx2.so was originally not compiled into the ipk. To whom it concerns: the flag for enabling dhx2 was set wrong - it should be --with-libgcrypt-dir=/path/to/lib

    The new ipk should be up so you can give it a shot. Also I edited my configs for enabling dhx2 on the server side by default.

    cheers

    AntwortenLöschen
  7. @4559f8c6-bd2a-11e0-8f00-000bcdcb2996 sorry mate I do not have those I will however put up a tutorial on how to compile netatalk this week. Maybe you could give it a try then!

    AntwortenLöschen
  8. Still having login problems, but I will post this on a forum. Thank you very much!!!

    AntwortenLöschen
  9. Fixed my problems, seems my /opt/etc/netatalk/passwd file was ignored and you need a valid pw in /etc/passwd. Authentication is awfully slow (DHX2) but performance ok. Works with Lion too.

    THANK YOU!!

    AntwortenLöschen
  10. Wonderful! Glad it helped, mate.

    AntwortenLöschen
  11. How do you get a valid password in /etc/passwd? My tomatousb uses shadow passwords...

    AntwortenLöschen
  12. One more thing... Going from Netatalk 2.2 beta4 to this resulted in my getting 3mb/s transfer speeds instead of 9mb/s transfer speeds. How can that be?

    AntwortenLöschen
  13. @andg
    1) The shadow passwords option is currently disabled. It has to be enabled at compile time - meaning one would have to recompile the package. At the moment I do not have enough ad clicks on this page nor any donations so far to put more work into providing a custom package :P *hint*

    2) I have not noticed any speed difference so far. I am using a Netgear router (WNR3500L) with an attached usb disc. My top speed is 6MB/s and has not changed since netatalk 2.0 Did you change your configs lately which could have had any influence on the speed bump you experience?

    AntwortenLöschen
  14. @nGotme

    Having to use cnidscheme:cdb and run cnid_metad is new. Didn't seem to be a requirement when I used netatalk 2.2 beta4. I don't know if that's what caused it?

    AntwortenLöschen
  15. I do not use cdb so maybe it is the problem on your end. Did you try dbd instead?

    AntwortenLöschen
  16. Your example config files say cdb? http://netatalk-ddwrt.blogspot.com/2011/08/netatalk-configurations.html

    AntwortenLöschen
  17. ah, nevermind... my applevolumes.default says cnidscheme:dbd

    AntwortenLöschen
  18. Hi, thanks for your efforts.
    I still have problems: when I enter password, progress spinning for a few seconds (maybe a minute) and then password prompt shakes as if it is wrong. Mac OS logs contains strange messages (I can post them a bit later); netatalk logs shows pretty nothing at all (except that DHX2 login: , and then, a minute later, session statistics). Looks like I have no chance setting up authentication, maybe you can hint me how to enable write access to guest account (just for Time Machine)?

    AntwortenLöschen
  19. And I want to add one thing: I think you forget to mention that end-user must do ipkg-opt install libgcrypt if it is not installed, otherwise (s)he will get Signal 11 error from uams_dhx2.so.

    AntwortenLöschen
  20. Hey newton - yes thanks for the info I will add it right away. It seems that libgcrypt is missing in the ipk's dependencies.

    As for the authentication problem - did you solve it by installing libgcrypt? Also are you using shadow passwords?

    AntwortenLöschen
  21. Damn yes, just tried it, and discovered that it is using password in /etc/passwd file! Don't you know how to make it using afppasswd one?

    AntwortenLöschen
  22. I am afraid you can use afppasswd only together with uams_randnum.so authentication, see http://netatalk.sourceforge.net/2.0/htmldocs/afppasswd.1.html

    AntwortenLöschen
  23. Hi, I get md5 error when installing your netatalk 2.2 ipk.
    There is also a netatalk package on the dd-wrt repos but its compiled against libdb 5.2 and I get a cidb error when accessing the share...
    Help please?

    AntwortenLöschen
  24. Hi!
    I just bought my wndr 3700 someday ago andI really want to use Time Machine with my new router. Is it work with wndr3700? I know you have WNR3500L but it is not same wndr3700 which I have.

    AntwortenLöschen
  25. Maybe netatalk 2.2 is already in dd-wrt's ipkg repository and there is no need to try my build anymore. If not you can try my build as long as you have the same dd-wrt flavor on your machine it should work. If it does not you can look into the cross compiling post...

    Post your feedback as soon as you have it running! :)

    AntwortenLöschen
  26. Question: did you compile with DSHADOWPW for these builds? Trying to get authentication working on a router with shadow passwords (E3000 running a modded tomato build). Authentication seems to be the last thing I'm stuck on. :(

    AntwortenLöschen
    Antworten
    1. No, I did not compile with DSHADOWPW. I just had a look into the netatalk.mk again. I used the "--without-shadow" flag.

      Löschen