f2f75170f80fe84a588df1cd14f49d06bf95bebe
[bbaumbach/samba-autobuild/.git] / docs / htmldocs / smb.conf.5.html
1
2
3  
4
5
6 <html><head><title>smb.conf (5)</title>
7
8 <link rev="made" href="mailto:samba-bugs@samba.org">
9 </head>
10 <body>
11
12 <hr>
13
14 <h1>smb.conf (5)</h1>
15 <h2>Samba</h2>
16 <h2>23 Oct 1998</h2>
17
18     
19
20     
21 <p><br><a name="NAME"></a>
22 <h2>NAME</h2>
23     smb.conf - The configuration file for the Samba suite
24 <p><br><a name="SYNOPSIS"></a>
25 <h2>SYNOPSIS</h2>
26      
27 <p><br><strong>smb.conf</strong> The <strong>smb.conf</strong> file is a configuration file for the
28 Samba suite. <strong>smb.conf</strong> contains runtime configuration information
29 for the Samba programs. The <strong>smb.conf</strong> file is designed to be
30 configured and administered by the <a href="swat.8.html"><strong>swat (8)</strong></a>
31 program. The complete description of the file format and possible
32 parameters held within are here for reference purposes.
33 <p><br><a name="FILEFORMAT"></a>
34 <h2>FILE FORMAT</h2>
35     
36 <p><br>The file consists of sections and parameters. A section begins with
37 the name of the section in square brackets and continues until the
38 next section begins. Sections contain parameters of the form 
39 <p><br><code>'name = value'</code>
40 <p><br>The file is line-based - that is, each newline-terminated line
41 represents either a comment, a section name or a parameter.
42 <p><br>Section and parameter names are not case sensitive.
43 <p><br>Only the first equals sign in a parameter is significant. Whitespace
44 before or after the first equals sign is discarded. Leading, trailing
45 and internal whitespace in section and parameter names is
46 irrelevant. Leading and trailing whitespace in a parameter value is
47 discarded. Internal whitespace within a parameter value is retained
48 verbatim.
49 <p><br>Any line beginning with a semicolon (';') or a hash ('#') character is
50 ignored, as are lines containing only whitespace.
51 <p><br>Any line ending in a <code>'\'</code> is "continued" on the next line in the
52 customary UNIX fashion.
53 <p><br>The values following the equals sign in parameters are all either a
54 string (no quotes needed) or a boolean, which may be given as yes/no,
55 0/1 or true/false. Case is not significant in boolean values, but is
56 preserved in string values. Some items such as create modes are
57 numeric.
58 <p><br><a name="SECTIONDESCRIPTIONS"></a>
59 <h2>SECTION DESCRIPTIONS</h2>
60     
61 <p><br>Each section in the configuration file (except for the
62 <a href="smb.conf.5.html#global"><strong>[global]</strong></a> section) describes a shared resource (known
63 as a <em>"share"</em>). The section name is the name of the shared resource
64 and the parameters within the section define the shares attributes.
65 <p><br>There are three special sections, <a href="smb.conf.5.html#global"><strong>[global]</strong></a>,
66 <a href="smb.conf.5.html#homes"><strong>[homes]</strong></a> and <a href="smb.conf.5.html#printers"><strong>[printers]</strong></a>, which are
67 described under <a href="smb.conf.5.html#SPECIALSECTIONS"><strong>'special sections'</strong></a>. The
68 following notes apply to ordinary section descriptions.
69 <p><br>A share consists of a directory to which access is being given plus
70 a description of the access rights which are granted to the user of
71 the service. Some housekeeping options are also specifiable.
72 <p><br>Sections are either filespace services (used by the client as an
73 extension of their native file systems) or printable services (used by
74 the client to access print services on the host running the server).
75 <p><br>Sections may be designated <a href="smb.conf.5.html#guestok"><strong>guest</strong></a> services, in which
76 case no password is required to access them. A specified UNIX
77 <a href="smb.conf.5.html#guestaccount"><strong>guest account</strong></a> is used to define access
78 privileges in this case.
79 <p><br>Sections other than guest services will require a password to access
80 them. The client provides the username. As older clients only provide
81 passwords and not usernames, you may specify a list of usernames to
82 check against the password using the <a href="smb.conf.5.html#user"><strong>"user="</strong></a> option in
83 the share definition. For modern clients such as Windows 95/98 and
84 Windows NT, this should not be necessary.
85 <p><br>Note that the access rights granted by the server are masked by the
86 access rights granted to the specified or guest UNIX user by the host
87 system. The server does not grant more access than the host system
88 grants.
89 <p><br>The following sample section defines a file space share. The user has
90 write access to the path <code>/home/bar</code>. The share is accessed via
91 the share name "foo":
92 <p><br><pre>
93
94
95         [foo]
96                 path = /home/bar
97                 writeable = true
98
99
100 </pre>
101
102 <p><br>The following sample section defines a printable share. The share
103 is readonly, but printable. That is, the only write access permitted
104 is via calls to open, write to and close a spool file. The
105 <a href="smb.conf.5.html#guestok"><strong>'guest ok'</strong></a> parameter means access will be permitted
106 as the default guest user (specified elsewhere):
107 <p><br><pre>
108
109         [aprinter]
110                 path = /usr/spool/public
111                 read only = true
112                 printable = true
113                 guest ok = true
114
115 </pre>
116
117 <p><br><a name="SPECIALSECTIONS"></a>
118 <h2>SPECIAL SECTIONS</h2>
119     
120 <p><br><ul>
121 <p><br><a name="global"></a>
122 <li><strong><strong>The [global] section</strong></strong>
123 <p><br>Parameters in this section apply to the server as a whole, or are
124 defaults for sections which do not specifically define certain
125 items. See the notes under <a href="smb.conf.5.html#PARAMETERS"><strong>'PARAMETERS'</strong></a> for more
126 information.
127 <p><br><a name="homes"></a>
128 <li><strong><strong>The [homes] section</strong></strong>
129 <p><br>If a section called <code>'homes'</code> is included in the configuration file,
130 services connecting clients to their home directories can be created
131 on the fly by the server.
132 <p><br>When the connection request is made, the existing sections are
133 scanned. If a match is found, it is used. If no match is found, the
134 requested section name is treated as a user name and looked up in the
135 local password file. If the name exists and the correct password has
136 been given, a share is created by cloning the [homes] section.
137 <p><br>Some modifications are then made to the newly created share:
138 <p><br><ul>
139 <p><br><li > The share name is changed from <code>'homes'</code> to the located
140 username
141 <p><br><li > If no path was given, the path is set to the user's home
142 directory.
143 <p><br></ul>
144 <p><br>If you decide to use a <a href="smb.conf.5.html#path"><strong>path=</strong></a> line in your [homes]
145 section then you may find it useful to use the <a href="smb.conf.5.html#percentS"><strong>%S</strong></a>
146 macro. For example :
147 <p><br><code>path=/data/pchome/%S</code>
148 <p><br>would be useful if you have different home directories for your PCs
149 than for UNIX access.
150 <p><br>This is a fast and simple way to give a large number of clients access
151 to their home directories with a minimum of fuss.
152 <p><br>A similar process occurs if the requested section name is <code>"homes"</code>,
153 except that the share name is not changed to that of the requesting
154 user. This method of using the [homes] section works well if different
155 users share a client PC.
156 <p><br>The [homes] section can specify all the parameters a normal service
157 section can specify, though some make more sense than others. The
158 following is a typical and suitable [homes] section:
159 <p><br><pre>
160
161         [homes]
162                 writeable = yes
163
164 </pre>
165
166 <p><br>An important point is that if guest access is specified in the [homes]
167 section, all home directories will be visible to all clients
168 <strong>without a password</strong>. In the very unlikely event that this is
169 actually desirable, it would be wise to also specify <a href="smb.conf.5.html#readonly"><strong>read only
170 access</strong></a>.
171 <p><br>Note that the <a href="smb.conf.5.html#browseable"><strong>browseable</strong></a> flag for auto home
172 directories will be inherited from the global browseable flag, not the
173 [homes] browseable flag. This is useful as it means setting
174 browseable=no in the [homes] section will hide the [homes] share but
175 make any auto home directories visible.
176 <p><br><a name="printers"></a>
177 <li><strong><strong>The [printers] section</strong></strong>
178 <p><br>This section works like <a href="smb.conf.5.html#homes"><strong>[homes]</strong></a>, but for printers.
179 <p><br>If a [printers] section occurs in the configuration file, users are
180 able to connect to any printer specified in the local host's printcap
181 file.
182 <p><br>When a connection request is made, the existing sections are
183 scanned. If a match is found, it is used. If no match is found, but a
184 <a href="smb.conf.5.html#homes"><strong>[homes]</strong></a> section exists, it is used as described
185 above. Otherwise, the requested section name is treated as a printer
186 name and the appropriate printcap file is scanned to see if the
187 requested section name is a valid printer share name. If a match is
188 found, a new printer share is created by cloning the [printers]
189 section.
190 <p><br>A few modifications are then made to the newly created share:
191 <p><br><ul>
192 <p><br><li > The share name is set to the located printer name
193 <p><br><li > If no printer name was given, the printer name is set to the
194 located printer name
195 <p><br><li > If the share does not permit guest access and no username was
196 given, the username is set to the located printer name.
197 <p><br></ul>
198 <p><br>Note that the [printers] service MUST be printable - if you specify
199 otherwise, the server will refuse to load the configuration file.
200 <p><br>Typically the path specified would be that of a world-writeable spool
201 directory with the sticky bit set on it. A typical [printers] entry
202 would look like this:
203 <p><br><pre>
204
205         [printers]
206                 path = /usr/spool/public
207                 guest ok = yes
208                 printable = yes 
209
210 </pre>
211
212 <p><br>All aliases given for a printer in the printcap file are legitimate
213 printer names as far as the server is concerned. If your printing
214 subsystem doesn't work like that, you will have to set up a
215 pseudo-printcap. This is a file consisting of one or more lines like
216 this:
217 <p><br><pre>
218         alias|alias|alias|alias...    
219 </pre>
220
221 <p><br>Each alias should be an acceptable printer name for your printing
222 subsystem. In the <a href="smb.conf.5.html#global"><strong>[global]</strong></a> section, specify the new
223 file as your printcap.  The server will then only recognize names
224 found in your pseudo-printcap, which of course can contain whatever
225 aliases you like. The same technique could be used simply to limit
226 access to a subset of your local printers.
227 <p><br>An alias, by the way, is defined as any component of the first entry
228 of a printcap record. Records are separated by newlines, components
229 (if there are more than one) are separated by vertical bar symbols
230 ("|").
231 <p><br>NOTE: On SYSV systems which use lpstat to determine what printers are
232 defined on the system you may be able to use <a href="smb.conf.5.html#printcapname"><strong>"printcap name =
233 lpstat"</strong></a> to automatically obtain a list of
234 printers. See the <a href="smb.conf.5.html#printcapname"><strong>"printcap name"</strong></a> option for
235 more details.
236 <p><br></ul>
237 <p><br><a name="PARAMETERS"></a>
238 <h2>PARAMETERS</h2>
239     
240 <p><br>Parameters define the specific attributes of sections.
241 <p><br>Some parameters are specific to the <a href="smb.conf.5.html#global"><strong>[global]</strong></a> section
242 (e.g., <a href="smb.conf.5.html#security"><strong>security</strong></a>).  Some parameters are usable in
243 all sections (e.g., <a href="smb.conf.5.html#createmode"><strong>create mode</strong></a>). All others are
244 permissible only in normal sections. For the purposes of the following
245 descriptions the <a href="smb.conf.5.html#homes"><strong>[homes]</strong></a> and
246 <a href="smb.conf.5.html#printers"><strong>[printers]</strong></a> sections will be considered normal.
247 The letter <code>'G'</code> in parentheses indicates that a parameter is
248 specific to the <a href="smb.conf.5.html#global"><strong>[global]</strong></a> section. The letter <code>'S'</code>
249 indicates that a parameter can be specified in a service specific
250 section. Note that all <code>'S'</code> parameters can also be specified in the
251 <a href="smb.conf.5.html#global"><strong>[global]</strong></a> section - in which case they will define
252 the default behavior for all services.
253 <p><br>Parameters are arranged here in alphabetical order - this may not
254 create best bedfellows, but at least you can find them! Where there
255 are synonyms, the preferred synonym is described, others refer to the
256 preferred synonym.
257 <p><br><a name="VARIABLESUBSTITUTIONS"></a>
258 <h2>VARIABLE SUBSTITUTIONS</h2>
259     
260 <p><br>Many of the strings that are settable in the config file can take
261 substitutions. For example the option <a href="smb.conf.5.html#path"><strong><code>"path =
262 /tmp/%u"</code></strong></a> would be interpreted as <code>"path = /tmp/john"</code> if
263 the user connected with the username john.
264 <p><br>These substitutions are mostly noted in the descriptions below, but
265 there are some general substitutions which apply whenever they might
266 be relevant. These are:
267 <p><br><ul>
268 <p><br><a name="percentS"></a> 
269 <li > <strong>%S</strong> = the name of the current service, if any.
270 <p><br><a name="percentP"></a>
271 <li > <strong>%P</strong> = the root directory of the current service, if any.
272 <p><br><a name="percentu"></a>
273 <li > <strong>%u</strong> = user name of the current service, if any.
274 <p><br><a name="percentg"></a>
275 <li > <strong>%g</strong> = primary group name of <a href="smb.conf.5.html#percentu"><strong>%u</strong></a>.
276 <p><br><a name="percentU"></a> 
277 <li > <strong>%U</strong> = session user name (the user name that
278 the client wanted, not necessarily the same as the one they got).
279 <p><br><a name="percentG"></a>
280 <li > <strong>%G</strong> = primary group name of <a href="smb.conf.5.html#percentU"><strong>%U</strong></a>.
281 <p><br><a name="percentH"></a>
282 <li > <strong>%H</strong> = the home directory of the user given by <a href="smb.conf.5.html#percentu"><strong>%u</strong></a>.
283 <p><br><a name="percentv"></a>
284 <li > <strong>%v</strong> = the Samba version.
285 <p><br><a name="percenth"></a>
286 <li > <strong>%h</strong> = the internet hostname that Samba is running on.
287 <p><br><a name="percentm"></a>
288 <li > <strong>%m</strong> = the NetBIOS name of the client machine (very useful).
289 <p><br><a name="percentL"></a>
290 <li > <strong>%L</strong> = the NetBIOS name of the server. This allows you to change your
291 config based on what the client calls you. Your server can have a "dual
292 personality".
293 <p><br><a name="percentM"></a> 
294 <li > <strong>%M</strong> = the internet name of the client machine.
295 <p><br><a name="percentN"></a>
296 <li > <strong>%N</strong> = the name of your NIS home directory server.  This is
297 obtained from your NIS auto.map entry.  If you have not compiled Samba
298 with the <strong>--with-automount</strong> option then this value will be the same
299 as <a href="smb.conf.5.html#percentL"><strong>%L</strong></a>.
300 <p><br><a name="percentp"></a>
301 <li > <strong>%p</strong> = the path of the service's home directory, obtained from your NIS
302 auto.map entry. The NIS auto.map entry is split up as "%N:%p".
303 <p><br><a name="percentR"></a> 
304 <li > <strong>%R</strong> = the selected protocol level after protocol
305 negotiation. It can be one of CORE, COREPLUS, LANMAN1, LANMAN2 or NT1.
306 <p><br><a name="percentd"></a>
307 <li > <strong>%d</strong> = The process id of the current server process.
308 <p><br><a name="percenta"></a> 
309 <li > <strong>%a</strong> = the architecture of the remote
310 machine. Only some are recognized, and those may not be 100%
311 reliable. It currently recognizes Samba, WfWg, WinNT and
312 Win95. Anything else will be known as "UNKNOWN". If it gets it wrong
313 then sending a level 3 log to <a href="mailto:samba-bugs@samba.org"><em>samba-bugs@samba.org</em></a>
314 should allow it to be fixed.
315 <p><br><a name="percentI"></a>
316 <li > <strong>%I</strong> = The IP address of the client machine.
317 <p><br><a name="percentT"></a>
318 <li > <strong>%T</strong> = the current date and time.
319 <p><br></ul>
320 <p><br>There are some quite creative things that can be done with these
321 substitutions and other smb.conf options.
322 <p><br><a name="NAMEMANGLING"></a>
323 <h2>NAME MANGLING</h2>
324     
325 <p><br>Samba supports <em>"name mangling"</em> so that DOS and Windows clients can
326 use files that don't conform to the 8.3 format. It can also be set to
327 adjust the case of 8.3 format filenames.
328 <p><br>There are several options that control the way mangling is performed,
329 and they are grouped here rather than listed separately. For the
330 defaults look at the output of the testparm program.
331 <p><br>All of these options can be set separately for each service (or
332 globally, of course).
333 <p><br>The options are:
334 <p><br><a name="manglecaseoption"></a>
335 <strong>"mangle case = yes/no"</strong> controls if names that have characters that
336 aren't of the "default" case are mangled. For example, if this is yes
337 then a name like <code>"Mail"</code> would be mangled. Default <em>no</em>.
338 <p><br><a name="casesensitiveoption"></a>
339 <strong>"case sensitive = yes/no"</strong> controls whether filenames are case
340 sensitive. If they aren't then Samba must do a filename search and
341 match on passed names. Default <em>no</em>.
342 <p><br><a name="defaultcaseoption"></a>
343 <strong>"default case = upper/lower"</strong> controls what the default case is for new
344 filenames. Default <em>lower</em>.
345 <p><br><a name="preservecaseoption"></a>
346 <strong>"preserve case = yes/no"</strong> controls if new files are created with the
347 case that the client passes, or if they are forced to be the <code>"default"</code>
348 case. Default <em>Yes</em>.
349 <p><br><a name="shortpreservecaseoption"></a>
350 <p><br><strong>"short preserve case = yes/no"</strong> controls if new files which conform
351 to 8.3 syntax, that is all in upper case and of suitable length, are
352 created upper case, or if they are forced to be the <code>"default"</code>
353 case. This option can be use with <a href="smb.conf.5.html#preservecaseoption"><strong>"preserve case =
354 yes"</strong></a> to permit long filenames to retain their
355 case, while short names are lowered. Default <em>Yes</em>.
356 <p><br>By default, Samba 2.0 has the same semantics as a Windows NT
357 server, in that it is case insensitive but case preserving.
358 <p><br><a name="NOTEABOUTUSERNAMEPASSWORDVALIDATION"></a>
359 <h2>NOTE ABOUT USERNAME/PASSWORD VALIDATION</h2>
360     
361 <p><br>There are a number of ways in which a user can connect to a
362 service. The server follows the following steps in determining if it
363 will allow a connection to a specified service. If all the steps fail
364 then the connection request is rejected. If one of the steps pass then
365 the following steps are not checked.
366 <p><br>If the service is marked <a href="smb.conf.5.html#guestonly"><strong>"guest only = yes"</strong></a> then
367 steps 1 to 5 are skipped.
368 <p><br><ol>
369 <p><br><li> Step 1: If the client has passed a username/password pair and
370 that username/password pair is validated by the UNIX system's password
371 programs then the connection is made as that username. Note that this
372 includes the <code>\\server\service%username</code> method of passing a
373 username.
374 <p><br><li> Step 2: If the client has previously registered a username with
375 the system and now supplies a correct password for that username then
376 the connection is allowed.
377 <p><br><li> Step 3: The client's netbios name and any previously used user
378 names are checked against the supplied password, if they match then
379 the connection is allowed as the corresponding user.
380 <p><br><li> Step 4: If the client has previously validated a
381 username/password pair with the server and the client has passed the
382 validation token then that username is used. This step is skipped if
383 <a href="smb.conf.5.html#revalidate"><strong>"revalidate = yes"</strong></a> for this service.
384 <p><br><li> Step 5: If a <a href="smb.conf.5.html#user"><strong>"user = "</strong></a> field is given in the
385 smb.conf file for the service and the client has supplied a password,
386 and that password matches (according to the UNIX system's password
387 checking) with one of the usernames from the <a href="smb.conf.5.html#user"><strong>user=</strong></a>
388 field then the connection is made as the username in the
389 <a href="smb.conf.5.html#user"><strong>"user="</strong></a> line. If one of the username in the
390 <a href="smb.conf.5.html#user"><strong>user=</strong></a> list begins with a <code>'@'</code> then that name
391 expands to a list of names in the group of the same name.
392 <p><br><li> Step 6: If the service is a guest service then a connection is
393 made as the username given in the <a href="smb.conf.5.html#guestaccount"><strong>"guest account
394 ="</strong></a> for the service, irrespective of the supplied
395 password.
396 <p><br></ol>
397 <p><br><a name="COMPLETELISTOFGLOBALPARAMETERS"></a>
398 <h2>COMPLETE LIST OF GLOBAL PARAMETERS</h2>
399     
400 <p><br>Here is a list of all global parameters. See the section of each
401 parameter for details.  Note that some are synonyms.
402 <p><br><ul>
403 <p><br><li > <a href="smb.conf.5.html#announceas"><strong>announce as</strong></a>
404 <p><br><li > <a href="smb.conf.5.html#announceversion"><strong>announce version</strong></a>
405 <p><br><li > <a href="smb.conf.5.html#autoservices"><strong>auto services</strong></a>
406 <p><br><li > <a href="smb.conf.5.html#bindinterfacesonly"><strong>bind interfaces only</strong></a>
407 <p><br><li > <a href="smb.conf.5.html#browselist"><strong>browse list</strong></a>
408 <p><br><li > <a href="smb.conf.5.html#changenotifytimeout"><strong>change notify timeout</strong></a>
409 <p><br><li > <a href="smb.conf.5.html#characterset"><strong>character set</strong></a>
410 <p><br><li > <a href="smb.conf.5.html#clientcodepage"><strong>client code page</strong></a>
411 <p><br><li > <a href="smb.conf.5.html#codingsystem"><strong>coding system</strong></a>
412 <p><br><li > <a href="smb.conf.5.html#configfile"><strong>config file</strong></a>
413 <p><br><li > <a href="smb.conf.5.html#deadtime"><strong>deadtime</strong></a>
414 <p><br><li > <a href="smb.conf.5.html#debugtimestamp"><strong>debug timestamp</strong></a>
415 <p><br><li > <a href="smb.conf.5.html#debuglevel"><strong>debuglevel</strong></a>
416 <p><br><li > <a href="smb.conf.5.html#default"><strong>default</strong></a>
417 <p><br><li > <a href="smb.conf.5.html#defaultservice"><strong>default service</strong></a>
418 <p><br><li > <a href="smb.conf.5.html#dfreecommand"><strong>dfree command</strong></a>
419 <p><br><li > <a href="smb.conf.5.html#dnsproxy"><strong>dns proxy</strong></a>
420 <p><br><li > <a href="smb.conf.5.html#domainadmingroup"><strong>domain admin group</strong></a>
421 <p><br><li > <a href="smb.conf.5.html#domainadminusers"><strong>domain admin users</strong></a>
422 <p><br><li > <a href="smb.conf.5.html#domaincontroller"><strong>domain controller</strong></a>
423 <p><br><li > <a href="smb.conf.5.html#domaingroupmap"><strong>domain group map</strong></a>
424 <p><br><li > <a href="smb.conf.5.html#domaingroups"><strong>domain groups</strong></a>
425 <p><br><li > <a href="smb.conf.5.html#domainguestgroup"><strong>domain guest group</strong></a>
426 <p><br><li > <a href="smb.conf.5.html#domainguestusers"><strong>domain guest users</strong></a>
427 <p><br><li > <a href="smb.conf.5.html#domainlogons"><strong>domain logons</strong></a>
428 <p><br><li > <a href="smb.conf.5.html#domainmaster"><strong>domain master</strong></a>
429 <p><br><li > <a href="smb.conf.5.html#domainusermap"><strong>domain user map</strong></a>
430 <p><br><li > <a href="smb.conf.5.html#encryptpasswords"><strong>encrypt passwords</strong></a>
431 <p><br><li > <a href="smb.conf.5.html#getwdcache"><strong>getwd cache</strong></a>
432 <p><br><li > <a href="smb.conf.5.html#homedirmap"><strong>homedir map</strong></a>
433 <p><br><li > <a href="smb.conf.5.html#hostsequiv"><strong>hosts equiv</strong></a>
434 <p><br><li > <a href="smb.conf.5.html#interfaces"><strong>interfaces</strong></a>
435 <p><br><li > <a href="smb.conf.5.html#keepalive"><strong>keepalive</strong></a>
436 <p><br><li > <a href="smb.conf.5.html#kerneloplocks"><strong>kernel oplocks</strong></a>
437 <p><br><li > <a href="smb.conf.5.html#ldapbindas"><strong>ldap bind as</strong></a>
438 <p><br><li > <a href="smb.conf.5.html#ldappasswdfile"><strong>ldap passwd file</strong></a>
439 <p><br><li > <a href="smb.conf.5.html#ldapport"><strong>ldap port</strong></a>
440 <p><br><li > <a href="smb.conf.5.html#ldapserver"><strong>ldap server</strong></a>
441 <p><br><li > <a href="smb.conf.5.html#ldapsuffix"><strong>ldap suffix</strong></a>
442 <p><br><li > <a href="smb.conf.5.html#lmannounce"><strong>lm announce</strong></a>
443 <p><br><li > <a href="smb.conf.5.html#lminterval"><strong>lm interval</strong></a>
444 <p><br><li > <a href="smb.conf.5.html#loadprinters"><strong>load printers</strong></a>
445 <p><br><li > <a href="smb.conf.5.html#localgroupmap"><strong>local group map</strong></a>
446 <p><br><li > <a href="smb.conf.5.html#localmaster"><strong>local master</strong></a>
447 <p><br><li > <a href="smb.conf.5.html#lockdir"><strong>lock dir</strong></a>
448 <p><br><li > <a href="smb.conf.5.html#lockdirectory"><strong>lock directory</strong></a>
449 <p><br><li > <a href="smb.conf.5.html#logfile"><strong>log file</strong></a>
450 <p><br><li > <a href="smb.conf.5.html#loglevel"><strong>log level</strong></a>
451 <p><br><li > <a href="smb.conf.5.html#logondrive"><strong>logon drive</strong></a>
452 <p><br><li > <a href="smb.conf.5.html#logonhome"><strong>logon home</strong></a>
453 <p><br><li > <a href="smb.conf.5.html#logonpath"><strong>logon path</strong></a>
454 <p><br><li > <a href="smb.conf.5.html#logonscript"><strong>logon script</strong></a>
455 <p><br><li > <a href="smb.conf.5.html#lpqcachetime"><strong>lpq cache time</strong></a>
456 <p><br><li > <a href="smb.conf.5.html#machinepasswordtimeout"><strong>machine password timeout</strong></a>
457 <p><br><li > <a href="smb.conf.5.html#mangledstack"><strong>mangled stack</strong></a>
458 <p><br><li > <a href="smb.conf.5.html#maxdisksize"><strong>max disk size</strong></a>
459 <p><br><li > <a href="smb.conf.5.html#maxlogsize"><strong>max log size</strong></a>
460 <p><br><li > <a href="smb.conf.5.html#maxmux"><strong>max mux</strong></a>
461 <p><br><li > <a href="smb.conf.5.html#maxopenfiles"><strong>max open files</strong></a>
462 <p><br><li > <a href="smb.conf.5.html#maxpacket"><strong>max packet</strong></a>
463 <p><br><li > <a href="smb.conf.5.html#maxttl"><strong>max ttl</strong></a>
464 <p><br><li > <a href="smb.conf.5.html#maxwinsttl"><strong>max wins ttl</strong></a>
465 <p><br><li > <a href="smb.conf.5.html#maxxmit"><strong>max xmit</strong></a>
466 <p><br><li > <a href="smb.conf.5.html#messagecommand"><strong>message command</strong></a>
467 <p><br><li > <a href="smb.conf.5.html#minwinsttl"><strong>min wins ttl</strong></a>
468 <p><br><li > <a href="smb.conf.5.html#nameresolveorder"><strong>name resolve order</strong></a>
469 <p><br><li > <a href="smb.conf.5.html#netbiosaliases"><strong>netbios aliases</strong></a>
470 <p><br><li > <a href="smb.conf.5.html#netbiosname"><strong>netbios name</strong></a>
471 <p><br><li > <a href="smb.conf.5.html#nishomedir"><strong>nis homedir</strong></a>
472 <p><br><li > <a href="smb.conf.5.html#ntpipesupport"><strong>nt pipe support</strong></a>
473 <p><br><li > <a href="smb.conf.5.html#ntsmbsupport"><strong>nt smb support</strong></a>
474 <p><br><li > <a href="smb.conf.5.html#nullpasswords"><strong>null passwords</strong></a>
475 <p><br><li > <a href="smb.conf.5.html#olelockingcompatibility"><strong>ole locking compatibility</strong></a>
476 <p><br><li > <a href="smb.conf.5.html#oslevel"><strong>os level</strong></a>
477 <p><br><li > <a href="smb.conf.5.html#packetsize"><strong>packet size</strong></a>
478 <p><br><li > <a href="smb.conf.5.html#panicaction"><strong>panic action</strong></a>
479 <p><br><li > <a href="smb.conf.5.html#passwdchat"><strong>passwd chat</strong></a>
480 <p><br><li > <a href="smb.conf.5.html#passwdchatdebug"><strong>passwd chat debug</strong></a>
481 <p><br><li > <a href="smb.conf.5.html#passwdprogram"><strong>passwd program</strong></a>
482 <p><br><li > <a href="smb.conf.5.html#passwordlevel"><strong>password level</strong></a>
483 <p><br><li > <a href="smb.conf.5.html#passwordserver"><strong>password server</strong></a>
484 <p><br><li > <a href="smb.conf.5.html#preferedmaster"><strong>prefered master</strong></a>
485 <p><br><li > <a href="smb.conf.5.html#preferredmaster"><strong>preferred master</strong></a>
486 <p><br><li > <a href="smb.conf.5.html#preload"><strong>preload</strong></a>
487 <p><br><li > <a href="smb.conf.5.html#printcap"><strong>printcap</strong></a>
488 <p><br><li > <a href="smb.conf.5.html#printcapname"><strong>printcap name</strong></a>
489 <p><br><li > <a href="smb.conf.5.html#printerdriverfile"><strong>printer driver file</strong></a>
490 <p><br><li > <a href="smb.conf.5.html#protocol"><strong>protocol</strong></a>
491 <p><br><li > <a href="smb.conf.5.html#readbmpx"><strong>read bmpx</strong></a>
492 <p><br><li > <a href="smb.conf.5.html#readprediction"><strong>read prediction</strong></a>
493 <p><br><li > <a href="smb.conf.5.html#readraw"><strong>read raw</strong></a>
494 <p><br><li > <a href="smb.conf.5.html#readsize"><strong>read size</strong></a>
495 <p><br><li > <a href="smb.conf.5.html#remoteannounce"><strong>remote announce</strong></a>
496 <p><br><li > <a href="smb.conf.5.html#remotebrowsesync"><strong>remote browse sync</strong></a>
497 <p><br><li > <a href="smb.conf.5.html#root"><strong>root</strong></a>
498 <p><br><li > <a href="smb.conf.5.html#rootdir"><strong>root dir</strong></a>
499 <p><br><li > <a href="smb.conf.5.html#rootdirectory"><strong>root directory</strong></a>
500 <p><br><li > <a href="smb.conf.5.html#security"><strong>security</strong></a>
501 <p><br><li > <a href="smb.conf.5.html#serverstring"><strong>server string</strong></a>
502 <p><br><li > <a href="smb.conf.5.html#sharedmemsize"><strong>shared mem size</strong></a>
503 <p><br><li > <a href="smb.conf.5.html#smbpasswdfile"><strong>smb passwd file</strong></a>
504 <p><br><li > <a href="smb.conf.5.html#smbrun"><strong>smbrun</strong></a>
505 <p><br><li > <a href="smb.conf.5.html#socketaddress"><strong>socket address</strong></a>
506 <p><br><li > <a href="smb.conf.5.html#socketoptions"><strong>socket options</strong></a>
507 <p><br><li > <a href="smb.conf.5.html#ssl"><strong>ssl</strong></a>
508 <p><br><li > <a href="smb.conf.5.html#sslCAcertDir"><strong>ssl CA certDir</strong></a>
509 <p><br><li > <a href="smb.conf.5.html#sslCAcertFile"><strong>ssl CA certFile</strong></a>
510 <p><br><li > <a href="smb.conf.5.html#sslciphers"><strong>ssl ciphers</strong></a>
511 <p><br><li > <a href="smb.conf.5.html#sslclientcert"><strong>ssl client cert</strong></a>
512 <p><br><li > <a href="smb.conf.5.html#sslclientkey"><strong>ssl client key</strong></a>
513 <p><br><li > <a href="smb.conf.5.html#sslcompatibility"><strong>ssl compatibility</strong></a>
514 <p><br><li > <a href="smb.conf.5.html#sslhosts"><strong>ssl hosts</strong></a>
515 <p><br><li > <a href="smb.conf.5.html#sslhostsresign"><strong>ssl hosts resign</strong></a>
516 <p><br><li > <a href="smb.conf.5.html#sslrequireclientcert"><strong>ssl require clientcert</strong></a>
517 <p><br><li > <a href="smb.conf.5.html#sslrequireservercert"><strong>ssl require servercert</strong></a>
518 <p><br><li > <a href="smb.conf.5.html#sslservercert"><strong>ssl server cert</strong></a>
519 <p><br><li > <a href="smb.conf.5.html#sslserverkey"><strong>ssl server key</strong></a>
520 <p><br><li > <a href="smb.conf.5.html#sslversion"><strong>ssl version</strong></a>
521 <p><br><li > <a href="smb.conf.5.html#statcache"><strong>stat cache</strong></a>
522 <p><br><li > <a href="smb.conf.5.html#statcachesize"><strong>stat cache size</strong></a>
523 <p><br><li > <a href="smb.conf.5.html#stripdot"><strong>strip dot</strong></a>
524 <p><br><li > <a href="smb.conf.5.html#syslog"><strong>syslog</strong></a>
525 <p><br><li > <a href="smb.conf.5.html#syslogonly"><strong>syslog only</strong></a>
526 <p><br><li > <a href="smb.conf.5.html#timeoffset"><strong>time offset</strong></a>
527 <p><br><li > <a href="smb.conf.5.html#timeserver"><strong>time server</strong></a>
528 <p><br><li > <a href="smb.conf.5.html#timestamplogs"><strong>timestamp logs</strong></a>
529 <p><br><li > <a href="smb.conf.5.html#unixpasswordsync"><strong>unix password sync</strong></a>
530 <p><br><li > <a href="smb.conf.5.html#unixrealname"><strong>unix realname</strong></a>
531 <p><br><li > <a href="smb.conf.5.html#updateencrypted"><strong>update encrypted</strong></a>
532 <p><br><li > <a href="smb.conf.5.html#userhosts"><strong>use rhosts</strong></a>
533 <p><br><li > <a href="smb.conf.5.html#usernamelevel"><strong>username level</strong></a>
534 <p><br><li > <a href="smb.conf.5.html#usernamemap"><strong>username map</strong></a>
535 <p><br><li > <a href="smb.conf.5.html#validchars"><strong>valid chars</strong></a>
536 <p><br><li > <a href="smb.conf.5.html#winsproxy"><strong>wins proxy</strong></a>
537 <p><br><li > <a href="smb.conf.5.html#winsserver"><strong>wins server</strong></a>
538 <p><br><li > <a href="smb.conf.5.html#winssupport"><strong>wins support</strong></a>
539 <p><br><li > <a href="smb.conf.5.html#workgroup"><strong>workgroup</strong></a>
540 <p><br><li > <a href="smb.conf.5.html#writeraw"><strong>write raw</strong></a>
541 <p><br></ul>
542 <p><br><a name="COMPLETELISTOFSERVICEPARAMETERS"></a>
543 <h2>COMPLETE LIST OF SERVICE PARAMETERS</h2>
544     
545 <p><br>Here is a list of all service parameters. See the section of each
546 parameter for details. Note that some are synonyms.
547 <p><br><ul>
548 <p><br><li > <a href="smb.conf.5.html#adminusers"><strong>admin users</strong></a>
549 <p><br><li > <a href="smb.conf.5.html#allowhosts"><strong>allow hosts</strong></a>
550 <p><br><li > <a href="smb.conf.5.html#alternatepermissions"><strong>alternate permissions</strong></a>
551 <p><br><li > <a href="smb.conf.5.html#available"><strong>available</strong></a>
552 <p><br><li > <a href="smb.conf.5.html#blockinglocks"><strong>blocking locks</strong></a>
553 <p><br><li > <a href="smb.conf.5.html#browsable"><strong>browsable</strong></a>
554 <p><br><li > <a href="smb.conf.5.html#browseable"><strong>browseable</strong></a>
555 <p><br><li > <a href="smb.conf.5.html#casesensitive"><strong>case sensitive</strong></a>
556 <p><br><li > <a href="smb.conf.5.html#casesignames"><strong>casesignames</strong></a>
557 <p><br><li > <a href="smb.conf.5.html#comment"><strong>comment</strong></a>
558 <p><br><li > <a href="smb.conf.5.html#copy"><strong>copy</strong></a>
559 <p><br><li > <a href="smb.conf.5.html#createmask"><strong>create mask</strong></a>
560 <p><br><li > <a href="smb.conf.5.html#createmode"><strong>create mode</strong></a>
561 <p><br><li > <a href="smb.conf.5.html#defaultcase"><strong>default case</strong></a>
562 <p><br><li > <a href="smb.conf.5.html#deletereadonly"><strong>delete readonly</strong></a>
563 <p><br><li > <a href="smb.conf.5.html#deletevetofiles"><strong>delete veto files</strong></a>
564 <p><br><li > <a href="smb.conf.5.html#denyhosts"><strong>deny hosts</strong></a>
565 <p><br><li > <a href="smb.conf.5.html#directory"><strong>directory</strong></a>
566 <p><br><li > <a href="smb.conf.5.html#directorymask"><strong>directory mask</strong></a>
567 <p><br><li > <a href="smb.conf.5.html#directorymode"><strong>directory mode</strong></a>
568 <p><br><li > <a href="smb.conf.5.html#dontdescend"><strong>dont descend</strong></a>
569 <p><br><li > <a href="smb.conf.5.html#dosfiletimeresolution"><strong>dos filetime resolution</strong></a>
570 <p><br><li > <a href="smb.conf.5.html#dosfiletimes"><strong>dos filetimes</strong></a>
571 <p><br><li > <a href="smb.conf.5.html#exec"><strong>exec</strong></a>
572 <p><br><li > <a href="smb.conf.5.html#fakedirectorycreatetimes"><strong>fake directory create times</strong></a>
573 <p><br><li > <a href="smb.conf.5.html#fakeoplocks"><strong>fake oplocks</strong></a>
574 <p><br><li > <a href="smb.conf.5.html#followsymlinks"><strong>follow symlinks</strong></a>
575 <p><br><li > <a href="smb.conf.5.html#forcecreatemode"><strong>force create mode</strong></a>
576 <p><br><li > <a href="smb.conf.5.html#forcedirectorymode"><strong>force directory mode</strong></a>
577 <p><br><li > <a href="smb.conf.5.html#forcegroup"><strong>force group</strong></a>
578 <p><br><li > <a href="smb.conf.5.html#forceuser"><strong>force user</strong></a>
579 <p><br><li > <a href="smb.conf.5.html#fstype"><strong>fstype</strong></a>
580 <p><br><li > <a href="smb.conf.5.html#group"><strong>group</strong></a>
581 <p><br><li > <a href="smb.conf.5.html#guestaccount"><strong>guest account</strong></a>
582 <p><br><li > <a href="smb.conf.5.html#guestok"><strong>guest ok</strong></a>
583 <p><br><li > <a href="smb.conf.5.html#guestonly"><strong>guest only</strong></a>
584 <p><br><li > <a href="smb.conf.5.html#hidedotfiles"><strong>hide dot files</strong></a>
585 <p><br><li > <a href="smb.conf.5.html#hidefiles"><strong>hide files</strong></a>
586 <p><br><li > <a href="smb.conf.5.html#hostsallow"><strong>hosts allow</strong></a>
587 <p><br><li > <a href="smb.conf.5.html#hostsdeny"><strong>hosts deny</strong></a>
588 <p><br><li > <a href="smb.conf.5.html#include"><strong>include</strong></a>
589 <p><br><li > <a href="smb.conf.5.html#invalidusers"><strong>invalid users</strong></a>
590 <p><br><li > <a href="smb.conf.5.html#locking"><strong>locking</strong></a>
591 <p><br><li > <a href="smb.conf.5.html#lppausecommand"><strong>lppause command</strong></a>
592 <p><br><li > <a href="smb.conf.5.html#lpqcommand"><strong>lpq command</strong></a>
593 <p><br><li > <a href="smb.conf.5.html#lpresumecommand"><strong>lpresume command</strong></a>
594 <p><br><li > <a href="smb.conf.5.html#lprmcommand"><strong>lprm command</strong></a>
595 <p><br><li > <a href="smb.conf.5.html#magicoutput"><strong>magic output</strong></a>
596 <p><br><li > <a href="smb.conf.5.html#magicscript"><strong>magic script</strong></a>
597 <p><br><li > <a href="smb.conf.5.html#manglecase"><strong>mangle case</strong></a>
598 <p><br><li > <a href="smb.conf.5.html#mangledmap"><strong>mangled map</strong></a>
599 <p><br><li > <a href="smb.conf.5.html#manglednames"><strong>mangled names</strong></a>
600 <p><br><li > <a href="smb.conf.5.html#manglingchar"><strong>mangling char</strong></a>
601 <p><br><li > <a href="smb.conf.5.html#maparchive"><strong>map archive</strong></a>
602 <p><br><li > <a href="smb.conf.5.html#maphidden"><strong>map hidden</strong></a>
603 <p><br><li > <a href="smb.conf.5.html#mapsystem"><strong>map system</strong></a>
604 <p><br><li > <a href="smb.conf.5.html#maptoguest"><strong>map to guest</strong></a>
605 <p><br><li > <a href="smb.conf.5.html#maxconnections"><strong>max connections</strong></a>
606 <p><br><li > <a href="smb.conf.5.html#minprintspace"><strong>min print space</strong></a>
607 <p><br><li > <a href="smb.conf.5.html#onlyguest"><strong>only guest</strong></a>
608 <p><br><li > <a href="smb.conf.5.html#onlyuser"><strong>only user</strong></a>
609 <p><br><li > <a href="smb.conf.5.html#oplocks"><strong>oplocks</strong></a>
610 <p><br><li > <a href="smb.conf.5.html#path"><strong>path</strong></a>
611 <p><br><li > <a href="smb.conf.5.html#postexec"><strong>postexec</strong></a>
612 <p><br><li > <a href="smb.conf.5.html#postscript"><strong>postscript</strong></a>
613 <p><br><li > <a href="smb.conf.5.html#preexec"><strong>preexec</strong></a>
614 <p><br><li > <a href="smb.conf.5.html#preservecase"><strong>preserve case</strong></a>
615 <p><br><li > <a href="smb.conf.5.html#printcommand"><strong>print command</strong></a>
616 <p><br><li > <a href="smb.conf.5.html#printok"><strong>print ok</strong></a>
617 <p><br><li > <a href="smb.conf.5.html#printable"><strong>printable</strong></a>
618 <p><br><li > <a href="smb.conf.5.html#printer"><strong>printer</strong></a>
619 <p><br><li > <a href="smb.conf.5.html#printerdriver"><strong>printer driver</strong></a>
620 <p><br><li > <a href="smb.conf.5.html#printerdriverlocation"><strong>printer driver location</strong></a>
621 <p><br><li > <a href="smb.conf.5.html#printername"><strong>printer name</strong></a>
622 <p><br><li > <a href="smb.conf.5.html#printing"><strong>printing</strong></a>
623 <p><br><li > <a href="smb.conf.5.html#public"><strong>public</strong></a>
624 <p><br><li > <a href="smb.conf.5.html#queuepausecommand"><strong>queuepause command</strong></a>
625 <p><br><li > <a href="smb.conf.5.html#queueresumecommand"><strong>queueresume command</strong></a>
626 <p><br><li > <a href="smb.conf.5.html#readlist"><strong>read list</strong></a>
627 <p><br><li > <a href="smb.conf.5.html#readonly"><strong>read only</strong></a>
628 <p><br><li > <a href="smb.conf.5.html#revalidate"><strong>revalidate</strong></a>
629 <p><br><li > <a href="smb.conf.5.html#rootpostexec"><strong>root postexec</strong></a>
630 <p><br><li > <a href="smb.conf.5.html#rootpreexec"><strong>root preexec</strong></a>
631 <p><br><li > <a href="smb.conf.5.html#setdirectory"><strong>set directory</strong></a>
632 <p><br><li > <a href="smb.conf.5.html#sharemodes"><strong>share modes</strong></a>
633 <p><br><li > <a href="smb.conf.5.html#shortpreservecase"><strong>short preserve case</strong></a>
634 <p><br><li > <a href="smb.conf.5.html#status"><strong>status</strong></a>
635 <p><br><li > <a href="smb.conf.5.html#strictlocking"><strong>strict locking</strong></a>
636 <p><br><li > <a href="smb.conf.5.html#strictsync"><strong>strict sync</strong></a>
637 <p><br><li > <a href="smb.conf.5.html#syncalways"><strong>sync always</strong></a>
638 <p><br><li > <a href="smb.conf.5.html#user"><strong>user</strong></a>
639 <p><br><li > <a href="smb.conf.5.html#username"><strong>username</strong></a>
640 <p><br><li > <a href="smb.conf.5.html#users"><strong>users</strong></a>
641 <p><br><li > <a href="smb.conf.5.html#validusers"><strong>valid users</strong></a>
642 <p><br><li > <a href="smb.conf.5.html#vetofiles"><strong>veto files</strong></a>
643 <p><br><li > <a href="smb.conf.5.html#vetooplockfiles"><strong>veto oplock files</strong></a>
644 <p><br><li > <a href="smb.conf.5.html#volume"><strong>volume</strong></a>
645 <p><br><li > <a href="smb.conf.5.html#widelinks"><strong>wide links</strong></a>
646 <p><br><li > <a href="smb.conf.5.html#writable"><strong>writable</strong></a>
647 <p><br><li > <a href="smb.conf.5.html#writelist"><strong>write list</strong></a>
648 <p><br><li > <a href="smb.conf.5.html#writeok"><strong>write ok</strong></a>
649 <p><br><li > <a href="smb.conf.5.html#writeable"><strong>writeable</strong></a>
650 <p><br></ul>
651 <p><br><a name="EXPLANATIONOFEACHPARAMETER"></a>
652 <h2>EXPLANATION OF EACH PARAMETER</h2>
653     
654 <p><br><ul>
655 <p><br><a name="adminusers"></a>
656 <li><strong><strong>admin users (S)</strong></strong>
657 <p><br>This is a list of users who will be granted administrative privileges
658 on the share. This means that they will do all file operations as the
659 super-user (root).
660 <p><br>You should use this option very carefully, as any user in this list
661 will be able to do anything they like on the share, irrespective of
662 file permissions.
663 <p><br><strong>Default:</strong> <br>
664 <code>  no admin users</code>
665 <p><br><strong>Example:</strong> <br>
666 <code>  admin users = jason</code>
667 <p><br><a name="allowhosts"></a>
668 <li><strong><strong>allow hosts (S)</strong></strong>
669 <p><br>A synonym for this parameter is <a href="smb.conf.5.html#hostsallow"><strong>'hosts allow'</strong></a>
670 <p><br>This parameter is a comma, space, or tab delimited set of hosts which
671 are permitted to access a service.
672 <p><br>If specified in the <a href="smb.conf.5.html#global"><strong>[global]</strong></a> section then it will
673 apply to all services, regardless of whether the individual service
674 has a different setting.
675 <p><br>You can specify the hosts by name or IP number. For example, you could
676 restrict access to only the hosts on a Class C subnet with something
677 like <code>"allow hosts = 150.203.5."</code>. The full syntax of the list is
678 described in the man page <strong>hosts_access (5)</strong>. Note that this man
679 page may not be present on your system, so a brief description will
680 be given here also.
681 <p><br><em>NOTE:</em> IF you wish to allow the <a href="smbpasswd.html.8"><strong>smbpasswd
682 (8)</strong></a> program to be run by local users to change
683 their Samba passwords using the local <a href="smbd.8.html"><strong>smbd (8)</strong></a>
684 daemon, then you <em>MUST</em> ensure that the localhost is listed in your
685 <strong>allow hosts</strong> list, as <a href="smbpasswd.html.8"><strong>smbpasswd (8)</strong></a> runs
686 in client-server mode and is seen by the local
687 <a href="smbd.8.html"><strong>smbd</strong></a> process as just another client.
688 <p><br>You can also specify hosts by network/netmask pairs and by netgroup
689 names if your system supports netgroups. The <em>EXCEPT</em> keyword can also
690 be used to limit a wildcard list. The following examples may provide
691 some help:
692 <p><br><strong>Example 1</strong>: allow localhost and all IPs in 150.203.*.* except one
693 <p><br><code>   hosts allow = localhost, 150.203. EXCEPT 150.203.6.66</code>
694 <p><br><strong>Example 2</strong>: allow localhost and hosts that match the given network/netmask
695 <p><br><code>   hosts allow = localhost, 150.203.15.0/255.255.255.0</code>
696 <p><br><strong>Example 3</strong>: allow a localhost plus a couple of hosts
697 <p><br><code>   hosts allow = localhost, lapland, arvidsjaur</code>
698 <p><br><strong>Example 4</strong>: allow only hosts in NIS netgroup "foonet" or localhost, but 
699 deny access from one particular host
700 <p><br><code>   hosts allow = @foonet, localhost</code>
701 <code>  hosts deny = pirate</code>
702 <p><br>Note that access still requires suitable user-level passwords.
703 <p><br>See <a href="testparm.1.html"><strong>testparm (1)</strong></a> for a way of testing your
704 host access to see if it does what you expect.
705 <p><br><strong>Default:</strong>
706 <code>  none (i.e., all hosts permitted access)</code>
707 <p><br><strong>Example:</strong>
708 <code>  allow hosts = 150.203.5. localhost myhost.mynet.edu.au</code>
709 <p><br><a name="alternatepermissions"></a>
710 <li><strong><strong>alternate permissions (S)</strong></strong>
711 <p><br>This is a deprecated parameter. It no longer has any effect in Samba2.0.
712 In previous versions of Samba it affected the way the DOS "read only"
713 attribute was mapped for a file. In Samba2.0 a file is marked "read only"
714 if the UNIX file does not have the 'w' bit set for the owner of the file,
715 regardless if the owner of the file is the currently logged on user or not.
716 <p><br><a name="announceas"></a>
717 <li><strong><strong>announce as (G)</strong></strong>
718 <p><br>This specifies what type of server <a href="nmbd.8.html"><strong>nmbd</strong></a> will
719 announce itself as, to a network neighborhood browse list. By default
720 this is set to Windows NT. The valid options are : "NT", "Win95" or
721 "WfW" meaning Windows NT, Windows 95 and Windows for Workgroups
722 respectively. Do not change this parameter unless you have a specific
723 need to stop Samba appearing as an NT server as this may prevent Samba
724 servers from participating as browser servers correctly.
725 <p><br><strong>Default:</strong>
726 <code>  announce as = NT</code>
727 <p><br><strong>Example</strong>
728 <code>  announce as = Win95</code>
729 <p><br><a name="announceversion"></a>
730 <li><strong><strong>announce version (G)</strong></strong>
731 <p><br>This specifies the major and minor version numbers that nmbd will use
732 when announcing itself as a server. The default is 4.2.  Do not change
733 this parameter unless you have a specific need to set a Samba server
734 to be a downlevel server.
735 <p><br><strong>Default:</strong>
736 <code>  announce version = 4.2</code>
737 <p><br><strong>Example:</strong>
738 <code>  announce version = 2.0</code>
739 <p><br><a name="autoservices"></a>
740 <li><strong><strong>auto services (G)</strong></strong>
741 <p><br>This is a list of services that you want to be automatically added to
742 the browse lists. This is most useful for homes and printers services
743 that would otherwise not be visible.
744 <p><br>Note that if you just want all printers in your printcap file loaded
745 then the <a href="smb.conf.5.html#loadprinters"><strong>"load printers"</strong></a> option is easier.
746 <p><br><strong>Default:</strong>
747 <code>  no auto services</code>
748 <p><br><strong>Example:</strong>
749 <code>  auto services = fred lp colorlp</code>
750 <p><br><a name="available"></a>
751 <li><strong><strong>available (S)</strong></strong>
752 <p><br>This parameter lets you <em>'turn off'</em> a service. If <code>'available = no'</code>,
753 then <em>ALL</em> attempts to connect to the service will fail. Such failures
754 are logged.
755 <p><br><strong>Default:</strong>
756 <code>  available = yes</code>
757 <p><br><strong>Example:</strong>
758 <code>  available = no</code>
759 <p><br><a name="bindinterfacesonly"></a>
760 <li><strong><strong>bind interfaces only (G)</strong></strong>
761 <p><br>This global parameter allows the Samba admin to limit what interfaces
762 on a machine will serve smb requests. If affects file service
763 <a href="smbd.8.html"><strong>smbd</strong></a> and name service <a href="nmbd.8.html"><strong>nmbd</strong></a>
764 in slightly different ways.
765 <p><br>For name service it causes <a href="nmbd.8.html"><strong>nmbd</strong></a> to bind to ports
766 137 and 138 on the interfaces listed in the
767 <a href="smb.conf.5.html#interfaces"><strong>'interfaces'</strong></a>
768 parameter. <a href="nmbd.8.html"><strong>nmbd</strong></a> also binds to the 'all
769 addresses' interface (0.0.0.0) on ports 137 and 138 for the purposes
770 of reading broadcast messages. If this option is not set then
771 <a href="nmbd.8.html"><strong>nmbd</strong></a> will service name requests on all of these
772 sockets. If <strong>"bind interfaces only"</strong> is set then
773 <a href="nmbd.8.html"><strong>nmbd</strong></a> will check the source address of any
774 packets coming in on the broadcast sockets and discard any that don't
775 match the broadcast addresses of the interfaces in the
776 <a href="smb.conf.5.html#interfaces"><strong>'interfaces'</strong></a> parameter list. As unicast packets
777 are received on the other sockets it allows <a href="nmbd.8.html"><strong>nmbd</strong></a>
778 to refuse to serve names to machines that send packets that arrive
779 through any interfaces not listed in the
780 <a href="smb.conf.5.html#interfaces"><strong>"interfaces"</strong></a> list.  IP Source address spoofing
781 does defeat this simple check, however so it must not be used
782 seriously as a security feature for <a href="nmbd.8.html"><strong>nmbd</strong></a>.
783 <p><br>For file service it causes <a href="smbd.8.html"><strong>smbd</strong></a> to bind only to
784 the interface list given in the <a href="smb.conf.5.html#interfaces"><strong>'interfaces'</strong></a>
785 parameter. This restricts the networks that <a href="smbd.8.html"><strong>smbd</strong></a>
786 will serve to packets coming in those interfaces.  Note that you
787 should not use this parameter for machines that are serving PPP or
788 other intermittent or non-broadcast network interfaces as it will not
789 cope with non-permanent interfaces.
790 <p><br>In addition, to change a users SMB password, the
791 <a href="smbpasswd.8.html"><strong>smbpasswd</strong></a> by default connects to the
792 <em>"localhost" - 127.0.0.1</em> address as an SMB client to issue the
793 password change request. If <strong>"bind interfaces only"</strong> is set then
794 unless the network address <em>127.0.0.1</em> is added to the
795 <a href="smb.conf.5.html#interfaces"><strong>'interfaces'</strong></a> parameter list then
796 <a href="smbpasswd.8.html"><strong>smbpasswd</strong></a> will fail to connect in it's
797 default mode. <a href="smbpasswd.8.html"><strong>smbpasswd</strong></a> can be forced to
798 use the primary IP interface of the local host by using its
799 <a href="smbpasswd.8.html#minusr"><strong>"-r remote machine"</strong></a> parameter, with
800 <strong>"remote machine"</strong> set to the IP name of the primary interface
801 of the local host.
802 <p><br><strong>Default:</strong>
803 <code>  bind interfaces only = False</code>
804 <p><br><strong>Example:</strong>
805 <code>  bind interfaces only = True</code>
806 <p><br><a name="blockinglocks"></a>
807 <li><strong><strong>blocking locks (S)</strong></strong>
808 <p><br>This parameter controls the behavior of <a href="smbd.8.html"><strong>smbd</strong></a> when
809 given a request by a client to obtain a byte range lock on a region
810 of an open file, and the request has a time limit associated with it.
811 <p><br>If this parameter is set and the lock range requested cannot be
812 immediately satisfied, Samba 2.0 will internally queue the lock 
813 request, and periodically attempt to obtain the lock until the
814 timeout period expires.
815 <p><br>If this parameter is set to "False", then Samba 2.0 will behave
816 as previous versions of Samba would and will fail the lock
817 request immediately if the lock range cannot be obtained.
818 <p><br>This parameter can be set per share.
819 <p><br><strong>Default:</strong>
820 <code>  blocking locks = True</code>
821 <p><br><strong>Example:</strong>
822 <code>  blocking locks = False</code>
823 <p><br><a name="browsable"></a>
824 <li><strong><strong>browsable (S)</strong></strong>
825 <p><br>Synonym for <a href="smb.conf.5.html#browseable"><strong>browseable</strong></a>.
826 <p><br><a name="browselist"></a>
827 <li><strong><strong>browse list(G)</strong></strong>
828 <p><br>This controls whether <a href="smbd.8.html"><strong>smbd</strong></a> will serve a browse
829 list to a client doing a NetServerEnum call. Normally set to true. You
830 should never need to change this.
831 <p><br><strong>Default:</strong>
832 <code>  browse list = Yes</code>
833 <p><br><a name="browseable"></a>
834 <li><strong><strong>browseable</strong></strong>
835 <p><br>This controls whether this share is seen in the list of available
836 shares in a net view and in the browse list.
837 <p><br><strong>Default:</strong>
838 <code>  browseable = Yes</code>
839 <p><br><strong>Example:</strong>
840 <code>  browseable = No</code>
841 <p><br><a name="casesensitive"></a>
842 <li><strong><strong>case sensitive (S)</strong></strong>
843 <p><br>See the discussion in the section <a href="smb.conf.5.html#NAMEMANGLING"><strong>NAME MANGLING</strong></a>.
844 <p><br><a name="casesignames"></a>
845 <li><strong><strong>casesignames (S)</strong></strong>
846 <p><br>Synonym for <a href="smb.conf.5.html#casesensitive"><strong>"case sensitive"</strong></a>.
847 <p><br><a name="changenotifytimeout"></a>
848 <li><strong><strong>change notify timeout (G)</strong></strong>
849 <p><br>One of the new NT SMB requests that Samba 2.0 supports is the
850 "ChangeNotify" requests. This SMB allows a client to tell a server to
851 <em>"watch"</em> a particular directory for any changes and only reply to
852 the SMB request when a change has occurred. Such constant scanning of
853 a directory is expensive under UNIX, hence an
854 <a href="smbd.8.html"><strong>smbd</strong></a> daemon only performs such a scan on each
855 requested directory once every <strong>change notify timeout</strong> seconds.
856 <p><br><strong>change notify timeout</strong> is specified in units of seconds.
857 <p><br><strong>Default:</strong>
858 <code>  change notify timeout = 60</code>
859 <p><br><strong>Example:</strong>
860 <code>  change notify timeout = 300</code>
861 <p><br>Would change the scan time to every 5 minutes.
862 <p><br><a name="characterset"></a>
863 <li><strong><strong>character set (G)</strong></strong>
864 <p><br>This allows a smbd to map incoming filenames from a DOS Code page (see
865 the <a href="smb.conf.5.html#clientcodepage"><strong>client code page</strong></a> parameter) to several
866 built in UNIX character sets. The built in code page translations are:
867 <p><br><ul>
868 <p><br><li > <strong>ISO8859-1</strong> Western European UNIX character set. The parameter
869 <a href="smb.conf.5.html#clientcodepage"><strong>client code page</strong></a> <em>MUST</em> be set to code
870 page 850 if the <strong>character set</strong> parameter is set to iso8859-1
871 in order for the conversion to the UNIX character set to be done
872 correctly.
873 <p><br><li > <strong>ISO8859-2</strong> Eastern European UNIX character set. The parameter
874 <a href="smb.conf.5.html#clientcodepage"><strong>client code page</strong></a> <em>MUST</em> be set to code
875 page 852 if the <strong>character set</strong> parameter is set to ISO8859-2
876 in order for the conversion to the UNIX character set to be done
877 correctly. 
878 <p><br><li > <strong>ISO8859-5</strong> Russian Cyrillic UNIX character set. The parameter
879 <a href="smb.conf.5.html#clientcodepage"><strong>client code page</strong></a> <em>MUST</em> be set to code
880 page 866 if the <strong>character set</strong> parameter is set to ISO8859-2
881 in order for the conversion to the UNIX character set to be done
882 correctly. 
883 <p><br><li > <strong>KOI8-R</strong> Alternate mapping for Russian Cyrillic UNIX
884 character set. The parameter <a href="smb.conf.5.html#clientcodepage"><strong>client code
885 page</strong></a> <em>MUST</em> be set to code page 866 if the
886 <strong>character set</strong> parameter is set to KOI8-R in order for the
887 conversion to the UNIX character set to be done correctly.
888 <p><br></ul>
889 <p><br><em>BUG</em>. These MSDOS code page to UNIX character set mappings should
890 be dynamic, like the loading of MS DOS code pages, not static.
891 <p><br>See also <a href="smb.conf.5.html#clientcodepage"><strong>client code page</strong></a>.  Normally this
892 parameter is not set, meaning no filename translation is done.
893 <p><br><strong>Default:</strong>
894 <code>  character set = &lt;empty string&gt;</code>
895 <p><br><strong>Example:</strong>
896 <code>  character set = ISO8859-1</code>
897 <p><br><a name="clientcodepage"></a>
898 <li><strong><strong>client code page (G)</strong></strong>
899 <p><br>This parameter specifies the DOS code page that the clients accessing
900 Samba are using. To determine what code page a Windows or DOS client
901 is using, open a DOS command prompt and type the command "chcp". This
902 will output the code page. The default for USA MS-DOS, Windows 95, and
903 Windows NT releases is code page 437. The default for western european
904 releases of the above operating systems is code page 850.
905 <p><br>This parameter tells <a href="smbd.8.html"><strong>smbd</strong></a> which of the
906 <code>codepage.XXX</code> files to dynamically load on startup. These files,
907 described more fully in the manual page <a href="make_smbcodepage.1.html"><strong>make_smbcodepage
908 (1)</strong></a>, tell <a href="smbd.8.html"><strong>smbd</strong></a> how
909 to map lower to upper case characters to provide the case insensitivity
910 of filenames that Windows clients expect.
911 <p><br>Samba currently ships with the following code page files :
912 <p><br><ul>
913 <p><br><li > <strong>Code Page 437 - MS-DOS Latin US</strong>
914 <p><br><li > <strong>Code Page 737 - Windows '95 Greek</strong>
915 <p><br><li > <strong>Code Page 850 - MS-DOS Latin 1</strong>
916 <p><br><li > <strong>Code Page 852 - MS-DOS Latin 2</strong>
917 <p><br><li > <strong>Code Page 861 - MS-DOS Icelandic</strong>
918 <p><br><li > <strong>Code Page 866 - MS-DOS Cyrillic</strong>
919 <p><br><li > <strong>Code Page 932 - MS-DOS Japanese SJIS</strong>
920 <p><br><li > <strong>Code Page 936 - MS-DOS Simplified Chinese</strong>
921 <p><br><li > <strong>Code Page 949 - MS-DOS Korean Hangul</strong>
922 <p><br><li > <strong>Code Page 950 - MS-DOS Traditional Chinese</strong>
923 <p><br></ul>
924 <p><br>Thus this parameter may have any of the values 437, 737, 850, 852,
925 861, 932, 936, 949, or 950.  If you don't find the codepage you need,
926 read the comments in one of the other codepage files and the
927 <a href="make_smbcodepage.1.html"><strong>make_smbcodepage (1)</strong></a> man page and
928 write one. Please remember to donate it back to the Samba user
929 community.
930 <p><br>This parameter co-operates with the <a href="smb.conf.5.html#validchars"><strong>"valid
931 chars"</strong></a> parameter in determining what characters are
932 valid in filenames and how capitalization is done. If you set both
933 this parameter and the <a href="smb.conf.5.html#validchars"><strong>"valid chars"</strong></a> parameter
934 the <strong>"client code page"</strong> parameter <em>MUST</em> be set before the
935 <a href="smb.conf.5.html#validchars"><strong>"valid chars"</strong></a> parameter in the <strong>smb.conf</strong>
936 file. The <a href="smb.conf.5.html#validchars"><strong>"valid chars"</strong></a> string will then augment
937 the character settings in the "client code page" parameter.
938 <p><br>If not set, <strong>"client code page"</strong> defaults to 850.
939 <p><br>See also : <a href="smb.conf.5.html#validchars"><strong>"valid chars"</strong></a>
940 <p><br><strong>Default:</strong>
941 <code>  client code page = 850</code>
942 <p><br><strong>Example:</strong>
943 <code>  client code page = 936</code>
944 <p><br><a name="codingsystem"></a>
945 <li><strong><strong>codingsystem (G)</strong></strong>
946 <p><br>This parameter is used to determine how incoming Shift-JIS Japanese
947 characters are mapped from the incoming <a href="smb.conf.5.html#clientcodepage"><strong>"client code
948 page"</strong></a> used by the client, into file names in the
949 UNIX filesystem. Only useful if <a href="smb.conf.5.html#clientcodepage"><strong>"client code
950 page"</strong></a> is set to 932 (Japanese Shift-JIS).
951 <p><br>The options are :
952 <p><br><ul>
953 <p><br><li > <strong>SJIS</strong>  Shift-JIS. Does no conversion of the incoming filename.
954 <p><br><li > <strong>JIS8, J8BB, J8BH, J8@B, J8@J, J8@H </strong> Convert from incoming
955 Shift-JIS to eight bit JIS code with different shift-in, shift out
956 codes.
957 <p><br><li > <strong>JIS7, J7BB, J7BH, J7@B, J7@J, J7@H </strong> Convert from incoming
958 Shift-JIS to seven bit JIS code with different shift-in, shift out
959 codes.
960 <p><br><li > <strong>JUNET, JUBB, JUBH, JU@B, JU@J, JU@H </strong> Convert from incoming
961 Shift-JIS to JUNET code with different shift-in, shift out codes.
962 <p><br><li > <strong>EUC</strong>  Convert an incoming Shift-JIS character to EUC code.
963 <p><br><li > <strong>HEX</strong> Convert an incoming Shift-JIS character to a 3 byte hex
964 representation, i.e. <code>:AB</code>.
965 <p><br><li > <strong>CAP</strong> Convert an incoming Shift-JIS character to the 3 byte hex
966 representation used by the Columbia AppleTalk Program (CAP),
967 i.e. <code>:AB</code>.  This is used for compatibility between Samba and CAP.
968 <p><br></ul>
969 <p><br><a name="comment"></a>
970 <li><strong><strong>comment (S)</strong></strong>
971 <p><br>This is a text field that is seen next to a share when a client does a
972 queries the server, either via the network neighborhood or via "net
973 view" to list what shares are available.
974 <p><br>If you want to set the string that is displayed next to the machine
975 name then see the server string command.
976 <p><br><strong>Default:</strong>
977 <code>  No comment string</code>
978 <p><br><strong>Example:</strong>
979 <code>  comment = Fred's Files</code>
980 <p><br><a name="configfile"></a>
981 <li><strong><strong>config file (G)</strong></strong>
982 <p><br>This allows you to override the config file to use, instead of the
983 default (usually <strong>smb.conf</strong>). There is a chicken and egg problem
984 here as this option is set in the config file!
985 <p><br>For this reason, if the name of the config file has changed when the
986 parameters are loaded then it will reload them from the new config
987 file.
988 <p><br>This option takes the usual substitutions, which can be very useful.
989 <p><br>If the config file doesn't exist then it won't be loaded (allowing you
990 to special case the config files of just a few clients).
991 <p><br><strong>Example:</strong>
992 <code>  config file = /usr/local/samba/lib/smb.conf.%m</code>
993 <p><br><a name="copy"></a>
994 <li><strong><strong>copy (S)</strong></strong>
995 <p><br>This parameter allows you to <em>'clone'</em> service entries. The specified
996 service is simply duplicated under the current service's name. Any
997 parameters specified in the current section will override those in the
998 section being copied.
999 <p><br>This feature lets you set up a 'template' service and create similar
1000 services easily. Note that the service being copied must occur earlier
1001 in the configuration file than the service doing the copying.
1002 <p><br><strong>Default:</strong>
1003 <code>  none</code>
1004 <p><br><strong>Example:</strong>
1005 <code>  copy = otherservice</code>
1006 <p><br><a name="createmask"></a>
1007 <li><strong><strong>create mask (S)</strong></strong>
1008 <p><br>A synonym for this parameter is <a href="smb.conf.5.html#createmode"><strong>'create mode'</strong></a>.
1009 <p><br>When a file is created, the necessary permissions are calculated
1010 according to the mapping from DOS modes to UNIX permissions, and the
1011 resulting UNIX mode is then bit-wise 'AND'ed with this parameter.
1012 This parameter may be thought of as a bit-wise MASK for the UNIX modes
1013 of a file. Any bit <em>*not*</em> set here will be removed from the modes set
1014 on a file when it is created.
1015 <p><br>The default value of this parameter removes the 'group' and 'other'
1016 write and execute bits from the UNIX modes.
1017 <p><br>Following this Samba will bit-wise 'OR' the UNIX mode created from
1018 this parameter with the value of the "force create mode" parameter
1019 which is set to 000 by default.
1020 <p><br>This parameter does not affect directory modes. See the parameter
1021 <a href="smb.conf.5.html#directorymode"><strong>'directory mode'</strong></a> for details.
1022 <p><br>See also the <a href="smb.conf.5.html#forcecreatemode"><strong>"force create mode"</strong></a> parameter
1023 for forcing particular mode bits to be set on created files. See also
1024 the <a href="smb.conf.5.html#directorymode"><strong>"directory mode"</strong></a> parameter for masking
1025 mode bits on created directories.
1026 <p><br><strong>Default:</strong>
1027 <code>  create mask = 0744</code>
1028 <p><br><strong>Example:</strong>
1029 <code>  create mask = 0775</code>
1030 <p><br><a name="createmode"></a>
1031 <li><strong><strong>create mode (S)</strong></strong>
1032 <p><br>This is a synonym for <a href="smb.conf.5.html#createmask"><strong>create mask</strong></a>.
1033 <p><br><a name="deadtime"></a>
1034 <li><strong><strong>deadtime (G)</strong></strong>
1035 <p><br>The value of the parameter (a decimal integer) represents the number
1036 of minutes of inactivity before a connection is considered dead, and
1037 it is disconnected. The deadtime only takes effect if the number of
1038 open files is zero.
1039 <p><br>This is useful to stop a server's resources being exhausted by a large
1040 number of inactive connections.
1041 <p><br>Most clients have an auto-reconnect feature when a connection is
1042 broken so in most cases this parameter should be transparent to users.
1043 <p><br>Using this parameter with a timeout of a few minutes is recommended
1044 for most systems.
1045 <p><br>A deadtime of zero indicates that no auto-disconnection should be
1046 performed.
1047 <p><br><strong>Default:</strong>
1048 <code>  deadtime = 0</code>
1049 <p><br><strong>Example:</strong>
1050 <code>  deadtime = 15</code>
1051 <p><br><a name="debugtimestamp"></a>
1052 <li><strong><strong>debug timestamp (G)</strong></strong>
1053 <p><br>Samba2.0 debug log messages are timestamped by default. If you are
1054 running at a high <a href="smb.conf.5.html#debuglevel"><strong>"debug level"</strong></a> these timestamps
1055 can be distracting. This boolean parameter allows them to be turned
1056 off.
1057 <p><br><strong>Default:</strong>
1058 <code>  debug timestamp = Yes</code>
1059 <p><br><strong>Example:</strong>
1060 <code>  debug timestamp = No</code>
1061 <p><br><a name="debuglevel"></a>
1062 <li><strong><strong>debug level (G)</strong></strong>
1063 <p><br>The value of the parameter (an integer) allows the debug level
1064 (logging level) to be specified in the <strong>smb.conf</strong> file. This is to
1065 give greater flexibility in the configuration of the system.
1066 <p><br>The default will be the debug level specified on the command line
1067 or level zero if none was specified.
1068 <p><br><strong>Example:</strong>
1069 <code>  debug level = 3</code>
1070 <p><br><a name="default"></a>
1071 <li><strong><strong>default (G)</strong></strong>
1072 <p><br>A synonym for <a href="smb.conf.5.html#defaultservice"><strong>default service</strong></a>.
1073 <p><br><a name="defaultcase"></a>
1074 <li><strong><strong>default case (S)</strong></strong>
1075 <p><br>See the section on <a href="smb.conf.5.html#NAMEMANGLING"><strong>"NAME MANGLING"</strong></a>. Also note
1076 the <a href="smb.conf.5.html#shortpreservecase"><strong>"short preserve case"</strong></a> parameter.
1077 <p><br><a name="defaultservice"></a>
1078 <li><strong><strong>default service (G)</strong></strong>
1079 <p><br>This parameter specifies the name of a service which will be connected
1080 to if the service actually requested cannot be found. Note that the
1081 square brackets are <em>NOT</em> given in the parameter value (see example
1082 below).
1083 <p><br>There is no default value for this parameter. If this parameter is not
1084 given, attempting to connect to a nonexistent service results in an
1085 error.
1086 <p><br>Typically the default service would be a <a href="smb.conf.5.html#guestok"><strong>guest ok</strong></a>,
1087 <a href="smb.conf.5.html#readonly"><strong>read-only</strong></a> service.
1088 <p><br>Also note that the apparent service name will be changed to equal that
1089 of the requested service, this is very useful as it allows you to use
1090 macros like <a href="smb.conf.5.html#percentS"><strong>%S</strong></a> to make a wildcard service.
1091 <p><br>Note also that any <code>'_'</code> characters in the name of the service used
1092 in the default service will get mapped to a <code>'/'</code>. This allows for
1093 interesting things.
1094 <p><br><strong>Example:</strong>
1095 <pre>
1096
1097         default service = pub
1098         
1099         [pub]
1100                 path = /%S
1101
1102 </pre>
1103
1104 <p><br><a name="deletereadonly"></a>
1105 <li><strong><strong>delete readonly (S)</strong></strong>
1106 <p><br>This parameter allows readonly files to be deleted.  This is not
1107 normal DOS semantics, but is allowed by UNIX.
1108 <p><br>This option may be useful for running applications such as rcs, where
1109 UNIX file ownership prevents changing file permissions, and DOS
1110 semantics prevent deletion of a read only file.
1111 <p><br><strong>Default:</strong>
1112 <code>  delete readonly = No</code>
1113 <p><br><strong>Example:</strong>
1114 <code>  delete readonly = Yes</code>
1115 <p><br><a name="deletevetofiles"></a>
1116 <li><strong><strong>delete veto files (S)</strong></strong>
1117 <p><br>This option is used when Samba is attempting to delete a directory
1118 that contains one or more vetoed directories (see the <a href="smb.conf.5.html#vetofiles"><strong>'veto
1119 files'</strong></a> option).  If this option is set to False (the
1120 default) then if a vetoed directory contains any non-vetoed files or
1121 directories then the directory delete will fail. This is usually what
1122 you want.
1123 <p><br>If this option is set to True, then Samba will attempt to recursively
1124 delete any files and directories within the vetoed directory. This can
1125 be useful for integration with file serving systems such as <strong>NetAtalk</strong>,
1126 which create meta-files within directories you might normally veto
1127 DOS/Windows users from seeing (e.g. <code>.AppleDouble</code>)
1128 <p><br>Setting <code>'delete veto files = True'</code> allows these directories to be 
1129 transparently deleted when the parent directory is deleted (so long
1130 as the user has permissions to do so).
1131 <p><br>See also the <a href="smb.conf.5.html#vetofiles"><strong>veto files</strong></a> parameter.
1132 <p><br><strong>Default:</strong>
1133 <code>  delete veto files = False</code>
1134 <p><br><strong>Example:</strong>
1135 <code>  delete veto files = True</code>
1136 <p><br><a name="denyhosts"></a>
1137 <li><strong><strong>deny hosts (S)</strong></strong>
1138 <p><br>The opposite of <a href="smb.conf.5.html#allowhosts"><strong>'allow hosts'</strong></a> - hosts listed
1139 here are <em>NOT</em> permitted access to services unless the specific
1140 services have their own lists to override this one. Where the lists
1141 conflict, the <a href="smb.conf.5.html#allowhosts"><strong>'allow'</strong></a> list takes precedence.
1142 <p><br><strong>Default:</strong>
1143 <code>  none (i.e., no hosts specifically excluded)</code>
1144 <p><br><strong>Example:</strong>
1145 <code>  deny hosts = 150.203.4. badhost.mynet.edu.au</code>
1146 <p><br><a name="dfreecommand"></a>
1147 <li><strong><strong>dfree command (G)</strong></strong>
1148 <p><br>The dfree command setting should only be used on systems where a
1149 problem occurs with the internal disk space calculations. This has
1150 been known to happen with Ultrix, but may occur with other operating
1151 systems. The symptom that was seen was an error of "Abort Retry
1152 Ignore" at the end of each directory listing.
1153 <p><br>This setting allows the replacement of the internal routines to
1154 calculate the total disk space and amount available with an external
1155 routine. The example below gives a possible script that might fulfill
1156 this function.
1157 <p><br>The external program will be passed a single parameter indicating a
1158 directory in the filesystem being queried. This will typically consist
1159 of the string <code>"./"</code>. The script should return two integers in
1160 ascii. The first should be the total disk space in blocks, and the
1161 second should be the number of available blocks. An optional third
1162 return value can give the block size in bytes. The default blocksize
1163 is 1024 bytes.
1164 <p><br>Note: Your script should <em>NOT</em> be setuid or setgid and should be
1165 owned by (and writeable only by) root!
1166 <p><br><strong>Default:</strong>
1167 <code>  By default internal routines for determining the disk capacity
1168 and remaining space will be used.</code>
1169 <p><br><strong>Example:</strong>
1170 <code>  dfree command = /usr/local/samba/bin/dfree</code>
1171 <p><br>Where the script dfree (which must be made executable) could be:
1172 <p><br><pre>
1173
1174         #!/bin/sh
1175         df $1 | tail -1 | awk '{print $2" "$4}'
1176
1177 </pre>
1178
1179 <p><br>or perhaps (on Sys V based systems):
1180 <p><br><pre>
1181
1182         #!/bin/sh
1183         /usr/bin/df -k $1 | tail -1 | awk '{print $3" "$5}'
1184
1185 </pre>
1186
1187 <p><br>Note that you may have to replace the command names with full
1188 path names on some systems.
1189 <p><br><a name="directory"></a>
1190 <li><strong><strong>directory (S)</strong></strong>
1191 <p><br>Synonym for <a href="smb.conf.5.html#path"><strong>path</strong></a>.
1192 <p><br><a name="directorymask"></a>
1193 <li><strong><strong>directory mask (S)</strong></strong>
1194 <p><br>This parameter is the octal modes which are used when converting DOS
1195 modes to UNIX modes when creating UNIX directories.
1196 <p><br>When a directory is created, the necessary permissions are calculated
1197 according to the mapping from DOS modes to UNIX permissions, and the
1198 resulting UNIX mode is then bit-wise 'AND'ed with this parameter.
1199 This parameter may be thought of as a bit-wise MASK for the UNIX modes
1200 of a directory. Any bit <em>*not*</em> set here will be removed from the
1201 modes set on a directory when it is created.
1202 <p><br>The default value of this parameter removes the 'group' and 'other'
1203 write bits from the UNIX mode, allowing only the user who owns the
1204 directory to modify it.
1205 <p><br>Following this Samba will bit-wise 'OR' the UNIX mode created from
1206 this parameter with the value of the "force directory mode"
1207 parameter. This parameter is set to 000 by default (i.e. no extra mode
1208 bits are added).
1209 <p><br>See the <a href="smb.conf.5.html#forcedirectorymode"><strong>"force directory mode"</strong></a> parameter
1210 to cause particular mode bits to always be set on created directories.
1211 <p><br>See also the <a href="smb.conf.5.html#createmode"><strong>"create mode"</strong></a> parameter for masking
1212 mode bits on created files.
1213 <p><br><strong>Default:</strong>
1214 <code>  directory mask = 0755</code>
1215 <p><br><strong>Example:</strong>
1216 <code>  directory mask = 0775</code>
1217 <p><br><a name="directorymode"></a>
1218 <li><strong><strong>directory mode (S)</strong></strong>
1219 <p><br>Synonym for <a href="smb.conf.5.html#directorymask"><strong>directory mask</strong></a>.
1220 <p><br><a name="dnsproxy"></a>
1221 <li><strong><strong>dns proxy (G)</strong></strong>
1222 <p><br>Specifies that <a href="nmbd.8.html"><strong>nmbd</strong></a> when acting as a WINS
1223 server and finding that a NetBIOS name has not been registered, should
1224 treat the NetBIOS name word-for-word as a DNS name and do a lookup
1225 with the DNS server for that name on behalf of the name-querying
1226 client.
1227 <p><br>Note that the maximum length for a NetBIOS name is 15 characters, so
1228 the DNS name (or DNS alias) can likewise only be 15 characters,
1229 maximum.
1230 <p><br><a href="nmbd.8.html"><strong>nmbd</strong></a> spawns a second copy of itself to do the
1231 DNS name lookup requests, as doing a name lookup is a blocking action.
1232 <p><br>See also the parameter <a href="smb.conf.5.html#winssupport"><strong>wins support</strong></a>.
1233 <p><br><strong>Default:</strong>
1234 <code>  dns proxy = yes</code>
1235 <p><br><a name="domainadmingroup"></a>
1236 <strong>domain admin group (G)</strong>
1237 <p><br>This is an <strong>EXPERIMENTAL</strong> parameter that is part of the unfinished
1238 Samba NT Domain Controller Code.  It has been removed as of November 98.
1239 To work with the latest code builds that may have more support for
1240 Samba NT Domain Controller functionality please subscribe to the
1241 mailing list <strong>Samba-ntdom</strong> available by sending email to
1242 <a href="mailto:listproc@samba.org"><em>listproc@samba.org</em></a>
1243 <p><br><a name="domainadminusers"></a> 
1244 <li><strong><strong>domain admin users (G)</strong></strong>
1245 <p><br>This is an <strong>EXPERIMENTAL</strong> parameter that is part of the unfinished
1246 Samba NT Domain Controller Code. It has been removed as of November 98.
1247 To work with the latest code builds that may have more support for
1248 Samba NT Domain Controller functionality please subscribe to the
1249 mailing list <strong>Samba-ntdom</strong> available by sending email to
1250 <a href="mailto:listproc@samba.org"><em>listproc@samba.org</em></a>
1251 <p><br><a name="domaincontroller"></a>
1252 <li><strong><strong>domain controller (G)</strong></strong>
1253 <p><br>This is a <strong>DEPRECATED</strong> parameter. It is currently not used within
1254 the Samba source and should be removed from all current smb.conf
1255 files. It is left behind for compatibility reasons.
1256 <p><br><a name="domaingroupmap"></a>
1257 <li><strong><strong>domain group map (G)</strong></strong>
1258 <p><br>This option allows you to specify a file containing unique mappings
1259 of individual NT Domain Group names (in any domain) to UNIX group
1260 names.  This allows NT domain groups to be presented correctly to
1261 NT users, despite the lack of native support for the NT Security model
1262 (based on VAX/VMS) in UNIX.  The reader is advised to become familiar
1263 with the NT Domain system and its administration.
1264 <p><br>This option is used in conjunction with <a href="smb.conf.5.html#localgroupmap"><strong>'local group map'</strong></a>
1265 and <a href="smb.conf.5.html#domainusermap"><strong>'domain user map'</strong></a>.  The use of these three
1266 options is trivial and often unnecessary in the case where Samba is
1267 not expected to interact with any other SAM databases (whether local
1268 workstations or Domain Controllers).
1269 <p><br>The map file is parsed line by line.  If any line begins with a <code>'#'</code>
1270 or a <code>';'</code> then it is ignored.  Each line should contain a single UNIX
1271 group name on the left then a single NT Domain Group name on the right,
1272 separated by a tabstop or <code>'='</code>.  If either name contains spaces then
1273 it should be enclosed in quotes.
1274 The line can be either of the form:
1275 <p><br><code>  UNIXgroupname    \\DOMAIN_NAME\\DomainGroupName </code>
1276 <p><br>or:
1277 <p><br><code>  UNIXgroupname    DomainGroupName </code>
1278 <p><br>In the case where Samba is either an <strong>EXPERIMENTAL</strong> Domain Controller
1279 or it is a member of a domain using <a href="smb.conf.5.html#security"><strong>"security = domain"</strong></a>,
1280 the latter format can be used: the default Domain name is the Samba Server's
1281 Domain name, specified by <a href="smb.conf.5.html#workgroup"><strong>"workgroup = MYGROUP"</strong></a>.
1282 <p><br>Any UNIX groups that are <em>NOT</em> specified in this map file are assumed to
1283 be either Local or Domain Groups, depending on the role of the Samba Server.
1284 <p><br>In the case when Samba is an <strong>EXPERIMENTAL</strong> Domain Controller, Samba
1285 will present <em>ALL</em> such unspecified UNIX groups as its own NT Domain
1286 Groups, with the same name.
1287 <p><br>In the case where Samba is member of a domain using
1288 <a href="smb.conf.5.html#security"><strong>"security = domain"</strong></a>, Samba will check the UNIX name with
1289 its Domain Controller (see <a href="smb.conf.5.html#passwordserver"><strong>"password server"</strong></a>)
1290 as if it was an NT Domain Group.  If the Domain Controller says that it is not,
1291 such unspecified (unmapped) UNIX groups which also are not NT Domain
1292 Groups are treated as Local Groups in the Samba Server's local SAM database.
1293 NT Administrators will recognise these as Workstation Local Groups,
1294 which are managed by running <strong>USRMGR.EXE</strong> and selecting a remote
1295 Domain named "\\WORKSTATION_NAME", or by running <strong>MUSRMGR.EXE</strong> on
1296 a local Workstation.
1297 <p><br>This may sound complicated, but it means that a Samba Server as
1298 either a member of a domain or as an <strong>EXPERIMENTAL</strong> Domain Controller
1299 will act like an NT Workstation (with a local SAM database) or an NT PDC
1300 (with a Domain SAM database) respectively, without the need for any of
1301 the map files at all.  If you <strong>want</strong> to get fancy, however, you can.
1302 <p><br>Note that adding an entry to map an arbitrary NT group in an arbitrary
1303 Domain to an arbitrary UNIX group <em>REQUIRES</em> the following:
1304 <p><br><ul>
1305 <p><br><li > that the UNIX group exists on the UNIX server.
1306 <p><br><li > that the NT Domain Group exists in the specified NT Domain
1307 <p><br><li > that the UNIX Server knows about the specified Domain; 
1308 <p><br><li > that all the UNIX users (who are expecting to access the Samba
1309 Server as the correct NT user and with the correct NT group permissions)
1310 in the UNIX group be mapped to the correct NT Domain users in the specified
1311 NT Domain using <a href="smb.conf.5.html#domainusermap"><strong>'domain user map'</strong></a>.
1312 <p><br></ul>
1313 <p><br>Failure to meet any of these requirements may result in either (or
1314 both) errors reported in the log files or (and) incorrect or missing
1315 access rights granted to users.
1316 <p><br><a name="domaingroups"></a>
1317 <li><strong><strong>domain groups (G)</strong></strong>
1318 <p><br>This is an <strong>EXPERIMENTAL</strong> parameter that is part of the unfinished
1319 Samba NT Domain Controller Code. It has been removed as of November 98.
1320 To work with the latest code builds that may have more support for
1321 Samba NT Domain Controller functionality please subscribe to the
1322 mailing list <strong>Samba-ntdom</strong> available by sending email to
1323 <a href="mailto:listproc@samba.org"><em>listproc@samba.org</em></a>
1324 <p><br><a name="domainguestgroup"></a>
1325 <li><strong><strong>domain guest group (G)</strong></strong>
1326 <p><br>This is an <strong>EXPERIMENTAL</strong> parameter that is part of the unfinished
1327 Samba NT Domain Controller Code. It has been removed as of November 98.
1328 To work with the latest code builds that may have more support for
1329 Samba NT Domain Controller functionality please subscribe to the
1330 mailing list <strong>Samba-ntdom</strong> available by sending email to
1331 <a href="mailto:listproc@samba.org"><em>listproc@samba.org</em></a>
1332 <p><br><a name="domainguestusers"></a>
1333 <li><strong><strong>domain guest users (G)</strong></strong>
1334 <p><br>This is an <strong>EXPERIMENTAL</strong> parameter that is part of the unfinished
1335 Samba NT Domain Controller Code. It has been removed as of November 98.
1336 To work with the latest code builds that may have more support for
1337 Samba NT Domain Controller functionality please subscribe to the
1338 mailing list <strong>Samba-ntdom</strong> available by sending email to
1339 <a href="mailto:listproc@samba.org"><em>listproc@samba.org</em></a>
1340 <p><br><a name="domainlogons"></a>
1341 <li><strong><strong>domain logons (G)</strong></strong>
1342 <p><br>If set to true, the Samba server will serve Windows 95/98 Domain
1343 logons for the <a href="smb.conf.5.html#workgroup"><strong>workgroup</strong></a> it is in. For more
1344 details on setting up this feature see the file DOMAINS.txt in the
1345 Samba documentation directory <code>docs/</code> shipped with the source code.
1346 <p><br>Note that Win95/98 Domain logons are <em>NOT</em> the same as Windows
1347 NT Domain logons. NT Domain logons require a Primary Domain Controller
1348 (PDC) for the Domain. It is intended that in a future release Samba
1349 will be able to provide this functionality for Windows NT clients
1350 also.
1351 <p><br><strong>Default:</strong>
1352 <code>  domain logons = no</code>
1353 <p><br><a name="domainmaster"></a>
1354 <li><strong><strong>domain master (G)</strong></strong>
1355 <p><br>Tell <a href="nmbd.8.html"><strong>nmbd</strong></a> to enable WAN-wide browse list
1356 collation. Setting this option causes <a href="nmbd.8.html"><strong>nmbd</strong></a> to
1357 claim a special domain specific NetBIOS name that identifies it as a
1358 domain master browser for its given
1359 <a href="smb.conf.5.html#workgroup"><strong>workgroup</strong></a>. Local master browsers in the same
1360 <a href="smb.conf.5.html#workgroup"><strong>workgroup</strong></a> on broadcast-isolated subnets will give
1361 this <a href="nmbd.8.html"><strong>nmbd</strong></a> their local browse lists, and then
1362 ask <a href="smbd.8.html"><strong>smbd</strong></a> for a complete copy of the browse list
1363 for the whole wide area network.  Browser clients will then contact
1364 their local master browser, and will receive the domain-wide browse
1365 list, instead of just the list for their broadcast-isolated subnet.
1366 <p><br>Note that Windows NT Primary Domain Controllers expect to be able to
1367 claim this <a href="smb.conf.5.html#workgroup"><strong>workgroup</strong></a> specific special NetBIOS
1368 name that identifies them as domain master browsers for that
1369 <a href="smb.conf.5.html#workgroup"><strong>workgroup</strong></a> by default (i.e. there is no way to
1370 prevent a Windows NT PDC from attempting to do this). This means that
1371 if this parameter is set and <a href="nmbd.8.html"><strong>nmbd</strong></a> claims the
1372 special name for a <a href="smb.conf.5.html#workgroup"><strong>workgroup</strong></a> before a Windows NT
1373 PDC is able to do so then cross subnet browsing will behave strangely
1374 and may fail.
1375 <p><br>By default ("auto") Samba will attempt to become the domain master
1376 browser only if it is the Primary Domain Controller.
1377 <p><br><strong>Default:</strong>
1378 <code>  domain master = auto</code>
1379 <p><br><strong>Example:</strong>
1380 <code>  domain master = no</code>
1381 <p><br><a name="domainusermap"></a>
1382 <li><strong><strong>domain user map (G)</strong></strong>
1383 <p><br>This option allows you to specify a file containing unique mappings
1384 of individual NT Domain User names (in any domain) to UNIX user
1385 names.  This allows NT domain users to be presented correctly to
1386 NT systems, despite the lack of native support for the NT Security model
1387 (based on VAX/VMS) in UNIX.  The reader is advised to become familiar
1388 with the NT Domain system and its administration.
1389 <p><br>This option is used in conjunction with <a href="smb.conf.5.html#localgroupmap"><strong>'local group map'</strong></a>
1390 and <a href="smb.conf.5.html#domaingroupmap"><strong>'domain group map'</strong></a>.  The use of these three
1391 options is trivial and often unnecessary in the case where Samba is
1392 not expected to interact with any other SAM databases (whether local
1393 workstations or Domain Controllers).
1394 <p><br>This option, which provides (and maintains) a one-to-one link between
1395 UNIX and NT users, is <em>DIFFERENT</em> from <a href="smb.conf.5.html#usernamemap"><strong>'username map'</strong></a>, which does <em>NOT</em> maintain a distinction between the
1396 name(s) it can map to and the name it maps.
1397 <p><br>The map file is parsed line by line.  If any line begins with a <code>'#'</code>
1398 or a <code>';'</code> then the line is ignored.  Each line should contain a single UNIX
1399 user name on the left then a single NT Domain User name on the right,
1400 separated by a tabstop or <code>'='</code>.  If either name contains spaces then
1401 it should be enclosed in quotes.
1402 The line can be either of the form:
1403 <p><br><code>  UNIXusername     \\DOMAIN_NAME\\DomainUserName </code>
1404 <p><br>or:
1405 <p><br><code>  UNIXusername     DomainUserName </code>
1406 <p><br>In the case where Samba is either an <strong>EXPERIMENTAL</strong> Domain Controller
1407 or it is a member of a domain using <a href="smb.conf.5.html#security"><strong>"security = domain"</strong></a>,
1408 the latter format can be used: the default Domain name is the Samba Server's
1409 Domain name, specified by <a href="smb.conf.5.html#workgroup"><strong>"workgroup = MYGROUP"</strong></a>.
1410 <p><br>Any UNIX users that are <em>NOT</em> specified in this map file are assumed
1411 to be either Domain or Workstation Users, depending on the role of the
1412 Samba Server.
1413 <p><br>In the case when Samba is an <strong>EXPERIMENTAL</strong> Domain Controller, Samba
1414 will present <em>ALL</em> such unspecified UNIX users as its own NT Domain
1415 Users, with the same name.
1416 <p><br>In the case where Samba is a member of a domain using
1417 <a href="smb.conf.5.html#security"><strong>"security = domain"</strong></a>, Samba will check the UNIX name with
1418 its Domain Controller (see <a href="smb.conf.5.html#passwordserver"><strong>"password server"</strong></a>)
1419 as if it was an NT Domain User.  If the Domain Controller says that it is not,
1420 such unspecified (unmapped) UNIX users which also are not NT Domain
1421 Users are treated as Local Users in the Samba Server's local SAM database.
1422 NT Administrators will recognise these as Workstation Users,
1423 which are managed by running <strong>USRMGR.EXE</strong> and selecting a remote
1424 Domain named "\\WORKSTATION_NAME", or by running <strong>MUSRMGR.EXE</strong> on
1425 a local Workstation.
1426 <p><br>This may sound complicated, but it means that a Samba Server as
1427 either a member of a domain or as an <strong>EXPERIMENTAL</strong> Domain Controller
1428 will act like an NT Workstation (with a local SAM database) or an NT PDC
1429 (with a Domain SAM database) respectively, without the need for any of
1430 the map files at all.  If you <strong>want</strong> to get fancy, however, you can.
1431 <p><br>Note that adding an entry to map an arbitrary NT User in an arbitrary
1432 Domain to an arbitrary UNIX user <em>REQUIRES</em> the following:
1433 <p><br><ul>
1434 <p><br><li > that the UNIX user exists on the UNIX server.
1435 <p><br><li > that the NT Domain User exists in the specified NT Domain.
1436 <p><br><li > that the UNIX Server knows about the specified Domain.
1437 <p><br></ul>
1438 <p><br>Failure to meet any of these requirements may result in either (or
1439 both) errors reported in the log files or (and) incorrect or missing
1440 access rights granted to users.
1441 <p><br><a name="dontdescend"></a>
1442 <li><strong><strong>dont descend (S)</strong></strong>
1443 <p><br>There are certain directories on some systems (e.g., the <code>/proc</code> tree
1444 under Linux) that are either not of interest to clients or are
1445 infinitely deep (recursive). This parameter allows you to specify a
1446 comma-delimited list of directories that the server should always show
1447 as empty.
1448 <p><br>Note that Samba can be very fussy about the exact format of the "dont
1449 descend" entries. For example you may need <code>"./proc"</code> instead of
1450 just <code>"/proc"</code>. Experimentation is the best policy :-)
1451 <p><br><strong>Default:</strong>
1452 <code>  none (i.e., all directories are OK to descend)</code>
1453 <p><br><strong>Example:</strong>
1454 <code>  dont descend = /proc,/dev</code>
1455 <p><br><a name="dosfiletimeresolution"></a>
1456 <li><strong><strong>dos filetime resolution (S)</strong></strong>
1457 <p><br>Under the DOS and Windows FAT filesystem, the finest granularity on
1458 time resolution is two seconds. Setting this parameter for a share
1459 causes Samba to round the reported time down to the nearest two second
1460 boundary when a query call that requires one second resolution is made
1461 to <a href="smbd.8.html"><strong>smbd</strong></a>.
1462 <p><br>This option is mainly used as a compatibility option for Visual C++
1463 when used against Samba shares. If oplocks are enabled on a share,
1464 Visual C++ uses two different time reading calls to check if a file
1465 has changed since it was last read. One of these calls uses a
1466 one-second granularity, the other uses a two second granularity. As
1467 the two second call rounds any odd second down, then if the file has a
1468 timestamp of an odd number of seconds then the two timestamps will not
1469 match and Visual C++ will keep reporting the file has changed. Setting
1470 this option causes the two timestamps to match, and Visual C++ is
1471 happy.
1472 <p><br><strong>Default:</strong>
1473 <code>  dos filetime resolution = False</code>
1474 <p><br><strong>Example:</strong>
1475 <code>  dos filetime resolution = True</code>
1476 <p><br><a name="dosfiletimes"></a>
1477 <li><strong><strong>dos filetimes (S)</strong></strong>
1478 <p><br>Under DOS and Windows, if a user can write to a file they can change
1479 the timestamp on it. Under POSIX semantics, only the owner of the file
1480 or root may change the timestamp. By default, Samba runs with POSIX
1481 semantics and refuses to change the timestamp on a file if the user
1482 smbd is acting on behalf of is not the file owner. Setting this option
1483 to True allows DOS semantics and smbd will change the file timestamp as
1484 DOS requires.
1485 <p><br><strong>Default:</strong>
1486 <code>  dos filetimes = False</code>
1487 <p><br><strong>Example:</strong>
1488 <code>  dos filetimes = True</code>
1489 <p><br><a name="encryptpasswords"></a>
1490 <li><strong><strong>encrypt passwords (G)</strong></strong>
1491 <p><br>This boolean controls whether encrypted passwords will be negotiated
1492 with the client. Note that Windows NT 4.0 SP3 and above and also
1493 Windows 98 will by default expect encrypted passwords unless a
1494 registry entry is changed. To use encrypted passwords in Samba see the
1495 file ENCRYPTION.txt in the Samba documentation directory <code>docs/</code>
1496 shipped with the source code.
1497 <p><br>In order for encrypted passwords to work correctly
1498 <a href="smbd.8.html"><strong>smbd</strong></a> must either have access to a local
1499 <a href="smbpasswd.5.html"><strong>smbpasswd (5)</strong></a> file (see the
1500 <a href="smbpasswd.8.html"><strong>smbpasswd (8)</strong></a> program for information on
1501 how to set up and maintain this file), or set the
1502 <a href="smb.conf.5.html#security"><strong>security=</strong></a> parameter to either
1503 <a href="smb.conf.5.html#securityequalserver"><strong>"server"</strong></a> or
1504 <a href="smb.conf.5.html#securityequaldomain"><strong>"domain"</strong></a> which causes
1505 <a href="smbd.8.html"><strong>smbd</strong></a> to authenticate against another server.
1506 <p><br><a name="exec"></a>
1507 <li><strong><strong>exec (S)</strong></strong>
1508 <p><br>This is a synonym for <a href="smb.conf.5.html#preexec"><strong>preexec</strong></a>.
1509 <p><br><a name="fakedirectorycreatetimes"></a>
1510 <li><strong><strong>fake directory create times (S)</strong></strong>
1511 <p><br>NTFS and Windows VFAT file systems keep a create time for all files
1512 and directories. This is not the same as the ctime - status change
1513 time - that Unix keeps, so Samba by default reports the earliest of
1514 the various times Unix does keep. Setting this parameter for a share
1515 causes Samba to always report midnight 1-1-1980 as the create time for
1516 directories.
1517 <p><br>This option is mainly used as a compatibility option for Visual C++
1518 when used against Samba shares. Visual C++ generated makefiles have
1519 the object directory as a dependency for each object file, and a make
1520 rule to create the directory. Also, when NMAKE compares timestamps it
1521 uses the creation time when examining a directory. Thus the object
1522 directory will be created if it does not exist, but once it does exist
1523 it will always have an earlier timestamp than the object files it
1524 contains.
1525 <p><br>However, Unix time semantics mean that the create time reported by
1526 Samba will be updated whenever a file is created or deleted in the
1527 directory. NMAKE therefore finds all object files in the object
1528 directory bar the last one built are out of date compared to the
1529 directory and rebuilds them. Enabling this option ensures directories
1530 always predate their contents and an NMAKE build will proceed as
1531 expected.
1532 <p><br><strong>Default:</strong>
1533 <code>  fake directory create times = False</code>
1534 <p><br><strong>Example:</strong>
1535 <code>  fake directory create times = True</code>
1536 <p><br><a name="fakeoplocks"></a>
1537 <li><strong><strong>fake oplocks (S)</strong></strong>
1538 <p><br>Oplocks are the way that SMB clients get permission from a server to
1539 locally cache file operations. If a server grants an oplock
1540 (opportunistic lock) then the client is free to assume that it is the
1541 only one accessing the file and it will aggressively cache file
1542 data. With some oplock types the client may even cache file open/close
1543 operations. This can give enormous performance benefits.
1544 <p><br>When you set <code>"fake oplocks = yes"</code> <a href="smbd.8.html"><strong>smbd</strong></a> will
1545 always grant oplock requests no matter how many clients are using the
1546 file.
1547 <p><br>It is generally much better to use the real <a href="smb.conf.5.html#oplocks"><strong>oplocks</strong></a>
1548 support rather than this parameter.
1549 <p><br>If you enable this option on all read-only shares or shares that you
1550 know will only be accessed from one client at a time such as
1551 physically read-only media like CDROMs, you will see a big performance
1552 improvement on many operations. If you enable this option on shares
1553 where multiple clients may be accessing the files read-write at the
1554 same time you can get data corruption. Use this option carefully!
1555 <p><br>This option is disabled by default.
1556 <p><br><a name="followsymlinks"></a>
1557 <li><strong><strong>follow symlinks (S)</strong></strong>
1558 <p><br>This parameter allows the Samba administrator to stop
1559 <a href="smbd.8.html"><strong>smbd</strong></a> from following symbolic links in a
1560 particular share. Setting this parameter to <em>"No"</em> prevents any file
1561 or directory that is a symbolic link from being followed (the user
1562 will get an error).  This option is very useful to stop users from
1563 adding a symbolic link to <code>/etc/passwd</code> in their home directory for
1564 instance.  However it will slow filename lookups down slightly.
1565 <p><br>This option is enabled (i.e. <a href="smbd.8.html"><strong>smbd</strong></a> will follow
1566 symbolic links) by default.
1567 <p><br><a name="forcecreatemode"></a>
1568 <li><strong><strong>force create mode (S)</strong></strong>
1569 <p><br>This parameter specifies a set of UNIX mode bit permissions that will
1570 <em>*always*</em> be set on a file created by Samba. This is done by
1571 bitwise 'OR'ing these bits onto the mode bits of a file that is being
1572 created. The default for this parameter is (in octal) 000. The modes
1573 in this parameter are bitwise 'OR'ed onto the file mode after the mask
1574 set in the <a href="smb.conf.5.html#createmask"><strong>"create mask"</strong></a> parameter is applied.
1575 <p><br>See also the parameter <a href="smb.conf.5.html#createmask"><strong>"create mask"</strong></a> for details
1576 on masking mode bits on created files.
1577 <p><br><strong>Default:</strong>
1578 <code>  force create mode = 000</code>
1579 <p><br><strong>Example:</strong>
1580 <code>  force create mode = 0755</code>
1581 <p><br>would force all created files to have read and execute permissions set
1582 for 'group' and 'other' as well as the read/write/execute bits set for
1583 the 'user'.
1584 <p><br><a name="forcedirectorymode"></a>
1585 <li><strong><strong>force directory mode (S)</strong></strong>
1586 <p><br>This parameter specifies a set of UNIX mode bit permissions that will
1587 <em>*always*</em> be set on a directory created by Samba. This is done by
1588 bitwise 'OR'ing these bits onto the mode bits of a directory that is
1589 being created. The default for this parameter is (in octal) 0000 which
1590 will not add any extra permission bits to a created directory. This
1591 operation is done after the mode mask in the parameter
1592 <a href="smb.conf.5.html#directorymask"><strong>"directory mask"</strong></a> is applied.
1593 <p><br>See also the parameter <a href="smb.conf.5.html#directorymask"><strong>"directory mask"</strong></a> for
1594 details on masking mode bits on created directories.
1595 <p><br><strong>Default:</strong>
1596 <code>  force directory mode = 000</code>
1597 <p><br><strong>Example:</strong>
1598 <code>  force directory mode = 0755</code>
1599 <p><br>would force all created directories to have read and execute
1600 permissions set for 'group' and 'other' as well as the
1601 read/write/execute bits set for the 'user'.
1602 <p><br><a name="forcegroup"></a>
1603 <li><strong><strong>force group (S)</strong></strong>
1604 <p><br>This specifies a UNIX group name that will be assigned as the default
1605 primary group for all users connecting to this service. This is useful
1606 for sharing files by ensuring that all access to files on service will
1607 use the named group for their permissions checking. Thus, by assigning
1608 permissions for this group to the files and directories within this
1609 service the Samba administrator can restrict or allow sharing of these
1610 files.
1611 <p><br><strong>Default:</strong>
1612 <code>  no forced group</code>
1613 <p><br><strong>Example:</strong>
1614 <code>  force group = agroup</code>
1615 <p><br><a name="forceuser"></a>
1616 <li><strong><strong>force user (S)</strong></strong>
1617 <p><br>This specifies a UNIX user name that will be assigned as the default
1618 user for all users connecting to this service. This is useful for
1619 sharing files. You should also use it carefully as using it
1620 incorrectly can cause security problems.
1621 <p><br>This user name only gets used once a connection is established. Thus
1622 clients still need to connect as a valid user and supply a valid
1623 password. Once connected, all file operations will be performed as the
1624 <code>"forced user"</code>, no matter what username the client connected as.
1625 <p><br>This can be very useful.
1626 <p><br><strong>Default:</strong>
1627 <code>  no forced user</code>
1628 <p><br><strong>Example:</strong>
1629 <code>  force user = auser</code>
1630 <p><br><a name="fstype"></a>
1631 <li><strong><strong>fstype (S)</strong></strong>
1632 <p><br>This parameter allows the administrator to configure the string that
1633 specifies the type of filesystem a share is using that is reported by
1634 <a href="smbd.8.html"><strong>smbd</strong></a> when a client queries the filesystem type
1635 for a share. The default type is <strong>"NTFS"</strong> for compatibility with
1636 Windows NT but this can be changed to other strings such as "Samba" or
1637 "FAT" if required.
1638 <p><br><strong>Default:</strong>
1639 <code>  fstype = NTFS</code>
1640 <p><br><strong>Example:</strong>
1641 <code>  fstype = Samba</code>
1642 <p><br><a name="getwdcache"></a>
1643 <li><strong><strong>getwd cache (G)</strong></strong>
1644 <p><br>This is a tuning option. When this is enabled a caching algorithm
1645 will be used to reduce the time taken for getwd() calls. This can have
1646 a significant impact on performance, especially when the
1647 <a href="smb.conf.5.html#widelinks"><strong>widelinks</strong></a> parameter is set to False.
1648 <p><br><strong>Default:</strong>
1649 <code>  getwd cache = No</code>
1650 <p><br><strong>Example:</strong>
1651 <code>  getwd cache = Yes</code>
1652 <p><br><a name="group"></a>
1653 <li><strong><strong>group (S)</strong></strong>
1654 <p><br>Synonym for <a href="smb.conf.5.html#forcegroup"><strong>"force group"</strong></a>.
1655 <p><br><a name="guestaccount"></a>
1656 <li><strong><strong>guest account (S)</strong></strong>
1657 <p><br>This is a username which will be used for access to services which are
1658 specified as <a href="smb.conf.5.html#guestok"><strong>'guest ok'</strong></a> (see below). Whatever
1659 privileges this user has will be available to any client connecting to
1660 the guest service. Typically this user will exist in the password
1661 file, but will not have a valid login. The user account <strong>"ftp"</strong> is
1662 often a good choice for this parameter. If a username is specified in
1663 a given service, the specified username overrides this one.
1664 <p><br>One some systems the default guest account "nobody" may not be able to
1665 print. Use another account in this case. You should test this by
1666 trying to log in as your guest user (perhaps by using the <code>"su -"</code>
1667 command) and trying to print using the system print command such as
1668 <strong>lpr (1)</strong> or <strong>lp (1)</strong>.
1669 <p><br><strong>Default:</strong>
1670 <code>  specified at compile time, usually "nobody"</code>
1671 <p><br><strong>Example:</strong>
1672 <code>  guest account = ftp</code>
1673 <p><br><a name="guestok"></a>
1674 <li><strong><strong>guest ok (S)</strong></strong>
1675 <p><br>If this parameter is <em>'yes'</em> for a service, then no password is
1676 required to connect to the service. Privileges will be those of the
1677 <a href="smb.conf.5.html#guestaccount"><strong>guest account</strong></a>.
1678 <p><br>See the section below on <a href="smb.conf.5.html#security"><strong>security</strong></a> for more
1679 information about this option.
1680 <p><br><strong>Default:</strong>
1681 <code>  guest ok = no</code>
1682 <p><br><strong>Example:</strong>
1683 <code>  guest ok = yes</code>
1684 <p><br><a name="guestonly"></a>
1685 <li><strong><strong>guest only (S)</strong></strong>
1686 <p><br>If this parameter is <em>'yes'</em> for a service, then only guest
1687 connections to the service are permitted. This parameter will have no
1688 affect if <a href="smb.conf.5.html#guestok"><strong>"guest ok"</strong></a> or <a href="smb.conf.5.html#public"><strong>"public"</strong></a>
1689 is not set for the service.
1690 <p><br>See the section below on <a href="smb.conf.5.html#security"><strong>security</strong></a> for more
1691 information about this option.
1692 <p><br><strong>Default:</strong>
1693 <code>  guest only = no</code>
1694 <p><br><strong>Example:</strong>
1695 <code>  guest only = yes</code>
1696 <p><br><a name="hidedotfiles"></a>
1697 <li><strong><strong>hide dot files (S)</strong></strong>
1698 <p><br>This is a boolean parameter that controls whether files starting with
1699 a dot appear as hidden files.
1700 <p><br><strong>Default:</strong>
1701 <code>  hide dot files = yes</code>
1702 <p><br><strong>Example:</strong>
1703 <code>  hide dot files = no</code>
1704 <p><br><a name="hidefiles"></a>
1705 <li><strong><strong>hide files(S)</strong></strong>
1706 <p><br>This is a list of files or directories that are not visible but are
1707 accessible.  The DOS 'hidden' attribute is applied to any files or
1708 directories that match.
1709 <p><br>Each entry in the list must be separated by a <code>'/'</code>, which allows
1710 spaces to be included in the entry.  <code>'*'</code> and <code>'?'</code> can be used
1711 to specify multiple files or directories as in DOS wildcards.
1712 <p><br>Each entry must be a Unix path, not a DOS path and must not include the 
1713 Unix directory separator <code>'/'</code>.
1714 <p><br>Note that the case sensitivity option is applicable in hiding files.
1715 <p><br>Setting this parameter will affect the performance of Samba, as it
1716 will be forced to check all files and directories for a match as they
1717 are scanned.
1718 <p><br>See also <a href="smb.conf.5.html#hidedotfiles"><strong>"hide dot files"</strong></a>, <a href="smb.conf.5.html#vetofiles"><strong>"veto
1719 files"</strong></a> and <a href="smb.conf.5.html#casesensitive"><strong>"case sensitive"</strong></a>.
1720 <p><br><strong>Default</strong>
1721 <pre>
1722
1723         No files or directories are hidden by this option (dot files are
1724         hidden by default because of the "hide dot files" option).
1725
1726 </pre>
1727
1728 <p><br><strong>Example</strong>
1729 <code>  hide files = /.*/DesktopFolderDB/TrashFor%m/resource.frk/</code>
1730 <p><br>The above example is based on files that the Macintosh SMB client
1731 (DAVE) available from <a href="www.thursby.com"><strong>Thursby</strong></a> creates for
1732 internal use, and also still hides all files beginning with a dot.
1733 <p><br><a name="homedirmap"></a>
1734 <li><strong><strong>homedir map (G)</strong></strong>
1735 <p><br>If <a href="smb.conf.5.html#nishomedir"><strong>"nis homedir"</strong></a> is true, and
1736 <a href="smbd.8.html"><strong>smbd</strong></a> is also acting as a Win95/98 <a href="smb.conf.5.html#domainlogons"><strong>logon
1737 server</strong></a> then this parameter specifies the NIS (or YP)
1738 map from which the server for the user's home directory should be
1739 extracted.  At present, only the Sun auto.home map format is
1740 understood. The form of the map is:
1741 <p><br><code>username   server:/some/file/system</code>
1742 <p><br>and the program will extract the servername from before the first
1743 <code>':'</code>.  There should probably be a better parsing system that copes
1744 with different map formats and also Amd (another automounter) maps.
1745 <p><br>NB: A working NIS is required on the system for this option to work.
1746 <p><br>See also <a href="smb.conf.5.html#nishomedir"><strong>"nis homedir"</strong></a>, <a href="smb.conf.5.html#domainlogons"><strong>domain
1747 logons</strong></a>.
1748 <p><br><strong>Default:</strong>
1749 <code>  homedir map = auto.home</code>
1750 <p><br><strong>Example:</strong>
1751 <code>  homedir map = amd.homedir</code>
1752 <p><br><a name="hostsallow"></a>
1753 <li><strong><strong>hosts allow (S)</strong></strong>
1754 <p><br>Synonym for <a href="smb.conf.5.html#allowhosts"><strong>allow hosts</strong></a>.
1755 <p><br><a name="hostsdeny"></a>
1756 <li><strong><strong>hosts deny (S)</strong></strong>
1757 <p><br>Synonym for <a href="smb.conf.5.html#denyhosts"><strong>denyhosts</strong></a>.
1758 <p><br><a name="hostsequiv"></a>
1759 <li><strong><strong>hosts equiv (G)</strong></strong>
1760 <p><br>If this global parameter is a non-null string, it specifies the name
1761 of a file to read for the names of hosts and users who will be allowed
1762 access without specifying a password.
1763 <p><br>This is not be confused with <a href="smb.conf.5.html#allowhosts"><strong>allow hosts</strong></a> which
1764 is about hosts access to services and is more useful for guest
1765 services. <strong>hosts equiv</strong> may be useful for NT clients which will not
1766 supply passwords to samba.
1767 <p><br>NOTE: The use of <strong>hosts equiv</strong> can be a major security hole. This is
1768 because you are trusting the PC to supply the correct username. It is
1769 very easy to get a PC to supply a false username. I recommend that the
1770 <strong>hosts equiv</strong> option be only used if you really know what you are
1771 doing, or perhaps on a home network where you trust your spouse and
1772 kids. And only if you <em>really</em> trust them :-).
1773 <p><br><strong>Default</strong>
1774 <code>  No host equivalences</code>
1775 <p><br><strong>Example</strong>
1776 <code>  hosts equiv = /etc/hosts.equiv</code>
1777 <p><br><a name="include"></a>
1778 <li><strong><strong>include (G)</strong></strong>
1779 <p><br>This allows you to include one config file inside another.  The file
1780 is included literally, as though typed in place.
1781 <p><br>It takes the standard substitutions, except <a href="smb.conf.5.html#percentu"><strong>%u</strong></a>,
1782 <a href="smb.conf.5.html#percentP"><strong>%P</strong></a> and <a href="smb.conf.5.html#percentS"><strong>%S</strong></a>.
1783 <p><br><a name="interfaces"></a>
1784 <li><strong><strong>interfaces (G)</strong></strong>
1785 <p><br>This option allows you to setup multiple network interfaces, so that
1786 Samba can properly handle browsing on all interfaces.
1787 <p><br>The option takes a list of ip/netmask pairs. The netmask may either be
1788 a bitmask, or a bitlength.
1789 <p><br>For example, the following line:
1790 <p><br><code>interfaces = 192.168.2.10/24 192.168.3.10/24</code>
1791 <p><br>would configure two network interfaces with IP addresses 192.168.2.10
1792 and 192.168.3.10. The netmasks of both interfaces would be set to
1793 255.255.255.0.
1794 <p><br>You could produce an equivalent result by using:
1795 <p><br><code>interfaces = 192.168.2.10/255.255.255.0 192.168.3.10/255.255.255.0</code>
1796 <p><br>if you prefer that format.
1797 <p><br>If this option is not set then Samba will attempt to find a primary
1798 interface, but won't attempt to configure more than one interface.
1799 <p><br>See also <a href="smb.conf.5.html#bindinterfacesonly"><strong>"bind interfaces only"</strong></a>.
1800 <p><br><a name="invalidusers"></a>
1801 <li><strong><strong>invalid users (S)</strong></strong>
1802 <p><br>This is a list of users that should not be allowed to login to this
1803 service. This is really a <em>"paranoid"</em> check to absolutely ensure an
1804 improper setting does not breach your security.
1805 <p><br>A name starting with a <code>'@'</code> is interpreted as an NIS netgroup first
1806 (if your system supports NIS), and then as a UNIX group if the name
1807 was not found in the NIS netgroup database.
1808 <p><br>A name starting with <code>'+'</code> is interpreted only by looking in the
1809 UNIX group database. A name starting with <code>'&amp;'</code> is interpreted only
1810 by looking in the NIS netgroup database (this requires NIS to be
1811 working on your system). The characters <code>'+'</code> and <code>'&amp;'</code> may be
1812 used at the start of the name in either order so the value
1813 <code>"+&amp;group"</code> means check the UNIX group database, followed by the NIS
1814 netgroup database, and the value <code>"&amp;+group"</code> means check the NIS
1815 netgroup database, followed by the UNIX group database (the same as
1816 the <code>'@'</code> prefix).
1817 <p><br>The current servicename is substituted for
1818 <a href="smb.conf.5.html#percentS"><strong>%S</strong></a>. This is useful in the <a href="smb.conf.5.html#homes"><strong>[homes]</strong></a>
1819 section.
1820 <p><br>See also <a href="smb.conf.5.html#validusers"><strong>"valid users"</strong></a>.
1821 <p><br><strong>Default:</strong>
1822 <code>  No invalid users</code>
1823 <p><br><strong>Example:</strong>
1824 <code>  invalid users = root fred admin @wheel</code>
1825 <p><br><a name="keepalive"></a>
1826 <li><strong><strong>keepalive (G)</strong></strong>
1827 <p><br>The value of the parameter (an integer) represents the number of
1828 seconds between <strong>'keepalive'</strong> packets. If this parameter is zero, no
1829 keepalive packets will be sent. Keepalive packets, if sent, allow the
1830 server to tell whether a client is still present and responding.
1831 <p><br>Keepalives should, in general, not be needed if the socket being used
1832 has the SO_KEEPALIVE attribute set on it (see <a href="smb.conf.5.html#socketoptions"><strong>"socket
1833 options"</strong></a>). Basically you should only use this option
1834 if you strike difficulties.
1835 <p><br><strong>Default:</strong>
1836 <code>  keep alive = 0</code>
1837 <p><br><strong>Example:</strong>
1838 <code>  keep alive = 60</code>
1839 <p><br><a name="kerneloplocks"></a>
1840 <li><strong><strong>kernel oplocks (G)</strong></strong>
1841 <p><br>For UNIXs that support kernel based <a href="smb.conf.5.html#oplocks"><strong>oplocks</strong></a>
1842 (currently only IRIX but hopefully also Linux and FreeBSD soon) this
1843 parameter allows the use of them to be turned on or off.
1844 <p><br>Kernel oplocks support allows Samba <a href="smb.conf.5.html#oplocks"><strong>oplocks</strong></a> to be
1845 broken whenever a local UNIX process or NFS operation accesses a file
1846 that <a href="smbd.8.html"><strong>smbd</strong></a> has oplocked. This allows complete
1847 data consistency between SMB/CIFS, NFS and local file access (and is a
1848 <em>very</em> cool feature :-).
1849 <p><br>This parameter defaults to <em>"On"</em> on systems that have the support,
1850 and <em>"off"</em> on systems that don't. You should never need to touch
1851 this parameter.
1852 <p><br><a name="ldapbindas"></a>
1853 <li><strong><strong>ldap bind as (G)</strong></strong>
1854 <p><br>This parameter is part of the <em>EXPERIMENTAL</em> Samba support for a
1855 password database stored on an LDAP server. These options are only
1856 available if your version of Samba was configured with the <strong>--with-ldap</strong>
1857 option.
1858 <p><br>This parameter specifies the entity to bind to an LDAP directory as.
1859 Usually it should be safe to use the LDAP root account; for larger
1860 installations it may be preferable to restrict Samba's access. See also
1861 <a href="smb.conf.5.html#ldappasswdfile"><strong>ldap passwd file</strong></a>.
1862 <p><br><strong>Default:</strong>
1863 <code>  none (bind anonymously)</code>
1864 <p><br><strong>Example:</strong>
1865 <code>  ldap bind as = "uid=root, dc=mydomain, dc=org"</code>
1866 <p><br><a name="ldappasswdfile"></a>
1867 <li><strong><strong>ldap passwd file (G)</strong></strong>
1868 <p><br>This parameter is part of the <em>EXPERIMENTAL</em> Samba support for a
1869 password database stored on an LDAP server. These options are only
1870 available if your version of Samba was configured with the <strong>--with-ldap</strong>
1871 option.
1872 <p><br>This parameter specifies a file containing the password with which
1873 Samba should bind to an LDAP server. For obvious security reasons
1874 this file must be set to mode 700 or less.
1875 <p><br><strong>Default:</strong>
1876 <code>  none (bind anonymously)</code>
1877 <p><br><strong>Example:</strong>
1878 <code>  ldap passwd file = /usr/local/samba/private/ldappasswd</code>
1879 <p><br><a name="ldapport"></a>
1880 <li><strong><strong>ldap port (G)</strong></strong>
1881 <p><br>This parameter is part of the <em>EXPERIMENTAL</em> Samba support for a
1882 password database stored on an LDAP server. These options are only
1883 available if your version of Samba was configured with the <strong>--with-ldap</strong>
1884 option.
1885 <p><br>This parameter specifies the TCP port number of the LDAP server.
1886 <p><br><strong>Default:</strong>
1887 <code>  ldap port = 389.</code>
1888 <p><br><a name="ldapserver"></a>
1889 <li><strong><strong>ldap server (G)</strong></strong>
1890 <p><br>This parameter is part of the <em>EXPERIMENTAL</em> Samba support for a
1891 password database stored on an LDAP server back-end. These options
1892 are only available if your version of Samba was configured with
1893 the <strong>--with-ldap</strong> option.
1894 <p><br>This parameter specifies the DNS name of the LDAP server to use
1895 when storing and retrieving information about Samba users and
1896 groups.
1897 <p><br><strong>Default:</strong>
1898 <code>  ldap server = localhost</code>
1899 <p><br><a name="ldapsuffix"></a>
1900 <li><strong><strong>ldap suffix (G)</strong></strong>
1901 <p><br>This parameter is part of the <em>EXPERIMENTAL</em> Samba support for a
1902 password database stored on an LDAP server back-end. These options
1903 are only available if your version of Samba was configured with
1904 the <strong>--with-ldap</strong> option.
1905 <p><br>This parameter specifies the node of the LDAP tree beneath which
1906 Samba should store its information. This parameter MUST be provided
1907 when using LDAP with Samba.
1908 <p><br><strong>Default:</strong>
1909 <code>  none</code>
1910 <p><br><strong>Example:</strong>
1911 <code>  ldap suffix = "dc=mydomain, dc=org"</code>
1912 <p><br><a name="lmannounce"></a>
1913 <li><strong><strong>lm announce (G)</strong></strong>
1914 <p><br>This parameter determines if <a href="nmbd.8.html"><strong>nmbd</strong></a> will produce
1915 Lanman announce broadcasts that are needed by <strong>OS/2</strong> clients in order
1916 for them to see the Samba server in their browse list. This parameter
1917 can have three values, <code>"true"</code>, <code>"false"</code>, or <code>"auto"</code>. The
1918 default is <code>"auto"</code>.  If set to <code>"false"</code> Samba will never produce
1919 these broadcasts. If set to <code>"true"</code> Samba will produce Lanman
1920 announce broadcasts at a frequency set by the parameter <a href="smb.conf.5.html#lminterval"><strong>"lm
1921 interval"</strong></a>. If set to <code>"auto"</code> Samba will not send Lanman
1922 announce broadcasts by default but will listen for them. If it hears
1923 such a broadcast on the wire it will then start sending them at a
1924 frequency set by the parameter <a href="smb.conf.5.html#lminterval"><strong>"lm interval"</strong></a>.
1925 <p><br>See also <a href="smb.conf.5.html#lminterval"><strong>"lm interval"</strong></a>.
1926 <p><br><strong>Default:</strong>
1927 <code>  lm announce = auto</code>
1928 <p><br><strong>Example:</strong>
1929 <code>  lm announce = true</code>
1930 <p><br><a name="lminterval"></a>
1931 <li><strong><strong>lm interval (G)</strong></strong>
1932 <p><br>If Samba is set to produce Lanman announce broadcasts needed by
1933 <strong>OS/2</strong> clients (see the <a href="smb.conf.5.html#lmannounce"><strong>"lm announce"</strong></a>
1934 parameter) then this parameter defines the frequency in seconds with
1935 which they will be made.  If this is set to zero then no Lanman
1936 announcements will be made despite the setting of the <a href="smb.conf.5.html#lmannounce"><strong>"lm
1937 announce"</strong></a> parameter.
1938 <p><br>See also <a href="smb.conf.5.html#lmannounce"><strong>"lm announce"</strong></a>.
1939 <p><br><strong>Default:</strong>
1940 <code>  lm interval = 60</code>
1941 <p><br><strong>Example:</strong>
1942 <code>  lm interval = 120</code>
1943 <p><br><a name="loadprinters"></a>
1944 <li><strong><strong>load printers (G)</strong></strong>
1945 <p><br>A boolean variable that controls whether all printers in the printcap
1946 will be loaded for browsing by default. See the
1947 <a href="smb.conf.5.html#printers"><strong>"printers"</strong></a> section for more details.
1948 <p><br><strong>Default:</strong>
1949 <code>  load printers = yes</code>
1950 <p><br><strong>Example:</strong>
1951 <code>  load printers = no</code>
1952 <p><br><a name="localgroupmap"></a>
1953 <li><strong><strong>local group map (G)</strong></strong>
1954 <p><br>This option allows you to specify a file containing unique mappings
1955 of individual NT Local Group names (in any domain) to UNIX group
1956 names.  This allows NT Local groups (aliases) to be presented correctly to
1957 NT users, despite the lack of native support for the NT Security model
1958 (based on VAX/VMS) in UNIX.  The reader is advised to become familiar
1959 with the NT Domain system and its administration.
1960 <p><br>This option is used in conjunction with <a href="smb.conf.5.html#domaingroupmap"><strong>'domain group map'</strong></a>
1961 and <a href="smb.conf.5.html#domainusermap"><strong>'domain name map'</strong></a>.  The use of these three
1962 options is trivial and often unnecessary in the case where Samba
1963 is not expected to interact with any other SAM databases (whether local
1964 workstations or Domain Controllers).
1965 <p><br>The map file is parsed line by line.  If any line begins with a <code>'#'</code>
1966 or a <code>';'</code> then it is ignored.  Each line should contain a single UNIX
1967 group name on the left then a single NT Local Group name on the right,
1968 separated by a tabstop or <code>'='</code>.  If either name contains spaces then
1969 it should be enclosed in quotes.
1970 The line can be either of the form:
1971 <p><br><code>  UNIXgroupname    \\DOMAIN_NAME\\LocalGroupName </code>
1972 <p><br>or:
1973 <p><br><code>  UNIXgroupname    LocalGroupName </code>
1974 <p><br>In the case where Samba is either an <strong>EXPERIMENTAL</strong> Domain Controller
1975 or it is a member of a domain using <a href="smb.conf.5.html#security"><strong>"security = domain"</strong></a>,
1976 the latter format can be used: the default Domain name is the Samba Server's
1977 Domain name, specified by <a href="smb.conf.5.html#workgroup"><strong>"workgroup = MYGROUP"</strong></a>.
1978 <p><br>Any UNIX groups that are <em>NOT</em> specified in this map file are treated
1979 as either Local or Domain Groups depending on the role of the Samba Server.
1980 <p><br>In the case when Samba is an <strong>EXPERIMENTAL</strong> Domain Controller, Samba
1981 will present <em>ALL</em> unspecified UNIX groups as its own NT Domain
1982 Groups, with the same name, and <em>NOT</em> as Local Groups.
1983 <p><br>In the case where Samba is member of a domain using
1984 <a href="smb.conf.5.html#security"><strong>"security = domain"</strong></a>, Samba will check the UNIX name with
1985 its Domain Controller (see <a href="smb.conf.5.html#passwordserver"><strong>"password server"</strong></a>)
1986 as if it was an NT Domain Group.  If the Domain Controller says that it is not,
1987 such unspecified (unmapped) UNIX groups which also are not NT Domain
1988 Groups are treated as Local Groups in the Samba Server's local SAM database.
1989 NT Administrators will recognise these as Workstation Local Groups,
1990 which are managed by running <strong>USRMGR.EXE</strong> and selecting a remote
1991 Domain named "\\WORKSTATION_NAME", or by running <strong>MUSRMGR.EXE</strong> on
1992 a local Workstation.
1993 <p><br>This may sound complicated, but it means that a Samba Server as
1994 either a member of a domain or as an <strong>EXPERIMENTAL</strong> Domain Controller
1995 will act like an NT Workstation (with a local SAM database) or an NT PDC
1996 (with a Domain SAM database) respectively, without the need for any of
1997 the map files at all.  If you <strong>want</strong> to get fancy, however, you can.
1998 <p><br>Note that adding an entry to map an arbitrary NT group in an arbitrary
1999 Domain to an arbitrary UNIX group <em>REQUIRES</em> the following:
2000 <p><br><ul>
2001 <p><br><li > that the UNIX group exists on the UNIX server.
2002 <p><br><li > that the NT Domain Group exists in the specified NT Domain
2003 <p><br><li > that the UNIX Server knows about the specified Domain; 
2004 <p><br><li > that all the UNIX users (who are expecting to access the Samba
2005 Server as the correct NT user and with the correct NT group permissions)
2006 in the UNIX group be mapped to the correct NT Domain users in the specified
2007 NT Domain using <a href="smb.conf.5.html#domainusermap"><strong>'domain user map'</strong></a>.
2008 <p><br></ul>
2009 <p><br>Failure to meet any of these requirements may result in either (or
2010 both) errors reported in the log files or (and) incorrect or missing
2011 access rights granted to users.
2012 <p><br><a name="localmaster"></a>
2013 <li><strong><strong>local master (G)</strong></strong>
2014 <p><br>This option allows <a href="nmbd.8.html"><strong>nmbd</strong></a> to try and become a
2015 local master browser on a subnet. If set to False then
2016 <a href="nmbd.8.html"><strong>nmbd</strong></a> will not attempt to become a local master
2017 browser on a subnet and will also lose in all browsing elections. By
2018 default this value is set to true. Setting this value to true doesn't
2019 mean that Samba will <em>become</em> the local master browser on a subnet,
2020 just that <a href="nmbd.8.html"><strong>nmbd</strong></a> will <em>participate</em> in
2021 elections for local master browser.
2022 <p><br>Setting this value to False will cause <a href="nmbd.8.html"><strong>nmbd</strong></a>
2023 <em>never</em> to become a local master browser.
2024 <p><br><strong>Default:</strong>
2025 <code>  local master = yes</code>
2026 <p><br><a name="lockdir"></a>
2027 <li><strong><strong>lock dir (G)</strong></strong>
2028 <p><br>Synonym for <a href="smb.conf.5.html#lockdirectory"><strong>"lock directory"</strong></a>.
2029 <p><br><a name="lockdirectory"></a>
2030 <li><strong><strong>lock directory (G)</strong></strong>
2031 <p><br>This option specifies the directory where lock files will be placed.
2032 The lock files are used to implement the <a href="smb.conf.5.html#maxconnections"><strong>"max
2033 connections"</strong></a> option.
2034 <p><br><strong>Default:</strong>
2035 <code>  lock directory = /tmp/samba</code>
2036 <p><br><strong>Example:</strong>
2037 <code>  lock directory = /usr/local/samba/var/locks</code>
2038 <p><br><a name="locking"></a>
2039 <li><strong><strong>locking (S)</strong></strong>
2040 <p><br>This controls whether or not locking will be performed by the server
2041 in response to lock requests from the client.
2042 <p><br>If <code>"locking = no"</code>, all lock and unlock requests will appear to
2043 succeed and all lock queries will indicate that the queried lock is
2044 clear.
2045 <p><br>If <code>"locking = yes"</code>, real locking will be performed by the server.
2046 <p><br>This option <em>may</em> be useful for read-only filesystems which <em>may</em>
2047 not need locking (such as cdrom drives), although setting this
2048 parameter of <code>"no"</code> is not really recommended even in this case.
2049 <p><br>Be careful about disabling locking either globally or in a specific
2050 service, as lack of locking may result in data corruption. You should
2051 never need to set this parameter.
2052 <p><br><strong>Default:</strong>
2053 <code>  locking = yes</code>
2054 <p><br><strong>Example:</strong>
2055 <code>  locking = no</code>
2056 <p><br><a name="logfile"></a>
2057 <li><strong><strong>log file (G)</strong></strong>
2058 <p><br>This options allows you to override the name of the Samba log file
2059 (also known as the debug file).
2060 <p><br>This option takes the standard substitutions, allowing you to have
2061 separate log files for each user or machine.
2062 <p><br><strong>Example:</strong>
2063 <code>  log file = /usr/local/samba/var/log.%m</code>
2064 <p><br><a name="loglevel"></a>
2065 <li><strong><strong>log level (G)</strong></strong>
2066 <p><br>Synonym for <a href="smb.conf.5.html#debuglevel"><strong>"debug level"</strong></a>.
2067 <p><br><a name="logondrive"></a>
2068 <li><strong><strong>logon drive (G)</strong></strong>
2069 <p><br>This parameter specifies the local path to which the home directory
2070 will be connected (see <a href="smb.conf.5.html#logonhome"><strong>"logon home"</strong></a>) and is only
2071 used by NT Workstations. 
2072 <p><br>Note that this option is only useful if Samba is set up as a
2073 <a href="smb.conf.5.html#domainlogons"><strong>logon server</strong></a>.
2074 <p><br><strong>Example:</strong>
2075 <code>  logon drive = h:</code>
2076 <p><br><a name="logonhome"></a>
2077 <li><strong><strong>logon home (G)</strong></strong>
2078 <p><br>This parameter specifies the home directory location when a Win95/98 or
2079 NT Workstation logs into a Samba PDC.  It allows you to do 
2080 <p><br><code>"NET USE H: /HOME"</code>
2081 <p><br>from a command prompt, for example.
2082 <p><br>This option takes the standard substitutions, allowing you to have
2083 separate logon scripts for each user or machine.
2084 <p><br>Note that this option is only useful if Samba is set up as a
2085 <a href="smb.conf.5.html#domainlogons"><strong>logon server</strong></a>.
2086 <p><br><strong>Example:</strong>
2087 <code>  logon home = "\\remote_smb_server\%U"</code>
2088 <p><br><strong>Default:</strong>
2089 <code>  logon home = "\\%N\%U"</code>
2090 <p><br><a name="logonpath"></a>
2091 <li><strong><strong>logon path (G)</strong></strong>
2092 <p><br>This parameter specifies the home directory where roaming profiles
2093 (USER.DAT / USER.MAN files for Windows 95/98) are stored.
2094 <p><br>This option takes the standard substitutions, allowing you to have
2095 separate logon scripts for each user or machine.  It also specifies
2096 the directory from which the <code>"desktop"</code>, <code>"start menu"</code>,
2097 <code>"network neighborhood"</code> and <code>"programs"</code> folders, and their
2098 contents, are loaded and displayed on your Windows 95/98 client.
2099 <p><br>The share and the path must be readable by the user for the
2100 preferences and directories to be loaded onto the Windows 95/98
2101 client.  The share must be writeable when the logs in for the first
2102 time, in order that the Windows 95/98 client can create the user.dat
2103 and other directories.
2104 <p><br>Thereafter, the directories and any of the contents can, if required, be
2105 made read-only.  It is not advisable that the USER.DAT file be made
2106 read-only - rename it to USER.MAN to achieve the desired effect (a
2107 <em>MAN</em>datory profile).
2108 <p><br>Windows clients can sometimes maintain a connection to the [homes]
2109 share, even though there is no user logged in.  Therefore, it is vital
2110 that the logon path does not include a reference to the homes share
2111 (i.e. setting this parameter to <code>\\%N\HOMES\profile_path</code> will cause
2112 problems).
2113 <p><br>This option takes the standard substitutions, allowing you to have
2114 separate logon scripts for each user or machine.
2115 <p><br>Note that this option is only useful if Samba is set up as a
2116 <a href="smb.conf.5.html#domainlogons"><strong>logon server</strong></a>.
2117 <p><br><strong>Default:</strong>
2118 <code>  logon path = \\%N\%U\profile</code>
2119 <p><br><strong>Example:</strong>
2120 <code>  logon path = \\PROFILESERVER\HOME_DIR\%U\PROFILE</code>
2121 <p><br><a name="logonscript"></a>
2122 <li><strong><strong>logon script (G)</strong></strong>
2123 <p><br>This parameter specifies the batch file (.bat) or NT command file
2124 (.cmd) to be downloaded and run on a machine when a user successfully
2125 logs in.  The file must contain the DOS style cr/lf line endings.
2126 Using a DOS-style editor to create the file is recommended.
2127 <p><br>The script must be a relative path to the <code>[netlogon]</code> service.  If
2128 the <code>[netlogon]</code> service specifies a <a href="smb.conf.5.html#path"><strong>path</strong></a> of
2129 /usr/local/samba/netlogon, and logon script = STARTUP.BAT, then the
2130 file that will be downloaded is:
2131 <p><br><code>/usr/local/samba/netlogon/STARTUP.BAT</code>
2132 <p><br>The contents of the batch file is entirely your choice.  A suggested
2133 command would be to add <code>NET TIME \\SERVER /SET /YES</code>, to force every
2134 machine to synchronize clocks with the same time server.  Another use
2135 would be to add <code>NET USE U: \\SERVER\UTILS</code> for commonly used
2136 utilities, or <code>NET USE Q: \\SERVER\ISO9001_QA</code> for example.
2137 <p><br>Note that it is particularly important not to allow write access to
2138 the <code>[netlogon]</code> share, or to grant users write permission on the
2139 batch files in a secure environment, as this would allow the batch
2140 files to be arbitrarily modified and security to be breached.
2141 <p><br>This option takes the standard substitutions, allowing you to have
2142 separate logon scripts for each user or machine.
2143 <p><br>Note that this option is only useful if Samba is set up as a
2144 <a href="smb.conf.5.html#domainlogons"><strong>logon server</strong></a>.
2145 <p><br><strong>Example:</strong>
2146 <code>  logon script = scripts\%U.bat</code>
2147 <p><br><a name="lppausecommand"></a>
2148 <li><strong><strong>lppause command (S)</strong></strong>
2149 <p><br>This parameter specifies the command to be executed on the server host
2150 in order to stop printing or spooling a specific print job.
2151 <p><br>This command should be a program or script which takes a printer name
2152 and job number to pause the print job. One way of implementing this is
2153 by using job priorities, where jobs having a too low priority won't be
2154 sent to the printer.
2155 <p><br>If a <code>"%p"</code> is given then the printername is put in its place. A
2156 <code>"%j"</code> is replaced with the job number (an integer).  On HPUX (see
2157 <a href="smb.conf.5.html#printing"><strong>printing=hpux</strong></a>), if the <code>"-p%p"</code> option is added
2158 to the lpq command, the job will show up with the correct status,
2159 i.e. if the job priority is lower than the set fence priority it will
2160 have the PAUSED status, whereas if the priority is equal or higher it
2161 will have the SPOOLED or PRINTING status.
2162 <p><br>Note that it is good practice to include the absolute path in the
2163 lppause command as the PATH may not be available to the server.
2164 <p><br>See also the <a href="smb.conf.5.html#printing"><strong>"printing"</strong></a> parameter.
2165 <p><br><strong>Default:</strong>
2166         Currently no default value is given to this string, unless the
2167 value of the <a href="smb.conf.5.html#printing"><strong>"printing"</strong></a> parameter is <code>SYSV</code>, in
2168 which case the default is :
2169 <p><br><code>   lp -i %p-%j -H hold</code>
2170 <p><br>or if the value of the <a href="smb.conf.5.html#printing"><strong>"printing"</strong></a> parameter is <code>softq</code>,
2171 then the default is:
2172 <p><br><code>   qstat -s -j%j -h</code>
2173 <p><br><strong>Example for HPUX:</strong>
2174         lppause command = /usr/bin/lpalt %p-%j -p0
2175 <p><br><a name="lpqcachetime"></a>
2176 <li><strong><strong>lpq cache time (G)</strong></strong>
2177 <p><br>This controls how long lpq info will be cached for to prevent the
2178 <strong>lpq</strong> command being called too often. A separate cache is kept for
2179 each variation of the <strong>lpq</strong> command used by the system, so if you
2180 use different <strong>lpq</strong> commands for different users then they won't
2181 share cache information.
2182 <p><br>The cache files are stored in <code>/tmp/lpq.xxxx</code> where xxxx is a hash of
2183 the <strong>lpq</strong> command in use.
2184 <p><br>The default is 10 seconds, meaning that the cached results of a
2185 previous identical <strong>lpq</strong> command will be used if the cached data is
2186 less than 10 seconds old. A large value may be advisable if your
2187 <strong>lpq</strong> command is very slow.
2188 <p><br>A value of 0 will disable caching completely.
2189 <p><br>See also the <a href="smb.conf.5.html#printing"><strong>"printing"</strong></a> parameter.
2190 <p><br><strong>Default:</strong>
2191 <code>  lpq cache time = 10</code>
2192 <p><br><strong>Example:</strong>
2193 <code>  lpq cache time = 30</code>
2194 <p><br><a name="lpqcommand"></a>
2195 <li><strong><strong>lpq command (S)</strong></strong>
2196 <p><br>This parameter specifies the command to be executed on the server host
2197 in order to obtain <code>"lpq"</code>-style printer status information.
2198 <p><br>This command should be a program or script which takes a printer name
2199 as its only parameter and outputs printer status information.
2200 <p><br>Currently eight styles of printer status information are supported;
2201 BSD, AIX, LPRNG, PLP, SYSV, HPUX, QNX and SOFTQ. This covers most UNIX
2202 systems. You control which type is expected using the
2203 <a href="smb.conf.5.html#printing"><strong>"printing ="</strong></a> option.
2204 <p><br>Some clients (notably Windows for Workgroups) may not correctly send
2205 the connection number for the printer they are requesting status
2206 information about. To get around this, the server reports on the first
2207 printer service connected to by the client. This only happens if the
2208 connection number sent is invalid.
2209 <p><br>If a <code>%p</code> is given then the printername is put in its place. Otherwise
2210 it is placed at the end of the command.
2211 <p><br>Note that it is good practice to include the absolute path in the <strong>lpq
2212 command</strong> as the PATH may not be available to the server.
2213 <p><br>See also the <a href="smb.conf.5.html#printing"><strong>"printing"</strong></a> parameter.
2214 <p><br><strong>Default:</strong>
2215 <code>        depends on the setting of printing =</code>
2216 <p><br><strong>Example:</strong>
2217 <code>  lpq command = /usr/bin/lpq %p</code>
2218 <p><br><a name="lpresumecommand"></a>
2219 <li><strong><strong>lpresume command (S)</strong></strong>
2220 <p><br>This parameter specifies the command to be executed on the server host
2221 in order to restart or continue printing or spooling a specific print
2222 job.
2223 <p><br>This command should be a program or script which takes a printer name
2224 and job number to resume the print job. See also the <a href="smb.conf.5.html#lppausecommand"><strong>"lppause
2225 command"</strong></a> parameter.
2226 <p><br>If a <code>%p</code> is given then the printername is put in its place. A
2227 <code>%j</code> is replaced with the job number (an integer).
2228 <p><br>Note that it is good practice to include the absolute path in the <strong>lpresume
2229 command</strong> as the PATH may not be available to the server.
2230 <p><br>See also the <a href="smb.conf.5.html#printing"><strong>"printing"</strong></a> parameter.
2231 <p><br><strong>Default:</strong>
2232 <p><br>Currently no default value is given to this string, unless the
2233 value of the <a href="smb.conf.5.html#printing"><strong>"printing"</strong></a> parameter is <code>SYSV</code>, in
2234 which case the default is :
2235 <p><br><code>   lp -i %p-%j -H resume</code>
2236 <p><br>or if the value of the <a href="smb.conf.5.html#printing"><strong>"printing"</strong></a> parameter is <code>softq</code>,
2237 then the default is:
2238 <p><br><code>   qstat -s -j%j -r</code>
2239 <p><br><strong>Example for HPUX:</strong>
2240 <code>        lpresume command = /usr/bin/lpalt %p-%j -p2</code>
2241 <p><br><a name="lprmcommand"></a>
2242 <li><strong><strong>lprm command (S)</strong></strong>
2243 <p><br>This parameter specifies the command to be executed on the server host
2244 in order to delete a print job.
2245 <p><br>This command should be a program or script which takes a printer name
2246 and job number, and deletes the print job.
2247 <p><br>If a <code>%p</code> is given then the printername is put in its place. A
2248 <code>%j</code> is replaced with the job number (an integer).
2249 <p><br>Note that it is good practice to include the absolute path in the
2250 <strong>lprm command</strong> as the PATH may not be available to the server.
2251 <p><br>See also the <a href="smb.conf.5.html#printing"><strong>"printing"</strong></a> parameter.
2252 <p><br><strong>Default:</strong>
2253 <code>  depends on the setting of "printing ="</code>
2254 <p><br><strong>Example 1:</strong>
2255 <code>  lprm command = /usr/bin/lprm -P%p %j</code>
2256 <p><br><strong>Example 2:</strong>
2257 <code>  lprm command = /usr/bin/cancel %p-%j</code>
2258 <p><br><a name="machinepasswordtimeout"></a>
2259 <li><strong><strong>machine password timeout (G)</strong></strong>
2260 <p><br>If a Samba server is a member of an Windows NT Domain (see the
2261 <a href="smb.conf.5.html#securityequaldomain"><strong>"security=domain"</strong></a>) parameter) then
2262 periodically a running <a href="smbd.8.html"><strong>smbd</strong></a> process will try and
2263 change the <strong>MACHINE ACCOUNT PASWORD</strong> stored in the file called
2264 <code>&lt;Domain&gt;.&lt;Machine&gt;.mac</code> where <code>&lt;Domain&gt;</code> is the name of the
2265 Domain we are a member of and <code>&lt;Machine&gt;</code> is the primary
2266 <a href="smb.conf.5.html#netbiosname"><strong>"NetBIOS name"</strong></a> of the machine
2267 <a href="smbd.8.html"><strong>smbd</strong></a> is running on. This parameter specifies how
2268 often this password will be changed, in seconds. The default is one
2269 week (expressed in seconds), the same as a Windows NT Domain member
2270 server.
2271 <p><br>See also <a href="smbpasswd.8.html"><strong>smbpasswd (8)</strong></a>, and the
2272 <a href="smb.conf.5.html#securityequaldomain"><strong>"security=domain"</strong></a>) parameter.
2273 <p><br><strong>Default:</strong>
2274 <code>  machine password timeout = 604800</code>
2275 <p><br><a name="magicoutput"></a>
2276 <li><strong><strong>magic output (S)</strong></strong>
2277 <p><br>This parameter specifies the name of a file which will contain output
2278 created by a magic script (see the <a href="smb.conf.5.html#magicscript"><strong>"magic
2279 script"</strong></a> parameter below).
2280 <p><br>Warning: If two clients use the same <a href="smb.conf.5.html#magicscript"><strong>"magic
2281 script"</strong></a> in the same directory the output file content
2282 is undefined.
2283 <p><br><strong>Default:</strong>
2284 <code>  magic output = &lt;magic script name&gt;.out</code>
2285 <p><br><strong>Example:</strong>
2286 <code>  magic output = myfile.txt</code>
2287 <p><br><a name="magicscript"></a>
2288 <li><strong><strong>magic script (S)</strong></strong>
2289 <p><br>This parameter specifies the name of a file which, if opened, will be
2290 executed by the server when the file is closed. This allows a UNIX
2291 script to be sent to the Samba host and executed on behalf of the
2292 connected user.
2293 <p><br>Scripts executed in this way will be deleted upon completion,
2294 permissions permitting.
2295 <p><br>If the script generates output, output will be sent to the file
2296 specified by the <a href="smb.conf.5.html#magicoutput"><strong>"magic output"</strong></a> parameter (see
2297 above).
2298 <p><br>Note that some shells are unable to interpret scripts containing
2299 carriage-return-linefeed instead of linefeed as the end-of-line
2300 marker. Magic scripts must be executable <em>"as is"</em> on the host,
2301 which for some hosts and some shells will require filtering at the DOS
2302 end.
2303 <p><br>Magic scripts are <em>EXPERIMENTAL</em> and should <em>NOT</em> be relied upon.
2304 <p><br><strong>Default:</strong>
2305 <code>  None. Magic scripts disabled.</code>
2306 <p><br><strong>Example:</strong>
2307 <code>  magic script = user.csh</code>
2308 <p><br><a name="manglecase"></a>
2309 <li><strong><strong>mangle case (S)</strong></strong>
2310 <p><br>See the section on <a href="smb.conf.5.html#NAMEMANGLING"><strong>"NAME MANGLING"</strong></a>.
2311 <p><br><a name="mangledmap"></a>
2312 <li><strong><strong>mangled map (S)</strong></strong>
2313 <p><br>This is for those who want to directly map UNIX file names which can
2314 not be represented on Windows/DOS.  The mangling of names is not always
2315 what is needed.  In particular you may have documents with file
2316 extensions that differ between DOS and UNIX. For example, under UNIX
2317 it is common to use <code>".html"</code> for HTML files, whereas under
2318 Windows/DOS <code>".htm"</code> is more commonly used.
2319 <p><br>So to map <code>"html"</code> to <code>"htm"</code> you would use:
2320 <p><br><code>  mangled map = (*.html *.htm)</code>
2321 <p><br>One very useful case is to remove the annoying <code>";1"</code> off the ends
2322 of filenames on some CDROMS (only visible under some UNIXs). To do
2323 this use a map of (*;1 *).
2324 <p><br><strong>default:</strong>
2325 <code>  no mangled map</code>
2326 <p><br><strong>Example:</strong>
2327 <code>  mangled map = (*;1 *)</code>
2328 <p><br><a name="manglednames"></a>
2329 <li><strong><strong>mangled names (S)</strong></strong>
2330 <p><br>This controls whether non-DOS names under UNIX should be mapped to
2331 DOS-compatible names ("mangled") and made visible, or whether non-DOS
2332 names should simply be ignored.
2333 <p><br>See the section on <a href="smb.conf.5.html#NAMEMANGLING"><strong>"NAME MANGLING"</strong></a> for details
2334 on how to control the mangling process.
2335 <p><br>If mangling is used then the mangling algorithm is as follows:
2336 <p><br><ul>
2337 <p><br><li > The first (up to) five alphanumeric characters before the
2338 rightmost dot of the filename are preserved, forced to upper case, and
2339 appear as the first (up to) five characters of the mangled name.
2340 <p><br><li > A tilde <code>"~"</code> is appended to the first part of the mangled
2341 name, followed by a two-character unique sequence, based on the
2342 original root name (i.e., the original filename minus its final
2343 extension). The final extension is included in the hash calculation
2344 only if it contains any upper case characters or is longer than three
2345 characters.
2346 <p><br>Note that the character to use may be specified using the
2347 <a href="smb.conf.5.html#manglingchar"><strong>"mangling char"</strong></a> option, if you don't like
2348 <code>'~'</code>.
2349 <p><br><li > The first three alphanumeric characters of the final extension
2350 are preserved, forced to upper case and appear as the extension of the
2351 mangled name. The final extension is defined as that part of the
2352 original filename after the rightmost dot. If there are no dots in the
2353 filename, the mangled name will have no extension (except in the case
2354 of <a href="smb.conf.5.html#hidefiles"><strong>"hidden files"</strong></a> - see below).
2355 <p><br><li > Files whose UNIX name begins with a dot will be presented as DOS
2356 hidden files. The mangled name will be created as for other filenames,
2357 but with the leading dot removed and <code>"___"</code> as its extension regardless
2358 of actual original extension (that's three underscores).
2359 <p><br></ul>
2360 <p><br>The two-digit hash value consists of upper case alphanumeric
2361 characters.
2362 <p><br>This algorithm can cause name collisions only if files in a directory
2363 share the same first five alphanumeric characters. The probability of
2364 such a clash is 1/1300.
2365 <p><br>The name mangling (if enabled) allows a file to be copied between UNIX
2366 directories from Windows/DOS while retaining the long UNIX
2367 filename. UNIX files can be renamed to a new extension from
2368 Windows/DOS and will retain the same basename. Mangled names do not
2369 change between sessions.
2370 <p><br><strong>Default:</strong>
2371 <code>  mangled names = yes</code>
2372 <p><br><strong>Example:</strong>
2373 <code>  mangled names = no</code>
2374 <p><br><a name="manglingchar"></a>
2375 <li><strong><strong>mangling char (S)</strong></strong>
2376 <p><br>This controls what character is used as the <em>"magic"</em> character in
2377 <a href="smb.conf.5.html#manglednames"><strong>name mangling</strong></a>. The default is a <code>'~'</code> but
2378 this may interfere with some software. Use this option to set it to
2379 whatever you prefer.
2380 <p><br><strong>Default:</strong>
2381 <code>  mangling char = ~</code>
2382 <p><br><strong>Example:</strong>
2383 <code>  mangling char = ^</code>
2384 <p><br><a name="mangledstack"></a>
2385 <li><strong><strong>mangled stack (G)</strong></strong>
2386 <p><br>This parameter controls the number of mangled names that should be
2387 cached in the Samba server <a href="smbd.8.html"><strong>smbd</strong></a>.
2388 <p><br>This stack is a list of recently mangled base names (extensions are
2389 only maintained if they are longer than 3 characters or contains upper
2390 case characters).
2391 <p><br>The larger this value, the more likely it is that mangled names can be
2392 successfully converted to correct long UNIX names. However, large
2393 stack sizes will slow most directory access. Smaller stacks save
2394 memory in the server (each stack element costs 256 bytes).
2395 <p><br>It is not possible to absolutely guarantee correct long file names, so
2396 be prepared for some surprises!
2397 <p><br><strong>Default:</strong>
2398 <code>  mangled stack = 50</code>
2399 <p><br><strong>Example:</strong>
2400 <code>  mangled stack = 100</code>
2401 <p><br><a name="maparchive"></a>
2402 <li><strong><strong>map archive (S)</strong></strong>
2403 <p><br>This controls whether the DOS archive attribute should be mapped to
2404 the UNIX owner execute bit.  The DOS archive bit is set when a file
2405 has been modified since its last backup.  One motivation for this
2406 option it to keep Samba/your PC from making any file it touches from
2407 becoming executable under UNIX.  This can be quite annoying for shared
2408 source code, documents, etc...
2409 <p><br>Note that this requires the <a href="smb.conf.5.html#createmask"><strong>"create mask"</strong></a>
2410 parameter to be set such that owner execute bit is not masked out
2411 (i.e. it must include 100). See the parameter <a href="smb.conf.5.html#createmask"><strong>"create
2412 mask"</strong></a> for details.
2413 <p><br><strong>Default:</strong>
2414 <code>      map archive = yes</code>
2415 <p><br><strong>Example:</strong>
2416 <code>      map archive = no</code>
2417 <p><br><a name="maphidden"></a>
2418 <li><strong><strong>map hidden (S)</strong></strong>
2419 <p><br>This controls whether DOS style hidden files should be mapped to the
2420 UNIX world execute bit.
2421 <p><br>Note that this requires the <a href="smb.conf.5.html#createmask"><strong>"create mask"</strong></a> to be
2422 set such that the world execute bit is not masked out (i.e. it must
2423 include 001). See the parameter <a href="smb.conf.5.html#createmask"><strong>"create mask"</strong></a>
2424 for details.
2425 <p><br><strong>Default:</strong>
2426 <code>  map hidden = no</code>
2427 <p><br><strong>Example:</strong>
2428 <code>  map hidden = yes</code>
2429 <p><br><a name="mapsystem"></a>
2430 <li><strong><strong>map system (S)</strong></strong>
2431 <p><br>This controls whether DOS style system files should be mapped to the
2432 UNIX group execute bit.
2433 <p><br>Note that this requires the <a href="smb.conf.5.html#createmask"><strong>"create mask"</strong></a> to be
2434 set such that the group execute bit is not masked out (i.e. it must
2435 include 010). See the parameter <a href="smb.conf.5.html#createmask"><strong>"create mask"</strong></a>
2436 for details.
2437 <p><br><strong>Default:</strong>
2438 <code>  map system = no</code>
2439 <p><br><strong>Example:</strong>
2440 <code>  map system = yes</code>
2441 <p><br><a name="maptoguest"></a>
2442 <li><strong><strong>map to guest (G)</strong></strong>
2443 <p><br>This parameter is only useful in <a href="smb.conf.5.html#security"><strong>security</strong></a> modes
2444 other than <a href="smb.conf.5.html#securityequalshare"><strong>"security=share"</strong></a> - i.e. user,
2445 server, and domain.
2446 <p><br>This parameter can take three different values, which tell
2447 <a href="smbd.8.html"><strong>smbd</strong></a> what to do with user login requests that
2448 don't match a valid UNIX user in some way.
2449 <p><br>The three settings are :
2450 <p><br><ul>
2451 <p><br><li > <strong>"Never"</strong> - Means user login requests with an invalid password
2452 are rejected. This is the default.
2453 <p><br><li > <strong>"Bad User"</strong> - Means user logins with an invalid password are
2454 rejected, unless the username does not exist, in which case it is
2455 treated as a guest login and mapped into the <a href="smb.conf.5.html#guestaccount"><strong>"guest
2456 account"</strong></a>.
2457 <p><br><li > <strong>"Bad Password"</strong> - Means user logins with an invalid
2458 password are treated as a guest login and mapped into the
2459 <a href="smb.conf.5.html#guestaccount"><strong>"guest account"</strong></a>. Note that this can
2460 cause problems as it means that any user incorrectly typing their
2461 password will be silently logged on a <strong>"guest"</strong> - and 
2462 will not know the reason they cannot access files they think
2463 they should - there will have been no message given to them
2464 that they got their password wrong. Helpdesk services will
2465 <em>*hate*</em> you if you set the <strong>"map to guest"</strong> parameter
2466 this way :-).
2467 <p><br></ul>
2468 <p><br>Note that this parameter is needed to set up <strong>"Guest"</strong> share
2469 services when using <a href="smb.conf.5.html#security"><strong>security</strong></a> modes other than
2470 share. This is because in these modes the name of the resource being
2471 requested is <em>*not*</em> sent to the server until after the server has
2472 successfully authenticated the client so the server cannot make
2473 authentication decisions at the correct time (connection to the
2474 share) for <strong>"Guest"</strong> shares.
2475 <p><br>For people familiar with the older Samba releases, this parameter
2476 maps to the old compile-time setting of the GUEST_SESSSETUP value
2477 in local.h.
2478 <p><br><strong>Default:</strong>
2479 <code>  map to guest = Never</code>
2480   <strong>Example</strong>:
2481 <code>  map to guest = Bad User</code>
2482 <p><br><a name="maxconnections"></a>
2483 <li><strong><strong>max connections (S)</strong></strong>
2484 <p><br>This option allows the number of simultaneous connections to a service
2485 to be limited. If <strong>"max connections"</strong> is greater than 0 then
2486 connections will be refused if this number of connections to the
2487 service are already open. A value of zero mean an unlimited number of
2488 connections may be made.
2489 <p><br>Record lock files are used to implement this feature. The lock files
2490 will be stored in the directory specified by the <a href="smb.conf.5.html#lockdirectory"><strong>"lock
2491 directory"</strong></a> option.
2492 <p><br><strong>Default:</strong>
2493 <code>  max connections = 0</code>
2494 <p><br><strong>Example:</strong>
2495 <code>  max connections = 10</code>
2496 <p><br><a name="maxdisksize"></a>
2497 <li><strong><strong>max disk size (G)</strong></strong>
2498 <p><br>This option allows you to put an upper limit on the apparent size of
2499 disks. If you set this option to 100 then all shares will appear to be
2500 not larger than 100 MB in size.
2501 <p><br>Note that this option does not limit the amount of data you can put on
2502 the disk. In the above case you could still store much more than 100
2503 MB on the disk, but if a client ever asks for the amount of free disk
2504 space or the total disk size then the result will be bounded by the
2505 amount specified in <strong>"max disk size"</strong>.
2506 <p><br>This option is primarily useful to work around bugs in some pieces of
2507 software that can't handle very large disks, particularly disks over
2508 1GB in size.
2509 <p><br>A <strong>"max disk size"</strong> of 0 means no limit.
2510 <p><br><strong>Default:</strong>
2511 <code>  max disk size = 0</code>
2512 <p><br><strong>Example:</strong>
2513 <code>  max disk size = 1000</code>
2514 <p><br><a name="maxlogsize"></a>
2515 <li><strong><strong>max log size (G)</strong></strong>
2516 <p><br>This option (an integer in kilobytes) specifies the max size the log
2517 file should grow to. Samba periodically checks the size and if it is
2518 exceeded it will rename the file, adding a <code>".old"</code> extension.
2519 <p><br>A size of 0 means no limit.
2520 <p><br><strong>Default:</strong>
2521 <code>  max log size = 5000</code>
2522 <p><br><strong>Example:</strong>
2523 <code>  max log size = 1000</code>
2524 <p><br><a name="maxmux"></a>
2525 <li><strong><strong>max mux (G)</strong></strong>
2526 <p><br>This option controls the maximum number of outstanding simultaneous
2527 SMB operations that samba tells the client it will allow. You should
2528 never need to set this parameter.
2529 <p><br><strong>Default:</strong>
2530 <code>  max mux = 50</code>
2531 <p><br><a name="maxopenfiles"></a>
2532 <li><strong><strong>maxopenfiles (G)</strong></strong>
2533 <p><br>This parameter limits the maximum number of open files that one
2534 <a href="smbd.8.html"><strong>smbd</strong></a> file serving process may have open for
2535 a client at any one time. The default for this parameter is set
2536 very high (10,000) as Samba uses only one bit per unopened file.
2537 <p><br>The limit of the number of open files is usually set by the
2538 UNIX per-process file descriptor limit rather than this parameter
2539 so you should never need to touch this parameter.
2540 <p><br><strong>Default:</strong>
2541 <code>  max open files = 10000</code>
2542 <p><br><a name="maxpacket"></a>
2543 <li><strong><strong>max packet (G)</strong></strong>
2544 <p><br>Synonym for <a name="<strong>"packetsize"</strong>"></a>(packetsize).
2545 <p><br><a name="maxttl"></a>
2546 <li><strong><strong>max ttl (G)</strong></strong>
2547 <p><br>This option tells <a href="nmbd.8.html"><strong>nmbd</strong></a> what the default 'time
2548 to live' of NetBIOS names should be (in seconds) when
2549 <a href="nmbd.8.html"><strong>nmbd</strong></a> is requesting a name using either a
2550 broadcast packet or from a WINS server. You should never need to
2551 change this parameter. The default is 3 days.
2552 <p><br><strong>Default:</strong>
2553 <code>  max ttl = 259200</code>
2554 <p><br><a name="maxwinsttl"></a>
2555 <li><strong><strong>max wins ttl (G)</strong></strong>
2556 <p><br>This option tells <a href="nmbd.8.html"><strong>nmbd</strong></a> when acting as a WINS
2557 server <a href="smb.conf.5.html#winssupport"><strong>(wins support =true)</strong></a> what the maximum
2558 'time to live' of NetBIOS names that <a href="nmbd.8.html"><strong>nmbd</strong></a> will
2559 grant will be (in seconds). You should never need to change this
2560 parameter.  The default is 6 days (518400 seconds).
2561 <p><br>See also the <a href="smb.conf.5.html#minwinsttl"><strong>"min wins ttl"</strong></a> parameter.
2562 <p><br><strong>Default:</strong>
2563 <code>        max wins ttl = 518400</code>
2564 <p><br><a name="maxxmit"></a>
2565 <li><strong><strong>max xmit (G)</strong></strong>
2566 <p><br>This option controls the maximum packet size that will be negotiated
2567 by Samba. The default is 65535, which is the maximum. In some cases
2568 you may find you get better performance with a smaller value. A value
2569 below 2048 is likely to cause problems.
2570 <p><br><strong>Default:</strong>
2571 <code>  max xmit = 65535</code>
2572 <p><br><strong>Example:</strong>
2573 <code>  max xmit = 8192</code>
2574 <p><br><a name="messagecommand"></a>
2575 <li><strong><strong>message command (G)</strong></strong>
2576 <p><br>This specifies what command to run when the server receives a WinPopup
2577 style message.
2578 <p><br>This would normally be a command that would deliver the message
2579 somehow. How this is to be done is up to your imagination.
2580 <p><br>An example is:
2581 <p><br><code>   message command = csh -c 'xedit %s;rm %s' &amp;</code>
2582 <p><br>This delivers the message using <strong>xedit</strong>, then removes it
2583 afterwards. <em>NOTE THAT IT IS VERY IMPORTANT THAT THIS COMMAND RETURN
2584 IMMEDIATELY</em>. That's why I have the <code>'&amp;'</code> on the end. If it doesn't
2585 return immediately then your PCs may freeze when sending messages
2586 (they should recover after 30secs, hopefully).
2587 <p><br>All messages are delivered as the global guest user. The command takes
2588 the standard substitutions, although <a href="smb.conf.5.html#percentu"><strong>%u</strong></a> won't work
2589 (<a href="smb.conf.5.html#percentU"><strong>%U</strong></a> may be better in this case).
2590 <p><br>Apart from the standard substitutions, some additional ones apply. In
2591 particular:
2592 <p><br><ul>
2593 <p><br><li > <code>"%s"</code> = the filename containing the message.
2594 <p><br><li > <code>"%t"</code> = the destination that the message was sent to (probably the server
2595 name).
2596 <p><br><li > <code>"%f"</code> = who the message is from.
2597 <p><br></ul>
2598 <p><br>You could make this command send mail, or whatever else takes your
2599 fancy. Please let us know of any really interesting ideas you have.
2600 <p><br>Here's a way of sending the messages as mail to root:
2601 <p><br><code>message command = /bin/mail -s 'message from %f on %m' root &lt; %s; rm %s</code>
2602 <p><br>If you don't have a message command then the message won't be
2603 delivered and Samba will tell the sender there was an
2604 error. Unfortunately WfWg totally ignores the error code and carries
2605 on regardless, saying that the message was delivered.
2606 <p><br>If you want to silently delete it then try:
2607 <p><br><code>"message command = rm %s"</code>.
2608 <p><br><strong>Default:</strong>
2609 <code>  no message command</code>
2610 <p><br><strong>Example:</strong>
2611 <code>        message command = csh -c 'xedit %s;rm %s' &amp;</code>
2612 <p><br><a name="minprintspace"></a>
2613 <li><strong><strong>min print space (S)</strong></strong>
2614 <p><br>This sets the minimum amount of free disk space that must be available
2615 before a user will be able to spool a print job. It is specified in
2616 kilobytes. The default is 0, which means a user can always spool a print
2617 job.
2618 <p><br>See also the <a href="smb.conf.5.html#printing"><strong>printing</strong></a> parameter.
2619 <p><br><strong>Default:</strong>
2620 <code>  min print space = 0</code>
2621 <p><br><strong>Example:</strong>
2622 <code>  min print space = 2000</code>
2623 <p><br><a name="minwinsttl"></a>
2624 <li><strong><strong>min wins ttl (G)</strong></strong>
2625 <p><br>This option tells <a href="nmbd.8.html"><strong>nmbd</strong></a> when acting as a WINS
2626 server <a href="smb.conf.5.html#winssupport"><strong>(wins support = true)</strong></a> what the minimum
2627 'time to live' of NetBIOS names that <a href="nmbd.8.html"><strong>nmbd</strong></a> will
2628 grant will be (in seconds). You should never need to change this
2629 parameter.  The default is 6 hours (21600 seconds).
2630 <p><br><strong>Default:</strong>
2631 <code>  min wins ttl = 21600</code>
2632 <p><br><a name="nameresolveorder"></a>
2633 <li><strong><strong>name resolve order (G)</strong></strong>
2634 <p><br>This option is used by the programs in the Samba suite to determine
2635 what naming services and in what order to resolve host names to IP
2636 addresses. The option takes a space separated string of different name
2637 resolution options.
2638 <p><br>The options are :"lmhosts", "host", "wins" and "bcast". They cause
2639 names to be resolved as follows :
2640 <p><br><ul>
2641 <p><br><li > <strong>lmhosts</strong> : Lookup an IP address in the Samba lmhosts file.
2642 <p><br><li > <strong>host</strong> : Do a standard host name to IP address resolution,
2643 using the system /etc/hosts, NIS, or DNS lookups. This method of name
2644 resolution is operating system depended for instance on IRIX or
2645 Solaris this may be controlled by the <em>/etc/nsswitch.conf</em> file).
2646 <p><br><li > <strong>wins</strong> : Query a name with the IP address listed in the
2647 <a href="smb.conf.5.html#winsserver"><strong>wins server</strong></a> parameter. If no WINS server has
2648 been specified this method will be ignored.
2649 <p><br><li > <strong>bcast</strong> : Do a broadcast on each of the known local interfaces
2650 listed in the <a href="smb.conf.5.html#interfaces"><strong>interfaces</strong></a> parameter. This is the
2651 least reliable of the name resolution methods as it depends on the
2652 target host being on a locally connected subnet.
2653 <p><br></ul>
2654 <p><br><strong>Default:</strong>
2655 <code>  name resolve order = lmhosts host wins bcast</code>
2656 <p><br><strong>Example:</strong>
2657 <code>  name resolve order = lmhosts bcast host</code>
2658 <p><br>This will cause the local lmhosts file to be examined first, followed
2659 by a broadcast attempt, followed by a normal system hostname lookup.
2660 <p><br><a name="netbiosaliases"></a>
2661 <li><strong><strong>netbios aliases (G)</strong></strong>
2662 <p><br>This is a list of NetBIOS names that <a href="nmbd.8.html"><strong>nmbd</strong></a> will
2663 advertise as additional names by which the Samba server is known. This
2664 allows one machine to appear in browse lists under multiple names. If
2665 a machine is acting as a <a href="smb.conf.5.html#localmaster"><strong>browse server</strong></a> or
2666 <a href="smb.conf.5.html#domainlogons"><strong>logon server</strong></a> none of these names will be
2667 advertised as either browse server or logon servers, only the primary
2668 name of the machine will be advertised with these capabilities.
2669 <p><br>See also <a href="smb.conf.5.html#netbiosname"><strong>"netbios name"</strong></a>.
2670 <p><br><strong>Default:</strong>
2671 <code>  empty string (no additional names)</code>
2672 <p><br><strong>Example:</strong>
2673 <code>  netbios aliases = TEST TEST1 TEST2</code>
2674 <p><br><a name="netbiosname"></a>
2675 <li><strong><strong>netbios name (G)</strong></strong>
2676 <p><br>This sets the NetBIOS name by which a Samba server is known. By
2677 default it is the same as the first component of the host's DNS name.
2678 If a machine is a <a href="smb.conf.5.html#localmaster"><strong>browse server</strong></a> or
2679 <a href="smb.conf.5.html#domainlogons"><strong>logon server</strong></a> this name (or the first component
2680 of the hosts DNS name) will be the name that these services are
2681 advertised under.
2682 <p><br>See also <a href="smb.conf.5.html#netbiosaliases"><strong>"netbios aliases"</strong></a>.
2683 <p><br><strong>Default:</strong>
2684 <code>  Machine DNS name.</code>
2685 <p><br><strong>Example:</strong>
2686 <code>  netbios name = MYNAME</code>
2687 <p><br><a name="nishomedir"></a>
2688 <li><strong><strong>nis homedir (G)</strong></strong>
2689 <p><br>Get the home share server from a NIS map. For UNIX systems that use an
2690 automounter, the user's home directory will often be mounted on a
2691 workstation on demand from a remote server. 
2692 <p><br>When the Samba logon server is not the actual home directory server,
2693 but is mounting the home directories via NFS then two network hops
2694 would be required to access the users home directory if the logon
2695 server told the client to use itself as the SMB server for home
2696 directories (one over SMB and one over NFS). This can be very
2697 slow.
2698 <p><br>This option allows Samba to return the home share as being on a
2699 different server to the logon server and as long as a Samba daemon is
2700 running on the home directory server, it will be mounted on the Samba
2701 client directly from the directory server. When Samba is returning the
2702 home share to the client, it will consult the NIS map specified in
2703 <a href="smb.conf.5.html#homedirmap"><strong>"homedir map"</strong></a> and return the server listed
2704 there.
2705 <p><br>Note that for this option to work there must be a working NIS
2706 system and the Samba server with this option must also be a
2707 <a href="smb.conf.5.html#domainlogons"><strong>logon server</strong></a>.
2708 <p><br><strong>Default:</strong>
2709 <code>  nis homedir = false</code>
2710 <p><br><strong>Example:</strong>
2711 <code>  nis homedir = true</code>
2712 <p><br><a name="ntpipesupport"></a>
2713 <li><strong><strong>nt pipe support (G)</strong></strong>
2714 <p><br>This boolean parameter controls whether <a href="smbd.8.html"><strong>smbd</strong></a>
2715 will allow Windows NT clients to connect to the NT SMB specific
2716 <code>IPC$</code> pipes. This is a developer debugging option and can be left
2717 alone.
2718 <p><br><strong>Default:</strong>
2719 <code>  nt pipe support = yes</code>
2720 <p><br><a name="ntsmbsupport"></a>
2721 <li><strong><strong>nt smb support (G)</strong></strong>
2722 <p><br>This boolean parameter controls whether <a href="smbd.8.html"><strong>smbd</strong></a>
2723 will negotiate NT specific SMB support with Windows NT
2724 clients. Although this is a developer debugging option and should be
2725 left alone, benchmarking has discovered that Windows NT clients give
2726 faster performance with this option set to <code>"no"</code>. This is still
2727 being investigated. If this option is set to <code>"no"</code> then Samba
2728 offers exactly the same SMB calls that versions prior to Samba2.0
2729 offered. This information may be of use if any users are having
2730 problems with NT SMB support.
2731 <p><br><strong>Default:</strong>
2732 <code>  nt support = yes</code>
2733 <p><br><a name="nullpasswords"></a>
2734 <li><strong><strong>null passwords (G)</strong></strong>
2735 <p><br>Allow or disallow client access to accounts that have null passwords. 
2736 <p><br>See also <a href="smbpasswd.5.html"><strong>smbpasswd (5)</strong></a>.
2737 <p><br><strong>Default:</strong>
2738 <code>  null passwords = no</code>
2739 <p><br><strong>Example:</strong>
2740 <code>  null passwords = yes</code>
2741 <p><br><a name="olelockingcompatibility"></a>
2742 <li><strong><strong>ole locking compatibility (G)</strong></strong>
2743 <p><br>This parameter allows an administrator to turn off the byte range lock
2744 manipulation that is done within Samba to give compatibility for OLE
2745 applications. Windows OLE applications use byte range locking as a
2746 form of inter-process communication, by locking ranges of bytes around
2747 the 2^32 region of a file range. This can cause certain UNIX lock
2748 managers to crash or otherwise cause problems. Setting this parameter
2749 to <code>"no"</code> means you trust your UNIX lock manager to handle such cases
2750 correctly.
2751 <p><br><strong>Default:</strong>
2752 <code>  ole locking compatibility = yes</code>
2753 <p><br><strong>Example:</strong>
2754 <code>  ole locking compatibility = no</code>
2755 <p><br><a name="onlyguest"></a>
2756 <li><strong><strong>only guest (S)</strong></strong>
2757 <p><br>A synonym for <a href="smb.conf.5.html#guestonly"><strong>"guest only"</strong></a>.
2758 <p><br><a name="onlyuser"></a>
2759 <li><strong><strong>only user (S)</strong></strong>
2760 <p><br>This is a boolean option that controls whether connections with
2761 usernames not in the <a href="smb.conf.5.html#user"><strong>user=</strong></a> list will be allowed. By
2762 default this option is disabled so a client can supply a username to
2763 be used by the server.
2764 <p><br>Note that this also means Samba won't try to deduce usernames from the
2765 service name. This can be annoying for the <a href="smb.conf.5.html#homes"><strong>[homes]</strong></a>
2766 section. To get around this you could use "<a href="smb.conf.5.html#user"><strong>user</strong></a> =
2767 <a href="smb.conf.5.html#percentS"><strong>%S</strong></a>" which means your <a href="smb.conf.5.html#user"><strong>"user"</strong></a> list
2768 will be just the service name, which for home directories is the name
2769 of the user.
2770 <p><br>See also the <a href="smb.conf.5.html#user"><strong>user</strong></a> parameter.
2771 <p><br><strong>Default:</strong>
2772 <code>  only user = False</code>
2773 <p><br><strong>Example:</strong>
2774 <code>  only user = True</code>
2775 <p><br><a name="oplocks"></a>
2776 <li><strong><strong>oplocks (S)</strong></strong>
2777 <p><br>This boolean option tells smbd whether to issue oplocks (opportunistic
2778 locks) to file open requests on this share. The oplock code can
2779 dramatically (approx. 30% or more) improve the speed of access to files
2780 on Samba servers. It allows the clients to aggressively cache files
2781 locally and you may want to disable this option for unreliable network
2782 environments (it is turned on by default in Windows NT Servers).  For
2783 more information see the file Speed.txt in the Samba docs/ directory.
2784 <p><br>Oplocks may be selectively turned off on certain files on a per share basis.
2785 See the 'veto oplock files' parameter. On some systems oplocks are recognized
2786 by the underlying operating system. This allows data synchronization between
2787 all access to oplocked files, whether it be via Samba or NFS or a local
2788 UNIX process. See the <a href="smb.conf.5.html#kerneloplocks"><strong>kernel oplocks</strong></a> parameter
2789 for details.
2790 <p><br><strong>Default:</strong>
2791 <code>  oplocks = True</code>
2792 <p><br><strong>Example:</strong>
2793 <code>  oplocks = False</code>
2794 <p><br><a name="oslevel"></a>
2795 <li><strong><strong>os level (G)</strong></strong>
2796 <p><br>This integer value controls what level Samba advertises itself as for
2797 browse elections. The value of this parameter determines whether
2798 <a href="nmbd.8.html"><strong>nmbd</strong></a> has a chance of becoming a local master
2799 browser for the <a href="smb.conf.5.html#workgroup"><strong>WORKGROUP</strong></a> in the local broadcast
2800 area. Setting this to zero will cause <a href="nmbd.8.html"><strong>nmbd</strong></a> to
2801 always lose elections to Windows machines. See BROWSING.txt in the
2802 Samba docs/ directory for details.
2803 <p><br><strong>Default:</strong>
2804 <code>  os level = 32</code>
2805 <p><br><strong>Example:</strong>
2806 <code>  os level = 65    ; This will win against any NT Server</code>
2807 <p><br><a name="packetsize"></a>
2808 <li><strong><strong>packet size (G)</strong></strong>
2809 <p><br>This is a deprecated parameter that how no effect on the current
2810 Samba code. It is left in the parameter list to prevent breaking
2811 old <strong>smb.conf</strong> files.
2812 <p><br><a name="panicaction"></a>
2813 <li><strong><strong>panic action (G)</strong></strong>
2814 <p><br>This is a Samba developer option that allows a system command to be
2815 called when either <a href="smbd.8.html"><strong>smbd</strong></a> or
2816 <a href="nmbd.8.html"><strong>nmbd</strong></a> crashes. This is usually used to draw
2817 attention to the fact that a problem occurred.
2818 <p><br><strong>Default:</strong>
2819 <code>  panic action = &lt;empty string&gt;</code>
2820 <p><br><a name="passwdchat"></a>
2821 <li><strong><strong>passwd chat (G)</strong></strong>
2822 <p><br>This string controls the <em>"chat"</em> conversation that takes places
2823 between <a href="smbd.8.html"><strong>smbd</strong></a> and the local password changing
2824 program to change the users password. The string describes a sequence
2825 of response-receive pairs that <a href="smbd.8.html"><strong>smbd</strong></a> uses to
2826 determine what to send to the <a href="smb.conf.5.html#passwdprogram"><strong>passwd</strong></a> program
2827 and what to expect back. If the expected output is not received then
2828 the password is not changed.
2829 <p><br>This chat sequence is often quite site specific, depending on what
2830 local methods are used for password control (such as NIS etc).
2831 <p><br>The string can contain the macros <code>"%o"</code> and <code>"%n"</code> which are
2832 substituted for the old and new passwords respectively. It can also
2833 contain the standard macros <code>"\n"</code>, <code>"\r"</code>, <code>"\t"</code> and <code>"\s"</code>
2834 to give line-feed, carriage-return, tab and space.
2835 <p><br>The string can also contain a <code>'*'</code> which matches any sequence of
2836 characters.
2837 <p><br>Double quotes can be used to collect strings with spaces in them into
2838 a single string.
2839 <p><br>If the send string in any part of the chat sequence is a fullstop
2840 <code>"."</code>  then no string is sent. Similarly, is the expect string is a
2841 fullstop then no string is expected.
2842 <p><br>Note that if the <a href="smb.conf.5.html#unixpasswordsync"><strong>"unix password sync"</strong></a>
2843 parameter is set to true, then this sequence is called <em>*AS ROOT*</em>
2844 when the SMB password in the smbpasswd file is being changed, without
2845 access to the old password cleartext. In this case the old password
2846 cleartext is set to <code>""</code> (the empty string).
2847 <p><br>See also <a href="smb.conf.5.html#unixpasswordsync"><strong>"unix password sync"</strong></a>,
2848 <a href="smb.conf.5.html#passwdprogram"><strong>"passwd program"</strong></a> and <a href="smb.conf.5.html#passwdchatdebug"><strong>"passwd chat
2849 debug"</strong></a>.
2850 <p><br><strong>Example:</strong> 
2851 <pre>
2852  passwd chat = "*Enter OLD password*" %o\n "*Enter NEW password*" %n\n "*Reenter NEW password*" %n\n "*Password changed*"
2853
2854 </pre>
2855
2856 <p><br><strong>Default:</strong>
2857 <pre>
2858        passwd chat = *old*password* %o\n *new*password* %n\n *new*password* %n\n *changed*
2859 </pre>
2860
2861 <p><br><a name="passwdchatdebug"></a>
2862 <li><strong><strong>passwd chat debug (G)</strong></strong>
2863 <p><br>This boolean specifies if the passwd chat script parameter is run in
2864 <code>"debug"</code> mode. In this mode the strings passed to and received from
2865 the passwd chat are printed in the <a href="smbd.8.html"><strong>smbd</strong></a> log with
2866 a <a href="smb.conf.5.html#debuglevel"><strong>"debug level"</strong></a> of 100. This is a dangerous
2867 option as it will allow plaintext passwords to be seen in the
2868 <a href="smbd.8.html"><strong>smbd</strong></a> log. It is available to help Samba admins
2869 debug their <a href="smb.conf.5.html#passwdchat"><strong>"passwd chat"</strong></a> scripts when calling
2870 the <a href="smb.conf.5.html#passwdprogram"><strong>"passwd program"</strong></a> and should be turned off
2871 after this has been done. This parameter is off by default.
2872 <p><br>See also <a href="smb.conf.5.html#passwdchat"><strong>"passwd chat"</strong></a>, <a href="smb.conf.5.html#passwdprogram"><strong>"passwd
2873 program"</strong></a>.
2874 <p><br><strong>Example:</strong>
2875 <code>     passwd chat debug = True</code>
2876 <p><br><strong>Default:</strong>
2877 <code>     passwd chat debug = False</code>
2878 <p><br><a name="passwdprogram"></a>
2879 <li><strong><strong>passwd program (G)</strong></strong>
2880 <p><br>The name of a program that can be used to set UNIX user passwords.
2881 Any occurrences of <a href="smb.conf.5.html#percentu"><strong>%u</strong></a> will be replaced with the
2882 user name. The user name is checked for existence before calling the
2883 password changing program.
2884 <p><br>Also note that many passwd programs insist in <em>"reasonable"</em>
2885 passwords, such as a minimum length, or the inclusion of mixed case
2886 chars and digits. This can pose a problem as some clients (such as
2887 Windows for Workgroups) uppercase the password before sending it.
2888 <p><br><em>Note</em> that if the <a href="smb.conf.5.html#unixpasswordsync"><strong>"unix password sync"</strong></a>
2889 parameter is set to <code>"True"</code> then this program is called <em>*AS
2890 ROOT*</em> before the SMB password in the
2891 <a href="smbpasswd.5.html"><strong>smbpasswd</strong></a> file is changed. If this UNIX
2892 password change fails, then <a href="smbd.8.html"><strong>smbd</strong></a> will fail to
2893 change the SMB password also (this is by design).
2894 <p><br>If the <a href="smb.conf.5.html#unixpasswordsync"><strong>"unix password sync"</strong></a> parameter is
2895 set this parameter <em>MUST USE ABSOLUTE PATHS</em> for <em>ALL</em> programs
2896 called, and must be examined for security implications. Note that by
2897 default <a href="smb.conf.5.html#unixpasswordsync"><strong>"unix password sync"</strong></a> is set to
2898 <code>"False"</code>.
2899 <p><br>See also <a href="smb.conf.5.html#unixpasswordsync"><strong>"unix password sync"</strong></a>.
2900 <p><br><strong>Default:</strong>
2901 <code>  passwd program = /bin/passwd</code>
2902 <p><br><strong>Example:</strong>
2903 <code>  passwd program = /sbin/passwd %u</code>
2904 <p><br><a name="passwordlevel"></a>
2905 <li><strong><strong>password level (G)</strong></strong>
2906 <p><br>Some client/server combinations have difficulty with mixed-case
2907 passwords.  One offending client is Windows for Workgroups, which for
2908 some reason forces passwords to upper case when using the LANMAN1
2909 protocol, but leaves them alone when using COREPLUS!
2910 <p><br>This parameter defines the maximum number of characters that may be
2911 upper case in passwords.
2912 <p><br>For example, say the password given was <code>"FRED"</code>. If <strong>password
2913 level</strong> is set to 1, the following combinations would be tried if
2914 <code>"FRED"</code> failed:
2915 <p><br><code>"Fred"</code>, <code>"fred"</code>, <code>"fRed"</code>, <code>"frEd"</code>, <code>"freD"</code>
2916 <p><br>If <strong>password level</strong> was set to 2, the following combinations would
2917 also be tried: 
2918 <p><br><code>"FRed"</code>, <code>"FrEd"</code>, <code>"FreD"</code>, <code>"fREd"</code>, <code>"fReD"</code>,
2919 <code>"frED"</code>, <code>..</code>
2920 <p><br>And so on.
2921 <p><br>The higher value this parameter is set to the more likely it is that a
2922 mixed case password will be matched against a single case
2923 password. However, you should be aware that use of this parameter
2924 reduces security and increases the time taken to process a new
2925 connection.
2926 <p><br>A value of zero will cause only two attempts to be made - the password
2927 as is and the password in all-lower case.
2928 <p><br><strong>Default:</strong>
2929 <code>  password level = 0</code>
2930 <p><br><strong>Example:</strong>
2931 <code>  password level = 4</code>
2932 <p><br><a name="passwordserver"></a>
2933 <li><strong><strong>password server (G)</strong></strong>
2934 <p><br>By specifying the name of another SMB server (such as a WinNT box)
2935 with this option, and using <a href="smb.conf.5.html#security"><strong>"security = domain"</strong></a> or
2936 <a href="smb.conf.5.html#security"><strong>"security = server"</strong></a> you can get Samba to do all
2937 its username/password validation via a remote server.
2938 <p><br>This options sets the name of the password server to use. It must be a
2939 NetBIOS name, so if the machine's NetBIOS name is different from its
2940 internet name then you may have to add its NetBIOS name to the lmhosts 
2941 file which is stored in the same directory as the <strong>smb.conf</strong> file.
2942 <p><br>The name of the password server is looked up using the parameter
2943 <a href="smb.conf.5.html#nameresolveorder"><strong>"name resolve order="</strong></a> and so may resolved
2944 by any method and order described in that parameter.
2945 <p><br>The password server much be a machine capable of using the "LM1.2X002"
2946 or the "LM NT 0.12" protocol, and it must be in user level security
2947 mode. 
2948 <p><br>NOTE: Using a password server means your UNIX box (running Samba) is
2949 only as secure as your password server. <em>DO NOT CHOOSE A PASSWORD
2950 SERVER THAT YOU DON'T COMPLETELY TRUST</em>.
2951 <p><br>Never point a Samba server at itself for password serving. This will
2952 cause a loop and could lock up your Samba server!
2953 <p><br>The name of the password server takes the standard substitutions, but
2954 probably the only useful one is <a href="smb.conf.5.html#percentm"><strong>%m</strong></a>, which means
2955 the Samba server will use the incoming client as the password
2956 server. If you use this then you better trust your clients, and you
2957 better restrict them with hosts allow!
2958 <p><br>If the <a href="smb.conf.5.html#security"><strong>"security"</strong></a> parameter is set to
2959 <strong>"domain"</strong>, then the list of machines in this option must be a list
2960 of Primary or Backup Domain controllers for the
2961 <a href="smb.conf.5.html#workgroup"><strong>Domain</strong></a>, as the Samba server is cryptographicly
2962 in that domain, and will use cryptographicly authenticated RPC calls
2963 to authenticate the user logging on. The advantage of using
2964 <a href="smb.conf.5.html#securityequaldomain"><strong>"security=domain"</strong></a> is that if you list
2965 several hosts in the <strong>"password server"</strong> option then
2966 <a href="smbd.8.html"><strong>smbd</strong></a> will try each in turn till it finds one
2967 that responds. This is useful in case your primary server goes down.
2968 <p><br>If the <a href="smb.conf.5.html#security"><strong>"security"</strong></a> parameter is set to
2969 <a href="smb.conf.5.html#securityequalserver"><strong>"server"</strong></a>, then there are different
2970 restrictions that <a href="smb.conf.5.html#securityequaldomain"><strong>"security=domain"</strong></a>
2971 doesn't suffer from:
2972 <p><br><ul>
2973 <p><br><li > You may list several password servers in the <strong>"password server"</strong>
2974 parameter, however if an <a href="smbd.8.html"><strong>smbd</strong></a> makes a connection
2975 to a password server, and then the password server fails, no more
2976 users will be able to be authenticated from this
2977 <a href="smbd.8.html"><strong>smbd</strong></a>.  This is a restriction of the SMB/CIFS
2978 protocol when in <a href="smb.conf.5.html#securityequalserver"><strong>"security=server"</strong></a> mode
2979 and cannot be fixed in Samba.
2980 <p><br><li > If you are using a Windows NT server as your password server then
2981 you will have to ensure that your users are able to login from the
2982 Samba server, as when in
2983 <a href="smb.conf.5.html#securityequalserver"><strong>"security=server"</strong></a> mode the network
2984 logon will appear to come from there rather than from the users
2985 workstation.
2986 <p><br></ul>
2987 <p><br>See also the <a href="smb.conf.5.html#security"><strong>"security"</strong></a> parameter.
2988 <p><br><strong>Default:</strong>
2989 <code>  password server = &lt;empty string&gt;</code>
2990 <p><br><strong>Example:</strong>
2991 <code>  password server = NT-PDC, NT-BDC1, NT-BDC2</code>
2992 <p><br><a name="path"></a>
2993 <li><strong><strong>path (S)</strong></strong>
2994 <p><br>This parameter specifies a directory to which the user of the service
2995 is to be given access. In the case of printable services, this is
2996 where print data will spool prior to being submitted to the host for
2997 printing.
2998 <p><br>For a printable service offering guest access, the service should be
2999 readonly and the path should be world-writeable and have the sticky bit
3000 set. This is not mandatory of course, but you probably won't get the
3001 results you expect if you do otherwise.
3002 <p><br>Any occurrences of <a href="smb.conf.5.html#percentu"><strong>%u</strong></a> in the path will be replaced
3003 with the UNIX username that the client is using on this
3004 connection. Any occurrences of <a href="smb.conf.5.html#percentm"><strong>%m</strong></a> will be replaced
3005 by the NetBIOS name of the machine they are connecting from. These
3006 replacements are very useful for setting up pseudo home directories
3007 for users.
3008 <p><br>Note that this path will be based on <a href="smb.conf.5.html#rootdir"><strong>"root dir"</strong></a> if
3009 one was specified.
3010 <p><br><strong>Default:</strong>
3011 <code>  none</code>
3012 <p><br><strong>Example:</strong>
3013 <code>  path = /home/fred</code>
3014 <p><br><a name="postexec"></a>
3015 <li><strong><strong>postexec (S)</strong></strong>
3016 <p><br>This option specifies a command to be run whenever the service is
3017 disconnected. It takes the usual substitutions. The command may be run
3018 as the root on some systems.
3019 <p><br>An interesting example may be do unmount server resources:
3020 <p><br><code>postexec = /etc/umount /cdrom</code>
3021 <p><br>See also <a href="smb.conf.5.html#preexec"><strong>preexec</strong></a>.
3022 <p><br><strong>Default:</strong>
3023 <code>      none (no command executed)</code>
3024 <p><br><strong>Example:</strong>
3025 <code>      postexec = echo "%u disconnected from %S from %m (%I)" &gt;&gt; /tmp/log</code>
3026 <p><br><a name="postscript"></a>
3027 <li><strong><strong>postscript (S)</strong></strong>
3028 <p><br>This parameter forces a printer to interpret the print files as
3029 postscript. This is done by adding a <code>%!</code> to the start of print output.
3030 <p><br>This is most useful when you have lots of PCs that persist in putting
3031 a control-D at the start of print jobs, which then confuses your
3032 printer.
3033 <p><br><strong>Default:</strong>
3034 <code>  postscript = False</code>
3035 <p><br><strong>Example:</strong>
3036 <code>  postscript = True</code>
3037 <p><br><a name="preexec"></a>
3038 <li><strong><strong>preexec (S)</strong></strong>
3039 <p><br>This option specifies a command to be run whenever the service is
3040 connected to. It takes the usual substitutions.
3041 <p><br>An interesting example is to send the users a welcome message every
3042 time they log in. Maybe a message of the day? Here is an example:
3043 <p><br><pre>
3044
3045         preexec = csh -c 'echo \"Welcome to %S!\" | /usr/local/samba/bin/smbclient -M %m -I %I' &amp;
3046
3047 </pre>
3048
3049 <p><br>Of course, this could get annoying after a while :-)
3050 <p><br>See also <a href="smb.conf.5.html#postexec"><strong>postexec</strong></a>.
3051 <p><br><strong>Default:</strong>
3052 <code>  none (no command executed)</code>
3053 <p><br><strong>Example:</strong>
3054 <code>        preexec = echo \"%u connected to %S from %m (%I)\" &gt;&gt; /tmp/log</code>
3055 <p><br><a name="preferredmaster"></a>
3056 <li><strong><strong>preferred master (G)</strong></strong>
3057 <p><br>This boolean parameter controls if <a href="nmbd.8.html"><strong>nmbd</strong></a> is a
3058 preferred master browser for its workgroup.
3059 <p><br>If this is set to true, on startup, <a href="nmbd.8.html"><strong>nmbd</strong></a> will
3060 force an election, and it will have a slight advantage in winning the
3061 election.  It is recommended that this parameter is used in
3062 conjunction with <a href="smb.conf.5.html#domainmaster"><strong>"domain master = yes"</strong></a>, so
3063 that <a href="nmbd.8.html"><strong>nmbd</strong></a> can guarantee becoming a domain
3064 master. Indeed the default ("auto") enables "preferred master" if
3065 Samba is configured as the domain master browser.
3066 <p><br>Use this option with caution, because if there are several hosts
3067 (whether Samba servers, Windows 95 or NT) that are preferred master
3068 browsers on the same subnet, they will each periodically and
3069 continuously attempt to become the local master browser.  This will
3070 result in unnecessary broadcast traffic and reduced browsing
3071 capabilities.
3072 <p><br>See also <a href="smb.conf.5.html#oslevel"><strong>os level</strong></a>.
3073 <p><br><strong>Default:</strong>
3074 <code>  preferred master = auto</code>
3075 <p><br><strong>Example:</strong>
3076 <code>  preferred master = yes</code>
3077 <p><br><a name="preferedmaster"></a>
3078 <li><strong><strong>prefered master (G)</strong></strong>
3079 <p><br>Synonym for <a href="smb.conf.5.html#preferredmaster"><strong>"preferred master"</strong></a> for people
3080 who cannot spell :-).
3081 <p><br><a name="preload"></a>
3082 <li><strong><strong>preload</strong></strong>
3083 Synonym for <a href="smb.conf.5.html#autoservices"><strong>"auto services"</strong></a>.
3084 <p><br><a name="preservecase"></a>
3085 <li><strong><strong>preserve case (S)</strong></strong>
3086 <p><br>This controls if new filenames are created with the case that the
3087 client passes, or if they are forced to be the <code>"default"</code> case.
3088 <p><br><strong>Default:</strong>
3089 <code>       preserve case = yes</code>
3090 <p><br>See the section on <a href="smb.conf.5.html#NAMEMANGLING"><strong>"NAME MANGLING"</strong></a> for a
3091 fuller discussion.
3092 <p><br><a name="printcommand"></a>
3093 <li><strong><strong>print command (S)</strong></strong>
3094 <p><br>After a print job has finished spooling to a service, this command
3095 will be used via a <code>system()</code> call to process the spool
3096 file. Typically the command specified will submit the spool file to
3097 the host's printing subsystem, but there is no requirement that this
3098 be the case. The server will not remove the spool file, so whatever
3099 command you specify should remove the spool file when it has been
3100 processed, otherwise you will need to manually remove old spool files.
3101 <p><br>The print command is simply a text string. It will be used verbatim,
3102 with two exceptions: All occurrences of <code>"%s"</code> will be replaced by
3103 the appropriate spool file name, and all occurrences of <code>"%p"</code> will
3104 be replaced by the appropriate printer name. The spool file name is
3105 generated automatically by the server, the printer name is discussed
3106 below.
3107 <p><br>The full path name will be used for the filename if <code>"%s"</code> is not
3108 preceded by a <code>'/'</code>. If you don't like this (it can stuff up some
3109 lpq output) then use <code>"%f"</code> instead. Any occurrences of <code>"%f"</code> get
3110 replaced by the spool filename without the full path at the front.
3111 <p><br>The print command <em>MUST</em> contain at least one occurrence of <code>"%s"</code>
3112 or <code>"%f"</code> - the <code>"%p"</code> is optional. At the time a job is
3113 submitted, if no printer name is supplied the <code>"%p"</code> will be
3114 silently removed from the printer command.
3115 <p><br>If specified in the <a href="smb.conf.5.html#global"><strong>"[global]"</strong></a> section, the print
3116 command given will be used for any printable service that does not
3117 have its own print command specified.
3118 <p><br>If there is neither a specified print command for a printable service
3119 nor a global print command, spool files will be created but not
3120 processed and (most importantly) not removed.
3121 <p><br>Note that printing may fail on some UNIXs from the <code>"nobody"</code>
3122 account. If this happens then create an alternative guest account that
3123 can print and set the <a href="smb.conf.5.html#guestaccount"><strong>"guest account"</strong></a> in the
3124 <a href="smb.conf.5.html#global"><strong>"[global]"</strong></a> section.
3125 <p><br>You can form quite complex print commands by realizing that they are
3126 just passed to a shell. For example the following will log a print
3127 job, print the file, then remove it. Note that <code>';'</code> is the usual
3128 separator for command in shell scripts.
3129 <p><br><code>print command = echo Printing %s &gt;&gt; /tmp/print.log; lpr -P %p %s; rm %s</code>
3130 <p><br>You may have to vary this command considerably depending on how you
3131 normally print files on your system. The default for the parameter
3132 varies depending on the setting of the <a href="smb.conf.5.html#printing"><strong>"printing="</strong></a>
3133 parameter.
3134 <p><br><strong>Default:</strong>
3135         For <a href="smb.conf.5.html#printing"><strong>"printing="</strong></a> BSD, AIX, QNX, LPRNG or PLP :
3136 <code>  print command = lpr -r -P%p %s</code>
3137 <p><br>For <a href="smb.conf.5.html#printing"><strong>"printing="</strong></a> SYS or HPUX :
3138 <code>  print command = lp -c -d%p %s; rm %s</code>
3139 <p><br>For <a href="smb.conf.5.html#printing"><strong>"printing="</strong></a> SOFTQ :
3140 <code>  print command = lp -d%p -s %s; rm %s</code>
3141 <p><br><strong>Example:</strong>
3142 <code>  print command = /usr/local/samba/bin/myprintscript %p %s</code>
3143 <p><br><a name="printok"></a>
3144 <li><strong><strong>print ok (S)</strong></strong>
3145 <p><br>Synonym for <a href="smb.conf.5.html#printable"><strong>printable</strong></a>.
3146 <p><br><a name="printable"></a>
3147 <li><strong><strong>printable (S)</strong></strong>
3148 <p><br>If this parameter is <code>"yes"</code>, then clients may open, write to and
3149 submit spool files on the directory specified for the service.
3150 <p><br>Note that a printable service will ALWAYS allow writing to the service
3151 path (user privileges permitting) via the spooling of print data. The
3152 <a href="smb.conf.5.html#readonly"><strong>"read only"</strong></a> parameter controls only non-printing
3153 access to the resource.
3154 <p><br><strong>Default:</strong>
3155 <code>  printable = no</code>
3156 <p><br><strong>Example:</strong>
3157 <code>  printable = yes</code>
3158 <p><br><a name="printcap"></a>
3159 <li><strong><strong>printcap (G)</strong></strong>
3160 <p><br>Synonym for <a href="smb.conf.5.html#printcapname"><strong>printcapname</strong></a>.
3161 <p><br><a name="printcapname"></a>
3162 <li><strong><strong>printcap name (G)</strong></strong>
3163 <p><br>This parameter may be used to override the compiled-in default
3164 printcap name used by the server (usually /etc/printcap). See the
3165 discussion of the <a href="smb.conf.5.html#printers"><strong>[printers]</strong></a> section above for
3166 reasons why you might want to do this.
3167 <p><br>On System V systems that use <strong>lpstat</strong> to list available printers you
3168 can use <code>"printcap name = lpstat"</code> to automatically obtain lists of
3169 available printers. This is the default for systems that define SYSV
3170 at configure time in Samba (this includes most System V based
3171 systems). If <strong>"printcap name"</strong> is set to <strong>lpstat</strong> on these systems
3172 then Samba will launch <code>"lpstat -v"</code> and attempt to parse the output
3173 to obtain a printer list.
3174 <p><br>A minimal printcap file would look something like this:
3175 <p><br><pre>
3176
3177         print1|My Printer 1
3178         print2|My Printer 2
3179         print3|My Printer 3
3180         print4|My Printer 4
3181         print5|My Printer 5
3182
3183 </pre>
3184
3185 <p><br>where the <code>'|'</code> separates aliases of a printer. The fact that the
3186 second alias has a space in it gives a hint to Samba that it's a
3187 comment.
3188 <p><br><em>NOTE</em>: Under AIX the default printcap name is
3189 <code>"/etc/qconfig"</code>. Samba will assume the file is in AIX <code>"qconfig"</code>
3190 format if the string <code>"/qconfig"</code> appears in the printcap filename.
3191 <p><br><strong>Default:</strong>
3192 <code>  printcap name = /etc/printcap</code>
3193 <p><br><strong>Example:</strong>
3194 <code>  printcap name = /etc/myprintcap</code>
3195 <p><br><a name="printer"></a>
3196 <li><strong><strong>printer (S)</strong></strong>
3197 <p><br>This parameter specifies the name of the printer to which print jobs
3198 spooled through a printable service will be sent.
3199 <p><br>If specified in the <a href="smb.conf.5.html#global"><strong>[global]</strong></a> section, the printer
3200 name given will be used for any printable service that does not have
3201 its own printer name specified.
3202 <p><br><strong>Default:</strong>
3203         none (but may be <code>"lp"</code> on many systems)
3204 <p><br><strong>Example:</strong>
3205         printer name = laserwriter
3206 <p><br><a name="printerdriver"></a>
3207 <li><strong><strong>printer driver (S)</strong></strong>
3208 <p><br>This option allows you to control the string that clients receive when
3209 they ask the server for the printer driver associated with a
3210 printer. If you are using Windows95 or WindowsNT then you can use this
3211 to automate the setup of printers on your system.
3212 <p><br>You need to set this parameter to the exact string (case sensitive)
3213 that describes the appropriate printer driver for your system. If you
3214 don't know the exact string to use then you should first try with no
3215 <strong>"printer driver"</strong> option set and the client will give you a list of
3216 printer drivers. The appropriate strings are shown in a scrollbox
3217 after you have chosen the printer manufacturer.
3218 <p><br>See also <a href="smb.conf.5.html#printerdriverfile"><strong>"printer driver file"</strong></a>.
3219 <p><br><strong>Example:</strong>
3220         printer driver = HP LaserJet 4L
3221 <p><br><a name="printerdriverfile"></a>
3222 <li><strong><strong>printer driver file (G)</strong></strong>
3223 <p><br>This parameter tells Samba where the printer driver definition file,
3224 used when serving drivers to Windows 95 clients, is to be found. If
3225 this is not set, the default is :
3226 <p><br><code>SAMBA_INSTALL_DIRECTORY/lib/printers.def</code>
3227 <p><br>This file is created from Windows 95 <code>"msprint.def"</code> files found on
3228 the Windows 95 client system. For more details on setting up serving
3229 of printer drivers to Windows 95 clients, see the documentation file
3230 in the docs/ directory, PRINTER_DRIVER.txt.
3231 <p><br><strong>Default:</strong>
3232 <code>  None (set in compile).</code>
3233 <p><br><strong>Example:</strong>
3234 <code>  printer driver file = /usr/local/samba/printers/drivers.def</code>
3235 <p><br>See also <a href="smb.conf.5.html#printerdriverlocation"><strong>"printer driver location"</strong></a>.
3236 <p><br><a name="printerdriverlocation"></a>
3237 <li><strong><strong>printer driver location (S)</strong></strong>
3238 <p><br>This parameter tells clients of a particular printer share where to
3239 find the printer driver files for the automatic installation of
3240 drivers for Windows 95 machines. If Samba is set up to serve printer
3241 drivers to Windows 95 machines, this should be set to
3242 <p><br><code>\\MACHINE\PRINTER$</code>
3243 <p><br>Where MACHINE is the NetBIOS name of your Samba server, and PRINTER$
3244 is a share you set up for serving printer driver files. For more
3245 details on setting this up see the documentation file in the docs/
3246 directory, PRINTER_DRIVER.txt.
3247 <p><br><strong>Default:</strong>
3248 <code>  None</code>
3249 <p><br><strong>Example:</strong>
3250 <code>  printer driver location = \\MACHINE\PRINTER$</code>
3251 <p><br>See also <a href="smb.conf.5.html#printerdriverfile"><strong>"printer driver file"</strong></a>.
3252 <p><br><a name="printername"></a>
3253 <li><strong><strong>printer name (S)</strong></strong>
3254 <p><br>Synonym for <a href="smb.conf.5.html#printer"><strong>printer</strong></a>.
3255 <p><br><a name="printing"></a>
3256 <li><strong><strong>printing (S)</strong></strong>
3257 <p><br>This parameters controls how printer status information is interpreted
3258 on your system, and also affects the default values for the
3259 <a href="smb.conf.5.html#printcommand"><strong>"print command"</strong></a>, <a href="smb.conf.5.html#lpqcommand"><strong>"lpq
3260 command"</strong></a> <a href="smb.conf.5.html#lppausecommand"><strong>"lppause command"</strong></a>,
3261 <a href="smb.conf.5.html#lpresumecommand"><strong>"lpresume command"</strong></a>, and <a href="smb.conf.5.html#lprmcommand"><strong>"lprm
3262 command"</strong></a>.
3263 <p><br>Currently eight printing styles are supported. They are
3264 <strong>"printing=BSD"</strong>, <strong>"printing=AIX"</strong>, <strong>"printing=LPRNG"</strong>,
3265 <strong>"printing=PLP"</strong>,
3266 <strong>"printing=SYSV"</strong>,<strong>"printing="HPUX"</strong>,<strong>"printing=QNX"</strong> and
3267 <strong>"printing=SOFTQ"</strong>.
3268 <p><br>To see what the defaults are for the other print commands when using
3269 these three options use the <a href="testparm.1.html"><strong>"testparm"</strong></a> program.
3270 <p><br>This option can be set on a per printer basis
3271 <p><br>See also the discussion in the <a href="smb.conf.5.html#printers"><strong>[printers]</strong></a> section.
3272 <p><br><a name="protocol"></a>
3273 <li><strong><strong>protocol (G)</strong></strong>
3274 <p><br>The value of the parameter (a string) is the highest protocol level
3275 that will be supported by the server.
3276 <p><br>Possible values are :
3277 <p><br><ul>
3278 <p><br><li > CORE: Earliest version. No concept of user names.
3279 <p><br><li > COREPLUS: Slight improvements on CORE for efficiency.
3280 <p><br><li > LANMAN1: First <em>"modern"</em> version of the protocol. Long
3281 filename support.
3282 <p><br><li > LANMAN2: Updates to Lanman1 protocol.
3283 <p><br><li > NT1: Current up to date version of the protocol. Used by Windows
3284 NT. Known as CIFS.
3285 <p><br></ul>
3286 <p><br>Normally this option should not be set as the automatic negotiation
3287 phase in the SMB protocol takes care of choosing the appropriate
3288 protocol.
3289 <p><br><strong>Default:</strong>
3290 <code>  protocol = NT1</code>
3291 <p><br><strong>Example:</strong>
3292 <code>  protocol = LANMAN1</code>
3293 <p><br><a name="public"></a>
3294 <li><strong><strong>public (S)</strong></strong>
3295 <p><br>Synonym for <a href="smb.conf.5.html#guestok"><strong>"guest ok"</strong></a>.
3296 <p><br><a name="queuepausecommand"></a>
3297 <li><strong><strong>queuepause command (S)</strong></strong>
3298 <p><br>This parameter specifies the command to be executed on the server host
3299 in order to pause the printerqueue.
3300 <p><br>This command should be a program or script which takes a printer name
3301 as its only parameter and stops the printerqueue, such that no longer
3302 jobs are submitted to the printer.
3303 <p><br>This command is not supported by Windows for Workgroups, but can be
3304 issued from the Printer's window under Windows 95 &amp; NT.
3305 <p><br>If a <code>"%p"</code> is given then the printername is put in its
3306 place. Otherwise it is placed at the end of the command.
3307 <p><br>Note that it is good practice to include the absolute path in the
3308 command as the PATH may not be available to the server.
3309 <p><br><strong>Default:</strong>
3310 <code>        depends on the setting of "printing ="</code>
3311 <p><br><strong>Example:</strong>
3312 <code>      queuepause command = disable %p</code>
3313 <p><br><a name="queueresumecommand"></a>
3314 <li><strong><strong>queueresume command (S)</strong></strong>
3315 <p><br>This parameter specifies the command to be executed on the server host
3316 in order to resume the printerqueue. It is the command to undo the
3317 behavior that is caused by the previous parameter
3318 (<a href="smb.conf.5.html#queuepausecommand"><strong>"queuepause command</strong></a>).
3319 <p><br>This command should be a program or script which takes a printer name
3320 as its only parameter and resumes the printerqueue, such that queued
3321 jobs are resubmitted to the printer.
3322 <p><br>This command is not supported by Windows for Workgroups, but can be
3323 issued from the Printer's window under Windows 95 &amp; NT.
3324 <p><br>If a <code>"%p"</code> is given then the printername is put in its
3325 place. Otherwise it is placed at the end of the command.
3326 <p><br>Note that it is good practice to include the absolute path in the
3327 command as the PATH may not be available to the server.
3328 <p><br><strong>Default:</strong>
3329 <code>        depends on the setting of "printing ="</code>
3330 <p><br><strong>Example:</strong>
3331 <code>      queuepause command = enable %p</code>
3332 <p><br><a name="readbmpx"></a>
3333 <li><strong><strong>read bmpx (G)</strong></strong>
3334 <p><br>This boolean parameter controls whether <a href="smbd.8.html"><strong>smbd</strong></a>
3335 will support the "Read Block Multiplex" SMB. This is now rarely used
3336 and defaults to off. You should never need to set this parameter.
3337 <p><br><strong>Default:</strong>
3338         read bmpx = No
3339 <p><br><a name="readlist"></a>
3340 <li><strong><strong>read list (S)</strong></strong>
3341 <p><br>This is a list of users that are given read-only access to a
3342 service. If the connecting user is in this list then they will not be
3343 given write access, no matter what the <a href="smb.conf.5.html#readonly"><strong>"read only"</strong></a>
3344 option is set to. The list can include group names using the syntax
3345 described in the <a href="smb.conf.5.html#invalidusers"><strong>"invalid users"</strong></a> parameter.
3346 <p><br>See also the <a href="smb.conf.5.html#writelist"><strong>"write list"</strong></a> parameter and
3347 the <a href="smb.conf.5.html#invalidusers"><strong>"invalid users"</strong></a> parameter.
3348 <p><br><strong>Default:</strong>
3349 <code>  read list = &lt;empty string&gt;</code>
3350 <p><br><strong>Example:</strong>
3351 <code>  read list = mary, @students</code>
3352 <p><br><a name="readonly"></a>
3353 <li><strong><strong>read only (S)</strong></strong>
3354 <p><br>Note that this is an inverted synonym for
3355 <a href="smb.conf.5.html#writeable"><strong>"writeable"</strong></a> and <a href="smb.conf.5.html#writeok"><strong>"write ok"</strong></a>.
3356 <p><br>See also <a href="smb.conf.5.html#writeable"><strong>"writeable"</strong></a> and <a href="smb.conf.5.html#writeok"><strong>"write
3357 ok"</strong></a>.
3358 <p><br><a name="readprediction"></a>
3359 <li><strong><strong>read prediction (G)</strong></strong>
3360 <p><br><em>NOTE</em>: This code is currently disabled in Samba2.0 and
3361 may be removed at a later date. Hence this parameter has
3362 no effect.
3363 <p><br>This options enables or disables the read prediction code used to
3364 speed up reads from the server. When enabled the server will try to
3365 pre-read data from the last accessed file that was opened read-only
3366 while waiting for packets.
3367 <p><br><strong>Default:</strong>
3368 <code>  read prediction = False</code>
3369 <p><br><a name="readraw"></a>
3370 <li><strong><strong>read raw (G)</strong></strong>
3371 <p><br>This parameter controls whether or not the server will support the raw
3372 read SMB requests when transferring data to clients.
3373 <p><br>If enabled, raw reads allow reads of 65535 bytes in one packet. This
3374 typically provides a major performance benefit.
3375 <p><br>However, some clients either negotiate the allowable block size
3376 incorrectly or are incapable of supporting larger block sizes, and for
3377 these clients you may need to disable raw reads.
3378 <p><br>In general this parameter should be viewed as a system tuning tool and left
3379 severely alone. See also <a href="smb.conf.5.html#writeraw"><strong>"write raw"</strong></a>.
3380 <p><br><strong>Default:</strong>
3381 <code>  read raw = yes</code>
3382 <p><br><a name="readsize"></a>
3383 <li><strong><strong>read size (G)</strong></strong>
3384 <p><br>The option <strong>"read size"</strong> affects the overlap of disk reads/writes
3385 with network reads/writes. If the amount of data being transferred in
3386 several of the SMB commands (currently SMBwrite, SMBwriteX and
3387 SMBreadbraw) is larger than this value then the server begins writing
3388 the data before it has received the whole packet from the network, or
3389 in the case of SMBreadbraw, it begins writing to the network before
3390 all the data has been read from disk.
3391 <p><br>This overlapping works best when the speeds of disk and network access
3392 are similar, having very little effect when the speed of one is much
3393 greater than the other.
3394 <p><br>The default value is 2048, but very little experimentation has been
3395 done yet to determine the optimal value, and it is likely that the
3396 best value will vary greatly between systems anyway. A value over
3397 65536 is pointless and will cause you to allocate memory
3398 unnecessarily.
3399 <p><br><strong>Default:</strong>
3400 <code>  read size = 2048</code>
3401 <p><br><strong>Example:</strong>
3402 <code>  read size = 8192</code>
3403 <p><br><a name="remoteannounce"></a>
3404 <li><strong><strong>remote announce (G)</strong></strong>
3405 <p><br>This option allows you to setup <a href="nmbd.8.html"><strong>nmbd</strong></a> to
3406 periodically announce itself to arbitrary IP addresses with an
3407 arbitrary workgroup name.
3408 <p><br>This is useful if you want your Samba server to appear in a remote
3409 workgroup for which the normal browse propagation rules don't
3410 work. The remote workgroup can be anywhere that you can send IP
3411 packets to.
3412 <p><br>For example:
3413 <p><br><code>   remote announce = 192.168.2.255/SERVERS 192.168.4.255/STAFF</code>
3414 <p><br>the above line would cause nmbd to announce itself to the two given IP
3415 addresses using the given workgroup names. If you leave out the
3416 workgroup name then the one given in the
3417 <a href="smb.conf.5.html#workgroup"><strong>"workgroup"</strong></a> parameter is used instead.
3418 <p><br>The IP addresses you choose would normally be the broadcast addresses
3419 of the remote networks, but can also be the IP addresses of known
3420 browse masters if your network config is that stable.
3421 <p><br>See the documentation file BROWSING.txt in the docs/ directory.
3422 <p><br><strong>Default:</strong>
3423 <code>  remote announce = &lt;empty string&gt;</code>
3424 <p><br><strong>Example:</strong>
3425 <code>  remote announce = 192.168.2.255/SERVERS 192.168.4.255/STAFF</code>
3426 <p><br><a name="remotebrowsesync"></a>
3427 <li><strong><strong>remote browse sync (G)</strong></strong>
3428 <p><br>This option allows you to setup <a href="nmbd.8.html"><strong>nmbd</strong></a> to
3429 periodically request synchronization of browse lists with the master
3430 browser of a samba server that is on a remote segment. This option
3431 will allow you to gain browse lists for multiple workgroups across
3432 routed networks. This is done in a manner that does not work with any
3433 non-samba servers.
3434 <p><br>This is useful if you want your Samba server and all local clients to
3435 appear in a remote workgroup for which the normal browse propagation
3436 rules don't work. The remote workgroup can be anywhere that you can
3437 send IP packets to.
3438 <p><br>For example:
3439 <p><br><code>   remote browse sync = 192.168.2.255 192.168.4.255</code>
3440 <p><br>the above line would cause <a href="nmbd.8.html"><strong>nmbd</strong></a> to request the
3441 master browser on the specified subnets or addresses to synchronize
3442 their browse lists with the local server.
3443 <p><br>The IP addresses you choose would normally be the broadcast addresses
3444 of the remote networks, but can also be the IP addresses of known
3445 browse masters if your network config is that stable. If a machine IP
3446 address is given Samba makes NO attempt to validate that the remote
3447 machine is available, is listening, nor that it is in fact the browse
3448 master on it's segment.
3449 <p><br><strong>Default:</strong>
3450 <code>  remote browse sync = &lt;empty string&gt;</code>
3451 <p><br><strong>Example:</strong>
3452 <code>  remote browse sync = 192.168.2.255 192.168.4.255</code>
3453 <p><br><a name="revalidate"></a>
3454 <li><strong><strong>revalidate (S)</strong></strong>
3455 <p><br>Note that this option only works with
3456 <a href="smb.conf.5.html#securityequalshare"><strong>"security=share"</strong></a> and will be ignored if
3457 this is not the case.
3458 <p><br>This option controls whether Samba will allow a previously validated
3459 username/password pair to be used to attach to a share. Thus if you
3460 connect to <code>\\server\share1</code> then to <code>\\server\share2</code> it won't
3461 automatically allow the client to request connection to the second
3462 share as the same username as the first without a password.
3463 <p><br>If <strong>"revalidate"</strong> is <code>"True"</code> then the client will be denied
3464 automatic access as the same username.
3465 <p><br><strong>Default:</strong>
3466 <code>  revalidate = False</code>
3467 <p><br><strong>Example:</strong>
3468 <code>  revalidate = True</code>
3469 <p><br><a name="root"></a>
3470 <li><strong><strong>root (G)</strong></strong>
3471 <p><br>Synonym for <a href="smb.conf.5.html#rootdirectory"><strong>"root directory"</strong></a>.
3472 <p><br><a name="rootdir"></a>
3473 <li><strong><strong>root dir (G)</strong></strong>
3474 <p><br>Synonym for <a href="smb.conf.5.html#rootdirectory"><strong>"root directory"</strong></a>.
3475 <p><br><a name="rootdirectory"></a>
3476 <li><strong><strong>root directory (G)</strong></strong>
3477 <p><br>The server will <code>"chroot()"</code> (i.e. Change it's root directory) to
3478 this directory on startup. This is not strictly necessary for secure
3479 operation. Even without it the server will deny access to files not in
3480 one of the service entries. It may also check for, and deny access to,
3481 soft links to other parts of the filesystem, or attempts to use
3482 <code>".."</code> in file names to access other directories (depending on the
3483 setting of the <a href="smb.conf.5.html#widelinks"><strong>"wide links"</strong></a> parameter).
3484 <p><br>Adding a <strong>"root directory"</strong> entry other than <code>"/"</code> adds an extra
3485 level of security, but at a price. It absolutely ensures that no
3486 access is given to files not in the sub-tree specified in the <strong>"root
3487 directory"</strong> option, <em>*including*</em> some files needed for complete
3488 operation of the server. To maintain full operability of the server
3489 you will need to mirror some system files into the <strong>"root
3490 directory"</strong> tree. In particular you will need to mirror /etc/passwd
3491 (or a subset of it), and any binaries or configuration files needed
3492 for printing (if required). The set of files that must be mirrored is
3493 operating system dependent.
3494 <p><br><strong>Default:</strong>
3495 <code>  root directory = /</code>
3496 <p><br><strong>Example:</strong>
3497 <code>  root directory = /homes/smb</code>
3498 <p><br><a name="rootpostexec"></a>
3499 <li><strong><strong>root postexec (S)</strong></strong>
3500 <p><br>This is the same as the <a href="smb.conf.5.html#postexec"><strong>"postexec"</strong></a> parameter
3501 except that the command is run as root. This is useful for unmounting
3502 filesystems (such as cdroms) after a connection is closed.
3503 <p><br>See also <a href="smb.conf.5.html#postexec"><strong>"postexec"</strong></a>.
3504 <p><br><a name="rootpreexec"></a>
3505 <li><strong><strong>root preexec (S)</strong></strong>
3506 <p><br>This is the same as the <a href="smb.conf.5.html#preexec"><strong>"preexec"</strong></a> parameter except
3507 that the command is run as root. This is useful for mounting
3508 filesystems (such as cdroms) before a connection is finalized.
3509 <p><br>See also <a href="smb.conf.5.html#preexec"><strong>"preexec"</strong></a>.
3510 <p><br><a name="security"></a>
3511 <li><strong><strong>security (G)</strong></strong>
3512 <p><br>This option affects how clients respond to Samba and is one of the most
3513 important settings in the <strong>smb.conf</strong> file.
3514 <p><br>The option sets the <code>"security mode bit"</code> in replies to protocol
3515 negotiations with <a href="smbd.8.html"><strong>smbd</strong></a> to turn share level
3516 security on or off. Clients decide based on this bit whether (and how)
3517 to transfer user and password information to the server.
3518 <p><br>The default is <a href="smb.conf.5.html#securityequaluser">"security=user"</a>, as this is
3519 the most common setting needed when talking to Windows 98 and Windows
3520 NT.
3521 <p><br>The alternatives are <a href="smb.conf.5.html#securityequalshare"><strong>"security = share"</strong></a>,
3522 <a href="smb.conf.5.html#securityequalserver"><strong>"security = server"</strong></a> or
3523 <a href="smb.conf.5.html#securityequaldomain"><strong>"security=domain"</strong></a>.
3524 <p><br><em>*****NOTE THAT THIS DEFAULT IS DIFFERENT IN SAMBA2.0 THAN FOR
3525 PREVIOUS VERSIONS OF SAMBA *******</em>.
3526 <p><br>In previous versions of Samba the default was
3527 <a href="smb.conf.5.html#securityequalshare"><strong>"security=share"</strong></a> mainly because that was
3528 the only option at one stage.
3529 <p><br>There is a bug in WfWg that has relevance to this setting. When in
3530 user or server level security a WfWg client will totally ignore the
3531 password you type in the "connect drive" dialog box. This makes it
3532 very difficult (if not impossible) to connect to a Samba service as
3533 anyone except the user that you are logged into WfWg as.
3534 <p><br>If your PCs use usernames that are the same as their usernames on the
3535 UNIX machine then you will want to use <strong>"security = user"</strong>. If you
3536 mostly use usernames that don't exist on the UNIX box then use
3537 <strong>"security = share"</strong>.
3538 <p><br>You should also use <a href="smb.conf.5.html#securityequalshare"><strong>security=share</strong></a> if
3539 you want to mainly setup shares without a password (guest
3540 shares). This is commonly used for a shared printer server. It is more
3541 difficult to setup guest shares with
3542 <a href="smb.conf.5.html#securityequaluser"><strong>security=user</strong></a>, see the <a href="smb.conf.5.html#maptoguest"><strong>"map to
3543 guest"</strong></a>parameter for details.
3544 <p><br>It is possible to use <a href="smbd.8.html"><strong>smbd</strong></a> in a <em>"hybrid
3545 mode"</em> where it is offers both user and share level security under
3546 different <a href="smb.conf.5.html#netbiosaliases"><strong>NetBIOS aliases</strong></a>. See the
3547 <a href="smb.conf.5.html#netbiosaliases"><strong>NetBIOS aliases</strong></a> and the
3548 <a href="smb.conf.5.html#include"><strong>include</strong></a> parameters for more information.
3549 <p><br>The different settings will now be explained.
3550 <p><br><ul>
3551 <p><br><a name="securityequalshare"></a>
3552 <li><strong><strong>"security=share"</strong></strong> When clients connect to a share level
3553 security server then need not log onto the server with a valid
3554 username and password before attempting to connect to a shared
3555 resource (although modern clients such as Windows 95/98 and Windows NT
3556 will send a logon request with a username but no password when talking
3557 to a <strong>security=share</strong> server). Instead, the clients send
3558 authentication information (passwords) on a per-share basis, at the
3559 time they attempt to connect to that share.
3560 <p><br>Note that <a href="smbd.8.html"><strong>smbd</strong></a> <em>*ALWAYS*</em> uses a valid UNIX
3561 user to act on behalf of the client, even in <strong>"security=share"</strong>
3562 level security.
3563 <p><br>As clients are not required to send a username to the server
3564 in share level security, <a href="smbd.8.html"><strong>smbd</strong></a> uses several
3565 techniques to determine the correct UNIX user to use on behalf
3566 of the client.
3567 <p><br>A list of possible UNIX usernames to match with the given
3568 client password is constructed using the following methods :
3569 <p><br><ul>
3570 <p><br><li > If the <a href="smb.conf.5.html#guestonly"><strong>"guest only"</strong></a> parameter is set, then
3571 all the other stages are missed and only the <a href="smb.conf.5.html#guestaccount"><strong>"guest
3572 account"</strong></a> username is checked.
3573 <p><br><li > Is a username is sent with the share connection request, then
3574 this username (after mapping - see <a href="smb.conf.5.html#usernamemap"><strong>"username
3575 map"</strong></a>), is added as a potential username.
3576 <p><br><li > If the client did a previous <em>"logon"</em> request (the
3577 SessionSetup SMB call) then the username sent in this SMB
3578 will be added as a potential username.
3579 <p><br><li > The name of the service the client requested is added
3580 as a potential username.
3581 <p><br><li > The NetBIOS name of the client is added to the list as a
3582 potential username.
3583 <p><br><li > Any users on the <a href="smb.conf.5.html#user"><strong>"user"</strong></a> list are added
3584 as potential usernames.
3585 <p><br></ul>
3586 <p><br>If the <a href="smb.conf.5.html#guestonly"><strong>"guest only"</strong></a> parameter is not set, then
3587 this list is then tried with the supplied password. The first user for
3588 whom the password matches will be used as the UNIX user.
3589 <p><br>If the <a href="smb.conf.5.html#guestonly"><strong>"guest only"</strong></a> parameter is set, or no
3590 username can be determined then if the share is marked as available to
3591 the <a href="smb.conf.5.html#guestaccount"><strong>"guest account"</strong></a>, then this guest user will
3592 be used, otherwise access is denied.
3593 <p><br>Note that it can be <em>*very*</em> confusing in share-level security as to
3594 which UNIX username will eventually be used in granting access.
3595 <p><br>See also the section <a href="smb.conf.5.html#NOTEABOUTUSERNAMEPASSWORDVALIDATION"><strong>"NOTE ABOUT USERNAME/PASSWORD
3596 VALIDATION"</strong></a>.
3597 <p><br><a name="securityequaluser"></a>
3598 <li><strong><strong>"security=user"</strong></strong>
3599 <p><br>This is the default security setting in Samba2.0. With user-level
3600 security a client must first <code>"log-on"</code> with a valid username and
3601 password (which can be mapped using the <a href="smb.conf.5.html#usernamemap"><strong>"username
3602 map"</strong></a> parameter). Encrypted passwords (see the
3603 <a href="smb.conf.5.html#encryptpasswords"><strong>"encrypted passwords"</strong></a> parameter) can also
3604 be used in this security mode. Parameters such as
3605 <a href="smb.conf.5.html#user"><strong>"user"</strong></a> and <a href="smb.conf.5.html#guestonly"><strong>"guest only"</strong></a>, if set
3606 are then applied and may change the UNIX user to use on this
3607 connection, but only after the user has been successfully
3608 authenticated.
3609 <p><br><em>Note</em> that the name of the resource being requested is
3610 <em>*not*</em> sent to the server until after the server has successfully
3611 authenticated the client. This is why guest shares don't work in user
3612 level security without allowing the server to automatically map unknown
3613 users into the <a href="smb.conf.5.html#guestaccount"><strong>"guest account"</strong></a>. See the
3614 <a href="smb.conf.5.html#maptoguest"><strong>"map to guest"</strong></a> parameter for details on
3615 doing this.
3616 <p><br>See also the section <a href="smb.conf.5.html#NOTEABOUTUSERNAMEPASSWORDVALIDATION"><strong>"NOTE ABOUT USERNAME/PASSWORD
3617 VALIDATION"</strong></a>.
3618 <p><br><a name="securityequalserver"></a>
3619 <li><strong><strong>"security=server"</strong></strong>
3620 <p><br>In this mode Samba will try to validate the username/password by
3621 passing it to another SMB server, such as an NT box. If this fails it
3622 will revert to <strong>"security = user"</strong>, but note that if encrypted
3623 passwords have been negotiated then Samba cannot revert back to
3624 checking the UNIX password file, it must have a valid smbpasswd file
3625 to check users against. See the documentation file in the docs/
3626 directory ENCRYPTION.txt for details on how to set this up.
3627 <p><br><em>Note</em> that from the clients point of view <strong>"security=server"</strong> is
3628 the same as <a href="smb.conf.5.html#securityequaluser"><strong>"security=user"</strong></a>. It only
3629 affects how the server deals with the authentication, it does not in
3630 any way affect what the client sees.
3631 <p><br><em>Note</em> that the name of the resource being requested is
3632 <em>*not*</em> sent to the server until after the server has successfully
3633 authenticated the client. This is why guest shares don't work in server
3634 level security without allowing the server to automatically map unknown
3635 users into the <a href="smb.conf.5.html#guestaccount"><strong>"guest account"</strong></a>. See the
3636 <a href="smb.conf.5.html#maptoguest"><strong>"map to guest"</strong></a> parameter for details on
3637 doing this.
3638 <p><br>See also the section <a href="smb.conf.5.html#NOTEABOUTUSERNAMEPASSWORDVALIDATION"><strong>"NOTE ABOUT USERNAME/PASSWORD
3639 VALIDATION"</strong></a>.
3640 <p><br>See also the <a href="smb.conf.5.html#passwordserver"><strong>"password server"</strong></a> parameter.
3641 and the <a href="smb.conf.5.html#encryptpasswords"><strong>"encrypted passwords"</strong></a> parameter.
3642 <p><br><a name="securityequaldomain"></a>
3643 <li><strong><strong>"security=domain"</strong></strong>
3644 <p><br>This mode will only work correctly if
3645 <a href="smbpasswd.8.html"><strong>smbpasswd</strong></a> has been used to add this machine
3646 into a Windows NT Domain. It expects the <a href="smb.conf.5.html#encryptpasswords"><strong>"encrypted
3647 passwords"</strong></a> parameter to be set to <code>"true"</code>. In
3648 this mode Samba will try to validate the username/password by passing
3649 it to a Windows NT Primary or Backup Domain Controller, in exactly the
3650 same way that a Windows NT Server would do.
3651 <p><br><em>Note</em> that a valid UNIX user must still exist as well as the
3652 account on the Domain Controller to allow Samba to have a valid
3653 UNIX account to map file access to.
3654 <p><br><em>Note</em> that from the clients point of view <strong>"security=domain"</strong> is
3655 the same as <a href="smb.conf.5.html#securityequaluser"><strong>"security=user"</strong></a>. It only
3656 affects how the server deals with the authentication, it does not in
3657 any way affect what the client sees.
3658 <p><br><em>Note</em> that the name of the resource being requested is
3659 <em>*not*</em> sent to the server until after the server has successfully
3660 authenticated the client. This is why guest shares don't work in domain
3661 level security without allowing the server to automatically map unknown
3662 users into the <a href="smb.conf.5.html#guestaccount"><strong>"guest account"</strong></a>. See the
3663 <a href="smb.conf.5.html#maptoguest"><strong>"map to guest"</strong></a> parameter for details on
3664 doing this.
3665 <p><br>e,(BUG:) There is currently a bug in the implementation of
3666 <strong>"security=domain</strong> with respect to multi-byte character
3667 set usernames. The communication with a Domain Controller
3668 must be done in UNICODE and Samba currently does not widen
3669 multi-byte user names to UNICODE correctly, thus a multi-byte
3670 username will not be recognized correctly at the Domain Controller.
3671 This issue will be addressed in a future release.
3672 <p><br>See also the section <a href="smb.conf.5.html#NOTEABOUTUSERNAMEPASSWORDVALIDATION"><strong>"NOTE ABOUT USERNAME/PASSWORD
3673 VALIDATION"</strong></a>.
3674 <p><br>See also the <a href="smb.conf.5.html#passwordserver"><strong>"password server"</strong></a> parameter.
3675 and the <a href="smb.conf.5.html#encryptpasswords"><strong>"encrypted passwords"</strong></a> parameter.
3676 <p><br></ul>
3677 <p><br><strong>Default:</strong>
3678 <code>  security = USER</code>
3679 <p><br><strong>Example:</strong>
3680 <code>  security = DOMAIN</code>
3681 <p><br><a name="serverstring"></a>
3682 <li><strong><strong>server string (G)</strong></strong>
3683 <p><br>This controls what string will show up in the printer comment box in
3684 print manager and next to the IPC connection in <code>"net view"</code>. It can be
3685 any string that you wish to show to your users.
3686 <p><br>It also sets what will appear in browse lists next to the machine
3687 name.
3688 <p><br>A <code>"%v"</code> will be replaced with the Samba version number.
3689 <p><br>A <code>"%h"</code> will be replaced with the hostname.
3690 <p><br><strong>Default:</strong>
3691 <code>  server string = Samba %v</code>
3692 <p><br><strong>Example:</strong>
3693 <code>  server string = University of GNUs Samba Server</code>
3694 <p><br><a name="setdirectory"></a>
3695 <li><strong><strong>set directory (S)</strong></strong>
3696 <p><br>If <code>"set directory = no"</code>, then users of the service may not use the
3697 setdir command to change directory.
3698 <p><br>The setdir command is only implemented in the Digital Pathworks
3699 client. See the Pathworks documentation for details.
3700 <p><br><strong>Default:</strong>
3701 <code>  set directory = no</code>
3702 <p><br><strong>Example:</strong>
3703 <code>  set directory = yes</code>
3704 <p><br><a name="sharemodes"></a>
3705 <li><strong><strong>share modes (S)</strong></strong>
3706 <p><br>This enables or disables the honoring of the <code>"share modes"</code> during a
3707 file open. These modes are used by clients to gain exclusive read or
3708 write access to a file.
3709 <p><br>These open modes are not directly supported by UNIX, so they are
3710 simulated using shared memory, or lock files if your UNIX doesn't
3711 support shared memory (almost all do).
3712 <p><br>The share modes that are enabled by this option are DENY_DOS,
3713 DENY_ALL, DENY_READ, DENY_WRITE, DENY_NONE and DENY_FCB.
3714 <p><br>This option gives full share compatibility and enabled by default.
3715 <p><br>You should <em>*NEVER*</em> turn this parameter off as many Windows
3716 applications will break if you do so.
3717 <p><br><strong>Default:</strong>
3718 <code>  share modes = yes</code>
3719 <p><br><a name="sharedmemsize"></a>
3720 <li><strong><strong>shared mem size (G)</strong></strong>
3721 <p><br>It specifies the size of the shared memory (in bytes) to use between
3722 <a href="smbd.8.html"><strong>smbd</strong></a> processes. This parameter defaults to one
3723 megabyte of shared memory. It is possible that if you have a large
3724 server with many files open simultaneously that you may need to
3725 increase this parameter. Signs that this parameter is set too low are
3726 users reporting strange problems trying to save files (locking errors)
3727 and error messages in the smbd log looking like <code>"ERROR
3728 smb_shm_alloc : alloc of XX bytes failed"</code>.
3729 <p><br><strong>Default:</strong>
3730 <code>  shared mem size = 1048576</code>
3731 <p><br><strong>Example:</strong>
3732 <code>  shared mem size = 5242880 ; Set to 5mb for a large number of files.</code>
3733 <p><br><a name="shortpreservecase"></a>
3734 <li><strong><strong>short preserve case (S)</strong></strong>
3735 <p><br>This boolean parameter controls if new files which conform to 8.3
3736 syntax, that is all in upper case and of suitable length, are created
3737 upper case, or if they are forced to be the <code>"default"</code> case. This
3738 option can be use with <a href="smb.conf.5.html#preservecaseoption"><strong>"preserve case
3739 =yes"</strong></a> to permit long filenames to retain their
3740 case, while short names are lowered. Default <em>Yes</em>.
3741 <p><br>See the section on <a href="smb.conf.5.html#NAMEMANGLING"><strong>NAME MANGLING</strong></a>.
3742 <p><br><strong>Default:</strong>
3743 <code>  short preserve case = yes</code>
3744 <p><br><a name="smbpasswdfile"></a>
3745 <li><strong><strong>smb passwd file (G)</strong></strong>
3746 <p><br>This option sets the path to the encrypted smbpasswd file.  By default
3747 the path to the smbpasswd file is compiled into Samba.
3748 <p><br><strong>Default:</strong>
3749 <code>  smb passwd file= &lt;compiled default&gt;</code>
3750 <p><br><strong>Example:</strong>
3751 <code>  smb passwd file = /usr/samba/private/smbpasswd</code>
3752 <p><br><a name="smbrun"></a>
3753 <li><strong><strong>smbrun (G)</strong></strong>
3754 <p><br>This sets the full path to the <strong>smbrun</strong> binary. This defaults to the
3755 value in the Makefile.
3756 <p><br>You must get this path right for many services to work correctly.
3757 <p><br>You should not need to change this parameter so long as Samba
3758 is installed correctly.
3759 <p><br><strong>Default:</strong>
3760 <code>  smbrun=&lt;compiled default&gt;</code>
3761 <p><br><strong>Example:</strong>
3762 <code>  smbrun = /usr/local/samba/bin/smbrun</code>
3763 <p><br><a name="socketaddress"></a>
3764 <li><strong><strong>socket address (G)</strong></strong>
3765 <p><br>This option allows you to control what address Samba will listen for
3766 connections on. This is used to support multiple virtual interfaces on
3767 the one server, each with a different configuration.
3768 <p><br>By default samba will accept connections on any address.
3769 <p><br><strong>Example:</strong>
3770 <code>  socket address = 192.168.2.20</code>
3771 <p><br><a name="socketoptions"></a>
3772 <li><strong><strong>socket options (G)</strong></strong>
3773 <p><br>This option allows you to set socket options to be used when talking
3774 with the client.
3775 <p><br>Socket options are controls on the networking layer of the operating
3776 systems which allow the connection to be tuned.
3777 <p><br>This option will typically be used to tune your Samba server for
3778 optimal performance for your local network. There is no way that Samba
3779 can know what the optimal parameters are for your net, so you must
3780 experiment and choose them yourself. We strongly suggest you read the
3781 appropriate documentation for your operating system first (perhaps
3782 <strong>"man setsockopt"</strong> will help).
3783 <p><br>You may find that on some systems Samba will say "Unknown socket
3784 option" when you supply an option. This means you either incorrectly 
3785 typed it or you need to add an include file to includes.h for your OS. 
3786 If the latter is the case please send the patch to
3787 <a href="mailto:samba-bugs@samba.org"><em>samba-bugs@samba.org</em></a>.
3788 <p><br>Any of the supported socket options may be combined in any way you
3789 like, as long as your OS allows it.
3790 <p><br>This is the list of socket options currently settable using this
3791 option:
3792 <p><br><ul>
3793 <p><br><li > SO_KEEPALIVE
3794 <p><br><li > SO_REUSEADDR
3795 <p><br><li > SO_BROADCAST
3796 <p><br><li > TCP_NODELAY
3797 <p><br><li > IPTOS_LOWDELAY
3798 <p><br><li > IPTOS_THROUGHPUT
3799 <p><br><li > SO_SNDBUF *
3800 <p><br><li > SO_RCVBUF *
3801 <p><br><li > SO_SNDLOWAT *
3802 <p><br><li > SO_RCVLOWAT *
3803 <p><br></ul>
3804 <p><br>Those marked with a <code>*</code> take an integer argument. The others can
3805 optionally take a 1 or 0 argument to enable or disable the option, by
3806 default they will be enabled if you don't specify 1 or 0.
3807 <p><br>To specify an argument use the syntax SOME_OPTION=VALUE for example
3808 <code>SO_SNDBUF=8192</code>. Note that you must not have any spaces before or after
3809 the = sign.
3810 <p><br>If you are on a local network then a sensible option might be
3811 <p><br><code>socket options = IPTOS_LOWDELAY</code>
3812 <p><br>If you have a local network then you could try:
3813 <p><br><code>socket options = IPTOS_LOWDELAY TCP_NODELAY</code>
3814 <p><br>If you are on a wide area network then perhaps try setting
3815 IPTOS_THROUGHPUT. 
3816 <p><br>Note that several of the options may cause your Samba server to fail
3817 completely. Use these options with caution!
3818 <p><br><strong>Default:</strong>
3819 <code>  socket options = TCP_NODELAY</code>
3820 <p><br><strong>Example:</strong>
3821 <code>  socket options = IPTOS_LOWDELAY</code>
3822 <p><br><a name="ssl"></a>
3823 <li><strong><strong>ssl (G)</strong></strong>
3824 <p><br>This variable is part of SSL-enabled Samba. This is only available if
3825 the SSL libraries have been compiled on your system and the configure
3826 option <code>"--with-ssl"</code> was given at configure time.
3827 <p><br><em>Note</em> that for export control reasons this code is <em>**NOT**</em>
3828 enabled by default in any current binary version of Samba.
3829 <p><br>This variable enables or disables the entire SSL mode. If it is set to
3830 "no", the SSL enabled samba behaves exactly like the non-SSL samba. If
3831 set to "yes", it depends on the variables <a href="smb.conf.5.html#sslhosts"><strong>"ssl
3832 hosts"</strong></a> and <a href="smb.conf.5.html#sslhostsresign"><strong>"ssl hosts resign"</strong></a>
3833 whether an SSL connection will be required.
3834 <p><br><strong>Default:</strong>
3835 <code>  ssl=no</code>
3836   <strong>Example:</strong>
3837 <code>  ssl=yes</code>
3838 <p><br><a name="sslCAcertDir"></a>
3839 <li><strong><strong>ssl CA certDir (G)</strong></strong>
3840 <p><br>This variable is part of SSL-enabled Samba. This is only available if
3841 the SSL libraries have been compiled on your system and the configure
3842 option <code>"--with-ssl"</code> was given at configure time.
3843 <p><br><em>Note</em> that for export control reasons this code is <em>**NOT**</em>
3844 enabled by default in any current binary version of Samba.
3845 <p><br>This variable defines where to look up the Certification
3846 Authorities. The given directory should contain one file for each CA
3847 that samba will trust.  The file name must be the hash value over the
3848 "Distinguished Name" of the CA. How this directory is set up is
3849 explained later in this document. All files within the directory that
3850 don't fit into this naming scheme are ignored. You don't need this
3851 variable if you don't verify client certificates.
3852 <p><br><strong>Default:</strong>
3853 <code>  ssl CA certDir = /usr/local/ssl/certs</code>
3854 <p><br><a name="sslCAcertFile"></a>
3855 <li><strong><strong>ssl CA certFile (G)</strong></strong>
3856 <p><br>This variable is part of SSL-enabled Samba. This is only available if
3857 the SSL libraries have been compiled on your system and the configure
3858 option <code>"--with-ssl"</code> was given at configure time.
3859 <p><br><em>Note</em> that for export control reasons this code is <em>**NOT**</em>
3860 enabled by default in any current binary version of Samba.
3861 <p><br>This variable is a second way to define the trusted CAs. The
3862 certificates of the trusted CAs are collected in one big file and this
3863 variable points to the file. You will probably only use one of the two
3864 ways to define your CAs. The first choice is preferable if you have
3865 many CAs or want to be flexible, the second is preferable if you only
3866 have one CA and want to keep things simple (you won't need to create
3867 the hashed file names). You don't need this variable if you don't
3868 verify client certificates.
3869 <p><br><strong>Default:</strong>
3870 <code>  ssl CA certFile = /usr/local/ssl/certs/trustedCAs.pem</code>
3871 <p><br><a name="sslciphers"></a>
3872 <li><strong><strong>ssl ciphers (G)</strong></strong>
3873 <p><br>This variable is part of SSL-enabled Samba. This is only available if
3874 the SSL libraries have been compiled on your system and the configure
3875 option <code>"--with-ssl"</code> was given at configure time.
3876 <p><br><em>Note</em> that for export control reasons this code is <em>**NOT**</em>
3877 enabled by default in any current binary version of Samba.
3878 <p><br>This variable defines the ciphers that should be offered during SSL
3879 negotiation. You should not set this variable unless you know what you
3880 are doing.
3881 <p><br><a name="sslclientcert"></a>
3882 <li><strong><strong>ssl client cert (G)</strong></strong>
3883 <p><br>This variable is part of SSL-enabled Samba. This is only available if
3884 the SSL libraries have been compiled on your system and the configure
3885 option <code>"--with-ssl"</code> was given at configure time.
3886 <p><br><em>Note</em> that for export control reasons this code is <em>**NOT**</em>
3887 enabled by default in any current binary version of Samba.
3888 <p><br>The certificate in this file is used by
3889 <a href="smbclient.1.html"><strong>smbclient</strong></a> if it exists. It's needed if the
3890 server requires a client certificate.
3891 <p><br><strong>Default:</strong>
3892 <code>  ssl client cert = /usr/local/ssl/certs/smbclient.pem</code>
3893 <p><br><a name="sslclientkey"></a>
3894 <li><strong><strong>ssl client key (G)</strong></strong>
3895 <p><br>This variable is part of SSL-enabled Samba. This is only available if
3896 the SSL libraries have been compiled on your system and the configure
3897 option <code>"--with-ssl"</code> was given at configure time.
3898 <p><br><em>Note</em> that for export control reasons this code is <em>**NOT**</em>
3899 enabled by default in any current binary version of Samba.
3900 <p><br>This is the private key for <a href="smbclient.1.html"><strong>smbclient</strong></a>. It's
3901 only needed if the client should have a certificate.
3902 <p><br><strong>Default:</strong>
3903 <code>  ssl client key = /usr/local/ssl/private/smbclient.pem</code>
3904 <p><br><a name="sslcompatibility"></a>
3905 <li><strong><strong>ssl compatibility (G)</strong></strong>
3906 <p><br>This variable is part of SSL-enabled Samba. This is only available if
3907 the SSL libraries have been compiled on your system and the configure
3908 option <code>"--with-ssl"</code> was given at configure time.
3909 <p><br><em>Note</em> that for export control reasons this code is <em>**NOT**</em>
3910 enabled by default in any current binary version of Samba.
3911 <p><br>This variable defines whether SSLeay should be configured for bug
3912 compatibility with other SSL implementations. This is probably not
3913 desirable because currently no clients with SSL implementations other
3914 than SSLeay exist.
3915 <p><br><strong>Default:</strong>
3916 <code>  ssl compatibility = no</code>
3917 <p><br><a name="sslhosts"></a>
3918 <li><strong><strong>ssl hosts (G)</strong></strong>
3919 <p><br>See <a href="smb.conf.5.html#sslhostsresign"><strong>"ssl hosts resign"</strong></a>.
3920 <p><br><a name="sslhostsresign"></a>
3921 <li><strong><strong>ssl hosts resign (G)</strong></strong>
3922 <p><br>This variable is part of SSL-enabled Samba. This is only available if
3923 the SSL libraries have been compiled on your system and the configure
3924 option <code>"--with-ssl"</code> was given at configure time.
3925 <p><br><em>Note</em> that for export control reasons this code is <em>**NOT**</em>
3926 enabled by default in any current binary version of Samba.
3927 <p><br>These two variables define whether samba will go into SSL mode or
3928 not. If none of them is defined, samba will allow only SSL
3929 connections. If the <a href="smb.conf.5.html#sslhosts"><strong>"ssl hosts"</strong></a> variable lists
3930 hosts (by IP-address, IP-address range, net group or name), only these
3931 hosts will be forced into SSL mode. If the <strong>"ssl hosts resign"</strong>
3932 variable lists hosts, only these hosts will NOT be forced into SSL
3933 mode. The syntax for these two variables is the same as for the
3934 <a href="smb.conf.5.html#hostsallow"><strong>"hosts allow"</strong></a> and <a href="smb.conf.5.html#hostsdeny"><strong>"hosts
3935 deny"</strong></a> pair of variables, only that the subject of the
3936 decision is different: It's not the access right but whether SSL is
3937 used or not. See the <a href="smb.conf.5.html#allowhosts"><strong>"allow hosts"</strong></a> parameter for
3938 details. The example below requires SSL connections from all hosts
3939 outside the local net (which is 192.168.*.*).
3940 <p><br><strong>Default:</strong>
3941 <code>  ssl hosts = &lt;empty string&gt;</code>
3942 <code>  ssl hosts resign = &lt;empty string&gt;</code>
3943 <p><br><strong>Example:</strong>
3944 <code>  ssl hosts resign = 192.168.</code>
3945 <p><br><a name="sslrequireclientcert"></a>
3946 <li><strong><strong>ssl require clientcert (G)</strong></strong>
3947 <p><br>This variable is part of SSL-enabled Samba. This is only available if
3948 the SSL libraries have been compiled on your system and the configure
3949 option <code>"--with-ssl"</code> was given at configure time.
3950 <p><br><em>Note</em> that for export control reasons this code is <em>**NOT**</em>
3951 enabled by default in any current binary version of Samba.
3952 <p><br>If this variable is set to <code>"yes"</code>, the server will not tolerate
3953 connections from clients that don't have a valid certificate. The
3954 directory/file given in <a href="smb.conf.5.html#sslCAcertDir"><strong>"ssl CA certDir"</strong></a> and
3955 <a href="smb.conf.5.html#sslCAcertFile"><strong>"ssl CA certFile"</strong></a> will be used to look up the
3956 CAs that issued the client's certificate. If the certificate can't be
3957 verified positively, the connection will be terminated.  If this
3958 variable is set to <code>"no"</code>, clients don't need certificates. Contrary
3959 to web applications you really <em>*should*</em> require client
3960 certificates. In the web environment the client's data is sensitive
3961 (credit card numbers) and the server must prove to be trustworthy. In
3962 a file server environment the server's data will be sensitive and the
3963 clients must prove to be trustworthy.
3964 <p><br><strong>Default:</strong>
3965 <code>  ssl require clientcert = no</code>
3966 <p><br><a name="sslrequireservercert"></a>
3967 <li><strong><strong>ssl require servercert (G)</strong></strong>
3968 <p><br>This variable is part of SSL-enabled Samba. This is only available if
3969 the SSL libraries have been compiled on your system and the configure
3970 option <code>"--with-ssl"</code> was given at configure time.
3971 <p><br><em>Note</em> that for export control reasons this code is <em>**NOT**</em>
3972 enabled by default in any current binary version of Samba.
3973 <p><br>If this variable is set to <code>"yes"</code>, the
3974 <a href="smbclient.1.html"><strong>smbclient</strong></a> will request a certificate from
3975 the server. Same as <a href="smb.conf.5.html#sslrequireclientcert"><strong>"ssl require
3976 clientcert"</strong></a> for the server.
3977 <p><br><strong>Default:</strong>
3978 <code>  ssl require servercert = no</code>
3979 <p><br><a name="sslservercert"></a>
3980 <li><strong><strong>ssl server cert (G)</strong></strong>
3981 <p><br>This variable is part of SSL-enabled Samba. This is only available if
3982 the SSL libraries have been compiled on your system and the configure
3983 option <code>"--with-ssl"</code> was given at configure time.
3984 <p><br><em>Note</em> that for export control reasons this code is <em>**NOT**</em>
3985 enabled by default in any current binary version of Samba.
3986 <p><br>This is the file containing the server's certificate. The server _must_
3987 have a certificate. The file may also contain the server's private key.
3988 See later for how certificates and private keys are created.
3989 <p><br><strong>Default:</strong>
3990 <code>  ssl server cert = &lt;empty string&gt;</code>
3991 <p><br><a name="sslserverkey"></a>
3992 <li><strong><strong>ssl server key (G)</strong></strong>
3993 <p><br>This variable is part of SSL-enabled Samba. This is only available if
3994 the SSL libraries have been compiled on your system and the configure
3995 option <code>"--with-ssl"</code> was given at configure time.
3996 <p><br><em>Note</em> that for export control reasons this code is <em>**NOT**</em>
3997 enabled by default in any current binary version of Samba.
3998 <p><br>This file contains the private key of the server. If this variable is
3999 not defined, the key is looked up in the certificate file (it may be
4000 appended to the certificate). The server <em>*must*</em> have a private key
4001 and the certificate <em>*must*</em> match this private key.
4002 <p><br><strong>Default:</strong>
4003 <code>  ssl server key = &lt;empty string&gt;</code>
4004 <p><br><a name="sslversion"></a>
4005 <li><strong><strong>ssl version (G)</strong></strong>
4006 <p><br>This variable is part of SSL-enabled Samba. This is only available if
4007 the SSL libraries have been compiled on your system and the configure
4008 option <code>"--with-ssl"</code> was given at configure time.
4009 <p><br><em>Note</em> that for export control reasons this code is <em>**NOT**</em>
4010 enabled by default in any current binary version of Samba.
4011 <p><br>This enumeration variable defines the versions of the SSL protocol
4012 that will be used. <code>"ssl2or3"</code> allows dynamic negotiation of SSL v2
4013 or v3, <code>"ssl2"</code> results in SSL v2, <code>"ssl3"</code> results in SSL v3 and
4014 "tls1" results in TLS v1. TLS (Transport Layer Security) is the
4015 (proposed?) new standard for SSL.
4016 <p><br><strong>Default:</strong>
4017 <code>  ssl version = "ssl2or3"</code>
4018 <p><br><a name="statcache"></a>
4019 <li><strong><strong>stat cache (G)</strong></strong>
4020 <p><br>This parameter determines if <a href="smbd.8.html"><strong>smbd</strong></a> will use a
4021 cache in order to speed up case insensitive name mappings. You should
4022 never need to change this parameter.
4023 <p><br><strong>Default:</strong>
4024 <code>  stat cache = yes</code>
4025 <p><br><a name="statcachesize"></a>
4026 <li><strong><strong>stat cache size (G)</strong></strong>
4027 <p><br>This parameter determines the number of entries in the <a href="smb.conf.5.html#statcache"><strong>stat
4028 cache</strong></a>.  You should never need to change this parameter.
4029 <p><br><strong>Default:</strong>
4030 <code>  stat cache size = 50</code>
4031 <p><br><a name="status"></a>
4032 <li><strong><strong>status (G)</strong></strong>
4033 <p><br>This enables or disables logging of connections to a status file that
4034 <a href="smbstatus.1.html"><strong>smbstatus</strong></a> can read.
4035 <p><br>With this disabled <a href="smbstatus.1.html"><strong>smbstatus</strong></a> won't be able
4036 to tell you what connections are active. You should never need to
4037 change this parameter.
4038 <p><br><strong>Default:</strong>
4039         status = yes
4040 <p><br><a name="strictlocking"></a>
4041 <li><strong><strong>strict locking (S)</strong></strong>
4042 <p><br>This is a boolean that controls the handling of file locking in the
4043 server. When this is set to <code>"yes"</code> the server will check every read and
4044 write access for file locks, and deny access if locks exist. This can
4045 be slow on some systems.
4046 <p><br>When strict locking is <code>"no"</code> the server does file lock checks only
4047 when the client explicitly asks for them.
4048 <p><br>Well behaved clients always ask for lock checks when it is important,
4049 so in the vast majority of cases <strong>"strict locking = no"</strong> is
4050 preferable.
4051 <p><br><strong>Default:</strong>
4052 <code>  strict locking = no</code>
4053 <p><br><strong>Example:</strong>
4054 <code>  strict locking = yes</code>
4055 <p><br><a name="strictsync"></a>
4056 <li><strong><strong>strict sync (S)</strong></strong>
4057 <p><br>Many Windows applications (including the Windows 98 explorer shell)
4058 seem to confuse flushing buffer contents to disk with doing a sync to
4059 disk. Under UNIX, a sync call forces the process to be suspended until
4060 the kernel has ensured that all outstanding data in kernel disk
4061 buffers has been safely stored onto stable storage. This is very slow
4062 and should only be done rarely. Setting this parameter to "no" (the
4063 default) means that smbd ignores the Windows applications requests for
4064 a sync call. There is only a possibility of losing data if the
4065 operating system itself that Samba is running on crashes, so there is
4066 little danger in this default setting. In addition, this fixes many
4067 performance problems that people have reported with the new Windows98
4068 explorer shell file copies.
4069 <p><br>See also the <a href="smb.conf.5.html#syncalways"><strong>"sync always"</strong></a> parameter.
4070 <p><br><strong>Default:</strong>
4071 <code>  strict sync = no</code>
4072 <p><br><strong>Example:</strong>
4073 <code>  strict sync = yes</code>
4074 <p><br><a name="stripdot"></a>
4075 <li><strong><strong>strip dot (G)</strong></strong>
4076 <p><br>This is a boolean that controls whether to strip trailing dots off
4077 UNIX filenames. This helps with some CDROMs that have filenames ending
4078 in a single dot.
4079 <p><br><strong>Default:</strong>
4080 <code>  strip dot = no</code>
4081 <p><br><strong>Example:</strong>
4082 <code>  strip dot = yes</code>
4083 <p><br><a name="syncalways"></a>
4084 <li><strong><strong>sync always (S)</strong></strong>
4085 <p><br>This is a boolean parameter that controls whether writes will always
4086 be written to stable storage before the write call returns. If this is
4087 false then the server will be guided by the client's request in each
4088 write call (clients can set a bit indicating that a particular write
4089 should be synchronous). If this is true then every write will be
4090 followed by a fsync() call to ensure the data is written to disk.
4091 Note that the <a href="smb.conf.5.html#strictsync"><strong>"strict sync"</strong></a> parameter must be
4092 set to <code>"yes"</code> in order for this parameter to have any affect.
4093 <p><br>See also the <a href="smb.conf.5.html#strictsync"><strong>"strict sync"</strong></a> parameter.
4094 <p><br><strong>Default:</strong>
4095 <code>  sync always = no</code>
4096 <p><br><strong>Example:</strong>
4097 <code>  sync always = yes</code>
4098 <p><br><a name="syslog"></a>
4099 <li><strong><strong>syslog (G)</strong></strong>
4100 <p><br>This parameter maps how Samba debug messages are logged onto the
4101 system syslog logging levels. Samba debug level zero maps onto syslog
4102 LOG_ERR, debug level one maps onto LOG_WARNING, debug level two maps
4103 to LOG_NOTICE, debug level three maps onto LOG_INFO.  The parameter
4104 sets the threshold for doing the mapping, all Samba debug messages
4105 above this threshold are mapped to syslog LOG_DEBUG messages.
4106 <p><br><strong>Default:</strong>
4107 <code>  syslog = 1</code>
4108 <p><br><a name="syslogonly"></a>
4109 <li><strong><strong>syslog only (G)</strong></strong>
4110 <p><br>If this parameter is set then Samba debug messages are logged into the
4111 system syslog only, and not to the debug log files.
4112 <p><br><strong>Default:</strong>
4113 <code>  syslog only = no</code>
4114 <p><br><a name="timeoffset"></a>
4115 <li><strong><strong>time offset (G)</strong></strong>
4116 <p><br>This parameter is a setting in minutes to add to the normal GMT to
4117 local time conversion. This is useful if you are serving a lot of PCs
4118 that have incorrect daylight saving time handling.
4119 <p><br><strong>Default:</strong>
4120 <code>  time offset = 0</code>
4121 <p><br><strong>Example:</strong>
4122 <code>  time offset = 60</code>
4123 <p><br><a name="timeserver"></a>
4124 <p><br><li><strong><strong>time server (G)</strong></strong>
4125 <p><br>This parameter determines if <a href="nmbd.8.html"><strong>nmbd</strong></a> advertises
4126 itself as a time server to Windows clients. The default is False.
4127 <p><br><strong>Default:</strong>
4128 <code>  time server = False</code>
4129 <p><br><strong>Example:</strong>
4130 <code>  time server = True</code>
4131 <p><br><a name="timestamplogs"></a>
4132 <li><strong><strong>timestamp logs (G)</strong></strong>
4133 <p><br>Samba2.0 will a timestamps to all log entries by default. This
4134 can be distracting if you are attempting to debug a problem. This
4135 parameter allows the timestamping to be turned off.
4136 <p><br><strong>Default:</strong>
4137 <code>  timestamp logs = True</code>
4138 <p><br><strong>Example:</strong>
4139 <code>  timestamp logs = False</code>
4140 <p><br><a name="unixpasswordsync"></a>
4141 <li><strong><strong>unix password sync (G)</strong></strong>
4142 <p><br>This boolean parameter controls whether Samba attempts to synchronize
4143 the UNIX password with the SMB password when the encrypted SMB
4144 password in the smbpasswd file is changed. If this is set to true the
4145 program specified in the <a href="smb.conf.5.html#passwdprogram"><strong>"passwd program"</strong></a>
4146 parameter is called <em>*AS ROOT*</em> - to allow the new UNIX password to be
4147 set without access to the old UNIX password (as the SMB password has
4148 change code has no access to the old password cleartext, only the
4149 new). By default this is set to <code>"false"</code>.
4150 <p><br>See also <a href="smb.conf.5.html#passwdprogram"><strong>"passwd program"</strong></a>, <a href="smb.conf.5.html#passwdchat"><strong>"passwd
4151 chat"</strong></a>.
4152 <p><br><strong>Default:</strong>
4153 <code>  unix password sync = False</code>
4154 <p><br><strong>Example:</strong>
4155 <code>  unix password sync = True</code>
4156 <p><br><a name="unixrealname"></a>
4157 <li><strong><strong>unix realname (G)</strong></strong>
4158 <p><br>This boolean parameter when set causes samba to supply the real name
4159 field from the unix password file to the client. This is useful for
4160 setting up mail clients and WWW browsers on systems used by more than
4161 one person.
4162 <p><br><strong>Default:</strong>
4163 <code>  unix realname = no</code>
4164 <p><br><strong>Example:</strong>
4165 <code>  unix realname = yes</code>
4166 <p><br><a name="updateencrypted"></a>
4167 <li><strong><strong>update encrypted (G)</strong></strong>
4168 <p><br>This boolean parameter allows a user logging on with a plaintext
4169 password to have their encrypted (hashed) password in the smbpasswd
4170 file to be updated automatically as they log on. This option allows a
4171 site to migrate from plaintext password authentication (users
4172 authenticate with plaintext password over the wire, and are checked
4173 against a UNIX account database) to encrypted password authentication
4174 (the SMB challenge/response authentication mechanism) without forcing
4175 all users to re-enter their passwords via smbpasswd at the time the
4176 change is made. This is a convenience option to allow the change over
4177 to encrypted passwords to be made over a longer period. Once all users
4178 have encrypted representations of their passwords in the smbpasswd
4179 file this parameter should be set to <code>"off"</code>.
4180 <p><br>In order for this parameter to work correctly the <a href="smb.conf.5.html#encryptpasswords"><strong>"encrypt
4181 passwords"</strong></a> parameter must be set to <code>"no"</code> when
4182 this parameter is set to <code>"yes"</code>.
4183 <p><br>Note that even when this parameter is set a user authenticating to
4184 smbd must still enter a valid password in order to connect correctly,
4185 and to update their hashed (smbpasswd) passwords.
4186 <p><br><strong>Default:</strong>
4187 <code>  update encrypted = no</code>
4188 <p><br><strong>Example:</strong>
4189 <code>  update encrypted = yes</code>
4190 <p><br><a name="userhosts"></a>
4191 <li><strong><strong>use rhosts (G)</strong></strong>
4192 <p><br>If this global parameter is a true, it specifies that the UNIX users
4193 <code>".rhosts"</code> file in their home directory will be read to find the
4194 names of hosts and users who will be allowed access without specifying
4195 a password.
4196 <p><br>NOTE: The use of <strong>use rhosts</strong> can be a major security hole. This is
4197 because you are trusting the PC to supply the correct username. It is
4198 very easy to get a PC to supply a false username. I recommend that the
4199 <strong>use rhosts</strong> option be only used if you really know what you are
4200 doing.
4201 <p><br><strong>Default:</strong>
4202 <code>  use rhosts = no</code>
4203 <p><br><strong>Example:</strong>
4204 <code>  use rhosts = yes</code>
4205 <p><br><a name="user"></a>
4206 <li><strong><strong>user (S)</strong></strong>
4207 <p><br>Synonym for <a href="smb.conf.5.html#username"><strong>"username"</strong></a>.
4208 <p><br><a name="users"></a>
4209 <li><strong><strong>users (S)</strong></strong>
4210 <p><br>Synonym for <a href="smb.conf.5.html#username"><strong>"username"</strong></a>.
4211 <p><br><a name="username"></a>
4212 <li><strong><strong>username (S)</strong></strong>
4213 <p><br>Multiple users may be specified in a comma-delimited list, in which
4214 case the supplied password will be tested against each username in
4215 turn (left to right).
4216 <p><br>The <strong>username=</strong> line is needed only when the PC is unable to supply
4217 its own username. This is the case for the COREPLUS protocol or where
4218 your users have different WfWg usernames to UNIX usernames. In both
4219 these cases you may also be better using the <code>\\server\share%user</code>
4220 syntax instead.
4221 <p><br>The <strong>username=</strong> line is not a great solution in many cases as it
4222 means Samba will try to validate the supplied password against each of
4223 the usernames in the username= line in turn. This is slow and a bad
4224 idea for lots of users in case of duplicate passwords. You may get
4225 timeouts or security breaches using this parameter unwisely.
4226 <p><br>Samba relies on the underlying UNIX security. This parameter does not
4227 restrict who can login, it just offers hints to the Samba server as to
4228 what usernames might correspond to the supplied password. Users can
4229 login as whoever they please and they will be able to do no more
4230 damage than if they started a telnet session. The daemon runs as the
4231 user that they log in as, so they cannot do anything that user cannot
4232 do.
4233 <p><br>To restrict a service to a particular set of users you can use the
4234 <a href="smb.conf.5.html#validusers"><strong>"valid users="</strong></a> parameter.
4235 <p><br>If any of the usernames begin with a <code>'@'</code> then the name will be
4236 looked up first in the yp netgroups list (if Samba is compiled with
4237 netgroup support), followed by a lookup in the UNIX groups database
4238 and will expand to a list of all users in the group of that name.
4239 <p><br>If any of the usernames begin with a <code>'+'</code> then the name will be
4240 looked up only in the UNIX groups database and will expand to a list
4241 of all users in the group of that name.
4242 <p><br>If any of the usernames begin with a <code>'&amp;'</code> then the name will be
4243 looked up only in the yp netgroups database (if Samba is compiled with
4244 netgroup support) and will expand to a list of all users in the
4245 netgroup group of that name.
4246 <p><br>Note that searching though a groups database can take quite some time,
4247 and some clients may time out during the search.
4248 <p><br>See the section <a href="smb.conf.5.html#NOTEABOUTUSERNAMEPASSWORDVALIDATION"><strong>"NOTE ABOUT USERNAME/PASSWORD
4249 VALIDATION"</strong></a> for more
4250 information on how this parameter determines access to the services.
4251 <p><br><strong>Default:</strong>
4252 <code>  The guest account if a guest service, else the name of the service.</code>
4253 <p><br><strong>Examples:</strong>
4254 <pre>
4255
4256         username = fred
4257         username = fred, mary, jack, jane, @users, @pcgroup
4258
4259 </pre>
4260
4261 <p><br><a name="usernamelevel"></a>
4262 <li><strong><strong>username level (G)</strong></strong>
4263 <p><br>This option helps Samba to try and 'guess' at the real UNIX username,
4264 as many DOS clients send an all-uppercase username. By default Samba
4265 tries all lowercase, followed by the username with the first letter
4266 capitalized, and fails if the username is not found on the UNIX
4267 machine.
4268 <p><br>If this parameter is set to non-zero the behavior changes. This
4269 parameter is a number that specifies the number of uppercase
4270 combinations to try whilst trying to determine the UNIX user name. The
4271 higher the number the more combinations will be tried, but the slower
4272 the discovery of usernames will be. Use this parameter when you have
4273 strange usernames on your UNIX machine, such as <code>"AstrangeUser"</code>.
4274 <p><br><strong>Default:</strong>
4275 <code>  username level = 0</code>
4276 <p><br><strong>Example:</strong>
4277 <code>  username level = 5</code>
4278 <p><br><a name="usernamemap"></a>
4279 <li><strong><strong>username map (G)</strong></strong>
4280 <p><br>This option allows you to specify a file containing a mapping of
4281 usernames from the clients to the server. This can be used for several
4282 purposes. The most common is to map usernames that users use on DOS or
4283 Windows machines to those that the UNIX box uses. The other is to map
4284 multiple users to a single username so that they can more easily share
4285 files.
4286 <p><br>The use of this option, therefore, relates to UNIX usernames
4287 and not Windows (specifically NT Domain) usernames.  In other words,
4288 once a name has been mapped using this option, the Samba server uses
4289 the mapped name for internal <em>AND</em> external purposes.
4290 <p><br>This option is <em>DIFFERENT</em> from the <a href="smb.conf.5.html#domainusermap"><strong>"domain user map"</strong></a> 
4291 parameter, which maintains a one-to-one mapping between UNIX usernames
4292 and NT Domain Usernames: more specifically, the Samba server maintains
4293 a link between <em>BOTH</em> usernames, presenting the NT username to the
4294 external NT world, and using the UNIX username internally.
4295 <p><br>The map file is parsed line by line. Each line should contain a single
4296 UNIX username on the left then a <code>'='</code> followed by a list of
4297 usernames on the right. The list of usernames on the right may contain
4298 names of the form @group in which case they will match any UNIX
4299 username in that group. The special client name <code>'*'</code> is a wildcard
4300 and matches any name. Each line of the map file may be up to 1023
4301 characters long.
4302 <p><br>The file is processed on each line by taking the supplied username and
4303 comparing it with each username on the right hand side of the <code>'='</code>
4304 signs. If the supplied name matches any of the names on the right hand
4305 side then it is replaced with the name on the left. Processing then
4306 continues with the next line.
4307 <p><br>If any line begins with a <code>'#'</code> or a <code>';'</code> then it is ignored
4308 <p><br>If any line begins with an <code>'!'</code> then the processing will stop after
4309 that line if a mapping was done by the line. Otherwise mapping
4310 continues with every line being processed. Using <code>'!'</code> is most
4311 useful when you have a wildcard mapping line later in the file.
4312 <p><br>For example to map from the name <code>"admin"</code> or <code>"administrator"</code> to
4313 the UNIX name <code>"root"</code> you would use:
4314 <p><br><code>   root = admin administrator</code>
4315 <p><br>Or to map anyone in the UNIX group <code>"system"</code> to the UNIX name
4316 <code>"sys"</code> you would use:
4317 <p><br><code>   sys = @system</code>
4318 <p><br>You can have as many mappings as you like in a username map file.
4319 <p><br>If your system supports the NIS NETGROUP option then the netgroup
4320 database is checked before the <code>/etc/group</code> database for matching
4321 groups.
4322 <p><br>You can map Windows usernames that have spaces in them by using double
4323 quotes around the name. For example:
4324 <p><br><code>   tridge = "Andrew Tridgell"</code>
4325 <p><br>would map the windows username <code>"Andrew Tridgell"</code> to the unix
4326 username tridge.
4327 <p><br>The following example would map mary and fred to the unix user sys,
4328 and map the rest to guest. Note the use of the <code>'!'</code> to tell Samba
4329 to stop processing if it gets a match on that line.
4330 <p><br><pre>
4331
4332         !sys = mary fred
4333         guest = *
4334
4335 </pre>
4336
4337 <p><br>Note that the remapping is applied to all occurrences of
4338 usernames. Thus if you connect to <code>"\\server\fred"</code> and <code>"fred"</code>
4339 is remapped to <code>"mary"</code> then you will actually be connecting to
4340 <code>"\\server\mary"</code> and will need to supply a password suitable for
4341 <code>"mary"</code> not <code>"fred"</code>. The only exception to this is the username
4342 passed to the <a href="smb.conf.5.html#passwordserver"><strong>"password server"</strong></a> (if you have
4343 one). The password server will receive whatever username the client
4344 supplies without modification.
4345 <p><br>Also note that no reverse mapping is done. The main effect this has is
4346 with printing. Users who have been mapped may have trouble deleting
4347 print jobs as PrintManager under WfWg will think they don't own the
4348 print job.
4349 <p><br><strong>Default:</strong>
4350 <code>  no username map</code>
4351 <p><br><strong>Example:</strong>
4352 <code>  username map = /usr/local/samba/lib/users.map</code>
4353 <p><br><a name="validchars"></a>
4354 <li><strong><strong>valid chars (S)</strong></strong>
4355 <p><br>The option allows you to specify additional characters that should be
4356 considered valid by the server in filenames. This is particularly
4357 useful for national character sets, such as adding u-umlaut or a-ring.
4358 <p><br>The option takes a list of characters in either integer or character
4359 form with spaces between them. If you give two characters with a colon
4360 between them then it will be taken as an lowercase:uppercase pair.
4361 <p><br>If you have an editor capable of entering the characters into the
4362 config file then it is probably easiest to use this method. Otherwise
4363 you can specify the characters in octal, decimal or hexadecimal form
4364 using the usual C notation.
4365 <p><br>For example to add the single character <code>'Z'</code> to the charset (which
4366 is a pointless thing to do as it's already there) you could do one of
4367 the following
4368 <p><br><pre>
4369
4370         valid chars = Z
4371         valid chars = z:Z
4372         valid chars = 0132:0172
4373
4374 </pre>
4375
4376 <p><br>The last two examples above actually add two characters, and alter the
4377 uppercase and lowercase mappings appropriately.
4378 <p><br>Note that you MUST specify this parameter after the <a href="smb.conf.5.html#clientcodepage"><strong>"client
4379 code page"</strong></a> parameter if you have both set. If
4380 <a href="smb.conf.5.html#clientcodepage"><strong>"client code page"</strong></a> is set after the
4381 <strong>"valid chars"</strong> parameter the <strong>"valid chars"</strong> settings will be
4382 overwritten.
4383 <p><br>See also the <a href="smb.conf.5.html#clientcodepage"><strong>"client code page"</strong></a> parameter.
4384 <p><br><strong>Default:</strong>
4385 <pre>
4386
4387         Samba defaults to using a reasonable set of valid characters
4388         for English systems
4389
4390 </pre>
4391
4392 <p><br><strong>Example</strong>
4393 <code>  valid chars = 0345:0305 0366:0326 0344:0304</code>
4394 <p><br>The above example allows filenames to have the Swedish characters in
4395 them.
4396 <p><br>NOTE: It is actually quite difficult to correctly produce a <strong>"valid
4397 chars"</strong> line for a particular system. To automate the process
4398 <a href="mailto:tino@augsburg.net"><em>tino@augsburg.net</em></a> has written a package called <strong>"validchars"</strong>
4399 which will automatically produce a complete <strong>"valid chars"</strong> line for
4400 a given client system. Look in the examples/validchars/ subdirectory
4401 of your Samba source code distribution for this package.
4402 <p><br><a name="validusers"></a>
4403 <li><strong><strong>valid users (S)</strong></strong>
4404 <p><br>This is a list of users that should be allowed to login to this
4405 service. Names starting with <code>'@'</code>, <code>'+'</code> and <code>'&amp;'</code> are
4406 interpreted using the same rules as described in the <a href="smb.conf.5.html#invalidusers"><strong>"invalid
4407 users"</strong></a> parameter.
4408 <p><br>If this is empty (the default) then any user can login. If a username
4409 is in both this list and the <a href="smb.conf.5.html#invalidusers"><strong>"invalid users"</strong></a>
4410 list then access is denied for that user.
4411 <p><br>The current servicename is substituted for
4412 <a href="smb.conf.5.html#percentS"><strong>"%S"</strong></a>. This is useful in the
4413 <a href="smb.conf.5.html#homes"><strong>[homes]</strong></a> section.
4414 <p><br>See also <a href="smb.conf.5.html#invalidusers"><strong>"invalid users"</strong></a>.
4415 <p><br><strong>Default:</strong>
4416 <code>  No valid users list. (anyone can login)</code>
4417 <p><br><strong>Example:</strong>
4418 <code>  valid users = greg, @pcusers</code>
4419 <p><br><a name="vetofiles"></a>
4420 <li><strong><strong>veto files(S)</strong></strong>
4421 <p><br>This is a list of files and directories that are neither visible nor
4422 accessible.  Each entry in the list must be separated by a <code>'/'</code>,
4423 which allows spaces to be included in the entry. <code>'*'</code> and <code>'?'</code> 
4424 can be used to specify multiple files or directories as in DOS
4425 wildcards.
4426 <p><br>Each entry must be a unix path, not a DOS path and must <em>*not*</em> include the 
4427 unix directory separator <code>'/'</code>.
4428 <p><br>Note that the <a href="smb.conf.5.html#casesensitive"><strong>"case sensitive"</strong></a> option is
4429 applicable in vetoing files.
4430 <p><br>One feature of the veto files parameter that it is important to be
4431 aware of, is that if a directory contains nothing but files that match
4432 the veto files parameter (which means that Windows/DOS clients cannot
4433 ever see them) is deleted, the veto files within that directory *are
4434 automatically deleted* along with it, if the user has UNIX permissions
4435 to do so.
4436 <p><br>Setting this parameter will affect the performance of Samba, as it
4437 will be forced to check all files and directories for a match as they
4438 are scanned.
4439 <p><br>See also <a href="smb.conf.5.html#hidefiles"><strong>"hide files"</strong></a> and <a href="smb.conf.5.html#casesensitive"><strong>"case
4440 sensitive"</strong></a>.
4441 <p><br><strong>Default:</strong>
4442 <code>  No files or directories are vetoed.</code>
4443 <p><br><strong>Examples:</strong>
4444 <p><br>Example 1.
4445 <p><br><pre>
4446
4447
4448     Veto any files containing the word Security, 
4449     any ending in .tmp, and any directory containing the
4450     word root.
4451
4452         veto files = /*Security*/*.tmp/*root*/
4453
4454 </pre>
4455
4456 <p><br>Example 2.
4457 <p><br><pre>
4458
4459     Veto the Apple specific files that a NetAtalk server
4460     creates.
4461
4462     veto files = /.AppleDouble/.bin/.AppleDesktop/Network Trash Folder/
4463
4464 </pre>
4465
4466 <p><br><a name="vetooplockfiles"></a>
4467 <li><strong><strong>veto oplock files (S)</strong></strong>
4468 <p><br>This parameter is only valid when the <a href="smb.conf.5.html#oplocks"><strong>"oplocks"</strong></a>
4469 parameter is turned on for a share. It allows the Samba administrator
4470 to selectively turn off the granting of oplocks on selected files that
4471 match a wildcarded list, similar to the wildcarded list used in the
4472 <a href="smb.conf.5.html#vetofiles"><strong>"veto files"</strong></a> parameter.
4473 <p><br><strong>Default:</strong>
4474 <code>  No files are vetoed for oplock grants.</code>
4475 <p><br><strong>Examples:</strong>
4476 <p><br>You might want to do this on files that you know will be heavily
4477 contended for by clients. A good example of this is in the NetBench
4478 SMB benchmark program, which causes heavy client contention for files
4479 ending in <code>".SEM"</code>. To cause Samba not to grant oplocks on these
4480 files you would use the line (either in the <a href="smb.conf.5.html#global"><strong>[global]</strong></a>
4481 section or in the section for the particular NetBench share :
4482 <p><br><code>     veto oplock files = /*.SEM/</code>
4483 <p><br><a name="volume"></a>
4484 <li><strong><strong>volume (S)</strong></strong>
4485 <p><br>This allows you to override the volume label returned for a
4486 share. Useful for CDROMs with installation programs that insist on a
4487 particular volume label.
4488 <p><br>The default is the name of the share.
4489 <p><br><a name="widelinks"></a>
4490 <li><strong><strong>wide links (S)</strong></strong>
4491 <p><br>This parameter controls whether or not links in the UNIX file system
4492 may be followed by the server. Links that point to areas within the
4493 directory tree exported by the server are always allowed; this
4494 parameter controls access only to areas that are outside the directory
4495 tree being exported.
4496 <p><br><strong>Default:</strong>
4497 <code>  wide links = yes</code>
4498 <p><br><strong>Example:</strong>
4499 <code>  wide links = no</code>
4500 <p><br><a name="winsproxy"></a>
4501 <li><strong><strong>wins proxy (G)</strong></strong>
4502 <p><br>This is a boolean that controls if <a href="nmbd.8.html"><strong>nmbd</strong></a> will
4503 respond to broadcast name queries on behalf of other hosts. You may
4504 need to set this to <code>"yes"</code> for some older clients.
4505 <p><br><strong>Default:</strong>
4506 <code>  wins proxy = no</code>
4507 <p><br><a name="winsserver"></a>
4508 <li><strong><strong>wins server (G)</strong></strong>
4509 <p><br>This specifies the IP address (or DNS name: IP address for preference)
4510 of the WINS server that <a href="nmbd.8.html"><strong>nmbd</strong></a> should register with.
4511 If you have a WINS server on your network then you should set this to
4512 the WINS server's IP.
4513 <p><br>You should point this at your WINS server if you have a
4514 multi-subnetted network.
4515 <p><br><em>NOTE</em>. You need to set up Samba to point to a WINS server if you
4516 have multiple subnets and wish cross-subnet browsing to work correctly.
4517 <p><br>See the documentation file BROWSING.txt in the docs/ directory of your
4518 Samba source distribution.
4519 <p><br><strong>Default:</strong>
4520 <code>  wins server = </code>
4521 <p><br><strong>Example:</strong>
4522 <code>  wins server = 192.9.200.1</code>
4523 <p><br><a name="winssupport"></a>
4524 <li><strong><strong>wins support (G)</strong></strong>
4525 <p><br>This boolean controls if the <a href="nmbd.8.html"><strong>nmbd</strong></a> process in
4526 Samba will act as a WINS server. You should not set this to true
4527 unless you have a multi-subnetted network and you wish a particular
4528 <a href="nmbd.8.html"><strong>nmbd</strong></a> to be your WINS server. Note that you
4529 should <em>*NEVER*</em> set this to true on more than one machine in your
4530 network.
4531 <p><br><strong>Default:</strong>
4532 <code>  wins support = no</code>
4533 <p><br><a name="workgroup"></a>
4534 <li><strong><strong>workgroup (G)</strong></strong>
4535 <p><br>This controls what workgroup your server will appear to be in when
4536 queried by clients. Note that this parameter also controls the Domain
4537 name used with the <a href="smb.conf.5.html#securityequaldomain"><strong>"security=domain"</strong></a>
4538 setting.
4539 <p><br><strong>Default:</strong>
4540 <code>  set at compile time to WORKGROUP</code>
4541 <p><br><strong>Example:</strong>
4542         workgroup = MYGROUP
4543 <p><br><a name="writable"></a>
4544 <li><strong><strong>writable (S)</strong></strong>
4545 <p><br>Synonym for <a href="smb.conf.5.html#writeable"><strong>"writeable"</strong></a> for people who can't spell :-).
4546 Pronounced "ritter-bull".
4547 <p><br><a name="writelist"></a>
4548 <li><strong><strong>write list (S)</strong></strong>
4549 <p><br>This is a list of users that are given read-write access to a
4550 service. If the connecting user is in this list then they will be
4551 given write access, no matter what the <a href="smb.conf.5.html#readonly"><strong>"read only"</strong></a>
4552 option is set to. The list can include group names using the @group
4553 syntax.
4554 <p><br>Note that if a user is in both the read list and the write list then
4555 they will be given write access.
4556 <p><br>See also the <a href="smb.conf.5.html#readlist"><strong>"read list"</strong></a> option.
4557 <p><br><strong>Default:</strong>
4558 <code>     write list = &lt;empty string&gt;</code>
4559 <p><br><strong>Example:</strong>
4560 <code>  write list = admin, root, @staff</code>
4561 <p><br><a name="writeok"></a>
4562 <li><strong><strong>write ok (S)</strong></strong>
4563 <p><br>Synonym for <a href="smb.conf.5.html#writeable"><strong>writeable</strong></a>.
4564 <p><br><a name="writeraw"></a>
4565 <li><strong><strong>write raw (G)</strong></strong>
4566 <p><br>This parameter controls whether or not the server will support raw
4567 writes SMB's when transferring data from clients. You should never
4568 need to change this parameter.
4569 <p><br><strong>Default:</strong>
4570 <code>  write raw = yes</code>
4571 <p><br><a name="writeable"></a>
4572 <li><strong><strong>writeable</strong></strong>
4573 <p><br>An inverted synonym is <a href="smb.conf.5.html#readonly"><strong>"read only"</strong></a>.
4574 <p><br>If this parameter is <code>"no"</code>, then users of a service may not create
4575 or modify files in the service's directory.
4576 <p><br>Note that a printable service <a href="smb.conf.5.html#printable"><strong>("printable = yes")</strong></a>
4577 will <em>*ALWAYS*</em> allow writing to the directory (user privileges
4578 permitting), but only via spooling operations.
4579 <p><br><strong>Default:</strong>
4580 <code>  writeable = no</code>
4581 <p><br><strong>Examples:</strong>
4582 <pre>
4583
4584         read only = no
4585         writeable = yes
4586         write ok = yes
4587
4588 </pre>
4589
4590 <p><br><a name="WARNINGS"></a>
4591 <h2>WARNINGS</h2>
4592     
4593 <p><br>Although the configuration file permits service names to contain
4594 spaces, your client software may not. Spaces will be ignored in
4595 comparisons anyway, so it shouldn't be a problem - but be aware of the
4596 possibility.
4597 <p><br>On a similar note, many clients - especially DOS clients - limit
4598 service names to eight characters. <a href="smbd.8.html"><strong>Smbd</strong></a> has no
4599 such limitation, but attempts to connect from such clients will fail
4600 if they truncate the service names.  For this reason you should
4601 probably keep your service names down to eight characters in length.
4602 <p><br>Use of the <a href="smb.conf.5.html#homes"><strong>[homes]</strong></a> and <a href="smb.conf.5.html#printers"><strong>[printers]</strong></a>
4603 special sections make life for an administrator easy, but the various
4604 combinations of default attributes can be tricky. Take extreme care
4605 when designing these sections. In particular, ensure that the
4606 permissions on spool directories are correct.
4607 <p><br><a name="VERSION"></a>
4608 <h2>VERSION</h2>
4609     
4610 <p><br>This man page is correct for version 2.0 of the Samba suite.
4611 <p><br><a name="SEEALSO"></a>
4612 <h2>SEE ALSO</h2>
4613     
4614 <p><br><a href="smbd.8.html"><strong>smbd (8)</strong></a>, <a href="smbclient.1.html"><strong>smbclient (1)</strong></a>,
4615 <a href="nmbd.8.html"><strong>nmbd (8)</strong></a>, <a href="testparm.1.html"><strong>testparm (1)</strong></a>,
4616 <a href="testprns.1.html"><strong>testprns (1)</strong></a>, <a href="samba.7.html"><strong>Samba</strong></a>,
4617 <a href="nmblookup.1.html"><strong>nmblookup (1)</strong></a>, <a href="smbpasswd.5.html"><strong>smbpasswd (5)</strong></a>,
4618 <a href="smbpasswd.8.html"><strong>smbpasswd (8)</strong></a>.
4619 <p><br><a name="AUTHOR"></a>
4620 <h2>AUTHOR</h2>
4621     
4622 <p><br>The original Samba software and related utilities were created by
4623 Andrew Tridgell <a href="mailto:samba-bugs@samba.org"><em>samba-bugs@samba.org</em></a>. Samba is now developed
4624 by the Samba Team as an Open Source project similar to the way the
4625 Linux kernel is developed.
4626 <p><br>The original Samba man pages were written by Karl Auer. The man page
4627 sources were converted to YODL format (another excellent piece of Open
4628 Source software, available at
4629 <a href="ftp://ftp.icce.rug.nl/pub/unix/"><strong>ftp://ftp.icce.rug.nl/pub/unix/</strong></a>)
4630 and updated for the Samba2.0 release by Jeremy Allison.
4631 <a href="mailto:samba-bugs@samba.org"><em>samba-bugs@samba.org</em></a>.
4632 <p><br>See <a href="samba.7.html"><strong>samba (7)</strong></a> to find out how to get a full
4633 list of contributors and details on how to submit bug reports,
4634 comments etc.
4635 </body>
4636 </html>