Summary of info from [[http://elinux.org/R-Pi_NAS]] //which has the best instructions for setting up a Windows share with Samba I have ever come across.//\\

**Configure the RPi as a Samba server to serve as a network drive**\\

Install the OS i.e. [[http://www.raspbian.org/|Rasbian]]. Rasbian is installed on the RPi SD card.\\
Ensure the RPi is connected to the internet i.e. ''ping www.google.com'' in terminal.\\
Install Samba
  * Type ''sudo apt-get install samba samba-common-bin'' in the terminal
  * Type ''y'' when asked.
  * Make copy of original config file with ''sudo cp /etc/samba/smb.conf /etc/samba/smb.conf.old''

To edit the Samba configuration file, type ''sudo nano /etc/samba/smb.conf'' in the terminal.\\
Make changes, note use arrow keys instead of mouse.\\
Save changes by pressing ''Control-X'', then press ''y'' then press ''[Enter]''\\
Then restart the Samba server by typing ''sudo /etc/init.d/samba restart''\\

**Changes that can be made**\\
To force the Samba server to ask for a username/password,
> change text ''#  security = user'' to ''security = user''\\

To configure private storage areas on the RPi
>In the [homes] section, change from ''read only = yes'' to ''read only = no''
>Create a smb login for user __pi__ by typing ''sudo smbpasswd -a pi''
>Create other users as in this example
>> type ''sudo useradd john -m -G users''
>> type ''sudo passwd john''
>> if smbpasswd doesn't work try ''pdbedit -a -u john'' or
>>> type ''sudo apt-get install samba-common-bin'' then type ''sudo smbpasswd -a john''\\

Create a public area where everybody can share files.
Create the public directory by typing
>''sudo mkdir /home/shares''
>''sudo mkdir /home/shares/public''
>''sudo chown -R root:users /home/shares/public''
>''sudo chmod -R ug=rwx,o=rx /home/shares/public''

Edit ''smb.conf'' by with
<code>
[public]
  comment = Public Storage
  path = /home/shares/public
  valid users = @users
  force group = users
  create mask = 0660
  directory mask = 0771
  read only = no
</code>

To add external USB storage.\\
//Note:Thumb drives are the easiest and cheapest way to add additional storage. Portable drives will require a powered hub to work.//\\

First note where the USB drive is located in the file tree by typing ''sudo fdisk -l''\\
The drive will probably have a ''/dev/sdXX''

Mount your drives in the public area by creating a directory then mounting your drive there\\
>''sudo mkdir /home/shares/public/disk1''
>''sudo mount /dev/sdxx /home/shares/public/disk1''


