0

I have a machine I'm using as a HTPC, running Fedora 23. Up until recently, everything was working fine browsing and connecting other PCs on my network (I have a mix of Linux and Windows machines). Now, for some reason, I can no longer browse my samba shares from this PC. Connecting directly (by name or IP) works fine; pinging by name works fine. I made no changes; in fact I was away for a week with everything turned off and this problem seems to have surfaced upon my return.

I've tried a number of things--multiple times in various permutations--all to no avail:

  • rebooting everything, including my router
  • restarting smb.service and nmb.service
  • temporarily disabling firewalld
  • temporarily setting SELinux to permissive
  • adding these lines to smb.conf:
  • 1) name resolve order = bcast host lmshosts wins
  • 2) dns proxy= no
  • 3) map to guest = bad user
  • testing the connection in a terminal with smbclient -d2 -L computername -U username -- this works!

Also, I don't see any errors in the logs in /var/log/samba . So after hours of hitting my head on this, I'm very much stumped. At this point it's not so much a problem that I need to solve, since connecting directly works, but I'd like to understand this better and learn a little something.

Here is the output of smbtree from the HTPC that doesn't work (let's call it "WOMBAT"), alongside the output from two machines that do work (running openSUSE and Linux Mint).

# smbtree output from "WOMBAT":
# browsing smb shares from this machine does not work...
# however, connecting directly works, e.g., to smb://dog/shared
# Pinging any of the other machines by name also works.
HOME
\\WOMBAT                Samba Server Version 4.3.11
    \\WOMBAT\IPC$               IPC Service (Samba Server Version 4.3.11)
    \\WOMBAT\homes              Home Directories
\\                      OpenRG File Server


# smbtree output from working machine, "DOG":
HOME
\\WOMBAT                Samba Server Version 4.3.11
\\ROUTERUSB_FILESH      OpenRG File Server
\\DOG           dog server (Samba, Linux Mint)
    \\DOG\IPC$              IPC Service (dog server (Samba, Linux Mint))
    \\DOG\Shared2           Media2 on dog
    \\DOG\Shared            Media on dog
    \\DOG\print$            Printer Drivers
\\CAT                   Cat
    \\CAT\Video (F)         
    \\CAT\C$                Default share
    \\CAT\Shared-Cat-F      
    \\CAT\H$                Default share
    \\CAT\ADMIN$            Remote Admin
    \\CAT\F$                Default share
    \\CAT\Shared-Cat2       
    \\CAT\Shared-Personal   
    \\CAT\G$                Default share
    \\CAT\Shared-Video      
    \\CAT\C                 
    \\CAT\Shared-Cat-C      
    \\CAT\print$            Printer Drivers
    \\CAT\SharedDocs        
    \\CAT\IPC$              Remote IPC
    \\CAT\Other (G)         
\\CHIPMUNK              Samba 4.2.4-18.1-3668-SUSE-SLE_12-x86_64
    \\CHIPMUNK\IPC$             IPC Service (Samba 4.2.4-18.1-3668-SUSE-SLE_12-x86_64)
    \\CHIPMUNK\share            Shared files
    \\CHIPMUNK\print$           Printer Drivers
    \\CHIPMUNK\groups           All groups
    \\CHIPMUNK\users            All users
    \\CHIPMUNK\profiles         Network Profiles Service
\\PIG         


# smbtree output from working machine, "CHIPMUNK":
HOME
\\WOMBAT                Samba Server Version 4.3.11
\\ROUTERUSB_FILESH      OpenRG File Server
\\DOG           dog server (Samba, Linux Mint)
    \\DOG\IPC$              IPC Service (dog server (Samba, Linux Mint))
    \\DOG\Shared2           Media2 on dog
    \\DOG\Shared            Media on dog
    \\DOG\print$            Printer Drivers
\\CAT                   Cat
    \\CAT\Video (F)         
    \\CAT\C$                Default share
    \\CAT\Shared-Cat-F      
    \\CAT\H$                Default share
    \\CAT\ADMIN$            Remote Admin
    \\CAT\F$                Default share
    \\CAT\Shared-Cat2       
    \\CAT\Shared-Personal   
    \\CAT\G$                Default share
    \\CAT\Shared-Video      
    \\CAT\C                 
    \\CAT\Shared-Cat-C      
    \\CAT\print$            Printer Drivers
    \\CAT\SharedDocs        
    \\CAT\IPC$              Remote IPC
    \\CAT\Other (G)         
\\CHIPMUNK              Samba 4.2.4-18.1-3668-SUSE-SLE_12-x86_64
    \\CHIPMUNK\IPC$             IPC Service (Samba 4.2.4-18.1-3668-SUSE-SLE_12-x86_64)
    \\CHIPMUNK\share            Shared files
    \\CHIPMUNK\print$           Printer Drivers
    \\CHIPMUNK\groups           All groups
    \\CHIPMUNK\users            All users
    \\CHIPMUNK\profiles         Network Profiles Service
\\PIG     

The only clue I've got is when running systemctl status nmb -l from the offending box (output below), my subnet doesn't look right. But I'm not sure about this--maybe it's fine--and I'm not sure how to confirm its correctness.

  ● nmb.service - Samba NMB Daemon
     Loaded: loaded (/usr/lib/systemd/system/nmb.service; enabled; vendor preset: disabled)
     Active: active (running) since Wed 2016-08-10 23:32:26 EDT; 2h 20min ago
   Main PID: 17468 (nmbd)
     Status: "nmbd: ready to serve connections..."
     CGroup: /system.slice/nmb.service
             └─17468 /usr/sbin/nmbd

  Aug 10 23:32:26 wombat.home systemd[1]: nmb.service: Supervising process 17468 which is not our child. We'll most likely not notice when it exits.
  Aug 10 23:32:26 wombat.home systemd[1]: Started Samba NMB Daemon.
  Aug 10 23:32:26 wombat.home nmbd[17468]: [2016/08/10 23:32:26.084522,  0] ../lib/util/become_daemon.c:124(daemon_ready)
  Aug 10 23:32:26 wombat.home nmbd[17468]:   STATUS=daemon 'nmbd' finished starting up and ready to serve connections
  Aug 10 23:32:49 wombat.home nmbd[17468]: [2016/08/10 23:32:49.120302,  0] ../source3/nmbd/nmbd_become_lmb.c:397(become_local_master_stage2)
  Aug 10 23:32:49 wombat.home nmbd[17468]:   *****
  Aug 10 23:32:49 wombat.home nmbd[17468]:   
  Aug 10 23:32:49 wombat.home nmbd[17468]:   Samba name server WOMBAT is now a local master browser for workgroup HOME on subnet 192.168.124.1
  Aug 10 23:32:49 wombat.home nmbd[17468]:   
  Aug 10 23:32:49 wombat.home nmbd[17468]:   *****

My next step is to try NFS instead (though that's side-stepping the issue), and after that, wipe the machine and start over. But even if that fixed it, I'd have learned nothing.

0

The problem was a virtual network interface (virbr0). Samba was picking this up as the preferred interface, which was pointing to an invalid broadcast address. I guess since it saw itself as the only samba server running there, it set itself as the "local master browser".

See this excerpt from the output of smbtree -d3, and take note of the third entry with an erroneous "bcast" of "192.168.124.255":

Processing section "[global]"
added interface wlp0s20u6 ip=192.168.1.14 bcast=192.168.1.255 netmask=255.255.255.0
added interface enp3s0 ip=192.168.1.15 bcast=192.168.1.255 netmask=255.255.255.0
added interface virbr0 ip=192.168.124.1 bcast=192.168.124.255 netmask=255.255.255.0

Disabling the libvitrd service (systemctl disable libvirtd) got rid of that interface, which seems to have rectified the problem; now smbtree shows the other shares on the network.

Before disabling this interface, when I would check the status of nmb.service, I saw a message something like, "Samba name server WOMBAT is now a local master browser for workgroup HOME on subnet 192.168.124.255". This incorrect subnet is what led me to the incorrect interface; I saw its address when running ifconfig.

EPILOGUE: I am not sure how that interface came to be. If I understand correctly, it's a virtual NAT interface. I don't have Virtualbox, VMWare, etc. installed on this computer; I'm not sure what else might have enabled it. If someone cares to, please shed some light in a comment.

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service, privacy policy and cookie policy

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