How to share an OS x USb drive on a windows network

If you want to share your Macintosh USB HD over a network, follow these instructions

  • First fire up a terminal program
  • In terminal type df -k to see what your drive is called eg
    /dev/disk1s3 709869 0% /Volumes/MyDisk
    So the example drive is called "/Volumes/MyDisk"
  • Type sudo su Type your root/admin password and you'll be presented with a command prompt that looks like this:
    computer-name:~root#
  • Edit your samba config file by typing "vi /etc/smb.conf" and then hit "shift g" to go to the bottom of the page.
  • Hit "o" to start a new line for editing then insert the following:
    [Any Name you want for the drive]
    comment = Any name you want for the drive
    path = /path/to/usbdrive/shown/in/your/df-k/
    browseable = yes
    read only = yes
  • Next hit "esc" and then "colon" and finally "wq"

Samba reads the smb.conf file continuously so there is no need to reload samba. So to connect just "cmd+k" and put "smb://IP/commentname" eg  smb://192.168.1.110/MyDisk. In Windows, just go to network places and type in \MyMac where MyMac is the name of your mac comuter. Your USB share will then appear.

You'll need to type in your 'allowed' username and password but your done. This will work for Mac, Windows, Unix, Linux, XBMC using samba/CIFS