I’m sure I’m not the only person getting frustrated with sharing files between a Raspberry Pi and a Windows 7 system. There seems to be an issue where Windows 7 enables encryption or something that stops Windows from connecting to the Samba shared folder. Having Windows 7 Home Premium also doesn’t help, it does not include all the functionality to change Local Group Policy. Searched online and found no solutions that worked for me, I started looking for alternatives.
The solution that worked in the end was to create a mounted drive on the Raspberry Pi that links to a shared folder on the Windows 7 machine.(Reversed Samba
Prerequisite:
- A Windows 7 user with a password.
- A Windows shared folder. (Avoid shared folder that are located on the Desktop or in User folders, Windows tend to have extra security on them. You also might need to apply some basic windows Read/Write permissions on the shared folder)
- You will need the IP of the Windows 7 Machines. (Recommended that it’s set to a static IP)
- No spaces in the names of the shared folder. (Also remember that Linux uses / instead of \)
The following shell commands will create a new mounting folder and mount the shared folder to it. (The XXX’s need to be replaced with the appropriate IP address and user credentials)
1 2 3 4 |
sudo mkdir /mnt/winshare sudo mount -t cifs //192.168.1.XXX/Users -o username=XXX,password=XXX /mnt/winshare |
Automatic mounting can be done by changing the /etc/fstab config file.
1 2 3 |
sudo nano /etc/fstab |
Add the following line to the bottom of the file (The XXX’s need to be replaced with the appropriate IP address and user credentials):
1 2 3 |
//192.168.1.XXX/ShareName /mnt/winshare cifs username=XXX,password=XXX 0 0 |
Hopefully this makes things a little easier to share files.
Sounds useful to me!
This works a treat I can now stream video from my laptop to my pi, which is connected to an old CRT TV!!! Looks great. Thanks so much.
No worries… 😉