Skip to content

Instantly share code, notes, and snippets.

@geocine
Last active December 20, 2015 01:39
Show Gist options
  • Save geocine/6050588 to your computer and use it in GitHub Desktop.
Save geocine/6050588 to your computer and use it in GitHub Desktop.
#!/bin/bash
# sample only
sudo dpkg --configure -a
sudo apt-get install ntfs-3g
sudo mkdir -p /media/USBHDD1
sudo mount -t auto /dev/sda1 /media/USBHDD1
sudo apt-get install samba samba-common-bin
sudo cp /etc/samba/smb.conf /etc/samba/smb.conf.old
sudo echo "[Share name]
writable = yes
path = /path/to/directory
public = yes
guest ok = yes
guest only = yes
guest account = nobody
browsable = yes" >> /etc/samba/smb.conf
sudo /etc/init.d/samba restart
sudo echo "/dev/sda1 /media/USBHDD1 auto noatime 0 0" >> /etc/fstab
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment