Linux – CentOS Samba server to be master browser for workgroup

centoslinuxsamba

We have a CentOS 5.9 server (w/ latest updates) running Samba 3.0.33-3.39.el5_8. The IP address of the server is 192.168.1.28. The problem is that every night at around 4 a.m., the clients lose their drive mappings to the server.

In the nmbd.log file:

[2013/04/10 04:02:27, 0] nmbd/nmbd_workgroupdb.c:dump_workgroups(282)  
  dump_workgroups()  
   dump workgroup on subnet       192.168.1.28: netmask=  255.255.255.0:  
    ACCE(1) current master browser = WS0337  
        MAIN-SAMBA 40809a03 (Samba Server)  
        WS0337 40071003 ()  

In the smb.conf:

local master = yes  
os level = 100  
domain master = no  
preferred master = yes  

Despite the above settings, the Windows 7 and Windows XP machines are elected master browsers:

nmblookup -M -- -
querying __MSBROWSE__ on 192.168.1.255  
192.168.1.71 __MSBROWSE__<01>  
192.168.1.10 __MSBROWSE__<01>  
192.168.1.67 __MSBROWSE__<01>  

I am no Samba expert, but I assume that the Samba server losing the election for master browser is related to the lost network mappings. I really need to resolve this issue – it is breaking a bunch of automated processes and giving me gray hair.

How can I make my CentOS Samba server become the master browser (and remain so), without having to manually turn of the Computer Browser service on every single Windows machine on the network?

Best Answer

In all honesty it sounds like you have other problems that are causing the samba server not to become the master-browser. Or in other words, not being the master-browser is another symptom. Not the cause. Being the master-browser does NOT have anything to do with being able to connect to a network share or not. It is simply a left-over technology from days-gone-by from old "NETBIOS" days. The master-browser is simply a machine who is currently most-likely the guy who knows the most about the local network. The only information that server has/provides is a name-association to an IP address for a specific type of service. The list is not typically crucial, as other methods of discovery are tried. When in doubt, you could always create a lmhosts file and hard-code values on one machine in the network to ensure the values are correct.

In most networks today, all this lookup-stuff is done with DNS. (...and in corporate networks before DNS they used WINS) NETBIOS stuff is rather messy and excessively chatty on networks.

Related Topic