Samba on Raspbian

Posted on

  • Install Samba Software
sudo apt-get install samba samba-common-bin -y
  • Check folder account ownership (for Sharing)
sudo chown -R pi:pi /path/foldername
  • Back up Samba configuration file
sudo cp /etc/samba/smb.conf /etc/samba/smb.bak
  • Edit new configuration file using text editor
sudo nano /etc/samba/smb.conf
  • inside smb.conf find section containing work group and Share Name
Edit the existing lines: 
workgroup = WorkgroupName
Wins support = yes
directory Mask = 0775
  • Add the following lines:
  • Share Name you want to appear on network
  • Leave [ ] Around Share Name
[Share Name]       
comment = comment on share
path = /path/foldername
create Mask = 0775
directory Mask = 0775
read only = no
browseable = yes
public = yes
force user = pi
only guest = no
  • Save configuration file
  • Set Samba Password
sudo smbpasswd -a pi
  • Enter new password and observe confirmation pi user was added to samba:
New SMB password:  
Retype SMB password:
added user Pi
  • restart Samba service
sudo samba restart

Share Drive should now be accessible on Local Network.
Mount Samba Share