Install Samba:

apt-get install samba

Edit the samba config file:

vi /etc/samba/smb.cnf

Append the following to the bottom of the config file:

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

*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:

groupadd sharegroup
useradd shareuser -G sharegroup

Set user password:

smbpasswd -a shareuser
New SMB password:
Retype new SMB password:
Added user shareuser.

Create the share directory:

mkdir /home/share

Set ownership and permissions on shared directory:

chown -R root:sharegroup /home/share
chmod -R 700 /home/share

Restart samba:

/etc/init.d/samba restart

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:


Further reading here

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: