[Samba] samba loses to be the master browser

Giulio Orsero giulioo at gmail.com
Tue Apr 26 15:18:27 MDT 2011


On Tue, Apr 26, 2011 at 22:52, Fernando Torrez
<fernando_torrez at hotmail.com> wrote:

> It was working great for the first 6 months as a logon and file server for around 40 >windows >computers. But lately from time to time the samba server loses to be the master

1. Disable "computer browser" service on the win7 PCs
2. Set up a cron job which will check for the master browser status
every few minutes, and force an election if not ok:

#!/bin/sh
PATH=/usr/bin:/usr/sbin:/bin:/sbin

nmblookup -M -- - 2>&1 | grep samba.ip.address >/dev/null 2>&1
if [ $? != 0 ]; then
    smbcontrol nmbd force-election
    nmblookup -M -- -|mail -s "Forced master browser election" your at email
fi


-- 
giulioo at pobox.com


More information about the samba mailing list