Connect to a FreeNAS Samba or AFP share on Mac OS X Lion [Workarounds] [Updated]

No support for legacy authentication method in SMB or AFP

As previously mentioned, OS X Lion does not support logging into NAS boxes running Samba or AFP servers that employ the DHCAST128 authentication method. Apple documented this as a security update, in which they outright disabled DHCAST128 in Lion.

People who are running type of NAS system – FreeNAS or store bought boxes will not work in Lion!

Now some people have figured out a workaround to manually enable DHCAST128 in Lion, so if you don’t mind a little hacking in the system go ahead and use it. Otherwise try to enable NFS on your NAS. NFS is support by most NAS boxes running Linux. However, note that NFS does not provide any option for user authentication.

Option 1 – Hacking the OS

SMB/CIFS solution:

  1. Upgrade FreeNAS to the latest stable build.
  2. Setup your SMB/CIFS shares accordingly.
  3. Go to Finder, click on Go->Connect to Server  or simply press command + K.
  4. Connect to your server by typing smb://your.ip/hostname or use cifs://your.ip/hostname
  5. Login, and you should be good to go.
  6. If you don’t see the login pop-up, connect to smb://user:pass@ip  instead.

Do not use the link in Finder under the Shared category. It will not let you connect. It could be my settings somewhere that’s causing the problem, but so far I can’t figure out why it won’t let me connect straight from the Finder shortcut. However, the Connect to Server option works just fine.

Leave a comment if you encounter problems.


AFP solution:

  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.

To disable DHCAST128,

sudo defaults write /Library/Preferences/com.apple.AppleShareClient afp_disabled_uams -array-add "DHCAST128"

Credit for these command goes to Alexander Wilde, please visit his site for the original post. All credits go to him!


Option 2 Enabling NFS

In FreeNAS, go to Services – > NFS and enable 4 NFS servers.

then configure your NFS shares, the easiest way is to point the share to your main storage folder under and share all sub-folders underneath.

Configure NFS shares

Note that if you do not “Map all users to root” you will not have write access to the share!

Save and apply. Then go to Disk Utilities on your Mac.

Click on File – > NFS Mounts, click on the ‘+’ to add a new mount.

Configure NFS mounts in Disk Utility

Replace the IP and folder names according to your FreeNAS share. Then click on ‘Verify” to close the dialog and close the window to save your settings. You may be asked to login to your admin account in order to save the setting. The mount will be auto-mounted to your system at boot time.

After you set everything up in Disk Utility. Quit it and wait a couple of minutes for it to show up in Finder. Note that even though we mounted it to a folder on the Desktop, it will NOT show up! The easiest solution here is to go to your Desktop in Finder and create an alias to the mounted folder. Or, create an actual folder on the Desktop beforehand then mount the share to it.

This isn’t the safest approach since NFS in FreeNAS does not have any authentication support. But for my personal needs it’s actually quite nice, especially when NFS is about 30-50% faster than SMB in some cases. For many home networks, it’s the only way to stream HD videos over the air.

So please give NFS a shot if you don’t want to hack your system to use AFP!

  • http://www.frankleng.me Frank Leng

    I don’t think legacy support for OS9 is supported anymore.

  • Janschimanski

    I have the same problem like Chris has…Are there any solutions now?

  • Janschimanski

    Solved the problem by setting up the NFS connection via Terminal…Now it works fine…

  • Theofa

    Perfection. Worked exactly how I needed it to.

  • http://www.aexm.fr/ samba protocol

    i simply used smb protocol to be able to connect to shares …

    afp doesnt work (OS X 10.7.4 and DS101j 2.0 fw)

    sebastien

  • Saeed Siddiki

    guys i am opting for the To disable DHCAST128, and cant seem to reach a solution. IN these TERMINAL commands after u input the passwords, is there a confirmation message that is suppose to appear? i still dont see the volume under TM – but everything else is working fantastically … would appreciate anyones help on this 

  • Brian

    Brilliant! I have AFP running on my DNS-323 (with Alt-F) and couldn’t figure out why I couldn’t connect to it (or NFS, as NFS worked fine before I switched out the firmware on the DNS-323). I did the AFP trick and it worked right away .. I’m running Mavericks DP8, by the way. Thanks so much for the guide!

  • http://www.frankleng.me Frank Leng

    Glad it worked for you.
    Mavericks GM was just released right?

See also: