Rasppi-samba

From openmichigan

Jump to: navigation, search

In order to share data in a "normal" fashion with Windows users who possess machines with wireless network capability the following assumptions are made:

  • a USB "drive" containing the content to be shared is plugged into the RPi
  • The data to be shared is found on that USB drive in the "/public" directory


Of course, the data can be in any directory on the USB drive, but that file path must be used in replace of "/public" in all of the following configuration instructions.  Here are the tasks performed to configure the Samba (file sharing) service:

If the USB drive is a NTFS formatted drive, you will need to do the following for the RPi to recognize & read that file system:

    sudo apt-get install ntfsprogs
    mkdir /media/ntfs

Install required Samba software on the Raspberry Pi (RPi):

    sudo apt-get install samba samba-common-bin
    sudo mv /etc/samba/smb.conf /etc/samba/smb.conf.old
    sudo chown -R root:users /media/ntfs/public
    sudo chmod -R ug=rwx,o=rx /media/ntfs/public

Create /etc/samba/smb.conf file

     [global]
     log level = 0
     workgroup = ummspi
     server string = %h
     dns proxy = no
     security = share
     guest account = nobody
     encrypt passwords = yes
     panic action = /usr/share/samba/panic-action %d
     usershare max shares = 100
     usershare path = /media/ntfs/public
     create mask = 0644
     directory mask = 0755
     # no printing fo Raspberry PI
     load printers = no
     printing = bsd
     printcap name = /dev/null
     disable spoolss = yes
     read only = yes

     [public]
     comment = Public Storage
     path = /media/ntfs/public
     read only = yes
     guest only = yes
     guest ok = yes


This configuration permits read-only access to a "/public" share that can be found/mounted on a Windows client at:

       \\www.ummspi.net\public    OR      \\192.168.42.1\public

Personal tools