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:
[Myshare] 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:
//ipaddress
Further reading here http://www.howtoforge.com/samba-server-install-on-debian-7-wheezy
Leave a Comment