Why can I access a Samba folder share on Windows 10 but not a USB drive share?

I have a samba share to a folder on my pi. I can access it from Windows. But when I try to connect to a USB device (rather than a folder) from windows I get errors.

This is how I share the USB drive in /etc/samba/smb.conf:

Comment = Pi shared folder
Path = /media/pi/elfdisk02
Browseable = yes
Writeable = Yes
only guest = no
create mask = 0777
directory mask = 0777
Public = yes
Guest ok = yes

That does not work.

My folder share from smb.conf that works looks like this:

Comment = Pi shared folder
Path = /share
Browseable = yes
Writeable = Yes
only guest = no
create mask = 0777
directory mask = 0777
Public = yes
Guest ok = yes

I can see both shares in the Windows 10 network. Why can I access the folder [share] but not the USB drive [elfdisk]? If the information above is insufficient, where else on Raspberry PI should I look to fix an error of this type?

At the risk of confusing the issue, here is a bit more information:

On Windows 10 Pro I get the error "The network folder specified is currently mapped using a different user name and password.."

On Windows 10 Home I get: "You might not have permissions to access this resource."

Here is what is turned on in smb.conf:


   workgroup = WORKGROUP
   log file = /var/log/samba/log.%m
   max log size = 1000
   logging = file
   panic action = /usr/share/samba/panic-action %d
   server role = standalone server
   obey pam restrictions = yes
   unix password sync = yes
   passwd program = /usr/bin/passwd %u
   passwd chat = *Enter\snew\s*\spassword:* %n\n *Retype\snew\s*\spassword:* %n\n *password\supdated\ssuccessfully* .
   pam password change = yes
   map to guest = bad user
   usershare allow guests = yes

   comment = Home Directories
   browseable = no
   read only = yes
   create mask = 0700
   directory mask = 0700
   valid users = %S

I am new to Samba and any help would be appreciated.

  • 1
    This seems to be a Windows problem.
    – Milliways
    Dec 27, 2020 at 4:30
  • Then should I ask elsewhere? If so, do you know where? Isn't connecting to Samba shares from Windows (or the Mac) a central part of Samba itself?
    – ccalvert
    Dec 27, 2020 at 5:51
  • But you are not asking a Question about Samba on the Pi, and have posted no Pi specific configuration or diagnostics, but are asking questions about the tools you are using on Windows. Even if you did "That does not work" is not going to help anyone who might happen to use Windows. I use commands like open smb://MilliwaysPi4.local/pi
    – Milliways
    Dec 27, 2020 at 6:15
  • @Milliways I appreciate your patience. I have heavily edited my question to try to answer your concerns. Does it help?
    – ccalvert
    Dec 27, 2020 at 15:15

2 Answers 2


You do not appear to have created a share to [elfdisk02].

I also note that you appear to be using the automount "feature" with /media/pi/elfdisk02

Automount seems to have its own ideas of permissions (and in my opinion is notoriously unreliable).

Any mount I want to share is created under /mnt (or some existing directory) and explicitly mounted (automatically or manually) using an entry in /etc/fstab which allows you to set proper sharing permissions.
An example [www] below

    path = /var/www
    read only = no
    public = yes
    writable = yes
  • Your initial response was correct. It was a Windows issue. I'm truly sorry to have taken up so much of your time and thank you for your help.
    – ccalvert
    Dec 29, 2020 at 18:28

I solved this problem in Windows by:

  • Selecting: / Settings / Apps / Programs and Features / Turn Windows features on and off
  • Completely uninstall SMB 1 and 2 and then reboot.
  • Go through Settings again and turn SMB2 back on.
  • Open File Explorer and This PC. Right-click and chose Add network location. Do not choose Map network drive.
  • Enter a location like this \\\elfdisk. I think using the IP rather than a location name is best but am not sure. My location name changed at one point from raspberrypi to raspberrypi-2. This caused me some confusion. So I am using the IP.

At any rate, after doing this and entering a username and password, I could see and use the elfdisk and other locations under This PC.

Sadly the problem reappeared after a time. Rebooting the pi appeared to fix it.

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service and acknowledge you have read our privacy policy.

Not the answer you're looking for? Browse other questions tagged or ask your own question.