|
[Date Prev] [Date Next] [Thread Prev] [Thread Next] [Date Index] [Thread Index]
|
Re: [PLUG] SAMBA restart nmbd
|
Below is a sample [global] section from a linux samba server on a big,
mixed-os network. It even handles being the master browser across
several class C subnets (with the "remote announce", "remote browse
sync" and "domain master" args). Actually, I think those settings may
be defunct. We don't have a .1 subnet any more. These args may be
completely unnecessary, at least the ones with "remote" in the name.
The key to really winning browser elections is to crank up the "os
level". Windows boxes, if I remember correctly, are at a level of 10.
Of course, the windows boxes themselves are running their broken SMB
service, and they can hose the whole thing just by being plugged in.
They may decide to do their own thing, and send broken broadcast
packets. What to do about that?
Well, you might want to have the DHCP server announce the master
browser to all clients. Add stuff like the following to dhcpd.conf:
subnet 192.168.2.0 netmask 255.255.255.0 {
...
option netbios-name-servers 192.168.2.136;
# option netbios-node-type 8;
option netbios-node-type 2;
# (1=broadcast only, 2=WINS only, 4=broadcast, then WINS, 8=WINS then broadcast)
# (see "man dhcp-options" for details...)
...
}
We are telling the DHCP clients that they will find their samba server
at 192.168.2.136, and they will not broadcast for another one. Probably
helps keep the packet shitstorm down too. We can see that we used
hybrid mode at one time, which allowed broadcasting as a backup measure.
Now we say, "set up your windows box right or too bad" by setting the
node type to 2. This is because we got sick of spending our days
staring at ethereal output, trying to find the rogue bastard who was
singlehandedly bringing down the samba network via a spurious entry in
his widows samba control panel applet toy.
The smb.conf snippet:
[global]
workgroup = WORKGROUP
netbios name = HAL
server string = Samba Server on HAL
encrypt passwords = Yes
map to guest = Bad User
password level = 8
username level = 5
log level = 2
max log size = 0
socket options = TCP_NODELAY SO_RCVBUF=8192 SO_SNDBUF=8192
os level = 99
preferred master = Yes
domain master = Yes
local master = Yes
enhanced browsing = Yes
remote announce = 192.168.1.255/WORKGROUP 192.168.1.208/WORKGROUP
remote browse sync = 192.168.1.255
wins support = Yes
dns proxy = No
valid users = <a big list of usernames here>
create mask = 0777
directory mask = 0777
hosts allow = 127.0.0.1 192.168.27.0/24 192.168.16.0/24 192.168.2.0/24 192.168.4.0/24 192.168.8.0/24
hosts deny = 0.0.0.0/0
Carlos
On Sat, 9 Jul 2005, high_desert wrote:
Date: Sat, 9 Jul 2005 17:51:11 -0700
From: high_desert <hidesert@cox.net>
Reply-To: Philadelphia Linux User's Group Discussion List
<plug@lists.phillylinux.org>
To: PLUG Listserv <plug@lists.phillylinux.org>
Subject: [PLUG] SAMBA restart nmbd
Sometimes on the home network (peer to peer, Windows, OSX, Linux) the
workgroup SAMBA is in charge of isn't there anymore (symptom is Windows
boxes only see themselves). I use SWAT on the SAMBA machine to restart nmbd
and then all is well. I thought I'd fixed it by setting the SAMBA server as
the master browser and to 'always win elections' but now it still occurs
occasionally and without any pattern perceivable to me.
___________________________________________________________________________
Philadelphia Linux Users Group -- http://www.phillylinux.org
Announcements - http://lists.phillylinux.org/mailman/listinfo/plug-announce
General Discussion -- http://lists.phillylinux.org/mailman/listinfo/plug
___________________________________________________________________________
Philadelphia Linux Users Group -- http://www.phillylinux.org
Announcements - http://lists.phillylinux.org/mailman/listinfo/plug-announce
General Discussion -- http://lists.phillylinux.org/mailman/listinfo/plug
|