OS X LION connection error with AFP and workaround

This time i wrote this post in english because i think this workaround will be interesting for a lot of people.

Ok the issue is that i tried to access my QNAP Turbo NAS TS-410 over AFP with OS X LION Developer Preview 2 and got a error message like this one above. I couldn’t login with a registered user on my QNAP NAS box. The guest account worked fine but no chance with a registered one.

So i found a solution and explanation at the Apple Developer Forum. Apple disables support for the “DHCAST128″ in OS X 10.7 LION , which is commonly used by NAS boxes. Apple thinks is it insufficiently secure. So all the Vendors must work with Apple for Lion compatibility.

To turn on “DHCAST128″ support please do the following:

1)  Launch /Applications/Utilities/Terminal and do:
sudo chmod o+w /Library/Preferences
defaults write /Library/Preferences/com.apple.AppleShareClient afp_host_prefs_version -int 1
Now restart your computer.
2)  From Finder, select an AFP server, or use “Connect To…”.  This will cause the AFP Client to create the full preferences file
3)  Launch Terminal again and do:
sudo defaults write /Library/Preferences/com.apple.AppleShareClient afp_disabled_uams -array “Cleartxt Passwrd” “MS2.0″ “2-Way Randnum exchange”
sudo chmod o-w /Library/Preferences
Now restart your computer.

Note:  To add a “DHCAST128″ to the disable list, use
sudo defaults write /Library/Preferences/com.apple.AppleShareClient afp_disabled_uams -array-add “DHCAST128″

 

I tried it at my OS X LION installation an it worked like a charm. I hope that all the Vendors like QNAP, Synology etc. will patch that in future firmware releases.

  • Pingback: LG WEBCARE NL

  • http://www.facebook.com/sergiobodyweb Sergio Longhi

    You rock man :)

  • http://www.facebook.com/sergiobodyweb Sergio Longhi

    But….. Time Machine is still not working under Lion :(

  • Pingback: Caroline

  • Pingback: Eros Gaetani

  • Pingback: packirara

  • Pingback: snow / 栗夫 / 観測者

  • http://twitter.com/DanCMos DCM

    Now that the firmware has been updated, how do I reverse this?

  • Pingback: LG WEBCARE NL

  • Kevin

    Okay I’m not sure I am doing this correct.  I did the first set of commands but I also did the last set by the “Note” to disable “DHCAST128″  Am I suppose to do both?  I am asking because it’s not working for my Buffalo TeraServer which it appears others got theirs to work. 

    If I was not suppose to do the last command. How do I re-enable “DHCAST128″?

  • Pingback: Tobias Weisserth

  • Pingback: Francesco Delfino

  • Onsdons

    YESSSS!!!! It worked, I see my sparse bundles again!
    Now I’ll will start to restore my new hard disk with Lion.

    Thanks, You are a geek!

  • Riscostm

    Thanks for this, it work very well buddy! One question tho, will the spotlight indexing still work with this work around? Awesome howto!

  • Riscostm

    Oh and just to let everyone know it works with the TeraStation TS-WXL755 model!

  • Pingback: Edwin Mckain

  • Tinker

    You are fabulous. It worked like a charm on my LG NAS N2B1

  • Anonymous

    Thanks a lot. you’re great!~~ Good job~

    U better than BuffaloNasServiceTeam…

  • Pingback: Dani

  • MaxRaschke

    Wheres your Flattr Button!? Thanks for this Workaround- saved my ass!

  • Anonymous

    Don’t forget to reset afp_host_prefs_version to the default “15″ afterwards (when the firmware for the NAS is updated to properly support Lion).

    sudo defaults write /Library/Preferences/com.apple.AppleShareClient afp_host_prefs_version -int 15

  • http://mu-studios.com Manuel Urbano Martínez

    Thank you! Works very well :)

  • Chrismiller27

    thanks alex, worked for us as well!!

  • Heinz-bert

    do you have a solution already

  • Anonymous

    Worked for me. Thank you so much!

  • Mrausma92

    Thank you very much for the post! I unsuccessfully tried to follow similar instructions from another friend with the same trouble. Your approach nailed it!!

  • Coelho

    This solution is valid to SMB? Because I tried and I don’t connect to my server, I’m received the same error 

    smb://Meo

  • Pingback: PipE

  • Pingback: [Sammelthread] *** "der neue" Mac-Quatsch-Thread *** [Part 17] - Seite 156 - Forum de Luxx

  • Josefcarel

    I have a similar problem but something different and I wonder if the solution proposed here will work for me, the message I get is like this. Tell me please if I can do as your advice?
    Thanks

    There was a problem connecting to the server “xx.xxx.xxx.xxx”.
    The server may not exist or it is unavailable at this time. Check the server name or IP address, check your network connection, and then try again.

  • Josefcarel

    My problem is similar but it happens when I try to connect remotely to my Hard Disk attached to my Airport Extreme
    “There was a problem connecting to the server…..”
    The Server my not exist or it is unavailable at this time. Check the server name or IP address, check your network connection and try again”

    I would like to know if the solution to my problem is the same as your proposal here.
    Thanks
    Josef Carel

  • Gast

    It worked! With afp… but not with smb. But afp is fine for me ;) Thank you!

  • James Wages

    I get the same error dialog in Lion when I try to connect to a PowerBook G3 Wallstreet PDQ running AppleShare IP 6.3.3 on OS 9.  So I am curious if your “hack” would also work for AppleShare. 

    I clicked on your link to “Apple Developer Forum,” but despite my being logged in there, your link does not take me to a specific discussion offering the original “solution and explanation.”  Therefore, please make your URL more specific.

    And will your method work for AppleShare IP servers?  If so, how does your method need to be changed to accomodate AppleShare IP servers?

    I look forward to your answer.

    Thank you.

  • Milan KD

    Dear Alex 1st of all thanks for the solution that you provide, and i was having Mac Os X Lion 10.7.2 and also I Do have WDsharespace 4TB, I use it to Time machine backups, And now i can access the WD “smb://wdsharespace” and access datas, but time machine i can’t connect. please help me, i’m stuck with this,

  • Milan KD

    i tried this To turn on “DHCAST128″ support but i’m not sure that the way i did is correct or not. so please instruct me the way i should do to make it work. thanks..!

  • Stefanieneves

    Hey there! So I’m having the same problem with my MyBook WD Hard Drive. Entering in that command code in Terminal prompts a warning message about how I may lose my data and I don’t want to continue forward as I cannot lose anything I have backed up!
    Do you have any advice for what I should do? Thank you!

  • Pingback: Darkoperator

  • Dsh

    Worked like a charm. Thank you very much indeed!

  • Pingback: Mugunth Kumar ()

  • Pingback: The Lion is dancing Samba too B-) — DejavuZ.COM

  • Pingback: くにあき

  • Pingback: えか

  • Renavia

    I’m having a problem. When it asked for the password, I can’t type. Why is that?