On Tue, Apr 26, 2011 at 22:52, Fernando Torrez
<[email protected]> 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@email
fi


-- 
[email protected]
-- 
To unsubscribe from this list go to the following URL and read the
instructions:  https://lists.samba.org/mailman/options/samba

Reply via email to