Skip to content

Instantly share code, notes, and snippets.

@teuteuguy
Created May 30, 2020 08:43
Show Gist options
  • Save teuteuguy/d373fbaa8cc62dd92ab1d49c998fd0be to your computer and use it in GitHub Desktop.
Save teuteuguy/d373fbaa8cc62dd92ab1d49c998fd0be to your computer and use it in GitHub Desktop.
#!/bin/bash
if [[ $(/usr/bin/id -u) -ne 0 ]]; then
echo "You must sudo this script"
exit
fi
apt-get update
apt-get upgrade -y
apt-get install -y samba samba-common-bin
echo >> /etc/samba/smb.conf
echo >> /etc/samba/smb.conf
echo "[pi4]" >> /etc/samba/smb.conf
echo " comment = My Share" >> /etc/samba/smb.conf
echo " path = /media/exfat" >> /etc/samba/smb.conf
echo " read only = no" >> /etc/samba/smb.conf
echo " guest ok = yes" >> /etc/samba/smb.conf
echo " browsable = yes" >> /etc/samba/smb.conf
echo " force user = pi" >> /etc/samba/smb.conf
# [pihole]
# comment = My Share
# path = /mnt/sandisk
# read only = no
# guest ok = yes
# browsable = yes
# force user = pi
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment