From My Wiki
Jump to: navigation, search

I will be using a raspberry pi to act as a smb server for filesharing: heres how to easily set up a raspberry pi with raspbian:

First show connected disk drives

sudo fdisk -l

make mount points

sudo mkdir /mnt/disk1
sudo mkdir /mnt/disk2

Do this if using NTFS drive

sudo apt-get install ntfs-3g 
then see

then mount

sudo mount /dev/sda1 /mnt/disk1

Now to share it over the network

sudo apt-get install samba samba-common-bin 
sudo vi /etc/samba/smb.conf
comment = USB Share
path = /mnt/disk1
writeable = Yes
browseable = Yes
public = yes
sudo service samba restart 
sudo testparm -s 

will need to remount after reboot Unless:

crontab -e
@reboot sudo mount /dev/sda1 /mnt/disk1
(may not need this)

Automatically mounting this in OS X

Use Automator to create an Application.

This applications has two parts:

Get Specified Servers with the value smb://guest:@raspberrypi/usb for guest access. (smb://username:password@hostname/dir)

And Connect to Servers

Save this as an application then go to System Preferences > Users & Groups > <username> > Login Items and then drag the application you created previous into the list.