Previous 1 2 Next 20 Replies Latest reply: Dec 25, 2012 7:56 AM by charlesf49
morph21 Level 1 Level 1

After a long, LONG, LOOOOOOONG time searching for an answer and trying different settings all over making a Mac OS the Master Browser finally solved the problem for me.

This is not about sharing, this is not about any of the other thousand issues that working with Windows' Samba might have.

Anyway, to put it simple, you need to edit /etc/smb.conf file as root. For that, open a Terminal and type:
+sudo nano /etc/smb.conf+

keep going down until you reach this part, then add the text in bold as shown:
+; Pull in system-wide preference settings. These are managed+
+; by smb-sync-preferences.+
+include = /var/db/smb.conf+

+; Pull in system share configuration. These are managed+
+; by smb-sync-shares.+
+include = /var/db/samba/smb.shares+

*+; Forcing Master Browser+*
*+os level = 65+*
*+preferred master = yes+*
*+local master = yes+*

+comment = All Printers+

Close the file with Control + X and then Yes for saving.

Now just go to System Preferences, Sharing and turn ON File Sharing, click in Options and turn "Share files and folders using SMB (Windows)" to ON. If it was ON already, just turn it OFF and then back ON to restart the service (nmbd).

In a few seconds, or minutes depending on the network, your Mac should become the local browser and then the PCs will appear in your Finder.

You can check if your Mac is the Master Browser by typing this in a Terminal:
+nmblookup -M -- -+

The Master Browser IP that will appear there should be your Mac's.

Message was edited by: morph21, fixing format issue

iMac 27" i7 4x2.8GHz 8GB, Mac OS X (10.6.4)
  • LCee Level 1 Level 1
    Bless you!!!!! It's been a long time for me too.

    This works! I had to wait several minutes but now it's working like it should.

    Thank you so very much.
  • falvesjr Level 1 Level 1
    Thanks! Worked for me too, though I did have to manually restart the nmbd service. Also, can you do this to multiple Macs in the same network?
  • morph21 Level 1 Level 1
    Hey LCee, glad it worked for you too!

    The "delay" is just for the first time. What happens is that each machine announces its name to the master. It does so when it joins the network and then after 4, 8 and 12 minutes, and from there, each 12 minutes only. That is why you had to wait a bit, but once you set it up like this, you shouldn't have to wait more.

    Lets say a Windows machine is turned on first. It then becomes the Master Browser. When the Mac is turned on, it claims the Master for itself and then the Windows machine transfer the information for the new Master. Once again, there is no wait, well, just a few seconds for the transfer.
  • morph21 Level 1 Level 1

    Yes you can. You can have a Master and "backup" Masters, so it should work. In my case, with only one Mac set up all the others started to work too.

    It seems that whenever Windows is chosen as a Master Browser things won't work properly anymore. So, if you have a Mac running as MB in your network, everything should be fine.

    Worst case you'll have a lot of redundancy with "backup" Master, but unless we are talking about a huge network of 100+ or even more machines, I don't see how this could give any problems.

    As for manually restarting the service that is strange, but in the end restarting was the objective and you got it, hehe. =)
  • falvesjr Level 1 Level 1
    No, not a huge network, just at home with three Macs and a couple of PCs that are used regularly. I was just wondering if it's OK to have multiple Macs as masters just in case the "main" master Mac is off, then all would still be well for the other Macs.

    Thanks for the info! I just wish someone had an easy fix like this for the problems with smb file sharing on the Mac!
  • Kurtster Level 1 Level 1
    Anyone know how to do this in Leopard? Those lines don't appear in that OS but it has the same problem seeing my Windows machine.
  • gsexsmith Level 1 Level 1
    It is still there. When in the editor you need to scroll down with the arrow keys to see more lines. Then you can add the lines above and you will start to see your network devices. Mine took awhile so be patient. 8))
    Hope this helps.
  • iMau Level 1 Level 1
    OMG ! after 1,5 year of searching this is THE answer i've looked for THX
  • RodneyW Level 4 Level 4
    G'day morph21,

    Thanks for sharing this workaround. Windows 7 uses an updated protocol for network browsing, which OS X does not support. However, Windows 7 does support the older approach (used by Windows XP and prior) when it is not the master.

    It should be remembered that, IF you use your Mac on a corporate network (i.e. running Active Directory), it is NOT a good idea to force it to become the master browser over and above the primary servers on the network. Your IT Admin people will not be happy!



    p.s. an alternative way of getting Windows 7 machines to appear on your home network is simply to boot your Mac first. It then becomes the local master by default. When Windows 7 starts it will simply tap into your Mac's list for it's own browsing.
  • streamworksaudio Level 1 Level 1
    I tried this... for testing...I disabled the Computer Browsing service on 2 Vista Machines and 1 Windows 7 Machine. I forced smb.conf to become the master.

    I booted all PCs and confirmed using nbtstat that all PCs were not the Master - I then booted up my Mac Book and it too will not become the master... so there is no master in my network if I were to leave it this way.

  • streamworksaudio Level 1 Level 1
    I stand corrected.... after letting everything sit for a few minutes the MacBook finally took over as the Master and all PCs can be seen from the Finder's Sidebar... just weird that it would take so long to take over.
  • vikinggeek Level 1 Level 1

    Can you provide a little more technical details? I'm trying to support OS X in a corporate network and would be very unhappy if the users forced a desktop machine to be the master browser. NOTE to others: If you make the suggested changes on your system and bring the machine to work, the network AND your machine may become very slow!

    We are using WINS on Windows 2008 servers, but it appears that 10.6 doesn't take advantage of this. I'm seeing strange entries in the log.nmbd file that the Macs cannot connect to the discovery port (138)

    -- Per
  • RodneyW Level 4 Level 4
    No worries Per,

    OS X uses "old" protocols for MS Networks, that are compatible with WIn XP/2003 and prior, but not fully compatible with Windows Vista/7/2008 and later.

    The upshot of this is that OS X works (close to) perfectly on a network with a Windows XP master browser or a Windows 2003 Domain Controller.

    On a network with a Windows Vista/7 Master Browser or Windows 2008 Domain Controller, it fails to be able to populate the network list. This means that the user is forced to manually identify and connect to servers.

    On a private network, where I am in full control of the machines, I can force OS X to win the Master Browser election by starting it first. The Windows Vista/7 machines then start up but do not force a re-election, because there is a Master Browser in place.

    On a corporate network running Windows 2008 Domain Controller - the OS X user is at a real disadvantage.

    As far as I know all of this arises because Apple is on an old version of Samba - because the Samba changed their licensing requirements some time ago. With a bit of luck Apple will do something about this in Lion.


  • vikinggeek Level 1 Level 1

    Thank you for clearing things up. This problem has caused lots of headaches since the Windows users can "see" the Mac users but not the other way around. When you say "old" and "new" do you refer to "Smb" and "Smb2" or is it something else? Any pointers to technical documentation (from Apple) would be appreciated.

    -- Per
Previous 1 2 Next