You’ve configured your external hard drive to be accessed within your LAN to start sharing your files, but wouldn’t it be easier to have that drive automatically mounted on other clients within the network at startup, and easily addressed via drive letters?
What I mean is instead of typing your RPi’s IP address and Samba share name within Windows Explorer’s address bar, you can just access it like any other attached device in the left panel.
- Open Windows File Explorer and start the Map Network Drive wizard:
- Windows 8/8.1: Right click on This PC from the left panel and select Map network drive…
- Windows 7: Click on Map network drive along the top below the address bar
- Choose your drive letter, however it would be wise to work your way backwards from the alphabet on this one
- Enter in your RPi’s IP address followed by its share name setup in smb.conf. Example: \\192.168.0.125\share – notice use of the backward slashes
- Check Reconnect at sign-in and Connect using different credentials and press Finish
- You will be prompted to enter in a username and password. The username will be the username of your account on the RPi – mine was pi – and the password is whatever you configured it to be when you executed the command sudo smbpasswd -a pi during setup and config of Samba. Check Remember my credentials.
- You can now access your Samba share as it were a mounted drive from within anywhere on your system. Using this method to mount a network drive makes it easier to locate, store and share data within applications and address them in scripts.
Try rebooting, I had to a couple of times. If not, ensure you have the appropriate settings configured in the Networking and Sharing Center:
- Go to Control Panel
- Click on Network and Internet, then Network and Sharing Center
- From the left panel, click Change advanced sharing settings
- Within the Home/Work or Private sections, ensure that Turn on network discovery and Turn on file and printer sharing are selected
- Click Save changes and reboot
This post is part of the Public Accessible Raspberry Pi File Server tutorial post.