Showing posts with label freenas. Show all posts
Showing posts with label freenas. Show all posts

Wednesday, 13 July 2011

FreeNAS fix for AFP connection issues with OSX Lion


The problem
I tried to connect to my FreeNAS box with Apple MAC OSX Lion over the AFP protocol and got an error message..  

There was a problem connecting to the server

The version of the server you are trying to connect to is not supported. Please contact your system administrator to resolve the problem.


The Solution
Apple disables support for the “DHCAST128″ in OS X 10.7 LION , which is commonly used by NAS boxes. Apple thinks it is insufficiently secure. So all the Vendors must work with Apple for Lion compatibility. However there is a workaround. You simply turn on or enable, DHCAST128 in Lion. Heres how you do it ..

To turn on “DHCAST128″ in Mac OS X Lion:-
1)  Launch terminal /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.

Now try connecting to FreeNAS over AFP protocol - voila! all fixed. Until FreeNAS has been updated this workaround should be sufficient. I know it's less secure than Apple wants, but at the moment NAS boxes aren't ready for the enhanced security features of OS X Lion. I will be keeping an eye on the FreeNAS forum. When a fix has been released by the experts, I will update this post.


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

Saturday, 26 June 2010

How to SSH into FreeNAS on a MAC


  1. Open Terminal
  2. type ssh root@192.168.0.20
  3. enter your password
Voila console access to your FreeNAS box

Usefull commands:

mv = move
example: mv /mnt/data3/Movies3/* /mnt/data6/

cp = copy
cp /mnt/data3/Movies3/* /mnt/data6/

ls = list directory contents
example: ls /mnt/data/movies

cd = change directory
example: cd /mnt/data/files or cd /


df = Disk Filesystem
example: df -h 
output: shows the disk space in "human readable" form.

Filesystem     Size    Used   Avail Capacity  Mounted on
/dev/ad6p1     902G    759G     71G    91%    /mnt/data1
/dev/ad7p1     902G    647G    183G    78%    /mnt/data2
/dev/ad8p1     902G    602G    228G    73%    /mnt/data3
/dev/ad9p1     902G    690G    140G    83%    /mnt/data4
/dev/ad10p1    1.8T     45G    1.6T     3%    /mnt/new
/dev/ad12p1     67G    7.5M     62G     0%    /mnt/data5






du = Disk Usage
example: du /mnt/data/images
output: lists all subdirectories to show how much disk space each has occupied.
..
example: du -h -s images
output: shows the disk usage of a directory (folder)