Samba shares
Samba is a suite of applications communicating via SMB protocol. SMB protocol is also used by Windows sharing. SMB is used mainly by two major services - shared folders and sharing of printers. This guide is about shared folders for now, maybe later I will add how to share a printer. Now install Samba services from repositories.
apt-get install samba samba-client samba-common-bin
Next step is to create a folder that will be shared by Samba.
mkdir shared
Create user that will be used to authenticate users accessing shared folder. New user will not be used for local login or any other purposes, so use "--no-create-home" parameter to skip creation of home directory.
adduser --no-create-home remote
To disable login to local shell to this account, follow "How to disable default 'pi' user" on Adjustments page only replace "pi" with "remote". Change owner of shared folder to new user.
chown remote shared
Now set password of user "remote" for Samba with:
smbpasswd -a remote
Next step is configuration of Samba`s shared folder. Edit /etc/samba/smb.conf and add this section at the end.
[shared]
path = /shared
writeable = yes
browseable = yes
valid users = remote
Now close the configuration file (CTRL+X...) and save changes (...press "y" and Enter) and restart Samba service.
/etc/init.d/samba restart
That should be all, now your folder is shared. Following command will show everything that is shared via Samba:
smbclient -L //127.0.0.1 -U remote
To connect to your shared folder from Windows, use Win+R (Run command...) and enter double backslash (Alt+Q) and RPi`s IP address.
Press "Enter", insert password and you should be see your shared folder.