Install Samba:

[html]
apt-get install samba
[/html]

Edit the samba config file:

[html]
vi /etc/samba/smb.cnf
[/html]

Append the following to the bottom of the config file:

[html]
[Myshare]
comment = My Share
read only = no
locking = no
path = /home/share
guest ok = no
browsable = yes
writable = yes
valid users = @sharegroup
[/html]

*path = path to the folder you are sharing
*@sharegroup – this is the user group which will be created below

Add group and then add the user to the group:

[html]
groupadd sharegroup
useradd shareuser -G sharegroup
[/html]

Set user password:

[html]
smbpasswd -a shareuser
New SMB password:
Retype new SMB password:
Added user shareuser.
[/html]

Create the share directory:

[html]
mkdir /home/share
[/html]

Set ownership and permissions on shared directory:

[html]
chown -R root:sharegroup /home/share
chmod -R 700 /home/share
[/html]

Restart samba:

[html]
/etc/init.d/samba restart
[/html]

Now try to access the samba share from a samba client.

e.g. from windows open file explorer end enter followed by the username and password set above:

[html]
//ipaddress
[/html]

Further reading here http://www.howtoforge.com/samba-server-install-on-debian-7-wheezy

Written by Matt Cooper
Hi, I'm Matt Cooper. I started this blog to pretty much act as a brain dump area for things I learn from day to day. You can contact me at: matt@matthewc424.sg-host.com.