1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
121
122
123
124
125
126
127
128
129
130
131
132
133
134
135
136
137
138
139
140
141
142
143
144
145
146
147
148
149
150
151
152
153
154
155
156
157
158
159
160
161
162
163
164
165
166
167
168
169
170
171
172
173
174
175
176
177
178
179
180
181
182
183
184
185
186
|
BROWSING
========
Samba now fully supports browsing. The browsing is supported by nmbd
and is also controlled by options in the smb.conf file (see
smb.conf(5)).
Samba can act as a local browse master for a workgroup and the ability
for samba to support domain logons and scripts is now available. See
DOMAIN.txt for more information on domain logons.
Samba can also act as a domain master browser for a workgroup. This
means that it will collate lists from local browse masters into a
wide area network server list. In order for browse clients to
resolve the names they may find in this list, it is recommended that
both samba and your clients use a WINS server
[Note that nmbd can be configured as a WINS server, but it is not
necessary to specifically use samba as your WINS server. NTAS can
be configured as your WINS server. In a mixed NT server and
samba environment on a Wide Area Network, it is recommended that
you use the NT server's WINS server capabilities. In a samba-only
environment, it is recommended that you use one and only one nmbd
as your WINS server].
To get browsing to work you need to run nmbd as usual, but will need
to use the "workgroup" option in smb.conf to control what workgroup
Samba becomes a part of.
Samba also has a useful option for a Samba server to offer itself for
browsing on another subnet. It is recommended that this option is only
used for 'unusual' purposes: announcements over the internet, for
example. See "remote announce" in the smb.conf man page.
If something doesn't work then hopefully the log.nmb file will
help you track down the problem. Try a debug level of 2 or 3 for
finding problems.
Note that if it doesn't work for you, then you should still be able to
type the server name as \\SERVER in filemanager then hit enter and
filemanager should display the list of available shares.
Some people find browsing fails because they don't have the global
"guest account" set to a valid account. Remember that the IPC$
connection that lists the shares is done as guest, and thus you must
have a valid guest account.
Also, a lot of people are getting bitten by the problem of too many
parameters on the command line of nmbd in inetd.conf. This trick is to
not use spaces between the option and the parameter (eg: -d2 instead
Of -d 2), and to not use the -B and -N options. New versions of nmbd
are now far more likely to correctly find your broadcast and network
addess, so in most cases these aren't needed.
The other big problem people have is that their broadcast address,
netmask or IP address is wrong (specified with the "interfaces" option
in smb.conf)
FORCING SAMBA TO BE THE MASTER
==============================
Who becomes the "master browser" is determined by an election process
using broadcasts. Each election packet contains a number of parameters
which determine what precedence (bias) a host should have in the
election. By default Samba uses a very low precedence and thus loses
elections to just about anyone else.
If you want Samba to win elections then just set the "os level" global
option in smb.conf to a higher number. It defaults to 0. Using 34
would make it win all elections over every other system (except other
samba systems!)
A "os level" of 2 would make it beat WfWg and Win95, but not NTAS. A
NTAS domain controller uses level 32.
The maximum os level is 255
If you want samba to force an election on startup, then set the
"preferred master" global option in smb.conf to "yes". Samba will
then have a slight advantage over other potential master browsers
that are not preferred master browsers. Use this parameter with
care, as if you have two hosts (whether they are windows 95 or NT or
samba) on the same local subnet both set with "preferred master" to
"yes", then periodically and continually they will force an election
in order to become the local master browser.
If you want samba to be a "domain master browser", then it is
recommended that you also set "preferred master" to "yes", because
samba will not become a domain master browser for the whole of your
LAN or WAN if it is not also a local master browser on its own
broadcast isolated subnet.
It is possible to configure two samba servers to attempt to become
the domain master browser for a domain. The first server that comes
up with be the domain master browser. All other samba servers will
attempt to become the domain master browser every 5 minutes. They
will find that another samba server is already the domain master
browser and will fail. This provides automatic redundancy, should
the current domain master browser fail.
MAKING SAMBA THE DOMAIN MASTER
==============================
The domain master is responsible for collating the browse lists of
multiple subnets so that browsing can occur between subnets. You can
make samba act as the domain master by setting "domain master = yes"
in smb.conf. By default it will not be a domain master.
When samba is the domain master and the master browser it will listen
for master announcements (made roughly every twelve minutes) from local
master browsers on other subnets and then contact them to synchronise
browse lists.
If you want samba to be the domain master then I suggest you also set
the "os level" high enough to make sure it wins elections, and set
"preferred master" to "yes", to get samba to force an election on
startup.
Note that all your servers (including samba) and clients should be
using a WINS server to resolve NetBIOS names. If your clients are only
using broadcasting to resolve NetBIOS names, then two things will occur:
a) your local master browsers will be unable to find a domain master
browser, as it will only be looking on the local subnet.
b) if a client happens to get hold of a domain-wide browse list, and
a user attempts to access a host in that list, it will be unable to
resolve the NetBIOS name of that host.
If, however, both samba and your clients are using a WINS server, then:
a) your local master browsers will contact the WINS server and, as long as
samba has registered that it is a domain master browser with the WINS
server, your local master browser will receive samba's ip address
as its domain master browser.
b) when a client receives a domain-wide browse list, and a user attempts
to access a host in that list, it will contact the WINS server to
resolve the NetBIOS name of that host. as long as that host has
registered its NetBIOS name with the same WINS server, the user will
be able to see that host.
NOTIFYING THE DOMAIN CONTROLLER
===============================
If you have a domain controller for the domain which Samba is a part
of then you should add the line "domain controller = address" to
smb.conf. "address" can either be a name available via DNS or a IP
address or a broadcast address. If it is a broadcast address then
Samba will look for a domain controller on that network.
If you have a domain controller, then you also have a domain master
browser (if your domain controller is Microsoft's NT Advanced Server,
or AT&T's Advanced Server for Unix, or SCO's Advanced File and Print
Server).
It will therefore be unnecessary for you to make samba a domain master,
and the parameter "domain master" should be set to 'no', and the
parameter "os level" should be set to a value between 0 and 32.
This will ensure that the domain controller will become your domain
master browser, and it only becomes a local master browser for its
subnet.
When Samba is the local master browser it will regularly contact the
"domain controller" to synchronise browse lists.
NOTE ABOUT BROADCAST ADDRESSES
==============================
If your network uses a "0" based broadcast address (for example if it
ends in a 0) then you will strike problems. Windows for Workgroups
does not seem to support a 0's broadcast and you will probably find
that browsing and name lookups won't work.
MULTIPLE INTERFACES
===================
Samba now supports machines with multiple network interfaces. If you
have multiple interfaces then you will need to use the "interfaces"
option in smb.conf to configure them. See smb.conf(5) for details.
|