Article reproduced from this blog
1. Sudo apt-get install samba
If you get an error, you'll need to execute sudo apt-get update before re-executing sudo apt-get install samba
Once the installation is complete, the Samba service is installed, and some basic tools are not installed, so you need to install the Samba support tool:
sudo apt-get install samba-common-bin
(Note: This step is very important, if this does not install will cause a tool like smbpasswd not to be installed, the latter will not be able to increase the Samba users)
2. Configure/etc/samba/smb.conf
sudo vi/etc/samba/smb.conf
modify the [homes] segment to read as follows:
[Homes]
comment = Home directories
browseable = yes
# By default, the home directories is exported read-only. Change the
# Next parameter to ' no ' if you want to is able to write to them.
Read Only = no
# File Creation Mask is set to 0700 for security reasons. If you want to
# Create files with GROUP=RW permissions, set next parameter to 0775.
Create mask = 0755
# Directory Creation Mask is set to 0700 for security reasons. If you want to
# Create dirs. With GROUP=RW permissions, set next parameter to 0775.
Directory mask = 0755
3. Add Samba Users:
sudo smbpasswd-a pi
Enter your password two times and it is recommended to be consistent with your system.
4. Restart the Samba service:
sudo service Samba restart
5. Verify the changes:
Access \\192.168.0.19\pi under Windows
Enter the username pi and password, successfully login samba!
Raspberry Pi Installation Samba service