Skip to content

Instantly share code, notes, and snippets.

@NuroDev
Last active September 4, 2017 20:46
Show Gist options
  • Save NuroDev/b6fe6e1bae56754569c6c5482a3ce5bd to your computer and use it in GitHub Desktop.
Save NuroDev/b6fe6e1bae56754569c6c5482a3ce5bd to your computer and use it in GitHub Desktop.
Script to download and install Samba for Raspberry Pi
sudo apt-get install samba samba-common-bin -y
@NuroDev
Copy link
Author

NuroDev commented Sep 2, 2017

WARNING:

This script has only been tested on Raspberry Pi 3. 1st & 2nd generation & Pi Zero is yet to be tested.
Please use the latest version of Raspbian available. Download Raspbian here.

Once Samba has finished installing, run the following command to open the Samba config file.

sudo nano /etc/samba/smb.conf

Then scroll to the bottom of the file and paste the following:

[media]
 comment=/media
 path=media
 browseable=yes
 read only=no
 writable=yes
 create mask=0777
 directory mask=0777
 public=yes

The last step when setting up Samba it to set a password for your user.
Use the following command to set the password for the user pi.

sudo smbpasswd -a pi 

Once finished, reboot your Pi using:

sudo reboot

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment