Install Samba

apt-get install samba

Create Shares

Create shares with proper permissions

mkdir -p /data/shares/public
chown -R root:users /data/shares/public/
chmod -R ug+rwx,o+rx-w /data/shares/public/

Configure Samba

Below configuration will create a new samba share which can be accessed by anybody on the network without entering any credentials.

nano /etc/samba/smb.conf

Contents of smb.conf

[global]
workgroup = WORKGROUP
server string = Samba Server %v
netbios name = WDMyCloud
security = user
map to guest = bad user
dns proxy = no

[Public]
   path = /data/shares/Public
   force group = users
   create mask = 0660
   directory mask = 0771
   browsable = yes
   writable = yes
   guest ok = yes

Restart Samba Service

The samba service has to restarted each time to use the new configuration.

/etc/init.d/samba restart