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