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