To resolve an issue with FreeNAS Samba shares not properly mapping when correct credentials are used.
On a FreeNAS installation, it’s possible to run into an issue with credentials being “saved” when browsing to the network path of a Samba share and not allowing for the share to be mapped properly because of it.
Note: This may be applicable to any Samba share set-up with both browsable shares and locked down shares
- A unit with FreeNAS
- A dataset with a Samba share set up
- “Network browsable” option selected on share options
When unable to map a browsable network samba share despite using the proper credentials, open the command prompt.
Entering “net use” will list all network shares. Shares without a Local drive name are not mapped, but have been browsed to and the credentials used to access them have been cached by Windows.
In this example, freesmb is an open share accessible to guests, while Benton is not.
After accessing freesmb and Benton through the network, we can see them populated in “net use.”
If we attempt to map Benton as a local drive with proper credentials, it will now fail and we’ll be met with a looping “Connecting to [IP address]”
To map this with proper credentials, we’ll need to use “net use \\192.168.16.87\Benton /delete”. If any other shares were browsed using the same IP/Host name, these will need to be deleted as well.
After deleting these shares from net use, we will be able to map the share properly.
We should now be able to browse to the other shares without issue as well. Browsable, unmapped shares may not appear under net use any longer as well.
If you’re still unable to map the SMB share properly, double check the credentials being used.
Check the permissions set on the dataset and parent pool.
Check that permissions are either set to inherited or not, adjust accordingly.
Review /var/log/samba4/log.smbd for any error messages pertaining to Samba
Review /var/log/messages for any Samba errors
If network shares are no longer browsable, review the permission level the account used to map the share currently has.