[Samba] Couldn't mount an (empty) share on W10, add a file to the share and now it works?

Patrick Goetz pgoetz at math.utexas.edu
Thu Nov 4 09:34:02 UTC 2021

While I'm OK with magical, inexplicable things, I would prefer not have 
these elements in my compute environment.  To this end,

To recap, yesterday I was unable to mount a share to a W10 machine using

     net use G: \\data2\share

The system would prompt me for a user name and password and then fail. 
The smbd log showed this:

[2021/11/03 05:41:19.186789,  0] 
   add_local_groups: SID S-1-5-21-2398640129-655337111-1434392923-1104 
-> getpwuid(11104) failed, is nsswitch configured?

indicating an authentication failure (getpwuid(11104) failed). The same 
share mounted fine from a linux client using smbclient.

To convince myself the share was working on the linux client, I added a 
file to the share:

root at data2:/data/share# ls -l
total 0
-rw-r--r-- 1 root root 0 Nov  3 14:29 foobar

to confirm that it was visible to the linux client. As far as I know, I 
made no other changes to the file server, DC, or permissions anywhere.

At a loss for something else to try, I started the previously disabled 
nmbd service. I wasn't able to browse the shares, but subsequently

    net use G: \\data\share

just worked on the same W10 machine with the same user account, and I'm 
no longer prompted for authentication. (?)

I turned nmbd off again, still works (obviously shouldn't be relevant, 
just documenting steps). I rebooted the W10 machine; still works.

Since there are now no errors, nothing is being logged in 

My only non-magical hypothesis is that adding a file to the previously 
empty share made it mountable?  Anyone have any insights?

More information about the samba mailing list