1<html>
2<body bgcolor="#ffffff">
3
4<img src="samba2_xs.gif" border="0" alt=" " height="100" width="76"
5hspace="10" align="left" />
6
7<h1 class="head0">Chapter 11. Additional Samba Information</h1>
8
9
10<p>This chapter wraps up our coverage of the
11<em class="filename">smb.conf</em> configuration file with some
12miscellaneous options that can perform a variety of tasks. We talk
13briefly about options for time synchronization, internationalization,
14messages, and common Windows bugs. For the most part, you will use
15these options only in isolated circumstances.</p>
16
17
18
19<div class="sect1"><a name="samba2-CHP-11-SECT-1"/>
20
21<h2 class="head1">Time Synchronization</h2>
22
23<p>In a network of computers, the systems on the network must agree on
24the current time and also on what time files have been modified. One
25example of the importance of synchronization is the
26<a name="INDEX-1"/>roaming profiles we covered in
27<a href="ch04.html">Chapter 4</a>. It is vital for all clients accessing a
28roaming profile to agree on what time it is and which client last
29modified the user's profile.</p>
30
31<p><a name="INDEX-2"/>Time synchronization can also be
32very important to programmers. A useful group of settings consists of
33the following options:</p>
34
35<blockquote><pre class="code">[global]
36    time server = yes
37    dos filetimes = yes
38    fake directory create times = yes
39    dos filetime resolution = yes
40    delete readonly = yes</pre></blockquote>
41
42<p>If you set these options, Samba shares will provide compatibility of
43file-modification times that Visual C++, <em class="emphasis">nmake</em>,
44and other Microsoft programming tools require. Otherwise, PC
45<em class="emphasis">make</em> programs might think that all the files in
46a directory need to be recompiled every time. Obviously, this is not
47the behavior you want.</p>
48
49<p>In <a href="ch04.html">Chapter 4</a>, we showed you how to create a logon
50script that used the <em class="emphasis">net
51time</em><a name="INDEX-3"/> command to synchronize
52clients' clocks automatically when they log on to
53the domain. If your network is configured as a workgroup rather than
54a domain, you can still make use of <em class="emphasis">net time</em> by
55placing the command:</p>
56
57<blockquote><pre class="code">net time \\<em class="replaceable">sambaserver</em> /set /yes</pre></blockquote>
58
59<p>in a startup script on each client that is run when the system boots.
60Samba always provides time service&mdash;regardless of whether it is
61running as a primary domain controller&mdash;or the
62<tt class="literal">time</tt> <tt class="literal">service</tt> configuration file
63parameter is set.</p>
64
65<p>Assuming that domain users log on to the domain at least once per day
66and workgroup clients reboot frequently, the <em class="emphasis">net
67time</em> command can keep client systems'
68clocks fairly well synchronized. However, sometimes domain users stay
69logged on for longer periods, and workgroup clients can run for days
70between reboots. In the meantime, the systems'
71hardware clocks can wander enough to become a problem. It might be
72possible to work around this, depending on the version of Windows the
73client system is running. On Windows 98/Me, you can use the Task
74Scheduler to run the <em class="emphasis">net time</em> command at regular
75intervals. Likewise, on Windows 2000/XP you can use the MS-DOS
76<em class="emphasis">at</em> command. However, a better way to deal with
77this issue is to use Network Time Protocol, which we will discuss
78shortly.</p>
79
80<p>Proper time synchronization is also important when operating in an
81Active Directory domain because Active Directory uses
82<a name="INDEX-4"/>Kerberos authentication.
83When a Kerberos domain controller creates an authentication ticket
84for a client, the time is encoded into the challenge-and-response
85exchanges between the client and domain controller. If the
86client's clock disagrees with the
87server's clock, authentication can fail.</p>
88
89<p>To provide proper time synchronization in <a name="INDEX-5"/>Active Directory domains, Microsoft has
90adopted <a name="INDEX-6"/>Network Time Protocol (NTP), using the
91name Windows Time Service for its implementation. For further
92information, the Microsoft white paper entitled <em class="citetitle">The
93Windows Time Service</em> can be downloaded from <a href="http://www.microsoft.com">http://www.microsoft.com</a>.</p>
94
95<p>The nice thing about this is that NTP is the standard method for
96synchronizing Unix hosts on a network, so you can synchronize all
97your Unix systems (including the Samba server) and Windows systems
98with the following method:</p>
99
100<ol><li>
101<p>Run NTP on the Unix systems in your network. For more information on
102using NTP, refer to <a href="http://www.ntp.org">http://www.ntp.org</a>.</p>
103</li><li>
104<p>Use one of the Unix systems (such as the Samba host system) as an NTP
105server to serve Windows 2000/XP clients.</p>
106</li><li>
107<p>For other Windows clients, you might have to download an update from
108Microsoft to add <a name="INDEX-7"/><a name="INDEX-8"/>Windows Time Service client support or
109use a third-party application such as the free
110<a name="INDEX-9"/>analogX Atomic TimeSync (<a href="http://www.analogx.com">http://www.analogx.com</a>). Or you can use the
111<em class="emphasis">net time</em> command to update the
112client's clock periodically, as discussed
113previously.</p>
114</li></ol>
115
116<div class="sect2"><a name="samba2-CHP-11-SECT-1.1"/>
117
118<h3 class="head2">Time-Synchronization Options</h3>
119
120<p>To support roaming profiles, programmers accessing your Samba server,
121and other time-sensitive functions on your network,
122you'll want to be aware of the options listed in
123<a href="ch11.html#samba2-CHP-11-TABLE-1">Table 11-1</a>.</p>
124
125<a name="samba2-CHP-11-TABLE-1"/><h4 class="head4">Table 11-1. Time-synchronization options</h4><table border="1">
126
127
128
129
130
131
132<tr>
133<th>
134<p>Option</p>
135</th>
136<th>
137<p>Parameters</p>
138</th>
139<th>
140<p>Function</p>
141</th>
142<th>
143<p>Default</p>
144</th>
145<th>
146<p>Scope</p>
147</th>
148</tr>
149
150
151<tr>
152<td>
153<p><tt class="literal">time server</tt></p>
154</td>
155<td>
156<p>Boolean</p>
157</td>
158<td>
159<p>If <tt class="literal">yes</tt>, announces <em class="emphasis">nmbd</em> as an
160SMB time service to Windows clients</p>
161</td>
162<td>
163<p><tt class="literal">no</tt></p>
164</td>
165<td>
166<p>Global</p>
167</td>
168</tr>
169<tr>
170<td>
171<p><tt class="literal">time offset</tt></p>
172</td>
173<td>
174<p>numeric</p>
175</td>
176<td>
177<p>Adds a specified number of minutes to the reported time</p>
178</td>
179<td>
180<p><tt class="literal">0</tt></p>
181</td>
182<td>
183<p>Global</p>
184</td>
185</tr>
186<tr>
187<td>
188<p><tt class="literal">dos filetimes</tt></p>
189</td>
190<td>
191<p>Boolean</p>
192</td>
193<td>
194<p>Allows non-owners of a file to change its time if they can write to it</p>
195</td>
196<td>
197<p><tt class="literal">no</tt></p>
198</td>
199<td>
200<p>Share</p>
201</td>
202</tr>
203<tr>
204<td>
205<p><tt class="literal">dos filetime</tt></p>
206
207<p><tt class="literal">resolution</tt></p>
208</td>
209<td>
210<p>Boolean</p>
211</td>
212<td>
213<p>Causes file times to be rounded to the next even second</p>
214</td>
215<td>
216<p><tt class="literal">no</tt></p>
217</td>
218<td>
219<p>Share</p>
220</td>
221</tr>
222<tr>
223<td>
224<p><tt class="literal">fake directory</tt> <tt class="literal">create times</tt></p>
225</td>
226<td>
227<p>Boolean</p>
228</td>
229<td>
230<p>Sets directory times to avoid an MS <em class="emphasis">nmake</em> bug</p>
231</td>
232<td>
233<p><tt class="literal">no</tt></p>
234</td>
235<td>
236<p>Share</p>
237</td>
238</tr>
239
240</table>
241
242
243<div class="sect3"><a name="samba2-CHP-11-SECT-1.1.1"/>
244
245<a name="INDEX-12"/><h3 class="head3">time server</h3>
246
247<p>Samba always operates as an SMB time server, matching the behavior of
248Windows systems. However, Samba's default is not to
249advertise itself as a time server to the network. When this option is
250set to <tt class="literal">yes</tt>, Samba advertises itself as an SMB time
251server:</p>
252
253<blockquote><pre class="code">[global]
254    time service = yes</pre></blockquote>
255
256
257</div>
258
259
260
261<div class="sect3"><a name="samba2-CHP-11-SECT-1.1.2"/>
262
263<a name="INDEX-13"/><h3 class="head3">time offset</h3>
264
265<p>To deal with clients that don't properly process
266daylight savings time, Samba provides the <tt class="literal">time</tt>
267<tt class="literal">offset</tt> option. If set, it adds the specified
268number of minutes to the current time. This is handy if
269you're in Newfoundland and Windows
270doesn't know about the 30-minute time difference
271there:</p>
272
273<blockquote><pre class="code">[global]
274    time offset = 30</pre></blockquote>
275
276
277</div>
278
279
280
281<div class="sect3"><a name="samba2-CHP-11-SECT-1.1.3"/>
282
283<a name="INDEX-14"/><h3 class="head3">dos filetimes</h3>
284
285<p>Traditionally, only the root user and the owner of a file can change
286its last-modified date on a Unix system. The share-level
287<tt class="literal">dos</tt> <tt class="literal">filetimes</tt> option allows the
288Samba server to mimic the characteristics of a DOS or Windows system:
289any user can change the last-modified date on a file in that share if
290she has write permission to it. To do this, Samba uses its root
291privileges to modify the timestamp on the file.</p>
292
293<p>By default, this option is disabled. Setting this option to
294<tt class="literal">yes</tt> is often necessary to allow PC
295<em class="emphasis">make</em> programs to work properly. Without it, they
296cannot change the last-modified date themselves. This often results
297in the program thinking <em class="emphasis">all</em> files need
298recompiling when they really don't.</p>
299
300
301</div>
302
303
304
305<div class="sect3"><a name="samba2-CHP-11-SECT-1.1.4"/>
306
307<h3 class="head3">dos filetime resolution</h3>
308
309<p>The <tt class="literal">dos</tt><a name="INDEX-15"/>
310<tt class="literal">filetime</tt> <tt class="literal">resolution</tt> parameter
311is a share-level option. If set to <tt class="literal">yes</tt>, Samba
312rounds file times to the closest 2-second boundary. This option
313exists primarily to satisfy a quirk in Windows that prevents Visual
314C++ from correctly recognizing that a file has not changed. You can
315enable it as follows:</p>
316
317<blockquote><pre class="code">[data]
318    dos filetime resolution = yes</pre></blockquote>
319
320<p>We recommend using this option only if you are using Microsoft Visual
321C++ on a Samba share that supports opportunistic locking.</p>
322
323
324</div>
325
326
327
328<div class="sect3"><a name="samba2-CHP-11-SECT-1.1.5"/>
329
330<h3 class="head3">fake directory create times</h3>
331
332<p>The <tt class="literal">fake</tt><a name="INDEX-16"/>
333<tt class="literal">directory</tt> <tt class="literal">create</tt>
334<tt class="literal">times</tt> option exists to keep PC
335<em class="emphasis">make</em> programs sane. VFAT and NTFS filesystems
336record the creation date of a specific directory, while Unix does
337not. Without this option, Samba takes the earliest recorded date it
338has for the directory (often the last-modified date of a file) and
339returns it to the client. If this is not sufficient, set the
340following option under a share definition:</p>
341
342<blockquote><pre class="code">[data]
343    fake directory create times = yes</pre></blockquote>
344
345<p>If set, Samba will adjust the directory create time it reports to the
346hardcoded value January 1, 1980. This is primarily used to convince
347the Visual C++ <em class="emphasis">nmake</em> program that any object
348files in its build directories are indeed younger than the creation
349date of the directory itself and need to be recompiled. <a name="INDEX-17"/> <a name="INDEX-18"/><a name="INDEX-19"/></p>
350
351
352</div>
353
354
355</div>
356
357
358</div>
359
360
361
362<div class="sect1"><a name="samba2-CHP-11-SECT-2"/>
363
364<h2 class="head1">Magic Scripts</h2>
365
366<p><em class="firstterm">Magic scripts</em> are a method of running programs
367on Unix and redirecting the output back to the SMB client. These are
368essentially an experimental hack. However, some users and their
369programs still rely on these two options for their programs to
370function correctly. Magic scripts are not widely trusted, and their
371use is highly discouraged by the Samba Team.</p>
372
373
374<div class="sect2"><a name="samba2-CHP-11-SECT-2.1"/>
375
376<h3 class="head2">Magic Script Options</h3>
377
378<p><a href="ch11.html#samba2-CHP-11-TABLE-2">Table 11-2</a> lists the options that deal with
379<a name="INDEX-20"/>magic scripts
380on the Samba server.</p>
381
382<a name="samba2-CHP-11-TABLE-2"/><h4 class="head4">Table 11-2. Magic script options</h4><table border="1">
383
384
385
386
387
388
389<tr>
390<th>
391<p>Option</p>
392</th>
393<th>
394<p>Parameters</p>
395</th>
396<th>
397<p>Function</p>
398</th>
399<th>
400<p>Default</p>
401</th>
402<th>
403<p>Scope</p>
404</th>
405</tr>
406
407
408<tr>
409<td>
410<p><tt class="literal">magic</tt> <tt class="literal">script</tt></p>
411</td>
412<td>
413<p>string (filename)</p>
414</td>
415<td>
416<p>File to be executed by Samba, as the logged-on user, when closed</p>
417</td>
418<td>
419<p>None</p>
420</td>
421<td>
422<p>Share</p>
423</td>
424</tr>
425<tr>
426<td>
427<p><tt class="literal">magic</tt> <tt class="literal">output</tt></p>
428</td>
429<td>
430<p>string (filename)</p>
431</td>
432<td>
433<p>File to log output from the magic file</p>
434</td>
435<td>
436<p><em class="emphasis">scriptname.out</em></p>
437</td>
438<td>
439<p>Share</p>
440</td>
441</tr>
442
443</table>
444
445
446<div class="sect3"><a name="samba2-CHP-11-SECT-2.1.1"/>
447
448<h3 class="head3">magic script</h3>
449
450<p>If the <tt class="literal">magic</tt><a name="INDEX-21"/>
451<tt class="literal">script</tt> option is set to a filename and the client
452creates a file by that name in that share, Samba will run the file as
453soon as the user has opened and closed it. For example,
454let's assume that the following option was created
455in the share <tt class="literal">[accounting]</tt>:</p>
456
457<blockquote><pre class="code">[accounting]
458    magic script = tally.sh</pre></blockquote>
459
460<p>Samba continually monitors the files in that share. If one by the
461name of <em class="emphasis">tally.sh</em> is closed (after being opened)
462by a user, Samba will execute the contents of that file locally. The
463file will be passed to the shell to execute; it must therefore be a
464legal Unix shell script. This means that it must have newline
465characters as line endings instead of Windows CRLFs. In addition, you
466need to use the <tt class="literal">#!</tt> directive at the beginning of
467the file to indicate under which shell or interpreter the script
468should run, unless the script is for the default shell on your
469system.</p>
470
471
472</div>
473
474
475
476<div class="sect3"><a name="samba2-CHP-11-SECT-2.1.2"/>
477
478<a name="INDEX-22"/><h3 class="head3">magic output</h3>
479
480<p>This option specifies an output file to which the script specified by
481the <tt class="literal">magic</tt> <tt class="literal">script</tt> option will
482send output. You must specify a filename in a writable directory:</p>
483
484<blockquote><pre class="code">[accounting]
485    magic script = tally.sh
486    magic output = /var/log/magicoutput</pre></blockquote>
487
488<p>If this option is omitted, the default output file is the name of the
489script (as stated in the <tt class="literal">magic</tt>
490<tt class="literal">script</tt> option) with the extension
491<em class="emphasis">.out</em> appended onto it.</p>
492
493
494</div>
495
496
497</div>
498
499
500</div>
501
502
503
504<div class="sect1"><a name="samba2-CHP-11-SECT-3"/>
505
506<h2 class="head1">Internationalization</h2>
507
508<p><a name="INDEX-23"/><a name="INDEX-24"/>Starting
509with Samba 3.0, Samba supports Unicode &quot;on the
510wire,&quot; requiring no additional effort on your part
511to support filenames and other text containing characters in
512international character sets.</p>
513
514
515<div class="sect2"><a name="samba2-CHP-11-SECT-3.1"/>
516
517<h3 class="head2">Internationalization Options</h3>
518
519<p>Samba 2.2.x has a limited ability to speak foreign tongues: if you
520need to support filenames containing characters that
521aren't in standard ASCII, some options that can help
522you are shown in <a href="ch11.html#samba2-CHP-11-TABLE-3">Table 11-3</a>.</p>
523
524<a name="samba2-CHP-11-TABLE-3"/><h4 class="head4">Table 11-3. Internationalization options</h4><table border="1">
525
526
527
528
529
530
531<tr>
532<th>
533<p>Option</p>
534</th>
535<th>
536<p>Parameters</p>
537</th>
538<th>
539<p>Function</p>
540</th>
541<th>
542<p>Default</p>
543</th>
544<th>
545<p>Scope</p>
546</th>
547</tr>
548
549
550<tr>
551<td>
552<p><tt class="literal">client code</tt> <tt class="literal">page</tt></p>
553</td>
554<td>
555<p>Described in this section</p>
556</td>
557<td>
558<p>Sets a code page to expect from clients</p>
559</td>
560<td>
561<p>850</p>
562</td>
563<td>
564<p>Global</p>
565</td>
566</tr>
567<tr>
568<td>
569<p><tt class="literal">character set</tt></p>
570</td>
571<td>
572<p>Described in this section</p>
573</td>
574<td>
575<p>Translates code pages into alternate Unix character sets</p>
576</td>
577<td>
578<p>None</p>
579</td>
580<td>
581<p>Global</p>
582</td>
583</tr>
584<tr>
585<td>
586<p><tt class="literal">coding system</tt></p>
587</td>
588<td>
589<p>Described in this section</p>
590</td>
591<td>
592<p>Translates code page 932 into an Asian character set</p>
593</td>
594<td>
595<p>None</p>
596</td>
597<td>
598<p>Global</p>
599</td>
600</tr>
601<tr>
602<td>
603<p><tt class="literal">valid chars</tt></p>
604</td>
605<td>
606<p>string (set of characters)</p>
607</td>
608<td>
609<p>Adds individual characters to a code page</p>
610</td>
611<td>
612<p>None</p>
613</td>
614<td>
615<p>Global</p>
616</td>
617</tr>
618
619</table>
620
621
622<div class="sect3"><a name="samba2-CHP-11-SECT-3.1.1"/>
623
624<h3 class="head3">client code page</h3>
625
626<p>The character sets on Windows platforms hark back to the original
627concept of a <em class="emphasis">code page</em><a name="INDEX-25"/>. These code pages are used by DOS and
628Windows clients to determine rules for mapping lowercase letters to
629uppercase letters. Samba can be instructed to use a variety of code
630pages through the use of the global
631<tt class="literal">client</tt><a name="INDEX-26"/> <tt class="literal">code</tt>
632<tt class="literal">page</tt> option to match the corresponding code page
633in use on the client. This option loads a code page definition file
634and can take the values specified in <a href="ch11.html#samba2-CHP-11-TABLE-4">Table 11-4</a>.</p>
635
636<a name="samba2-CHP-11-TABLE-4"/><h4 class="head4">Table 11-4. Valid code pages with Samba 2.0</h4><table border="1">
637
638
639
640<tr>
641<th>
642<p>Code page</p>
643</th>
644<th>
645<p>Definition</p>
646</th>
647</tr>
648
649
650<tr>
651<td>
652<p><tt class="literal">437</tt></p>
653</td>
654<td>
655<p>MS-DOS Latin (United States)</p>
656</td>
657</tr>
658<tr>
659<td>
660<p><tt class="literal">737</tt></p>
661</td>
662<td>
663<p>Windows 95 Greek</p>
664</td>
665</tr>
666<tr>
667<td>
668<p><tt class="literal">850</tt></p>
669</td>
670<td>
671<p>MS-DOS Latin 1 (Western European)</p>
672</td>
673</tr>
674<tr>
675<td>
676<p><tt class="literal">852</tt></p>
677</td>
678<td>
679<p>MS-DOS Latin 2 (Eastern European)</p>
680</td>
681</tr>
682<tr>
683<td>
684<p><tt class="literal">861</tt></p>
685</td>
686<td>
687<p>MS-DOS Icelandic</p>
688</td>
689</tr>
690<tr>
691<td>
692<p><tt class="literal">866</tt></p>
693</td>
694<td>
695<p>MS-DOS Cyrillic (Russian)</p>
696</td>
697</tr>
698<tr>
699<td>
700<p><tt class="literal">932</tt></p>
701</td>
702<td>
703<p>MS-DOS Japanese Shift-JIS</p>
704</td>
705</tr>
706<tr>
707<td>
708<p><tt class="literal">936</tt></p>
709</td>
710<td>
711<p>MS-DOS Simplified Chinese</p>
712</td>
713</tr>
714<tr>
715<td>
716<p><tt class="literal">949</tt></p>
717</td>
718<td>
719<p>MS-DOS Korean Hangul</p>
720</td>
721</tr>
722<tr>
723<td>
724<p><tt class="literal">950</tt></p>
725</td>
726<td>
727<p>MS-DOS Traditional Chinese</p>
728</td>
729</tr>
730
731</table>
732
733<p>You can set the client code page as follows:</p>
734
735<blockquote><pre class="code">[global]
736    client code page = 852</pre></blockquote>
737
738<p>The default value of this option is 850, for MS-DOS Latin 1. You can
739use the <em class="emphasis">make_smbcodepage</em> tool that comes with
740Samba (by default in <em class="filename">/usr/local/samba/bin</em> ) to
741create your own SMB code pages, in the event that those listed
742earlier are not sufficient.</p>
743
744
745</div>
746
747
748
749<div class="sect3"><a name="samba2-CHP-11-SECT-3.1.2"/>
750
751<h3 class="head3">character set</h3>
752
753<p>The global <tt class="literal">character</tt><a name="INDEX-27"/>
754<tt class="literal">set</tt> option can be used to convert filenames
755offered through a DOS code page (see the previous section, <a href="ch11.html#samba2-CHP-11-SECT-3.1.1">Section 11.3.1.1</a>) to equivalents that can be
756represented by Unix character sets other than those in the United
757States. For example, if you want to convert the Western European
758MS-DOS character set on the client to a Western European Unix
759character set on the server, you can use the following in your
760configuration file:</p>
761
762<blockquote><pre class="code">[global]
763    client code page = 850
764    character set = ISO8859-1</pre></blockquote>
765
766<p>Note that you must include a <tt class="literal">client</tt>
767<tt class="literal">code</tt> <tt class="literal">page</tt> option to specify the
768character set from which you are converting. The valid character sets
769(and their matching code pages) that Samba accepts are listed in
770<a href="ch11.html#samba2-CHP-11-TABLE-5">Table 11-5</a>.</p>
771
772<a name="samba2-CHP-11-TABLE-5"/><h4 class="head4">Table 11-5. Valid character sets</h4><table border="1">
773
774
775
776
777<tr>
778<th>
779<p>Character set</p>
780</th>
781<th>
782<p>Matching code page</p>
783</th>
784<th>
785<p>Definition</p>
786</th>
787</tr>
788
789
790<tr>
791<td>
792<p><tt class="literal">ISO8859-1</tt></p>
793</td>
794<td>
795<p><tt class="literal">850</tt></p>
796</td>
797<td>
798<p>Western European Unix</p>
799</td>
800</tr>
801<tr>
802<td>
803<p><tt class="literal">ISO8859-2</tt></p>
804</td>
805<td>
806<p><tt class="literal">852</tt></p>
807</td>
808<td>
809<p>Eastern European Unix</p>
810</td>
811</tr>
812<tr>
813<td>
814<p><tt class="literal">ISO8859-5</tt></p>
815</td>
816<td>
817<p><tt class="literal">866</tt></p>
818</td>
819<td>
820<p>Russian Cyrillic Unix</p>
821</td>
822</tr>
823<tr>
824<td>
825<p><tt class="literal">ISO8859-7</tt></p>
826</td>
827<td>
828<p>737</p>
829</td>
830<td>
831<p>Greek Unix</p>
832</td>
833</tr>
834<tr>
835<td>
836<p><tt class="literal">KOI8-R</tt></p>
837</td>
838<td>
839<p><tt class="literal">866</tt></p>
840</td>
841<td>
842<p>Alternate Russian Cyrillic Unix</p>
843</td>
844</tr>
845
846</table>
847
848<p>Normally, the <tt class="literal">character</tt> <tt class="literal">set</tt>
849option is disabled completely.</p>
850
851
852</div>
853
854
855
856<div class="sect3"><a name="samba2-CHP-11-SECT-3.1.3"/>
857
858<h3 class="head3">coding system</h3>
859
860<p>The <tt class="literal">coding</tt><a name="INDEX-28"/> <tt class="literal">system</tt>
861option is similar to the <tt class="literal">character</tt>
862<tt class="literal">set</tt> option. However, its purpose is to determine
863how to convert a Japanese Shift JIS code page into an appropriate
864Unix character set. To use this option, the <tt class="literal">client</tt>
865<tt class="literal">code</tt> <tt class="literal">page</tt> option described
866previously must be set to page <tt class="literal">932</tt>. The valid
867coding systems that Samba accepts are listed in <a href="ch11.html#samba2-CHP-11-TABLE-6">Table 11-6</a>.</p>
868
869<a name="samba2-CHP-11-TABLE-6"/><h4 class="head4">Table 11-6. Valid coding-system parameters</h4><table border="1">
870
871
872
873<tr>
874<th>
875<p>Character set</p>
876</th>
877<th>
878<p>Definition</p>
879</th>
880</tr>
881
882
883<tr>
884<td>
885<p><tt class="literal">SJIS</tt></p>
886</td>
887<td>
888<p>Standard Shift JIS</p>
889</td>
890</tr>
891<tr>
892<td>
893<p><tt class="literal">JIS8</tt></p>
894</td>
895<td>
896<p>Eight-bit JIS codes</p>
897</td>
898</tr>
899<tr>
900<td>
901<p><tt class="literal">J8BB</tt></p>
902</td>
903<td>
904<p>Eight-bit JIS codes</p>
905</td>
906</tr>
907<tr>
908<td>
909<p><tt class="literal">J8BH</tt></p>
910</td>
911<td>
912<p>Eight-bit JIS codes</p>
913</td>
914</tr>
915<tr>
916<td>
917<p><tt class="literal">J8@B</tt></p>
918</td>
919<td>
920<p>Eight-bit JIS codes</p>
921</td>
922</tr>
923<tr>
924<td>
925<p><tt class="literal">J8@J</tt></p>
926</td>
927<td>
928<p>Eight-bit JIS codes</p>
929</td>
930</tr>
931<tr>
932<td>
933<p><tt class="literal">J8@H</tt></p>
934</td>
935<td>
936<p>Eight-bit JIS codes</p>
937</td>
938</tr>
939<tr>
940<td>
941<p><tt class="literal">JIS7</tt></p>
942</td>
943<td>
944<p>Seven-bit JIS codes</p>
945</td>
946</tr>
947<tr>
948<td>
949<p><tt class="literal">J7BB</tt></p>
950</td>
951<td>
952<p>Seven-bit JIS codes</p>
953</td>
954</tr>
955<tr>
956<td>
957<p><tt class="literal">J7BH</tt></p>
958</td>
959<td>
960<p>Seven-bit JIS codes</p>
961</td>
962</tr>
963<tr>
964<td>
965<p><tt class="literal">J7@B</tt></p>
966</td>
967<td>
968<p>Seven-bit JIS codes</p>
969</td>
970</tr>
971<tr>
972<td>
973<p><tt class="literal">J7@J</tt></p>
974</td>
975<td>
976<p>Seven-bit JIS codes</p>
977</td>
978</tr>
979<tr>
980<td>
981<p><tt class="literal">J7@H</tt></p>
982</td>
983<td>
984<p>Seven-bit JIS codes</p>
985</td>
986</tr>
987<tr>
988<td>
989<p><tt class="literal">JUNET</tt></p>
990</td>
991<td>
992<p>JUNET codes</p>
993</td>
994</tr>
995<tr>
996<td>
997<p><tt class="literal">JUBB</tt></p>
998</td>
999<td>
1000<p>JUNET codes</p>
1001</td>
1002</tr>
1003<tr>
1004<td>
1005<p><tt class="literal">JUBH</tt></p>
1006</td>
1007<td>
1008<p>JUNET codes</p>
1009</td>
1010</tr>
1011<tr>
1012<td>
1013<p><tt class="literal">JU@B</tt></p>
1014</td>
1015<td>
1016<p>JUNET codes</p>
1017</td>
1018</tr>
1019<tr>
1020<td>
1021<p><tt class="literal">JU@J</tt></p>
1022</td>
1023<td>
1024<p>JUNET codes</p>
1025</td>
1026</tr>
1027<tr>
1028<td>
1029<p><tt class="literal">JU@H</tt></p>
1030</td>
1031<td>
1032<p>JUNET codes</p>
1033</td>
1034</tr>
1035<tr>
1036<td>
1037<p><tt class="literal">EUC</tt></p>
1038</td>
1039<td>
1040<p>EUC codes</p>
1041</td>
1042</tr>
1043<tr>
1044<td>
1045<p><tt class="literal">HEX</tt></p>
1046</td>
1047<td>
1048<p>Three-byte hexadecimal code</p>
1049</td>
1050</tr>
1051<tr>
1052<td>
1053<p><tt class="literal">CAP</tt></p>
1054</td>
1055<td>
1056<p>Three-byte hexadecimal code (Columbia AppleTalk Program)</p>
1057</td>
1058</tr>
1059
1060</table>
1061
1062
1063</div>
1064
1065
1066
1067<div class="sect3"><a name="samba2-CHP-11-SECT-3.1.4"/>
1068
1069<h3 class="head3">valid chars</h3>
1070
1071<p>The <tt class="literal">valid</tt><a name="INDEX-29"/> <tt class="literal">chars</tt> option
1072can be used to add individual characters to a code page. You can use
1073this option as follows:</p>
1074
1075<blockquote><pre class="code">valid chars = &Icirc;
1076valid chars = 0450:0420 0x0A20:0x0A00
1077valid chars = A:a</pre></blockquote>
1078
1079<p>Each character in the list specified should be separated by spaces.
1080If there is a colon between two characters or a numerical equivalent,
1081the data to the left of the colon is considered an uppercase
1082character, while the data to the right is considered the lowercase
1083character. You can represent characters both by literals (if you can
1084type them) and by octal, hexadecimal, or decimal Unicode equivalents.</p>
1085
1086<p>If you use this option, it must be listed after the
1087<tt class="literal">client</tt> <tt class="literal">code</tt>
1088<tt class="literal">page</tt> to which you wish to add the character.
1089<a name="INDEX-30"/><a name="INDEX-31"/></p>
1090
1091
1092</div>
1093
1094
1095</div>
1096
1097
1098</div>
1099
1100
1101
1102<div class="sect1"><a name="samba2-CHP-11-SECT-4"/>
1103
1104<h2 class="head1">Windows Messenger Service</h2>
1105
1106<p>One of the odd features of SMB protocol is its ability to send text
1107messages between computers. Although both the name and functionality
1108are similar to that of Windows Messenger, the two are not the same.
1109<a name="INDEX-32"/><a name="INDEX-33"/><a name="INDEX-34"/>Windows Messenger (also called MSN
1110Messenger) is an Internet-oriented instant messenging service, while
1111Windows Messenger Service is an older and simpler LAN-oriented
1112service. Using the Windows Messenger Service, messages can be
1113addressed to users, individual computers, or entire workgroups on the
1114network.</p>
1115
1116<p>The <a name="INDEX-35"/>WinPopup
1117tool (<em class="filename">Winpopup.exe</em>), shown in <a href="ch11.html#samba2-CHP-11-FIG-1">Figure 11-1</a>, can be used on Windows 95/98/Me to send or
1118receive messages. WinPopup is a handy tool for sending messages.
1119However, to receive messages, it must already be running when the
1120message is sent from the remote system.</p>
1121
1122<div class="figure"><a name="samba2-CHP-11-FIG-1"/><img src="figs/sam2_1101.gif"/></div><h4 class="head4">Figure 11-1. Sending a message from a Windows 95/98/Me system (left); receiving a message (right)</h4>
1123
1124<p>On Windows NT/2000/XP, the messenger service lets you receive
1125messages without having an application already running; messages will
1126automatically appear in a small dialog box on the screen when
1127received, as shown in <a href="ch11.html#samba2-CHP-11-FIG-2">Figure 11-2</a>.</p>
1128
1129<div class="figure"><a name="samba2-CHP-11-FIG-2"/><img src="figs/sam2_1102.gif"/></div><h4 class="head4">Figure 11-2. Receiving a message on a Windows 2000 system</h4>
1130
1131<p>To send messages, it is necessary to use the <em class="emphasis">net
1132send</em> command from a command-prompt window, like this:</p>
1133
1134<blockquote><pre class="code">C:\&gt; <tt class="userinput"><b>net send maya &quot;Who's There?&quot;</b></tt>
1135The message was successfully sent to MAYA.</pre></blockquote>
1136
1137
1138<div class="sect2"><a name="samba2-CHP-11-SECT-4.1"/>
1139
1140<h3 class="head2">Windows Messenger Service Configuration Option</h3>
1141
1142<p>Samba has a single option to handle Windows Messenger Service,
1143<tt class="literal">message</tt> <tt class="literal">command</tt>, as shown in
1144<a href="ch11.html#samba2-CHP-11-TABLE-7">Table 11-7</a>.</p>
1145
1146<a name="samba2-CHP-11-TABLE-7"/><h4 class="head4">Table 11-7. Windows Messenger Service configuration option</h4><table border="1">
1147
1148
1149
1150
1151
1152
1153<tr>
1154<th>
1155<p>Option</p>
1156</th>
1157<th>
1158<p>Parameter</p>
1159</th>
1160<th>
1161<p>Function</p>
1162</th>
1163<th>
1164<p>Default</p>
1165</th>
1166<th>
1167<p>Scope</p>
1168</th>
1169</tr>
1170
1171
1172<tr>
1173<td>
1174<p><tt class="literal">message</tt> <tt class="literal">command</tt></p>
1175</td>
1176<td>
1177<p>string (shell command)</p>
1178</td>
1179<td>
1180<p>Sets a command to run on Unix when a WinPopup message is received</p>
1181</td>
1182<td>
1183<p>None</p>
1184</td>
1185<td>
1186<p>Global</p>
1187</td>
1188</tr>
1189
1190</table>
1191
1192
1193<div class="sect3"><a name="samba2-CHP-11-SECT-4.1.1"/>
1194
1195<h3 class="head3">message command</h3>
1196
1197<p>Samba's
1198<tt class="literal">message</tt><a name="INDEX-36"/> <tt class="literal">command</tt>
1199option defines the command that will run on the server when a Windows
1200Messenger Service message arrives. The command will be executed as
1201the <tt class="literal">guest</tt> <tt class="literal">account</tt> user. What to
1202do with messages is questionable because most Samba hosts run as
1203unattended servers. One solution is to mail the messages to root like
1204this:</p>
1205
1206<blockquote><pre class="code">[global]
1207    message command = /bin/mail -s &quot;SMB Message From %f on %m&quot; root &lt;%s; rm %s</pre></blockquote>
1208
1209<p>Note the use of variables here. The <tt class="literal">%s</tt> variable
1210will be replaced by the name of the file in which the message
1211resides. This file should be deleted when the command is finished
1212with it; otherwise, a buildup of message files will collect on the
1213Samba server. In addition, the command must either exit quickly or
1214fork its own process (using an <tt class="literal">&amp;</tt> after the
1215command); otherwise, the client might suspend and wait for
1216notification that the command was sent successfully before
1217continuing.</p>
1218
1219<p>In addition to the standard variables, <a href="ch11.html#samba2-CHP-11-TABLE-8">Table 11-8</a>
1220shows the three unique variables that you can use in a
1221<tt class="literal">message</tt> <tt class="literal">command</tt>.</p>
1222
1223<a name="samba2-CHP-11-TABLE-8"/><h4 class="head4">Table 11-8. message command variables</h4><table border="1">
1224
1225
1226
1227<tr>
1228<th>
1229<p>Variable</p>
1230</th>
1231<th>
1232<p>Definition</p>
1233</th>
1234</tr>
1235
1236
1237<tr>
1238<td>
1239<p><tt class="literal">%s</tt></p>
1240</td>
1241<td>
1242<p>The name of the file in which the message resides</p>
1243</td>
1244</tr>
1245<tr>
1246<td>
1247<p><tt class="literal">%f</tt></p>
1248</td>
1249<td>
1250<p>The name of the system that sent the message</p>
1251</td>
1252</tr>
1253<tr>
1254<td>
1255<p><tt class="literal">%t</tt></p>
1256</td>
1257<td>
1258<p>The name of the system that is the destination of the message
1259<a name="INDEX-37"/><a name="INDEX-38"/><a name="INDEX-39"/></p>
1260</td>
1261</tr>
1262
1263</table>
1264
1265
1266</div>
1267
1268
1269</div>
1270
1271
1272</div>
1273
1274
1275
1276<div class="sect1"><a name="samba2-CHP-11-SECT-5"/>
1277
1278<h2 class="head1">Miscellaneous Options</h2>
1279
1280<p>Many Samba options are available to deal with operating system issues
1281on either Unix or Windows. In particular, some of these options are
1282used for setting limits for clients' use of
1283resources on the Unix server. The options shown in <a href="ch11.html#samba2-CHP-11-TABLE-9">Table 11-9</a> deal with some of these issues.</p>
1284
1285<a name="samba2-CHP-11-TABLE-9"/><h4 class="head4">Table 11-9. Miscellaneous options</h4><table border="1">
1286
1287
1288
1289
1290
1291
1292<tr>
1293<th>
1294<p>Option</p>
1295</th>
1296<th>
1297<p>Parameters</p>
1298</th>
1299<th>
1300<p>Function</p>
1301</th>
1302<th>
1303<p>Default</p>
1304</th>
1305<th>
1306<p>Scope</p>
1307</th>
1308</tr>
1309
1310
1311<tr>
1312<td>
1313<p><tt class="literal">deadtime</tt></p>
1314</td>
1315<td>
1316<p>numeric (minutes)</p>
1317</td>
1318<td>
1319<p>Number of minutes of inactivity before a connection should be
1320terminated.</p>
1321</td>
1322<td>
1323<p><tt class="literal">0</tt></p>
1324</td>
1325<td>
1326<p>Global</p>
1327</td>
1328</tr>
1329<tr>
1330<td>
1331<p><tt class="literal">dfree command</tt></p>
1332</td>
1333<td>
1334<p>string (command)</p>
1335</td>
1336<td>
1337<p>Used to specify a command that returns free disk space in a format
1338recognized by Samba.</p>
1339</td>
1340<td>
1341<p>None</p>
1342</td>
1343<td>
1344<p>Global</p>
1345</td>
1346</tr>
1347<tr>
1348<td>
1349<p><tt class="literal">fstype</tt></p>
1350</td>
1351<td>
1352<p><tt class="literal">NTFS</tt>, <tt class="literal">FAT</tt>, or
1353<tt class="literal">Samba</tt></p>
1354</td>
1355<td>
1356<p>Filesystem type reported by the server to the client.</p>
1357</td>
1358<td>
1359<p><tt class="literal">NTFS</tt></p>
1360</td>
1361<td>
1362<p>Global</p>
1363</td>
1364</tr>
1365<tr>
1366<td>
1367<p><tt class="literal">keepalive</tt></p>
1368</td>
1369<td>
1370<p>numeric (seconds)</p>
1371</td>
1372<td>
1373<p>Number of seconds between checks for an inoperative client.</p>
1374</td>
1375<td>
1376<p><tt class="literal">300</tt> (none)</p>
1377</td>
1378<td>
1379<p>Global</p>
1380</td>
1381</tr>
1382<tr>
1383<td>
1384<p><tt class="literal">max disk size</tt></p>
1385</td>
1386<td>
1387<p>numeric (MB)</p>
1388</td>
1389<td>
1390<p>Largest disk size to return to a client, some of which have limits.
1391Does not affect actual operations on the disk.</p>
1392</td>
1393<td>
1394<p><tt class="literal">0</tt> (infinity)</p>
1395</td>
1396<td>
1397<p>Global</p>
1398</td>
1399</tr>
1400<tr>
1401<td>
1402<p><tt class="literal">max mux</tt></p>
1403</td>
1404<td>
1405<p>numeric</p>
1406</td>
1407<td>
1408<p>Maximum number of simultaneous SMB operations that clients can make.</p>
1409</td>
1410<td>
1411<p><tt class="literal">50</tt></p>
1412</td>
1413<td>
1414<p>Global</p>
1415</td>
1416</tr>
1417<tr>
1418<td>
1419<p><tt class="literal">max open files</tt></p>
1420</td>
1421<td>
1422<p>numeric</p>
1423</td>
1424<td>
1425<p>Limits number of open files to be below Unix limits.</p>
1426</td>
1427<td>
1428<p><tt class="literal">10000</tt></p>
1429</td>
1430<td>
1431<p>Global</p>
1432</td>
1433</tr>
1434<tr>
1435<td>
1436<p><tt class="literal">max xmit</tt></p>
1437</td>
1438<td>
1439<p>numeric</p>
1440</td>
1441<td>
1442<p>Specifies the maximum packet size that Samba will send.</p>
1443</td>
1444<td>
1445<p><tt class="literal">65535</tt> or <tt class="literal">16644</tt></p>
1446</td>
1447<td>
1448<p>Global</p>
1449</td>
1450</tr>
1451<tr>
1452<td>
1453<p><tt class="literal">nt pipe support</tt></p>
1454</td>
1455<td>
1456<p>Boolean</p>
1457</td>
1458<td>
1459<p>Turns off an NT/2000/XP support feature; for benchmarking or in case
1460of an error.</p>
1461</td>
1462<td>
1463<p><tt class="literal">yes</tt></p>
1464</td>
1465<td>
1466<p>Global</p>
1467</td>
1468</tr>
1469<tr>
1470<td>
1471<p><tt class="literal">nt smb support</tt></p>
1472</td>
1473<td>
1474<p>Boolean</p>
1475</td>
1476<td>
1477<p>Turns off an NT/2000/XP support feature; for benchmarking or in case
1478of an error.</p>
1479</td>
1480<td>
1481<p><tt class="literal">yes</tt></p>
1482</td>
1483<td>
1484<p>Global</p>
1485</td>
1486</tr>
1487<tr>
1488<td>
1489<p><tt class="literal">ole locking</tt> <tt class="literal">compatibility</tt></p>
1490</td>
1491<td>
1492<p>Boolean</p>
1493</td>
1494<td>
1495<p>Remaps out-of-range lock requests used on Windows to fit in allowable
1496range on Unix. Turning it off causes Unix lock errors.</p>
1497</td>
1498<td>
1499<p><tt class="literal">yes</tt></p>
1500</td>
1501<td>
1502<p>Global</p>
1503</td>
1504</tr>
1505<tr>
1506<td>
1507<p><tt class="literal">panic action</tt></p>
1508</td>
1509<td>
1510<p>string</p>
1511</td>
1512<td>
1513<p>Command to run if Samba server fails; for debugging.</p>
1514</td>
1515<td>
1516<p>None</p>
1517</td>
1518<td>
1519<p>Global</p>
1520</td>
1521</tr>
1522<tr>
1523<td>
1524<p><tt class="literal">set directory</tt></p>
1525</td>
1526<td>
1527<p>Boolean</p>
1528</td>
1529<td>
1530<p>If <tt class="literal">yes</tt>, allows VMS clients to issue
1531<tt class="literal">set</tt> <tt class="literal">dir</tt> commands.</p>
1532</td>
1533<td>
1534<p><tt class="literal">no</tt></p>
1535</td>
1536<td>
1537<p>Global</p>
1538</td>
1539</tr>
1540<tr>
1541<td>
1542<p><tt class="literal">status</tt></p>
1543</td>
1544<td>
1545<p>Boolean</p>
1546</td>
1547<td>
1548<p>If <tt class="literal">yes</tt>, allows Samba to monitor status for
1549<tt class="literal">smbstatus</tt> command.</p>
1550</td>
1551<td>
1552<p><tt class="literal">yes</tt></p>
1553</td>
1554<td>
1555<p>Global</p>
1556</td>
1557</tr>
1558<tr>
1559<td>
1560<p><tt class="literal">strict sync</tt></p>
1561</td>
1562<td>
1563<p>Boolean</p>
1564</td>
1565<td>
1566<p>If <tt class="literal">no</tt>, ignores Windows application requests to
1567perform a sync-to-disk.</p>
1568</td>
1569<td>
1570<p><tt class="literal">no</tt></p>
1571</td>
1572<td>
1573<p>Global</p>
1574</td>
1575</tr>
1576<tr>
1577<td>
1578<p><tt class="literal">sync always</tt></p>
1579</td>
1580<td>
1581<p>Boolean</p>
1582</td>
1583<td>
1584<p>If <tt class="literal">yes</tt>, forces all client writes to be committed
1585to disk before returning from the call.</p>
1586</td>
1587<td>
1588<p><tt class="literal">no</tt></p>
1589</td>
1590<td>
1591<p>Global</p>
1592</td>
1593</tr>
1594<tr>
1595<td>
1596<p><tt class="literal">strip dot</tt></p>
1597</td>
1598<td>
1599<p>Boolean</p>
1600</td>
1601<td>
1602<p>If <tt class="literal">yes</tt>, strips trailing dots from Unix filenames.</p>
1603</td>
1604<td>
1605<p><tt class="literal">no</tt></p>
1606</td>
1607<td>
1608<p>Global</p>
1609</td>
1610</tr>
1611<tr>
1612<td>
1613<p><tt class="literal">change notify timeout</tt></p>
1614</td>
1615<td>
1616<p>numeric (seconds)</p>
1617</td>
1618<td>
1619<p>Interval between checks when a client asks to wait for a change in a
1620specified directory.</p>
1621</td>
1622<td>
1623<p><tt class="literal">60</tt></p>
1624</td>
1625<td>
1626<p>Global</p>
1627</td>
1628</tr>
1629<tr>
1630<td>
1631<p><tt class="literal">stat cache</tt></p>
1632</td>
1633<td>
1634<p>Boolean</p>
1635</td>
1636<td>
1637<p>If <tt class="literal">yes</tt>, Samba will cache recent name mappings.</p>
1638</td>
1639<td>
1640<p><tt class="literal">yes</tt></p>
1641</td>
1642<td>
1643<p>Global</p>
1644</td>
1645</tr>
1646<tr>
1647<td>
1648<p><tt class="literal">stat cache size</tt></p>
1649</td>
1650<td>
1651<p>numeric</p>
1652</td>
1653<td>
1654<p>Number of entries in the stat cache.</p>
1655</td>
1656<td>
1657<p><tt class="literal">50</tt></p>
1658</td>
1659<td>
1660<p>Global</p>
1661</td>
1662</tr>
1663
1664</table>
1665
1666
1667<div class="sect2"><a name="samba2-CHP-11-SECT-5.1"/>
1668
1669<a name="INDEX-40"/><h3 class="head2">deadtime</h3>
1670
1671<p>This global option sets the number of minutes that Samba will wait
1672for an inactive client before closing its session with the Samba
1673server. A client is considered inactive when it has no open files and
1674no data is being sent from it. The default value for this option is
16750, which means that Samba never closes any connection, regardless of
1676how long they have been inactive. This can lead to unnecessary
1677consumption of the server's resources by inactive
1678clients. We recommend that you override the default as follows:</p>
1679
1680<blockquote><pre class="code">[global]
1681    deadtime = 10</pre></blockquote>
1682
1683<p>This tells Samba to terminate any inactive client sessions after 10
1684minutes. For most networks, setting this option as such will not
1685inconvenience users because reconnections from the client are
1686generally performed transparently to the user. See also the
1687<tt class="literal">keepalive</tt> parameter.</p>
1688
1689
1690<div class="sect3"><a name="samba2-CHP-11-SECT-5.1.1"/>
1691
1692<a name="INDEX-41"/><h3 class="head3">dfree command</h3>
1693
1694<p>This global option is used on systems that incorrectly determine the
1695free space left on the disk. So far, the only confirmed system that
1696needs this option set is Ultrix. There is no default value for this
1697option, which means that Samba already knows how to compute the free
1698disk space on its own and the results are considered reliable. You
1699can override it as follows:</p>
1700
1701<blockquote><pre class="code">[global]
1702    dfree command = /usr/local/bin/dfree</pre></blockquote>
1703
1704<p>This option should point to a script that returns the total disk
1705space in a block and the number of available blocks. The Samba
1706documentation recommends the following as a usable script:</p>
1707
1708<blockquote><pre class="code">#!/bin/sh
1709df $1 | tail -1 | awk '{print $2&quot; &quot;$4}'</pre></blockquote>
1710
1711<p>On System V machines, the following will work:</p>
1712
1713<blockquote><pre class="code">#!/bin/sh
1714/usr/bin/df $1 | tail -1 | awk '{print $3&quot; &quot;$5}'</pre></blockquote>
1715
1716
1717</div>
1718
1719
1720
1721<div class="sect3"><a name="samba2-CHP-11-SECT-5.1.2"/>
1722
1723<a name="INDEX-42"/><h3 class="head3">fstype</h3>
1724
1725<p>This share-level option sets the type of filesystem that Samba
1726reports when queried by the client. Three strings can be used as a
1727value to this configuration option, as listed in <a href="ch11.html#samba2-CHP-11-TABLE-10">Table 11-10</a>.</p>
1728
1729<a name="samba2-CHP-11-TABLE-10"/><h4 class="head4">Table 11-10. Filesystem types</h4><table border="1">
1730
1731
1732
1733<tr>
1734<th>
1735<p>Value</p>
1736</th>
1737<th>
1738<p>Definition</p>
1739</th>
1740</tr>
1741
1742
1743<tr>
1744<td>
1745<p>NTFS</p>
1746</td>
1747<td>
1748<p>Microsoft Windows NT filesystem</p>
1749</td>
1750</tr>
1751<tr>
1752<td>
1753<p>FAT</p>
1754</td>
1755<td>
1756<p>DOS FAT filesystem</p>
1757</td>
1758</tr>
1759<tr>
1760<td>
1761<p>Samba</p>
1762</td>
1763<td>
1764<p>Samba filesystem</p>
1765</td>
1766</tr>
1767
1768</table>
1769
1770<p>The default value for this option is <tt class="literal">NTFS</tt>, which
1771represents a Windows NT filesystem. There probably
1772isn't a need to specify any other type of
1773filesystem. However, if you need to, you can override the default
1774value per share as follows:</p>
1775
1776<blockquote><pre class="code">[data]
1777    fstype = FAT</pre></blockquote>
1778
1779
1780</div>
1781
1782
1783
1784<div class="sect3"><a name="samba2-CHP-11-SECT-5.1.3"/>
1785
1786<a name="INDEX-43"/><h3 class="head3">keepalive</h3>
1787
1788<p>This global option specifies the number of seconds that Samba waits
1789between sending NetBIOS <em class="emphasis">keepalive packets</em>. These
1790packets are used to ping a client to detect whether it is still alive
1791and on the network. The default value for this option is
1792<tt class="literal">300</tt> (5 minutes), which you can override as
1793follows:</p>
1794
1795<blockquote><pre class="code">[global]
1796    keepalive = 600</pre></blockquote>
1797
1798<p>The value of <tt class="literal">600</tt> (10 minutes) is good for networks
1799populated by reliable clients. If your network contains relatively
1800unreliable clients, you might prefer to set
1801<tt class="literal">keepalive</tt> to a lower value, such as
1802<tt class="literal">30</tt>. If <tt class="literal">keepalive</tt> is set to 0,
1803no NetBIOS keepalive packets will be sent. See also the
1804<tt class="literal">deadtime</tt> parameter.</p>
1805
1806
1807</div>
1808
1809
1810
1811<div class="sect3"><a name="samba2-CHP-11-SECT-5.1.4"/>
1812
1813<a name="INDEX-44"/><h3 class="head3">max disk size</h3>
1814
1815<p>This global option specifies an illusory limit, in megabytes, for
1816each share that Samba is offering. It only affects how much disk
1817space Samba reports the share as having and does not prevent more
1818disk space from actually being available for use. You would typically
1819set this option to prevent clients with older operating
1820systems&mdash;or running buggy applications&mdash;from being confused
1821by large disk spaces. For example, some older Windows applications
1822become confused when they encounter a share larger than 1 gigabyte.
1823To work around this problem, <tt class="literal">max</tt>
1824<tt class="literal">disk</tt> <tt class="literal">size</tt> can be set as
1825follows:</p>
1826
1827<blockquote><pre class="code">[global]
1828    max disk size = 1000</pre></blockquote>
1829
1830<p>The default value for this option is <tt class="literal">0</tt>, which
1831means there is no upper limit.</p>
1832
1833
1834</div>
1835
1836
1837
1838<div class="sect3"><a name="samba2-CHP-11-SECT-5.1.5"/>
1839
1840<a name="INDEX-45"/><h3 class="head3">max mux</h3>
1841
1842<p>This global option specifies the maximum number of concurrent SMB
1843operations Samba allows. The default value for this option is
1844<tt class="literal">50</tt>. You can override it as follows:</p>
1845
1846<blockquote><pre class="code">[global]
1847    max mux = 100</pre></blockquote>
1848
1849
1850</div>
1851
1852
1853
1854<div class="sect3"><a name="samba2-CHP-11-SECT-5.1.6"/>
1855
1856<a name="INDEX-46"/><h3 class="head3">max open files</h3>
1857
1858<p>This global option specifies the maximum number of open files that
1859Samba should allow at any given time for all processes. This value
1860must be equal to or less than the amount allowed by the operating
1861system, which varies from system to system. The default value for
1862this option is <tt class="literal">10000</tt>. You can override it as
1863follows:</p>
1864
1865<blockquote><pre class="code">[global]
1866    max open files = 8000</pre></blockquote>
1867
1868
1869</div>
1870
1871
1872
1873<div class="sect3"><a name="samba2-CHP-11-SECT-5.1.7"/>
1874
1875<a name="INDEX-47"/><h3 class="head3">max xmit</h3>
1876
1877<p>This global option sets the maximum size of packets that Samba
1878exchanges with a client. In rare cases, setting a smaller maximum
1879packet size can increase performance, especially with Windows for
1880Workgroups. In Samba versions up to 2.2.5, the default value for this
1881option is <tt class="literal">65535</tt>. In 2.2.7 and later versions, the
1882default was changed to <tt class="literal">16644</tt> to match the behavior
1883of Windows 2000 and improve support for Windows NT 4.0. You can
1884override the default as follows:</p>
1885
1886<blockquote><pre class="code">[global]
1887    max xmit = 4096</pre></blockquote>
1888
1889
1890</div>
1891
1892
1893
1894<div class="sect3"><a name="samba2-CHP-11-SECT-5.1.8"/>
1895
1896<a name="INDEX-48"/><h3 class="head3">nt pipe support</h3>
1897
1898<p>This global option is used by developers to allow or disallow Windows
1899NT/2000/XP clients the ability to make connections to
1900<a name="INDEX-49"/>NT-specific SMB IPC$ pipes. As a user, you
1901should never need to override the default:</p>
1902
1903<blockquote><pre class="code">[global]
1904    nt pipe support = yes</pre></blockquote>
1905
1906
1907</div>
1908
1909
1910
1911<div class="sect3"><a name="samba2-CHP-11-SECT-5.1.9"/>
1912
1913<a name="INDEX-50"/><h3 class="head3">nt smb support</h3>
1914
1915<p>This global option is used by developers to negotiate NT-specific SMB
1916options with Windows NT/2000/XP clients. The Samba Team has
1917discovered that slightly better performance comes from setting this
1918value to <tt class="literal">no</tt>. However, as a user, you should
1919probably not override the default:</p>
1920
1921<blockquote><pre class="code">[global]
1922    nt smb support = yes</pre></blockquote>
1923
1924
1925</div>
1926
1927
1928
1929<div class="sect3"><a name="samba2-CHP-11-SECT-5.1.10"/>
1930
1931<a name="INDEX-51"/><h3 class="head3">ole locking compatibility</h3>
1932
1933<p>This global option turns off Samba's internal
1934byte-range locking manipulation in files, which gives compatibility
1935with Object Linking and Embedding (OLE) applications that use high
1936byte-range locks as a method of interprocess communication. The
1937default value for this option is <tt class="literal">yes</tt>. If you trust
1938your Unix locking mechanisms, you can override it as follows:</p>
1939
1940<blockquote><pre class="code">[global]
1941    ole locking compatibility = no</pre></blockquote>
1942
1943
1944</div>
1945
1946
1947
1948<div class="sect3"><a name="samba2-CHP-11-SECT-5.1.11"/>
1949
1950<a name="INDEX-52"/><h3 class="head3">panic action</h3>
1951
1952<p>This global option specifies a command to execute in the event that
1953Samba encounters a fatal error when loading or running. There is no
1954default value for this option. You can specify an action as follows:</p>
1955
1956<blockquote><pre class="code">[global]
1957    panic action = /bin/csh -c
1958          'xedit &lt;&lt;: &quot;Samba has shutdown unexpectedly&quot;;:'</pre></blockquote>
1959
1960
1961</div>
1962
1963
1964
1965<div class="sect3"><a name="samba2-CHP-11-SECT-5.1.12"/>
1966
1967<a name="INDEX-53"/><h3 class="head3">set directory</h3>
1968
1969<p>This Boolean share-level option allows <a name="INDEX-54"/>Digital Pathworks clients to
1970use the <em class="emphasis">setdir</em> command to change directories on
1971the server. If you are not using the Digital Pathworks client, you
1972should not need to alter this option. The default value for this
1973option is <tt class="literal">no</tt>. You can override it per share as
1974follows:</p>
1975
1976<blockquote><pre class="code">[data]
1977    set directory = yes</pre></blockquote>
1978
1979
1980</div>
1981
1982
1983
1984<div class="sect3"><a name="samba2-CHP-11-SECT-5.1.13"/>
1985
1986<a name="INDEX-55"/><h3 class="head3">status</h3>
1987
1988<p>This global option indicates whether Samba should log all active
1989connections to a status file. This file is used only by the
1990<em class="emphasis">smbstatus</em> command. If you have no intentions of
1991using this command, you can set this option to <tt class="literal">no</tt>,
1992which can result in a small increase of speed on the server. The
1993default value for this option is <tt class="literal">yes</tt>. You can
1994override it as follows:</p>
1995
1996<blockquote><pre class="code">[global]
1997    status = no</pre></blockquote>
1998
1999
2000</div>
2001
2002
2003
2004<div class="sect3"><a name="samba2-CHP-11-SECT-5.1.14"/>
2005
2006<a name="INDEX-56"/><h3 class="head3">strict sync</h3>
2007
2008<p>This share-level option determines whether Samba honors all requests
2009to perform a disk sync when requested to do so by a client. Many
2010Windows clients request a disk sync when they are really just trying
2011to flush data to their own open files. In this case, a disk sync is
2012generally unnecessary on Unix due to its high reliability, and it
2013mostly has the effect of substantially reducing the performance of
2014the Samba host system. The default value for this option is
2015<tt class="literal">no</tt>, which allows the superfluous disk sync
2016requests to be ignored. You can override the default as follows:</p>
2017
2018<blockquote><pre class="code">[data]
2019    strict sync = yes</pre></blockquote>
2020
2021
2022</div>
2023
2024
2025
2026<div class="sect3"><a name="samba2-CHP-11-SECT-5.1.15"/>
2027
2028<a name="INDEX-57"/><h3 class="head3">sync always</h3>
2029
2030<p>This share-level option decides whether every write to disk should be
2031followed by a disk synchronization before the write call returns
2032control to the client. Even if the value of this option is
2033<tt class="literal">no</tt>, clients can request a disk synchronization;
2034see the earlier <tt class="literal">strict</tt> <tt class="literal">sync</tt>
2035option. The default value for this option is <tt class="literal">no</tt>.
2036You can override it per share as follows:</p>
2037
2038<blockquote><pre class="code">[data]
2039    sync always = yes</pre></blockquote>
2040
2041
2042</div>
2043
2044
2045
2046<div class="sect3"><a name="samba2-CHP-11-SECT-5.1.16"/>
2047
2048<a name="INDEX-58"/><h3 class="head3">strip dot</h3>
2049
2050<p>This global option determines whether to remove the trailing dot from
2051Unix filenames that are formatted with a dot at the end. The default
2052value for this option is <tt class="literal">no</tt>. You can override it
2053per share as follows:</p>
2054
2055<blockquote><pre class="code">[global]
2056    strip dot = yes</pre></blockquote>
2057
2058
2059</div>
2060
2061
2062
2063<div class="sect3"><a name="samba2-CHP-11-SECT-5.1.17"/>
2064
2065<h3 class="head3">change notify timeout</h3>
2066
2067<p>The <tt class="literal">change</tt><a name="INDEX-59"/>
2068<tt class="literal">notify</tt> <tt class="literal">timeout</tt> global option
2069emulates a Windows NT/2000 SMB feature called <em class="firstterm">change
2070notification</em><a name="INDEX-60"/>. This allows a client to request
2071that a Windows NT/2000 server periodically monitor a specific
2072directory on a share for any changes. If changes occur, the server
2073will notify the client.</p>
2074
2075<p>Samba performs this function for its clients at an interval that
2076defaults to 1 minute (60 seconds). Performing these checks too often
2077can slow down the server considerably; however, you can use this
2078option to specify an alternate time that Samba should wait between
2079performing checks:</p>
2080
2081<blockquote><pre class="code">[global]
2082    change notify timeout = 30</pre></blockquote>
2083
2084
2085</div>
2086
2087
2088
2089<div class="sect3"><a name="samba2-CHP-11-SECT-5.1.18"/>
2090
2091<h3 class="head3">stat cache</h3>
2092
2093<p>The <tt class="literal">stat</tt><a name="INDEX-61"/> <tt class="literal">cache</tt> global
2094option turns on caching of recent case-insensitive name mappings. The
2095default is <tt class="literal">yes</tt>. The Samba Team recommends that you
2096never change this parameter.</p>
2097
2098
2099</div>
2100
2101
2102
2103<div class="sect3"><a name="samba2-CHP-11-SECT-5.1.19"/>
2104
2105<h3 class="head3">stat cache size</h3>
2106
2107<p>The <tt class="literal">stat</tt><a name="INDEX-62"/> <tt class="literal">cache</tt>
2108<tt class="literal">size</tt> global option sets the number of cache
2109entries to be used for the <tt class="literal">stat</tt>
2110<tt class="literal">cache</tt> option. The default here is
2111<tt class="literal">50</tt>. Again, the Samba Team recommends that you
2112never change this parameter.</p>
2113
2114
2115</div>
2116
2117
2118</div>
2119
2120
2121</div>
2122
2123<hr/><h4 class="head4"><a href="toc.html">TOC</a></h4></body></html>
2124