Ubuntu SMB share (smbd) for OS-X / Windows clients
Source: https://help.ubuntu.com/community/How to Create a Network Share Via Samba Via CLI
Install Samba
sudo apt-get update sudo apt-get install samba
Set a password for your user in Samba
sudo smbpasswd -a
Note: Samba uses a separate set of passwords than the standard Linux system accounts (stored in /etc/samba/smbpasswd), so you’ll need to create a Samba password for yourself.
Create a directory to be shared
mkdir /home/<user_name>/<folder_name>
Make a safe backup copy of the original smb.conf file to your home folder, in case you make an error
sudo cp /etc/samba/smb.conf ~
Edit the file “/etc/samba/smb.conf”
sudo nano /etc/samba/smb.conf
Once “smb.conf” has loaded, add this to the very end of the file:
[folder_name] path = /home/<user_name>/<folder_name> available = yes valid users = read only = no browseable = yes public = yes writable = yes
Restart the samba:
sudo service smbd restart
Once Samba has restarted, use this command to check your smb.conf for any syntax errors
testparm
Refer to source web site article for tips, and instructions on how to connect to this share.