Changed default for max mux to 50 in line with source change.
[samba.git] / docs / manpages / smb.conf.5
1 .TH SMB.CONF 5 smb.conf smb.conf
2 .SH NAME
3 smb.conf \- configuration file for smbd
4 .SH SYNOPSIS
5 .B smb.conf
6 .SH DESCRIPTION
7 The
8 .B smb.conf
9 file is a configuration file for the Samba suite.
10
11 .B smb.conf
12 contains runtime configuration information for the
13 .B smbd
14 program. The
15 .B smbd
16 program provides LanManager-like services to clients
17 using the SMB protocol.
18 .SH FILE FORMAT
19 The file consists of sections and parameters. A section begins with the 
20 name of the section in square brackets and continues until the next
21 section begins. Sections contain parameters of the form 'name = value'.
22
23 The file is line-based - that is, each newline-terminated line represents
24 either a comment, a section name or a parameter.
25
26 Section and parameter names are not case sensitive.
27
28 Only the first equals sign in a parameter is significant. Whitespace before 
29 or after the first equals sign is discarded. Leading, trailing and internal
30 whitespace in section and parameter names is irrelevant. Leading and
31 trailing whitespace in a parameter value is discarded. Internal whitespace
32 within a parameter value is retained verbatim.
33
34 Any line beginning with a semicolon is ignored, as are lines containing 
35 only whitespace.
36
37 Any line ending in a \e is "continued" on the next line in the
38 customary UNIX fashion.
39
40 The values following the equals sign in parameters are all either a string
41 (no quotes needed) or a boolean, which may be given as yes/no, 0/1 or
42 true/false. Case is not significant in boolean values, but is preserved
43 in string values. Some items such as create modes are numeric.
44 .SH SERVICE DESCRIPTIONS
45 Each section in the configuration file describes a service. The section name
46 is the service name and the parameters within the section define the service's
47 attributes.
48
49 There are three special sections, [global], [homes] and [printers], which are
50 described under 'special sections'. The following notes apply to ordinary 
51 service descriptions.
52
53 A service consists of a directory to which access is being given plus a 
54 description of the access rights which are granted to the user of the 
55 service. Some housekeeping options are also specifiable.
56
57 Services are either filespace services (used by the client as an extension of
58 their native file systems) or printable services (used by the client to access
59 print services on the host running the server).
60
61 Services may be guest services, in which case no password is required to
62 access them. A specified guest account is used to define access privileges
63 in this case.
64
65 Services other than guest services will require a password to access
66 them. The client provides the username. As many clients only provide
67 passwords and not usernames, you may specify a list of usernames to
68 check against the password using the "user=" option in the service
69 definition. 
70
71 Note that the access rights granted by the server are masked by the access
72 rights granted to the specified or guest user by the host system. The 
73 server does not grant more access than the host system grants.
74
75 The following sample section defines a file space service. The user has write
76 access to the path /home/bar. The service is accessed via the service name 
77 "foo":
78
79         [foo]
80                 path = /home/bar
81                 writable = true
82
83 The following sample section defines a printable service. The service is 
84 readonly, but printable. That is, the only write access permitted is via 
85 calls to open, write to and close a spool file. The 'guest ok' parameter 
86 means access will be permitted as the default guest user (specified elsewhere):
87
88         [aprinter]
89                 path = /usr/spool/public
90                 read only = true
91                 printable = true
92                 public = true
93 .SH SPECIAL SECTIONS
94
95 .SS The [global] section
96 .RS 3
97 Parameters in this section apply to the server as a whole, or are defaults
98 for services which do not specifically define certain items. See the notes
99 under 'Parameters' for more information.
100 .RE
101
102 .SS The [homes] section
103 .RS 3
104 If a section called 'homes' is included in the configuration file, services
105 connecting clients to their home directories can be created on the fly by the
106 server.
107
108 When the connection request is made, the existing services are scanned. If a
109 match is found, it is used. If no match is found, the requested service name is
110 treated as a user name and looked up in the local passwords file. If the
111 name exists and the correct password has been given, a service is created
112 by cloning the [homes] section.
113
114 Some modifications are then made to the newly created section:
115
116 .RS 3
117 The service name is changed from 'homes' to the located username
118
119 If no path was given, the path is set to the user's home directory.
120 .RE
121
122 If you decide to use a path= line in your [homes] section then you may
123 find it useful to use the %S macro. For example path=/data/pchome/%S
124 would be useful if you have different home directories for your PCs
125 than for UNIX access.
126
127 This is a fast and simple way to give a large number of clients access to
128 their home directories with a minimum of fuss.
129
130 A similar process occurs if the requested service name is "homes", except that
131 the service name is not changed to that of the requesting user. This method
132 of using the [homes] section works well if different users share a client PC.
133
134 The [homes] section can specify all the parameters a normal service section
135 can specify, though some make more sense than others. The following is a 
136 typical and suitable [homes] section:
137
138         [homes]
139                 writable = yes
140
141 An important point:
142
143 .RS 3
144 If guest access is specified in the [homes] section, all home directories will
145 be accessible to all clients
146 .B without a password.
147 In the very unlikely event
148 that this is actually desirable, it would be wise to also specify read only
149 access.
150 .RE
151 .RE
152
153 Note that the browseable flag for auto home directories will be
154 inherited from the global browseable flag, not the [homes] browseable
155 flag. This is useful as it means setting browseable=no in the [homes]
156 section will hide the [homes] service but make any auto home
157 directories visible.
158
159 .SS The [printers] section
160 .RS 3
161 This section works like [homes], but for printers.
162
163 If a [printers] section occurs in the configuration file, users are able 
164 to connect to any printer specified in the local host's printcap file.
165
166 When a connection request is made, the existing services are scanned. If a
167 match is found, it is used. If no match is found, but a [homes] section
168 exists, it is used as described above. Otherwise, the requested service name is
169 treated as a printer name and the appropriate printcap file is scanned to
170 see if the requested service name is a valid printer name. If a match is
171 found, a new service is created by cloning the [printers] section.
172
173 A few modifications are then made to the newly created section:
174
175 .RS 3
176 The service name is set to the located printer name
177
178 If no printer name was given, the printer name is set to the located printer
179 name
180
181 If the service does not permit guest access and no username was given, the 
182 username is set to the located printer name.
183 .RE
184
185 Note that the [printers] service MUST be printable - if you specify otherwise,
186 the server will refuse to load the configuration file.
187
188 Typically the path specified would be that of a world-writable spool directory
189 with the sticky bit set on it. A typical [printers] entry would look like this:
190
191         [printers]
192                 path = /usr/spool/public
193                 writable = no
194                 public = yes
195                 printable = yes 
196
197 All aliases given for a printer in the printcap file are legitimate printer
198 names as far as the server is concerned. If your printing subsystem doesn't
199 work like that, you will have to set up a pseudo-printcap. This is a file
200 consisting of one or more lines like this:
201
202         alias|alias|alias|alias...
203
204 Each alias should be an acceptable printer name for your printing 
205 subsystem. In the [global] section, specify the new file as your printcap.
206 The server will then only recognise names found in your pseudo-printcap,
207 which of course can contain whatever aliases you like. The same technique
208 could be used simply to limit access to a subset of your local printers.
209
210 An alias, by the way, is defined as any component of the first entry of a 
211 printcap record. Records are separated by newlines, components (if there are 
212 more than one) are separated by vertical bar symbols ("|").
213 .RE
214 .SH PARAMETERS
215 Parameters define the specific attributes of services.
216
217 Some parameters are specific to the [global] section (eg., security).
218 Some parameters are usable in all sections (eg., create mode). All others are
219 permissible only in normal sections. For the purposes of the following
220 descriptions the [homes] and [printers] sections will be considered normal.
221 The letter 'G' in parentheses indicates that a parameter is specific to the
222 [global] section. The letter 'S' indicates that a parameter can be
223 specified in a service specific section. Note that all S parameters
224 can also be specified in the [global] section - in which case they
225 will define the default behaviour for all services.
226
227 Parameters are arranged here in alphabetical order - this may not create
228 best bedfellows, but at least you can find them! Where there are synonyms,
229 the preferred synonym is described, others refer to the preferred synonym.
230
231 .SS VARIABLE SUBSTITUTIONS
232
233 Many of the strings that are settable in the config file can take
234 substitutions. For example the option "path = /tmp/%u" would be
235 interpreted as "path = /tmp/john" if the user connected with the
236 username john.
237
238 These substitutions are mostly noted in the descriptions below, but
239 there are some general substitutions which apply whenever they might be
240 relevant. These are:
241
242 %S = the name of the current service, if any
243
244 %P = the root directory of the current service, if any
245
246 %u = user name of the current service, if any
247
248 %g = primary group name of %u
249
250 %U = session user name (the user name that the client wanted, not
251 necessarily the same as the one they got)
252
253 %G = primary group name of %U
254
255 %H = the home directory of the user given by %u
256
257 %v = the Samba version
258
259 %h = the hostname that Samba is running on
260
261 %m = the netbios name of the client machine (very useful)
262
263 %L = the netbios name of the server. This allows you to change your
264 config based on what the client calls you. Your server can have a "dual
265 personality".
266
267 %M = the internet name of the client machine
268
269 %d = The process id of the current server process
270
271 %a = the architecture of the remote machine. Only some are recognised,
272 and those may not be 100% reliable. It currently recognises Samba,
273 WfWg, WinNT and Win95. Anything else will be known as "UNKNOWN". If it
274 gets it wrong then sending me a level 3 log should allow me to fix it.
275
276 %I = The IP address of the client machine
277
278 %T = the current date and time
279
280 There are some quite creative things that can be done with these
281 substitutions and other smb.conf options.
282
283 .SS NAME MANGLING
284
285 Samba supports "name mangling" so that DOS and Windows clients can use
286 files that don't conform to the 8.3 format. It can also be set to adjust
287 the case of 8.3 format filenames.
288
289 There are several options that control the way mangling is performed,
290 and they are grouped here rather than listed separately. For the
291 defaults look at the output of the testparm program.
292
293 All of these options can be set separately for each service (or
294 globally, of course).
295
296 The options are:
297
298 "mangle case = yes/no" controls if names that have characters that
299 aren't of the "default" case are mangled. For example, if this is yes
300 then a name like "Mail" would be mangled. Default no.
301
302 "case sensitive = yes/no" controls whether filenames are case
303 sensitive. If they aren't then Samba must do a filename search and
304 match on passed names. Default no.
305
306 "default case = upper/lower" controls what the default case is for new
307 filenames. Default lower.
308
309 "preserve case = yes/no" controls if new files are created with the
310 case that the client passes, or if they are forced to be the "default"
311 case. Default no.
312
313 "short preserve case = yes/no" controls if new files which conform to 8.3
314 syntax, that is all in upper case and of suitable length, are created
315 upper case, or if they are forced to be the "default" case. This option can
316 be use with "preserve case = yes" to permit long filenames to retain their
317 case, while short names are lowered. Default no.
318
319 .SS COMPLETE LIST OF GLOBAL PARAMETERS
320
321 Here is a list of all global parameters. See the section of each
322 parameter for details.  Note that some are synonyms.
323
324 auto services
325
326 browse list
327
328 character set
329
330 client code page
331
332 config file
333
334 deadtime
335
336 debuglevel
337
338 default
339
340 default service
341
342 dfree command
343
344 domain controller
345
346 domain master
347
348 encrypt passwords
349
350 getwd cache
351
352 homedir map
353
354 hosts equiv
355
356 include
357
358 keepalive
359
360 lock dir
361
362 load printers
363
364 local master
365
366 lock directory
367
368 log file
369
370 log level
371
372 logon path
373
374 logon script
375
376 lpq cache time
377
378 mangled stack
379
380 max log size
381
382 max mux
383
384 max packet
385
386 max ttl
387
388 max xmit
389
390 message command
391
392 netbios name
393
394 nis homedir
395
396 null passwords
397
398 os level
399
400 packet size
401
402 passwd chat
403
404 passwd program
405
406 password level
407
408 password server
409
410 preferred master
411
412 preload
413
414 printing
415
416 printcap name
417
418 protocol
419
420 read bmpx
421
422 read prediction
423
424 read raw
425
426 read size
427
428 remote announce
429
430 root
431
432 root dir
433
434 root directory
435
436 security
437
438 server string
439
440 shared file entries
441
442 shared mem size
443
444 smb passwd file
445
446 smbrun
447
448 socket address
449
450 socket options
451
452 status
453
454 strip dot
455
456 syslog
457
458 syslog only
459
460 time offset
461
462 time server
463
464 unix realname
465
466 username map
467
468 use rhosts
469
470 valid chars
471
472 veto files
473
474 workgroup
475
476 write raw
477
478 .SS COMPLETE LIST OF SERVICE PARAMETERS
479
480 Here is a list of all service parameters. See the section of each
481 parameter for details. Note that some are synonyms.
482
483 admin users
484
485 allow hosts
486
487 alternate permissions
488
489 available
490
491 browseable
492
493 case sensitive
494
495 case sig names
496
497 copy
498
499 create mask
500
501 create mode
502
503 comment
504
505 default case
506
507 delete readonly
508
509 deny hosts
510
511 directory
512
513 directory mask
514
515 directory mode
516
517 dont descend
518
519 exec
520
521 fake oplocks
522
523 force create mode
524
525 force directory mode
526
527 force group
528
529 force user
530
531 guest account
532
533 guest ok
534
535 guest only
536
537 hide dot files
538
539 hosts allow
540
541 hosts deny
542
543 invalid users
544
545 locking
546
547 lppause command
548
549 lpq command
550
551 lpresume command
552
553 lprm command
554
555 magic output
556
557 magic script
558
559 mangle case
560
561 mangled names
562
563 mangling char
564
565 map archive
566
567 map hidden
568
569 map system
570
571 max connections
572
573 min print space
574
575 only guest
576
577 only user
578
579 path
580
581 postexec
582
583 postscript
584
585 preserve case
586
587 print command
588
589 printer driver
590
591 print ok
592
593 printable
594
595 printer
596
597 printer name
598
599 public
600
601 read only
602
603 read list
604
605 revalidate
606
607 root postexec
608
609 root preexec
610
611 set directory
612
613 share modes
614
615 short preserve case
616
617 strict locking
618
619 sync always
620
621 user
622
623 username
624
625 users
626
627 valid users
628
629 volume
630
631 wide links
632
633 writable
634
635 write ok
636
637 writeable
638
639 write list
640
641 .SS EXPLANATION OF EACH PARAMETER
642 .RS 3
643
644 .SS admin users (G)
645
646 This is a list of users who will be granted administrative privileges
647 on the share. This means that they will do all file operations as the
648 super-user (root).
649
650 You should use this option very carefully, as any user in this list
651 will be able to do anything they like on the share, irrespective of
652 file permissions.
653
654 .B Default:
655         no admin users
656
657 .B Example:
658         admin users = jason
659
660 .SS auto services (G)
661 This is a list of services that you want to be automatically added to
662 the browse lists. This is most useful for homes and printers services
663 that would otherwise not be visible.
664
665 Note that if you just want all printers in your printcap file loaded
666 then the "load printers" option is easier.
667
668 .B Default:
669         no auto services
670
671 .B Example:
672         auto services = fred lp colorlp
673
674 .SS allow hosts (S)
675 A synonym for this parameter is 'hosts allow'.
676
677 This parameter is a comma delimited set of hosts which are permitted to access
678 a services. If specified in the [global] section, matching hosts will be
679 allowed access to any service that does not specifically exclude them from
680 access. Specific services my have their own list, which override those
681 specified in the [global] section.
682
683 You can specify the hosts by name or IP number. For example, you could
684 restrict access to only the hosts on a Class C subnet with something like
685 "allow hosts = 150.203.5.". The full syntax of the list is described in
686 the man page
687 .BR hosts_access (5).
688
689 You can also specify hosts by network/netmask pairs and by netgroup
690 names if your system supports netgroups. The EXCEPT keyword can also
691 be used to limit a wildcard list. The following examples may provide
692 some help:
693
694 Example 1: allow all IPs in 150.203.*.* except one
695
696         hosts allow = 150.203. EXCEPT 150.203.6.66
697
698 Example 2: allow hosts that match the given network/netmask
699
700         hosts allow = 150.203.15.0/255.255.255.0
701
702 Example 3: allow a couple of hosts
703
704         hosts allow = lapland, arvidsjaur
705
706 Example 4: allow only hosts in netgroup "foonet" or localhost, but 
707 deny access from one particular host
708
709         hosts allow = @foonet, localhost
710         hosts deny = pirate
711
712 Note that access still requires suitable user-level passwords.
713
714 See
715 .BR testparm (1)
716 for a way of testing your host access to see if it
717 does what you expect.
718
719 .B Default:
720         none (i.e., all hosts permitted access)
721
722 .B Example:
723         allow hosts = 150.203.5. myhost.mynet.edu.au
724
725 .SS alternate permissions (S)
726
727 This option affects the way the "read only" DOS attribute is produced
728 for UNIX files. If this is false then the read only bit is set for
729 files on writeable shares which the user cannot write to.
730
731 If this is true then it is set for files whos user write bit is not set.
732
733 The latter behaviour is useful for when users copy files from each
734 others directories, and use a file manager that preserves
735 permissions. Without this option they may get annoyed as all copied
736 files will have the "read only" bit set.
737
738 .B Default:
739         alternate permissions = no
740
741 .B Example:
742         alternate permissions = yes
743
744 .SS available (S)
745 This parameter lets you 'turn off' a service. If 'available = no', then
746 ALL attempts to connect to the service will fail. Such failures are logged.
747
748 .B Default:
749         available = yes
750
751 .B Example:
752         available = no
753 .SS browseable (S)
754 This controls whether this share is seen in the list of available
755 shares in a net view and in the browse list.
756
757 .B Default:
758         browseable = Yes
759
760 .B Example: 
761         browseable = No
762 .SS browse list(G)
763 This controls whether the smbd will serve a browse list to a client
764 doing a NetServerEnum call. Normally set to true. You should never
765 need to change this.
766
767 .B Default:
768         browse list = Yes
769
770 .SS case sensitive (G)
771 See the discussion on NAME MANGLING.
772
773 .SS case sig names (G)
774 See "case sensitive"
775
776 .SS character set (G)
777 This allows a smbd to map incoming characters from a DOS 850 Code page
778 to either a Western European (ISO8859-1) or Easter European (ISO8859-2)
779 code page. Normally not set, meaning no filename translation is done.
780
781 .B Default
782
783         character set =
784
785 .B Example
786
787         character set = iso8859-1
788
789 .SS client code page (G)
790 Currently (Samba 1.9.17 and above) this may be set to one of two
791 values, 850 or 437. It specifies the base DOS code page that the
792 clients accessing Samba are using. To determine this, open a DOS
793 command prompt and type the command "chcp". This will output the
794 code page. The default for USA MS-DOS, Windows 95, and Windows NT
795 releases is code page 437. The default for western european 
796 releases of the above operating systems is code page 850.
797
798 This parameter co-operates with the "valid chars" parameter in
799 determining what characters are valid in filenames and how
800 capitalization is done. It has been added as a convenience for
801 clients whose code page is either 437 or 850 so a convoluted
802 "valid chars" string does not have to be determined. If you
803 set both this parameter and the "valid chars" parameter the 
804 "client code page" parameter MUST be set before the "valid chars"
805 in the smb.conf file. The "valid chars" string will then augment
806 the character settings in the "client code page" parameter.
807
808 If "client code page" is set to a value other than 850 or 437
809 it will default to 850.
810
811 See also : "valid chars".
812
813 .B Default
814
815         client code page = 850
816
817 .B Example
818
819         client code page = 437
820
821 .SS comment (S)
822 This is a text field that is seen when a client does a net view to
823 list what shares are available. It will also be used when browsing is
824 fully supported.
825
826 .B Default:
827         No comment string
828
829 .B Example:
830         comment = Fred's Files
831
832 .SS config file (G)
833
834 This allows you to override the config file to use, instead of the
835 default (usually smb.conf). There is a chicken and egg problem here as
836 this option is set in the config file! 
837
838 For this reason, if the name of the config file has changed when the
839 parameters are loaded then it will reload them from the new config
840 file.
841
842 This option takes the usual substitutions, which can be very useful.
843
844 If the config file doesn't exist then it won't be loaded (allowing
845 you to special case the config files of just a few clients).
846
847 .B Example:
848         config file = /usr/local/samba/lib/smb.conf.%m
849
850 .SS copy (S)
851 This parameter allows you to 'clone' service entries. The specified
852 service is simply duplicated under the current service's name. Any 
853 parameters specified in the current section will override those in the
854 section being copied.
855
856 This feature lets you set up a 'template' service and create similar 
857 services easily. Note that the service being copied must occur earlier 
858 in the configuration file than the service doing the copying.
859
860 .B Default:
861         none
862
863 .B Example:
864         copy = otherservice
865 .SS create mask (S)
866 A synonym for this parameter is 'create mode'.
867
868 This parameter is the octal modes which are used when converting DOS modes 
869 to UNIX modes.
870
871 When a file is created, the neccessary permissions are calculated
872 according to the mapping from DOS modes to UNIX permissions, and
873 the resulting UNIX mode is then bit-wise 'AND'ed with this parameter.
874 This parameter may be thought of as a bit-wise MASK for the UNIX
875 modes of a file. Any bit *not* set here will be removed from the
876 modes set on a file when it is created.
877
878 The default value of this parameter removes the 'user' execute
879 bit and the 'group' and 'other' write and execute bits from the
880 UNIX modes.
881
882 Following this Samba will bit-wise 'OR' the UNIX mode created from
883 this parameter with the value of the "force create mode" parameter 
884 which is set to 0700 by default. This causes the 'user' read, write
885 and execute bits to be set for every file created. You must have at 
886 least 'user' read, write and execute bits set for Samba to work properly.
887
888 For Samba 1.9.17 and above this parameter no longer affects directory
889 modes. See the parameter 'directory mode' for details.
890
891 See also the "force create mode" parameter for forcing particular
892 mode bits to be set on created files.
893 See also the "directory mode" paramter for masking mode bits on created
894 directories.
895
896 .B Default:
897         create mask = 0644
898
899 .B Example:
900         create mask = 0775
901 .SS create mode (S)
902 See
903 .B create mask.
904
905 .SS dead time (G)
906 The value of the parameter (a decimal integer) represents the number of
907 minutes of inactivity before a connection is considered dead, and it
908 is disconnected. The deadtime only takes effect if the number of open files
909 is zero.
910
911 This is useful to stop a server's resources being exhausted by a large
912 number of inactive connections.
913
914 Most clients have an auto-reconnect feature when a connection is broken so
915 in most cases this parameter should be transparent to users.
916
917 Using this parameter with a timeout of a few minutes is recommended
918 for most systems.
919
920 A deadtime of zero indicates that no auto-disconnection should be performed.
921
922 .B Default:
923         dead time = 0
924
925 .B Example:
926         dead time = 15
927 .SS debug level (G)
928 The value of the parameter (an integer) allows the debug level
929 (logging level) to be specified in the
930 .B smb.conf
931 file. This is to give
932 greater flexibility in the configuration of the system.
933
934 The default will be the debug level specified on the command line.
935
936 .B Example:
937         debug level = 3
938 .SS default (G)
939 See
940 .B default service.
941 .SS default case (S)
942
943 See the section on "NAME MANGLING" Also note the addition of "short
944 preserve case"
945
946 .SS default service (G)
947 A synonym for this parameter is 'default'.
948
949 This parameter specifies the name of a service which will be connected to
950 if the service actually requested cannot be found. Note that the square
951 brackets are NOT given in the parameter value (see example below).
952
953 There is no default value for this parameter. If this parameter is not given,
954 attempting to connect to a nonexistent service results in an error.
955
956 Typically the default service would be a public, read-only service.
957
958 Also note that as of 1.9.14 the apparent service name will be changed to
959 equal that of the requested service, this is very useful as it allows
960 you to use macros like %S to make a wildcard service.
961
962 Note also that any _ characters in the name of the service used in the
963 default service will get mapped to a /. This allows for interesting
964 things.
965
966
967 .B Example:
968         default service = pub
969         
970         [pub]
971              path = /%S
972           
973
974 .SS delete readonly (S)
975 This parameter allows readonly files to be deleted.  This is not normal DOS
976 semantics, but is allowed by UNIX.
977
978 This option may be useful for running applications such as rcs, where UNIX
979 file ownership prevents changing file permissions, and DOS semantics prevent
980 deletion of a read only file.
981
982 .B Default:
983         delete readonly = No
984
985 .B Example:
986         delete readonly = Yes
987 .SS deny hosts (S)
988 A synonym for this parameter is 'hosts deny'.
989
990 The opposite of 'allow hosts' - hosts listed here are NOT permitted
991 access to services unless the specific services have their own lists to
992 override this one. Where the lists conflict, the 'allow' list takes precedence.
993
994 .B Default:
995         none (i.e., no hosts specifically excluded)
996
997 .B Example:
998         deny hosts = 150.203.4. badhost.mynet.edu.au
999 .SS dfree command (G)
1000 The dfree command setting should only be used on systems where a
1001 problem occurs with the internal disk space calculations. This has
1002 been known to happen with Ultrix, but may occur with other operating
1003 systems. The symptom that was seen was an error of "Abort Retry
1004 Ignore" at the end of each directory listing.
1005
1006 This setting allows the replacement of the internal routines to
1007 calculate the total disk space and amount available with an external
1008 routine. The example below gives a possible script that might fulfill
1009 this function. 
1010
1011 The external program will be passed a single parameter indicating a
1012 directory in the filesystem being queried. This will typically consist
1013 of the string "./". The script should return two integers in ascii. The
1014 first should be the total disk space in blocks, and the second should
1015 be the number of available blocks. An optional third return value
1016 can give the block size in bytes. The default blocksize is 1024 bytes.
1017
1018 Note: Your script should NOT be setuid or setgid and should be owned by
1019 (and writable only by) root!
1020
1021 .B Default:
1022         By default internal routines for determining the disk capacity
1023 and remaining space will be used.
1024
1025 .B Example:
1026         dfree command = /usr/local/samba/bin/dfree
1027
1028         Where the script dfree (which must be made executable) could be
1029
1030 .nf
1031         #!/bin/sh
1032         df $1 | tail -1 | awk '{print $2" "$4}'
1033 .fi
1034
1035         or perhaps (on Sys V)
1036
1037 .nf
1038         #!/bin/sh
1039         /usr/bin/df -k $1 | tail -1 | awk '{print $3" "$5}'
1040 .fi
1041
1042         Note that you may have to replace the command names with full
1043 path names on some systems.
1044 .SS directory (S)
1045 See
1046 .B path.
1047
1048 .SS directory mask (S)
1049 A synonym for this parameter is 'directory mode'.
1050
1051 This parameter is the octal modes which are used when converting DOS modes 
1052 to UNIX modes when creating UNIX directories.
1053
1054 When a directory is created, the neccessary permissions are calculated
1055 according to the mapping from DOS modes to UNIX permissions, and
1056 the resulting UNIX mode is then bit-wise 'AND'ed with this parameter.
1057 This parameter may be thought of as a bit-wise MASK for the UNIX
1058 modes of a directory. Any bit *not* set here will be removed from the
1059 modes set on a directory when it is created.
1060
1061 The default value of this parameter removes the 'group' and 'other'
1062 write bits from the UNIX mode.
1063
1064 Following this Samba will bit-wise 'OR' the UNIX mode created from
1065 this parameter with the value of the "force directory mode" parameter. 
1066 This parameter is set to 000 by default (ie. no extra mode bits are added).
1067
1068 See the "force directory mode" parameter to cause particular mode
1069 bits to always be set on created directories.
1070
1071 See also the "create mode" parameter for masking mode bits on created
1072 files.
1073
1074 .B Default:
1075         directory mask = 0755
1076
1077 .B Example:
1078         directory mask = 0775
1079 .SS directory mode (S)
1080 See
1081 .B directory mask.
1082 .SS domain controller (G)
1083
1084 Specifies the DNS name or IP address of the machine to refer domain 
1085 logons from Win95 machines to. You should never need to set this parameter.
1086
1087 .B Default:
1088         domain controller =
1089
1090 .SS domain master (G)
1091
1092 Enable WAN-wide browse list collation.  Local master browsers on 
1093 broadcast-isolated subnets will give samba their local browse lists, and 
1094 ask for a complete copy of the browse list for the whole wide area network.
1095 Browser clients will then contact their local master browser, and will
1096 receive the domain-wide browse list, instead of just the list for their
1097 broadcast-isolated subnet.
1098
1099 .B Default:
1100         domain master = no
1101
1102 .SS dont descend (S)
1103 There are certain directories on some systems (eg., the /proc tree under
1104 Linux) that are either not of interest to clients or are infinitely deep
1105 (recursive). This parameter allows you to specify a comma-delimited list
1106 of directories that the server should always show as empty.
1107
1108 Note that Samba can be very fussy about the exact format of the "dont
1109 descend" entries. For example you may need "./proc" instead of just
1110 "/proc". Experimentation is the best policy :-)
1111
1112 .B Default:
1113         none (i.e., all directories are OK to descend)
1114
1115 .B Example:
1116         dont descend = /proc,/dev
1117
1118 .SS encrypt passwords (G)
1119
1120 This boolean controls whether encrypted passwords will be negotiated
1121 with the client. Note that this option has no effect if you haven't
1122 compiled in the necessary des libraries and encryption code. It
1123 defaults to no.
1124
1125 .SS exec (S)
1126
1127 This is an alias for preexec
1128
1129 .SS fake oplocks (S)
1130
1131 Oplocks are the way that SMB clients get permission from a server to
1132 locally cache file operations. If a server grants an oplock
1133 (opportunistic lock) then the client is free to assume that it is the
1134 only one accessing the file and it will aggressively cache file
1135 data. With some oplock types the client may even cache file open/close
1136 operations. This can give enormous performance benefits.
1137
1138 Samba does not support opportunistic locks because they are very
1139 difficult to do under Unix. Samba can fake them, however, by granting
1140 a oplock whenever a client asks for one. This is controlled using the
1141 smb.conf option "fake oplocks". If you set "fake oplocks = yes" then
1142 you are telling the client that it may aggressively cache the file
1143 data.
1144
1145 By enabling this option on all read-only shares or shares that you know
1146 will only be accessed from one client at a time you will see a big
1147 performance improvement on many operations. If you enable this option
1148 on shares where multiple clients may be accessing the files read-write
1149 at the same time you can get data corruption. Use this option
1150 carefully! 
1151
1152 This option is disabled by default.
1153
1154 .SS force create mode (S)
1155 This parameter specifies a set of UNIX mode bit permissions that
1156 will *always* be set on a file created by Samba. This is done
1157 by bitwise 'OR'ing these bits onto the mode bits of a file that
1158 is being created. The default for this parameter is (in octel)
1159 0700 as files must have at least 'user' read/write/execute bits
1160 set for Samba to work correctly. This operation is done after
1161 the mode mask in the parameter "create mask" is applied.
1162
1163 See also the parameter "create mask" for details on masking mode
1164 bits on created files.
1165
1166 .B Default:
1167        force create mode = 0700
1168
1169 .B Example:
1170        force create mode = 0755
1171
1172 would force all created files to have read and execute permissions
1173 set for 'group' and 'other' as well as the read/write/execute bits 
1174 set for the 'user'.
1175
1176 .SS force directory mode (S)
1177 This parameter specifies a set of UNIX mode bit permissions that
1178 will *always* be set on a directory created by Samba. This is done
1179 by bitwise 'OR'ing these bits onto the mode bits of a directory that
1180 is being created. The default for this parameter is (in octel)
1181 0000 which will not add any extra permission bits to a created
1182 directory. This operation is done after the mode mask in the parameter 
1183 "directory mask" is applied.
1184
1185 See also the parameter "directory mask" for details on masking mode
1186 bits on created directories.
1187
1188 .B Default:
1189        force directory mode = 000
1190
1191 .B Example:
1192        force directory mode = 0755
1193
1194 would force all created directories to have read and execute permissions
1195 set for 'group' and 'other' as well as the read/write/execute bits 
1196 set for the 'user'.
1197
1198 .SS force group (S)
1199 This specifies a group name that all connections to this service
1200 should be made as. This may be useful for sharing files.
1201
1202 .B Default:
1203        no forced group
1204
1205 .B Example:
1206        force group = agroup
1207
1208 .SS force user (S)
1209 This specifies a user name that all connections to this service
1210 should be made as. This may be useful for sharing files. You should
1211 also use it carefully as using it incorrectly can cause security
1212 problems.
1213
1214 This user name only gets used once a connection is established. Thus
1215 clients still need to connect as a valid user and supply a valid
1216 password. Once connected, all file operations will be performed as the
1217 "forced user", not matter what username the client connected as.
1218
1219 .B Default:
1220        no forced user
1221
1222 .B Example:
1223        force user = auser
1224
1225 .SS getwd cache (G)
1226 This is a tuning option. When this is enabled a cacheing algorithm will
1227 be used to reduce the time taken for getwd() calls. This can have a
1228 significant impact on performance, especially when widelinks is False.
1229
1230 .B Default:
1231         getwd cache = No
1232
1233 .B Example:
1234         getwd cache = Yes
1235
1236 .SS group (S)
1237 This is an alias for "force group" and is only kept for compatibility
1238 with old versions of Samba. It may be removed in future versions.
1239
1240 .SS guest account (S)
1241 This is a username which will be used for access to services which are
1242 specified as 'guest ok' (see below). Whatever privileges this user has
1243 will be available to any client connecting to the guest
1244 service. Typically this user will exist in the password file, but will
1245 not have a valid login. If a username is specified in a given service,
1246 the specified username overrides this one.
1247
1248 One some systems the account "nobody" may not be able to print. Use
1249 another account in this case. You should test this by trying to log in
1250 as your guest user (perhaps by using the "su \-" command) and trying to
1251 print using
1252 .BR lpr .
1253
1254 Note that as of version 1.9 of Samba this option may be set
1255 differently for each service.
1256
1257 .B Default:
1258         specified at compile time
1259
1260 .B Example:
1261         guest account = nobody
1262 .SS guest ok (S)
1263 See
1264 .B public.
1265 .SS guest only (S)
1266 If this parameter is 'yes' for a service, then only guest connections to the
1267 service are permitted. This parameter will have no affect if "guest ok" or
1268 "public" is not set for the service.
1269
1270 See the section below on user/password validation for more information about
1271 this option.
1272
1273 .B Default:
1274         guest only = no
1275
1276 .B Example:
1277         guest only = yes
1278 .SS hide dot files (S)
1279 This is a boolean parameter that controls whether files starting with
1280 a dot appear as hidden files.
1281
1282 .B Default:
1283         hide dot files = yes
1284
1285 .B Example:
1286         hide dot files = no
1287 .SS homedir map (G)
1288 If "nis homedir" is true, this parameter specifies the NIS (or YP) map
1289 from which the server for the user's home directory should be extracted.
1290 At present, only the Sun auto.home map format is understood. The form of
1291 the map is:
1292
1293 username        server:/some/file/system
1294
1295 and the program will extract the servername from before the first ':'.
1296 There should probably be a better parsing system that copes with different
1297 map formats and also Amd (another automounter) maps.
1298
1299 NB: The -DNETGROUP option is required in the Makefile for option to work
1300 and on some architectures the line -lrpcsvc needs to be added to the
1301 LIBSM variable. This is required for Solaris 2, FreeBSD and HPUX.
1302
1303 See also "nis homedir"
1304
1305 .B Default:
1306         homedir map = auto.home
1307
1308 .B Example:
1309         homedir map = amd.homedir
1310 .SS hosts allow (S)
1311 See
1312 .B allow hosts.
1313 .SS hosts deny (S)
1314 See
1315 .B deny hosts.
1316
1317 .SS hosts equiv (G)
1318 If this global parameter is a non-null string, it specifies the name of
1319 a file to read for the names of hosts and users who will be allowed access
1320 without specifying a password.
1321
1322 This is not be confused with 
1323 .B allow hosts
1324 which is about hosts access to services and is more useful for guest services.
1325 .B hosts equiv
1326 may be useful for NT clients which will not supply passwords to samba.
1327
1328 NOTE: The use of hosts.equiv can be a major security hole. This is
1329 because you are trusting the PC to supply the correct username. It is
1330 very easy to get a PC to supply a false username. I recommend that the
1331 hosts.equiv option be only used if you really know what you are doing,
1332 or perhaps on a home network where you trust your wife and kids :-)
1333
1334 .B Default
1335         No host equivalences
1336
1337 .B Example
1338         hosts equiv = /etc/hosts.equiv
1339
1340 .SS include (G)
1341
1342 This allows you to include one config file inside another.  The file is
1343 included literally, as though typed in place.
1344
1345 It takes the standard substitutions, except %u, %P and %S
1346
1347 .SS interfaces (G)
1348
1349 This option allows you to setup multiple network interfaces, so that
1350 Samba can properly handle browsing on all interfaces.
1351
1352 The option takes a list of ip/netmask pairs. The netmask may either be
1353 a bitmask, or a bitlength. 
1354
1355 For example, the following line:
1356
1357 interfaces = 192.168.2.10/24 192.168.3.10/24
1358
1359 would configure two network interfaces with IP addresses 192.168.2.10
1360 and 192.168.3.10. The netmasks of both interfaces would be set to
1361 255.255.255.0. 
1362
1363 You could produce an equivalent result by using:
1364
1365 interfaces = 192.168.2.10/255.255.255.0 192.168.3.10/255.255.255.0
1366
1367 if you prefer that format.
1368
1369 If this option is not set then Samba will attempt to find a primary
1370 interface, but won't attempt to configure more than one interface.
1371
1372 .SS invalid users (S)
1373 This is a list of users that should not be allowed to login to this
1374 service. This is really a "paranoid" check to absolutely ensure an
1375 improper setting does not breach your security.
1376
1377 A name starting with @ is interpreted as a UNIX group.
1378
1379 The current servicename is substituted for %S. This is useful in the
1380 [homes] section.
1381
1382 See also "valid users"
1383
1384 .B Default
1385         No invalid users
1386
1387 .B Example
1388         invalid users = root fred admin @wheel
1389
1390 .SS keep alive (G)
1391 The value of the parameter (an integer) represents the number of seconds 
1392 between 'keepalive' packets. If this parameter is zero, no keepalive packets
1393 will be sent. Keepalive packets, if sent, allow the server to tell whether a
1394 client is still present and responding.
1395
1396 Keepalives should, in general, not be needed if the socket being used
1397 has the SO_KEEPALIVE attribute set on it (see "socket
1398 options"). Basically you should only use this option if you strike
1399 difficulties.
1400
1401 .B Default:
1402         keep alive = 0
1403
1404 .B Example:
1405         keep alive = 60
1406 .SS load printers (G)
1407 A boolean variable that controls whether all printers in the printcap
1408 will be loaded for browsing by default. 
1409
1410 .B Default:
1411         load printers = no
1412
1413 .B Example:
1414         load printers = yes
1415
1416 .SS local master (G)
1417 This option allows the nmbd to become a local master browser on a
1418 subnet. If set to False then nmbd will not attempt to become a local
1419 master browser on a subnet and will also lose in all browsing elections. 
1420 By default this value is set to true. Setting this value to true doesn't 
1421 mean that Samba will become the local master browser on a subnet, just 
1422 that the nmbd will participate in elections for local master browser.
1423
1424 .B Default:
1425         local master = yes
1426
1427 .SS lock directory (G)
1428 This option specifies the directory where lock files will be placed.
1429 The lock files are used to implement the "max connections" option.
1430
1431 .B Default:
1432         lock directory = /tmp/samba
1433
1434 .B Example: 
1435         lock directory = /usr/local/samba/var/locks
1436 .SS locking (S)
1437 This controls whether or not locking will be performed by the server in 
1438 response to lock requests from the client.
1439
1440 If "locking = no", all lock and unlock requests will appear to succeed and 
1441 all lock queries will indicate that the queried lock is clear.
1442
1443 If "locking = yes", real locking will be performed by the server.
1444
1445 This option may be particularly useful for read-only filesystems which
1446 do not need locking (such as cdrom drives).
1447
1448 Be careful about disabling locking either globally or in a specific
1449 service, as lack of locking may result in data corruption.
1450
1451 .B Default:
1452         locking = yes
1453
1454 .B Example:
1455         locking = no
1456
1457 .SS log file (G)
1458
1459 This options allows you to override the name of the Samba log file
1460 (also known as the debug file).
1461
1462 This option takes the standard substitutions, allowing you to have
1463 separate log files for each user or machine.
1464
1465 .B Example:
1466         log file = /usr/local/samba/var/log.%m
1467
1468 .SS log level (G)
1469 see "debug level"
1470
1471 .SS logon path (G)
1472
1473 This parameter specifies the home directory where roaming profiles 
1474 (USER.DAT / USER.MAN files) are stored.
1475
1476 This option takes the standard substitutions, allowing you to have
1477 separate logon scripts for each user or machine.  It also specifies
1478 the directory from which the "desktop", "start menu", "nethood" and
1479 "programs" folders, and their contents, are loaded and displayed
1480 on your Windows 95 client.
1481
1482 The share and the path must be readable by the user for the preferences
1483 and directories to be loaded onto the Windows 95 client.  The share
1484 must be writeable when the logs in for the first time, in order that
1485 the Windows 95 client can create the user.dat and other directories.
1486
1487 Thereafter, the directories and any of contents can, if required,
1488 be made read-only.  It is not adviseable that the USER.DAT file be made
1489 read-only - rename it to USER.MAN to achieve the desired effect
1490 (a MANdatory profile).
1491
1492 .B Default:
1493         logon path = \\\\%L\\%U 
1494
1495 .B Example:
1496         logon path = \\\\PROFILESERVER\\HOME_DIR\\%U
1497
1498 .SS logon script (G)
1499
1500 This parameter specifies the batch file (.bat) or NT command file (.cmd)
1501 to be downloaded and run on a machine when a user successfully logs in.
1502 The file must contain the DOS style cr/lf line endings.  Using a DOS-style
1503 editor to create the file is recommended.
1504
1505 The script must be a relative path to the [netlogon] service.  If the
1506 [netlogon] service specifies a path of /usr/local/samba/netlogon, and
1507 logon script = STARTUP.BAT, then file that will be downloaded is:
1508
1509 .B /usr/local/samba/netlogon/STARTUP.BAT
1510
1511 The contents of the batch file is entirely your choice.  A suggested
1512 command would be to add NET TIME \\\\SERVER /SET /YES, to force every
1513 machine to synchronise clocks with the same time server.  Another use
1514 would be to add NET USE U: \\\\SERVER\\UTILS for commonly used utilities,
1515 or NET USE Q: \\\\SERVER\\ISO9001_QA.
1516
1517 Note that it is particularly important not to allow write access to
1518 the [netlogon] share, or to grant users write permission on the
1519 batch files in a secure environment, as this would allow the batch
1520 files to be arbitrarily modified.
1521
1522 .B
1523 This option takes the standard substitutions, allowing you to have
1524 separate logon scripts for each user or machine.
1525
1526 .B Example:
1527         logon script = scripts/%U.bat
1528
1529 .SS lppause command (S)
1530 This parameter specifies the command to be executed on the server host in
1531 order to stop printing or spooling a specific print job.
1532
1533 This command should be a program or script which takes a printer name and
1534 job number to pause the print job. Currently I don't know of any print
1535 spooler system that can do this with a simple option, except for the PPR
1536 system from Trinity College (ppr\-dist.trincoll.edu/pub/ppr). One way
1537 of implementing this is by using job priorities, where jobs having a too
1538 low priority won't be sent to the printer. See also the
1539 .B lppause
1540 command.
1541
1542 If a %p is given then the printername is put in its place. A %j is
1543 replaced with the job number (an integer).
1544 On HPUX (see printing=hpux), if the -p%p option is added to the lpq
1545 command, the job will show up with the correct status, i.e. if the job
1546 priority is lower than the set fence priority it will have the PAUSED
1547 status, whereas if the priority is equal or higher it will have the
1548 SPOOLED or PRINTING status.
1549
1550 Note that it is good practice to include the absolute path in the lppause
1551 command as the PATH may not be available to the server.
1552
1553 .B Default:
1554         Currently no default value is given to this string
1555
1556 .B Example for HPUX:
1557         lppause command = /usr/bin/lpalt %p-%j -p0
1558
1559 .SS lpq cache time (G)
1560
1561 This controls how long lpq info will be cached for to prevent the lpq
1562 command being called too often. A separate cache is kept for each
1563 variation of the lpq command used by the system, so if you use
1564 different lpq commands for different users then they won't share cache
1565 information.
1566
1567 The cache files are stored in /tmp/lpq.xxxx where xxxx is a hash
1568 of the lpq command in use.
1569
1570 The default is 10 seconds, meaning that the cached results of a
1571 previous identical lpq command will be used if the cached data is less
1572 than 10 seconds old. A large value may be advisable if your lpq
1573 command is very slow.
1574
1575 A value of 0 will disable cacheing completely.
1576
1577 .B Default:
1578         lpq cache time = 10
1579
1580 .B Example:
1581         lpq cache time = 30
1582
1583 .SS lpq command (S)
1584 This parameter specifies the command to be executed on the server host in
1585 order to obtain "lpq"-style printer status information. 
1586
1587 This command should be a program or script which takes a printer name
1588 as its only parameter and outputs printer status information. 
1589
1590 Currently six styles of printer status information are supported; BSD,
1591 SYSV, AIX, HPUX, QNX, LPRNG and PLP. This covers most UNIX systems. You
1592 control which type is expected using the "printing =" option.
1593
1594 Some clients (notably Windows for Workgroups) may not correctly send the
1595 connection number for the printer they are requesting status information
1596 about. To get around this, the server reports on the first printer service
1597 connected to by the client. This only happens if the connection number sent
1598 is invalid.
1599
1600 If a %p is given then the printername is put in its place. Otherwise
1601 it is placed at the end of the command.
1602
1603 Note that it is good practice to include the absolute path in the lpq
1604 command as the PATH may not be available to the server.
1605
1606 .B Default:
1607         depends on the setting of "printing ="
1608
1609 .B Example:
1610         lpq command = /usr/bin/lpq %p
1611
1612 .SS lpresume command (S)
1613 This parameter specifies the command to be executed on the server host in
1614 order to restart or continue printing or spooling a specific print job.
1615
1616 This command should be a program or script which takes a printer name and
1617 job number to resume the print job. See also the lppause command.
1618
1619 If a %p is given then the printername is put in its place. A %j is
1620 replaced with the job number (an integer).
1621
1622 Note that it is good practice to include the absolute path in the lpresume
1623 command as the PATH may not be available to the server.
1624
1625 .B Default:
1626         Currently no default value is given to this string
1627
1628 .B Example for HPUX:
1629         lpresume command = /usr/bin/lpalt %p-%j -p2
1630
1631 .SS lprm command (S)
1632 This parameter specifies the command to be executed on the server host in
1633 order to delete a print job.
1634
1635 This command should be a program or script which takes a printer name
1636 and job number, and deletes the print job.
1637
1638 Currently seven styles of printer control are supported; BSD, SYSV, AIX
1639 HPUX, QNX, LPRNG and PLP. This covers most UNIX systems. You control
1640 which type is expected using the "printing =" option.
1641
1642 If a %p is given then the printername is put in its place. A %j is
1643 replaced with the job number (an integer).
1644
1645 Note that it is good practice to include the absolute path in the lprm
1646 command as the PATH may not be available to the server.
1647
1648 .B Default:
1649         depends on the setting of "printing ="
1650
1651 .B Example 1:
1652         lprm command = /usr/bin/lprm -P%p %j
1653
1654 .B Example 2:
1655         lprm command = /usr/bin/cancel %p-%j
1656
1657 .SS magic output (S)
1658 This parameter specifies the name of a file which will contain output
1659 created by a magic script (see
1660 .I magic script
1661 below).
1662
1663 Warning: If two clients use the same magic script in the same directory the
1664 output file content is undefined.
1665 .B Default:
1666         magic output = <magic script name>.out
1667
1668 .B Example:
1669         magic output = myfile.txt
1670 .SS magic script (S)
1671 This parameter specifies the name of a file which, if opened, will be
1672 executed by the server when the file is closed. This allows a UNIX script
1673 to be sent to the Samba host and executed on behalf of the connected user.
1674
1675 Scripts executed in this way will be deleted upon completion, permissions
1676 permitting.
1677
1678 If the script generates output, output will be sent to the file specified by
1679 the
1680 .I magic output
1681 parameter (see above).
1682
1683 Note that some shells are unable to interpret scripts containing
1684 carriage-return-linefeed instead of linefeed as the end-of-line
1685 marker. Magic scripts must be executable "as is" on the host, which
1686 for some hosts and some shells will require filtering at the DOS end.
1687
1688 Magic scripts are EXPERIMENTAL and should NOT be relied upon.
1689
1690 .B Default:
1691         None. Magic scripts disabled.
1692
1693 .B Example:
1694         magic script = user.csh
1695
1696 .SS mangle case (S)
1697
1698 See the section on "NAME MANGLING"
1699
1700 .SS mangled map (S)
1701 This is for those who want to directly map UNIX file names which are
1702 not representable on DOS.  The mangling of names is not always what is
1703 needed.  In particular you may have documents with file extensions
1704 that differ between DOS and UNIX. For example, under UNIX it is common
1705 to use .html for HTML files, whereas under DOS .htm is more commonly
1706 used.
1707
1708 So to map 'html' to 'htm' you put:
1709
1710   mangled map = (*.html *.htm)
1711
1712 One very useful case is to remove the annoying ;1 off the ends of
1713 filenames on some CDROMS (only visible under some UNIXes). To do this
1714 use a map of (*;1 *)
1715
1716 .B default:
1717         no mangled map
1718
1719 .B Example:
1720         mangled map = (*;1 *)
1721
1722 .SS mangled names (S)
1723 This controls whether non-DOS names under UNIX should be mapped to
1724 DOS-compatible names ("mangled") and made visible, or whether non-DOS names
1725 should simply be ignored.
1726
1727 See the section on "NAME MANGLING" for details on how to control the
1728 mangling process.
1729
1730 If mangling is used then the mangling algorithm is as follows:
1731 .RS
1732 - the first (up to) five alphanumeric characters before the rightmost dot of
1733 the filename are preserved, forced to upper case, and appear as the first (up
1734 to) five characters of the mangled name.
1735
1736 - a tilde ("~") is appended to the first part of the mangled name, followed
1737 by a two-character unique sequence, based on the original root name 
1738 (i.e., the original filename minus its final extension). The final
1739 extension is included in the hash calculation only if it contains any upper
1740 case characters or is longer than three characters.
1741
1742 Note that the character to use may be specified using the "mangling
1743 char" option, if you don't like ~.
1744
1745 - the first three alphanumeric characters of the final extension are preserved,
1746 forced to upper case and appear as the extension of the mangled name. The 
1747 final extension is defined as that part of the original filename after the
1748 rightmost dot. If there are no dots in the filename, the mangled name will
1749 have no extension (except in the case of hidden files - see below).
1750
1751 - files whose UNIX name begins with a dot will be presented as DOS hidden
1752 files. The mangled name will be created as for other filenames, but with the
1753 leading dot removed and "___" as its extension regardless of actual original
1754 extension (that's three underscores).
1755 .RE
1756
1757 The two-digit hash value consists of upper case alphanumeric characters.
1758
1759 This algorithm can cause name collisions only if files in a directory share
1760 the same first five alphanumeric characters. The probability of such a clash 
1761 is 1/1300.
1762
1763 The name mangling (if enabled) allows a file to be copied between UNIX
1764 directories from DOS while retaining the long UNIX filename. UNIX files can
1765 be renamed to a new extension from DOS and will retain the same basename. 
1766 Mangled names do not change between sessions.
1767
1768 .B Default:
1769         mangled names = yes
1770
1771 .B Example:
1772         mangled names = no
1773 .SS mangling char (S)
1774 This controls what character is used as the "magic" character in name
1775 mangling. The default is a ~ but this may interfere with some
1776 software. Use this option to set it to whatever you prefer.
1777
1778 .B Default:
1779         mangling char = ~
1780
1781 .B Example:
1782         mangling char = ^
1783
1784 .SS mangled stack (G)
1785 This parameter controls the number of mangled names that should be cached in
1786 the Samba server.
1787
1788 This stack is a list of recently mangled base names (extensions are only
1789 maintained if they are longer than 3 characters or contains upper case
1790 characters).
1791
1792 The larger this value, the more likely it is that mangled names can be
1793 successfully converted to correct long UNIX names. However, large stack
1794 sizes will slow most directory access. Smaller stacks save memory in the
1795 server (each stack element costs 256 bytes).
1796
1797 It is not possible to absolutely guarantee correct long file names, so
1798 be prepared for some surprises!
1799
1800 .B Default:
1801         mangled stack = 50
1802
1803 .B Example:
1804         mangled stack = 100
1805
1806 .SS map archive (S)
1807 This controls whether the DOS archive attribute should be mapped to UNIX
1808 execute bits.  The DOS archive bit is set when a file has been modified
1809 since its last backup.  One motivation for this option it to keep Samba/your
1810 PC from making any file it touches from becoming executable under UNIX.
1811 This can be quite annoying for shared source code, documents,  etc...
1812
1813 .B Default:
1814       map archive = yes
1815
1816 .B Example:
1817       map archive = no
1818
1819 .SS map hidden (S)
1820 This controls whether DOS style hidden files should be mapped to UNIX
1821 execute bits.
1822
1823 .B Default:
1824         map hidden = no
1825
1826 .B Example:
1827         map hidden = yes
1828 .SS map system (S)
1829 This controls whether DOS style system files should be mapped to UNIX
1830 execute bits.
1831
1832 .B Default:
1833         map system = no
1834
1835 .B Example:
1836         map system = yes
1837 .SS max connections (S)
1838 This option allows the number of simultaneous connections to a
1839 service to be limited. If "max connections" is greater than 0 then
1840 connections will be refused if this number of connections to the
1841 service are already open. A value of zero mean an unlimited number of
1842 connections may be made.
1843
1844 Record lock files are used to implement this feature. The lock files
1845 will be stored in the directory specified by the "lock directory" option.
1846
1847 .B Default:
1848         max connections = 0
1849
1850 .B Example:
1851         max connections = 10
1852
1853 .SS max disk size (G)
1854 This option allows you to put an upper limit on the apparent size of
1855 disks. If you set this option to 100 then all shares will appear to be
1856 not larger than 100 MB in size.
1857
1858 Note that this option does not limit the amount of data you can put on
1859 the disk. In the above case you could still store much more than 100
1860 MB on the disk, but if a client ever asks for the amount of free disk
1861 space or the total disk size then the result will be bounded by the
1862 amount specified in "max disk size".
1863
1864 This option is primarily useful to work around bugs in some pieces of
1865 software that can't handle very large disks, particularly disks over
1866 1GB in size.
1867
1868 A "max disk size" of 0 means no limit.
1869
1870 .B Default:
1871         max disk size = 0
1872
1873 .B Example:
1874         max disk size = 1000
1875
1876 .SS max log size (G)
1877
1878 This option (an integer in kilobytes) specifies the max size the log
1879 file should grow to. Samba periodically checks the size and if it is
1880 exceeded it will rename the file, adding a .old extension.
1881
1882 A size of 0 means no limit.
1883
1884 .B Default:
1885         max log size = 5000
1886
1887 .B Example:
1888         max log size = 1000
1889
1890 .SS max mux (G)
1891
1892 This option controls the maximum number of outstanding simultaneous SMB 
1893 operations that samba tells the client it will allow. You should never need 
1894 to set this parameter.
1895
1896 .B Default:
1897         max mux = 50
1898
1899 .SS max packet (G)
1900
1901 A synonym for this parameter is 'packet size'.
1902
1903 .SS max ttl (G)
1904
1905 This option tells nmbd what the default 'time to live' of NetBIOS
1906 names should be (in seconds). You should never need to change this parameter.
1907
1908 .B Default:
1909         max ttl = 14400
1910 .SS max xmit (G)
1911
1912 This option controls the maximum packet size that will be negotiated
1913 by Samba. The default is 65535, which is the maximum. In some cases
1914 you may find you get better performance with a smaller value. A value
1915 below 2048 is likely to cause problems.
1916
1917 .B Default:
1918         max xmit = 65535
1919
1920 .B Example:
1921         max xmit = 8192
1922
1923 .SS message command (G)
1924
1925 This specifies what command to run when the server receives a WinPopup
1926 style message.
1927
1928 This would normally be a command that would deliver the message
1929 somehow. How this is to be done is up to your imagination.
1930
1931 What I use is:
1932
1933    message command = csh -c 'xedit %s;rm %s' &
1934
1935 This delivers the message using xedit, then removes it
1936 afterwards. NOTE THAT IT IS VERY IMPORTANT THAT THIS COMMAND RETURN
1937 IMMEDIATELY. That's why I have the & on the end. If it doesn't return
1938 immediately then your PCs may freeze when sending messages (they
1939 should recover after 30secs, hopefully).
1940
1941 All messages are delivered as the global guest user. The command takes
1942 the standard substitutions, although %u won't work (%U may be better
1943 in this case).
1944
1945 Apart from the standard substitutions, some additional ones apply. In
1946 particular:
1947
1948 %s = the filename containing the message
1949
1950 %t = the destination that the message was sent to (probably the server
1951 name)
1952
1953 %f = who the message is from
1954
1955 You could make this command send mail, or whatever else takes your
1956 fancy. Please let me know of any really interesting ideas you have.
1957
1958 Here's a way of sending the messages as mail to root:
1959
1960 message command = /bin/mail -s 'message from %f on %m' root < %s; rm %s
1961
1962 If you don't have a message command then the message won't be
1963 delivered and Samba will tell the sender there was an
1964 error. Unfortunately WfWg totally ignores the error code and carries
1965 on regardless, saying that the message was delivered.
1966
1967 If you want to silently delete it then try "message command = rm %s".
1968
1969 For the really adventurous, try something like this:
1970
1971 message command = csh -c 'csh < %s |& /usr/local/samba/bin/smbclient \e
1972                   -M %m; rm %s' &
1973
1974 this would execute the command as a script on the server, then give
1975 them the result in a WinPopup message. Note that this could cause a
1976 loop if you send a message from the server using smbclient! You better
1977 wrap the above in a script that checks for this :-)
1978
1979 .B Default:
1980         no message command
1981
1982 .B Example:
1983         message command = csh -c 'xedit %s;rm %s' &
1984
1985 .SS min print space (S)
1986
1987 This sets the minimum amount of free disk space that must be available
1988 before a user will be able to spool a print job. It is specified in
1989 kilobytes. The default is 0, which means no limit.
1990
1991 .B Default:
1992         min print space = 0
1993
1994 .B Example:
1995         min print space = 2000
1996
1997 .SS netbios name (G)
1998
1999 This sets the NetBIOS name by which a Samba server is known. By
2000 default it is the same as the first component of the host's DNS name.
2001
2002 .SS nis homedir (G)
2003 Get the home share server from a NIS (or YP) map. For unix systems that
2004 use an automounter, the user's home directory will often be mounted on
2005 a workstation on demand from a remote server. When the Samba logon server
2006 is not the actual home directory server, two network hops are required
2007 to access the home directory and this can be very slow especially with 
2008 writing via Samba to an NFS mounted directory. This option allows samba
2009 to return the home share as being on a different server to the logon
2010 server and as long as a samba daemon is running on the home directory 
2011 server, it will be mounted on the Samba client directly from the directory
2012 server. When Samba is returning the home share to the client, it will
2013 consult the NIS (or YP) map specified in "homedir map" and return the
2014 server listed there.
2015
2016 .B Default:
2017         nis homedir = false
2018
2019 .B Example:
2020         nis homedir = true
2021
2022 .SS null passwords (G)
2023 Allow or disallow access to accounts that have null passwords. 
2024
2025 .B Default:
2026         null passwords = no
2027
2028 .B Example:
2029         null passwords = yes
2030
2031 .SS only guest (S)
2032 A synonym for this command is 'guest only'.
2033
2034 .SS only user (S)
2035 This is a boolean option that controls whether connections with
2036 usernames not in the user= list will be allowed. By default this
2037 option is disabled so a client can supply a username to be used by
2038 the server.
2039
2040 Note that this also means Samba won't try to deduce usernames from the
2041 service name. This can be annoying for the [homes] section. To get
2042 around this you could use "user = %S" which means your "user" list
2043 will be just the service name, which for home directories is the name
2044 of the user.
2045
2046 .B Default: 
2047         only user = False
2048
2049 .B Example: 
2050         only user = True
2051
2052 .SS os level (G)
2053 This integer value controls what level Samba advertises itself as for
2054 browse elections. See BROWSING.txt for details.
2055
2056 .SS packet size (G)
2057 The maximum transmit packet size during a raw read. This option is no
2058 longer implemented as of version 1.7.00, and is kept only so old
2059 configuration files do not become invalid.
2060
2061 .SS passwd chat (G)
2062 This string controls the "chat" conversation that takes places
2063 between smbd and the local password changing program to change the
2064 users password. The string describes a sequence of response-receive
2065 pairs that smbd uses to determine what to send to the passwd program
2066 and what to expect back. If the expected output is not received then
2067 the password is not changed.
2068
2069 This chat sequence is often quite site specific, depending on what
2070 local methods are used for password control (such as NIS+ etc).
2071
2072 The string can contain the macros %o and %n which are substituted for
2073 the old and new passwords respectively. It can also contain the
2074 standard macros \en \er \et and \es to give line-feed, carriage-return,
2075 tab and space.
2076
2077 The string can also contain a * which matches any sequence of
2078 characters.
2079
2080 Double quotes can be used to collect strings with spaces in them into
2081 a single string.
2082
2083 If the send string in any part of the chat sequence is a fullstop "."
2084 then no string is sent. Similarly, is the expect string is a fullstop
2085 then no string is expected.
2086
2087 .B Example:
2088         passwd chat = "*Enter OLD password*" %o\en "*Enter NEW password*" %n\en \e
2089                        "*Reenter NEW password*" %n\en "*Password changed*"
2090
2091
2092 .B Default:
2093        passwd chat = *old*password* %o\en *new*password* %n\en *new*password* %n\en *changed*
2094
2095 .SS passwd program (G)
2096 The name of a program that can be used to set user passwords.
2097
2098 This is only necessary if you have enabled remote password changing at
2099 compile time. Any occurrences of %u will be replaced with the user
2100 name.
2101
2102 Also note that many passwd programs insist in "reasonable" passwords,
2103 such as a minimum length, or the inclusion of mixed case chars and
2104 digits. This can pose a problem as some clients (such as Windows for
2105 Workgroups) uppercase the password before sending it. 
2106
2107 .B Default:
2108         passwd program = /bin/passwd
2109
2110 .B Example:
2111         passwd program = /sbin/passwd %u
2112
2113 .SS password level (G)
2114 Some client/server combinations have difficulty with mixed-case passwords.
2115 One offending client is Windows for Workgroups, which for some reason forces
2116 passwords to upper case when using the LANMAN1 protocol, but leaves them alone
2117 when using COREPLUS!
2118
2119 This parameter defines the maximum number of characters that may be upper case
2120 in passwords.
2121
2122 For example, say the password given was "FRED". If
2123 .B password level
2124 is set to 1 (one), the following combinations would be tried if "FRED" failed:
2125 "Fred", "fred", "fRed", "frEd", "freD". If
2126 .B password level was set to 2 (two), the following combinations would also be
2127 tried: "FRed", "FrEd", "FreD", "fREd", "fReD", "frED". And so on.
2128
2129 The higher value this parameter is set to the more likely it is that a mixed
2130 case password will be matched against a single case password. However, you
2131 should be aware that use of this parameter reduces security and increases the
2132 time taken to process a new connection.
2133
2134 A value of zero will cause only two attempts to be made - the password as is
2135 and the password in all-lower case.
2136
2137 If you find the connections are taking too long with this option then
2138 you probably have a slow crypt() routine. Samba now comes with a fast
2139 "ufc crypt" that you can select in the Makefile. You should also make
2140 sure the PASSWORD_LENGTH option is correct for your system in local.h
2141 and includes.h. On most systems only the first 8 chars of a password
2142 are significant so PASSWORD_LENGTH should be 8, but on some longer
2143 passwords are significant. The includes.h file tries to select the
2144 right length for your system.
2145
2146 .B Default:
2147         password level = 0
2148
2149 .B Example:
2150         password level = 4
2151
2152 .SS password server (G)
2153
2154 By specifying the name of another SMB server (such as a WinNT box)
2155 with this option, and using "security = server" you can get Samba to
2156 do all its username/password validation via a remote server.
2157
2158 This options sets the name of the password server to use. It must be a
2159 netbios name, so if the machine's netbios name is different from its
2160 internet name then you may have to add its netbios name to
2161 /etc/hosts.
2162
2163 The password server much be a machine capable of using the "LM1.2X002"
2164 or the "LM NT 0.12" protocol, and it must be in user level security
2165 mode. 
2166
2167 NOTE: Using a password server means your UNIX box (running Samba) is
2168 only as secure as your password server. DO NOT CHOOSE A PASSWORD
2169 SERVER THAT YOU DON'T COMPLETELY TRUST.
2170
2171 Never point a Samba server at itself for password serving. This will
2172 cause a loop and could lock up your Samba server!
2173
2174 The name of the password server takes the standard substitutions, but
2175 probably the only useful one is %m, which means the Samba server will
2176 use the incoming client as the password server. If you use this then
2177 you better trust your clients, and you better restrict them with hosts
2178 allow!
2179
2180 If you list several hosts in the "password server" option then smbd
2181 will try each in turn till it finds one that responds. This is useful
2182 in case your primary server goes down.
2183
2184 .SS path (S)
2185 A synonym for this parameter is 'directory'.
2186
2187 This parameter specifies a directory to which the user of the service is to
2188 be given access. In the case of printable services, this is where print data 
2189 will spool prior to being submitted to the host for printing.
2190
2191 For a printable service offering guest access, the service should be readonly
2192 and the path should be world-writable and have the sticky bit set. This is not
2193 mandatory of course, but you probably won't get the results you expect if you
2194 do otherwise.
2195
2196 Any occurrences of %u in the path will be replaced with the username
2197 that the client is connecting as. Any occurrences of %m will be
2198 replaced by the name of the machine they are connecting from. These
2199 replacements are very useful for setting up pseudo home directories
2200 for users.
2201
2202 Note that this path will be based on 'root dir' if one was specified.
2203 .B Default:
2204         none
2205
2206 .B Example:
2207         path = /home/fred+ 
2208
2209 .SS postexec (S)
2210
2211 This option specifies a command to be run whenever the service is
2212 disconnected. It takes the usual substitutions. The command may be run
2213 as the root on some systems.
2214
2215 An interesting example may be do unmount server resources:
2216
2217 postexec = /etc/umount /cdrom
2218
2219 See also preexec
2220
2221 .B Default:
2222       none (no command executed)
2223
2224 .B Example:
2225       postexec = echo \e"%u disconnected from %S from %m (%I)\e" >> /tmp/log
2226
2227 .SS postscript (S)
2228 This parameter forces a printer to interpret the print files as
2229 postscript. This is done by adding a %! to the start of print output. 
2230
2231 This is most useful when you have lots of PCs that persist in putting
2232 a control-D at the start of print jobs, which then confuses your
2233 printer.
2234
2235 .B Default: 
2236         postscript = False
2237
2238 .B Example: 
2239         postscript = True
2240
2241 .SS preexec (S)
2242
2243 This option specifies a command to be run whenever the service is
2244 connected to. It takes the usual substitutions.
2245
2246 An interesting example is to send the users a welcome message every
2247 time they log in. Maybe a message of the day? Here is an example:
2248
2249 preexec = csh -c 'echo \e"Welcome to %S!\e" | \e
2250        /usr/local/samba/bin/smbclient -M %m -I %I' &
2251
2252 Of course, this could get annoying after a while :-)
2253
2254 See also postexec
2255
2256 .B Default:
2257         none (no command executed)
2258
2259 .B Example:
2260         preexec = echo \e"%u connected to %S from %m (%I)\e" >> /tmp/log
2261
2262 .SS preferred master (G)
2263 This boolean parameter controls if Samba is a preferred master browser
2264 for its workgroup.
2265 If this is set to true, on startup, samba will force an election, 
2266 and it will have a slight advantage in winning the election.  
2267 It is recommended that this parameter is used in conjunction 
2268 with domain master = yes, so that samba can guarantee becoming 
2269 a domain master.  
2270
2271 Use this option with caution, because if there are several hosts
2272 (whether samba servers, Windows 95 or NT) that are preferred master
2273 browsers on the same subnet, they will each periodically and continuously
2274 attempt to become the local master browser.  This will result in
2275 unnecessary broadcast traffic and reduced browsing capabilities.
2276
2277 See
2278 .B os level = nn
2279
2280 .B Default:
2281         preferred master = no
2282
2283 .SS preload
2284 This is an alias for "auto services"
2285
2286 .SS preserve case (S)
2287
2288 This controls if new filenames are created with the case that the
2289 client passes, or if they are forced to be the "default" case.
2290
2291 .B Default:
2292        preserve case = no
2293
2294 See the section on "NAME MANGLING" for a fuller discussion.
2295
2296 .SS print command (S)
2297 After a print job has finished spooling to a service, this command will be
2298 used via a system() call to process the spool file. Typically the command 
2299 specified will submit the spool file to the host's printing subsystem, but
2300 there is no requirement that this be the case. The server will not remove the
2301 spool file, so whatever command you specify should remove the spool file when
2302 it has been processed, otherwise you will need to manually remove old spool
2303 files.
2304
2305 The print command is simply a text string. It will be used verbatim,
2306 with two exceptions: All occurrences of "%s" will be replaced by the
2307 appropriate spool file name, and all occurrences of "%p" will be
2308 replaced by the appropriate printer name. The spool file name is
2309 generated automatically by the server, the printer name is discussed
2310 below.
2311
2312 The full path name will be used for the filename if %s is not preceded
2313 by a /. If you don't like this (it can stuff up some lpq output) then
2314 use %f instead. Any occurrences of %f get replaced by the spool
2315 filename without the full path at the front.
2316
2317 The print command MUST contain at least one occurrence of "%s" or %f -
2318 the "%p" is optional. At the time a job is submitted, if no printer
2319 name is supplied the "%p" will be silently removed from the printer
2320 command.
2321
2322 If specified in the [global] section, the print command given will be used
2323 for any printable service that does not have its own print command specified.
2324
2325 If there is neither a specified print command for a printable service nor a 
2326 global print command, spool files will be created but not processed and (most
2327 importantly) not removed.
2328
2329 Note that printing may fail on some UNIXes from the "nobody"
2330 account. If this happens then create an alternative guest account that
2331 can print and set the "guest account" in the [global] section.
2332
2333 You can form quite complex print commands by realising that they are
2334 just passed to a shell. For example the following will log a print
2335 job, print the file, then remove it. Note that ; is the usual
2336 separator for command in shell scripts.
2337
2338 print command = echo Printing %s >> /tmp/print.log; lpr -P %p %s; rm %s
2339
2340 You may have to vary this command considerably depending on how you
2341 normally print files on your system.
2342
2343 .B Default:
2344         print command = lpr -r -P %p %s
2345
2346 .B Example:
2347         print command = /usr/local/samba/bin/myprintscript %p %s
2348 .SS print ok (S)
2349 See
2350 .B printable.
2351 .SS printable (S)
2352 A synonym for this parameter is 'print ok'.
2353
2354 If this parameter is 'yes', then clients may open, write to and submit spool 
2355 files on the directory specified for the service.
2356
2357 Note that a printable service will ALWAYS allow writing to the service path
2358 (user privileges permitting) via the spooling of print data. The 'read only'
2359 parameter controls only non-printing access to the resource.
2360
2361 .B Default:
2362         printable = no
2363
2364 .B Example:
2365         printable = yes
2366
2367 .SS printcap name (G)
2368 This parameter may be used to override the compiled-in default printcap
2369 name used by the server (usually /etc/printcap). See the discussion of the
2370 [printers] section above for reasons why you might want to do this.
2371
2372 For those of you without a printcap (say on SysV) you can just create a
2373 minimal file that looks like a printcap and set "printcap name =" in
2374 [global] to point at it.
2375
2376 A minimal printcap file would look something like this:
2377
2378 print1|My Printer 1
2379 .br
2380 print2|My Printer 2
2381 .br
2382 print3|My Printer 3
2383 .br
2384 print4|My Printer 4
2385 .br
2386 print5|My Printer 5
2387
2388 where the | separates aliases of a printer. The fact that the second
2389 alias has a space in it gives a hint to Samba that it's a comment.
2390
2391 NOTE: Under AIX the default printcap name is "/etc/qconfig". Samba
2392 will assume the file is in AIX "qconfig" format if the string
2393 "/qconfig" appears in the printcap filename.
2394
2395 .B Default:
2396         printcap name = /etc/printcap
2397
2398 .B Example:
2399         printcap name = /etc/myprintcap
2400 .SS printer (S)
2401 A synonym for this parameter is 'printer name'.
2402
2403 This parameter specifies the name of the printer to which print jobs spooled
2404 through a printable service will be sent.
2405
2406 If specified in the [global] section, the printer name given will be used
2407 for any printable service that does not have its own printer name specified.
2408
2409 .B Default:
2410         none (but may be 'lp' on many systems)
2411
2412 .B Example:
2413         printer name = laserwriter
2414
2415 .SS printer driver (S)
2416 This option allows you to control the string that clients receive when
2417 they ask the server for the printer driver associated with a
2418 printer. If you are using Windows95 or WindowsNT then you can use this
2419 to automate the setup of printers on your system.
2420
2421 You need to set this parameter to the exact string (case sensitive)
2422 that describes the appropriate printer driver for your system. 
2423 If you don't know the exact string to use then you should first try
2424 with no "printer driver" option set and the client will give you a
2425 list of printer drivers. The appropriate strings are shown in a
2426 scrollbox after you have chosen the printer manufacturer.
2427
2428 .B Example:
2429         printer driver = HP LaserJet 4L
2430
2431 .SS printer name (S)
2432 See
2433 .B printer.
2434
2435 .SS printing (G)
2436 This parameters controls how printer status information is interpreted
2437 on your system, and also affects the default values for the "print
2438 command", "lpq command" and "lprm command".
2439
2440 Currently six printing styles are supported. They are "printing =
2441 bsd", "printing = sysv", "printing = hpux", "printing = aix",
2442 "printing = qnx" and "printing = plp".
2443
2444 To see what the defaults are for the other print commands when using
2445 these three options use the "testparm" program.
2446
2447
2448 .SS protocol (G)
2449 The value of the parameter (a string) is the highest protocol level that will
2450 be supported by the server. 
2451
2452 Possible values are CORE, COREPLUS, LANMAN1, LANMAN2 and NT1. The relative
2453 merits of each are discussed in the README file.
2454
2455 Normally this option should not be set as the automatic negotiation
2456 phase in the SMB protocol takes care of choosing the appropriate protocol.
2457
2458 .B Default:
2459         protocol = NT1
2460
2461 .B Example:
2462         protocol = LANMAN1
2463 .SS public (S)
2464 A synonym for this parameter is 'guest ok'.
2465
2466 If this parameter is 'yes' for a service, then no password is required
2467 to connect to the service. Privileges will be those of the guest
2468 account.
2469
2470 See the section below on user/password validation for more information about
2471 this option.
2472
2473 .B Default:
2474         public = no
2475
2476 .B Example:
2477         public = yes
2478 .SS read list (S)
2479 This is a list of users that are given read-only access to a
2480 service. If the connecting user is in this list then they will
2481 not be given write access, no matter what the "read only" option
2482 is set to. The list can include group names using the @group syntax.
2483
2484 See also the "write list" option
2485
2486 .B Default:
2487      read list =
2488
2489 .B Example:
2490      read list = mary, @students
2491
2492 .SS read only (S)
2493 See
2494 .B writable
2495 and
2496 .B write ok.
2497 Note that this is an inverted synonym for writable and write ok.
2498 .SS read prediction (G)
2499 This options enables or disables the read prediction code used to
2500 speed up reads from the server. When enabled the server will try to
2501 pre-read data from the last accessed file that was opened read-only
2502 while waiting for packets.
2503
2504 .SS Default:
2505         read prediction = False
2506
2507 .SS Example:
2508         read prediction = True
2509 .SS read raw (G)
2510 This parameter controls whether or not the server will support raw reads when
2511 transferring data to clients.
2512
2513 If enabled, raw reads allow reads of 65535 bytes in one packet. This
2514 typically provides a major performance benefit.
2515
2516 However, some clients either negotiate the allowable block size incorrectly
2517 or are incapable of supporting larger block sizes, and for these clients you
2518 may need to disable raw reads.
2519
2520 In general this parameter should be viewed as a system tuning tool and left
2521 severely alone. See also
2522 .B write raw.
2523
2524 .B Default:
2525         read raw = yes
2526
2527 .B Example:
2528         read raw = no
2529 .SS read size (G)
2530
2531 The option "read size" affects the overlap of disk reads/writes with
2532 network reads/writes. If the amount of data being transferred in
2533 several of the SMB commands (currently SMBwrite, SMBwriteX and
2534 SMBreadbraw) is larger than this value then the server begins writing
2535 the data before it has received the whole packet from the network, or
2536 in the case of SMBreadbraw, it begins writing to the network before
2537 all the data has been read from disk.
2538
2539 This overlapping works best when the speeds of disk and network access
2540 are similar, having very little effect when the speed of one is much
2541 greater than the other.
2542
2543 The default value is 2048, but very little experimentation has been
2544 done yet to determine the optimal value, and it is likely that the best
2545 value will vary greatly between systems anyway. A value over 65536 is
2546 pointless and will cause you to allocate memory unnecessarily.
2547
2548 .B Default:
2549         read size = 2048
2550
2551 .B Example:
2552         read size = 8192
2553
2554 .SS remote announce (G)
2555
2556 This option allows you to setup nmbd to periodically announce itself
2557 to arbitrary IP addresses with an arbitrary workgroup name. 
2558
2559 This is useful if you want your Samba server to appear in a remote
2560 workgroup for which the normal browse propagation rules don't
2561 work. The remote workgroup can be anywhere that you can send IP
2562 packets to.
2563
2564 For example:
2565
2566        remote announce = 192.168.2.255/SERVERS 192.168.4.255/STAFF
2567
2568 the above line would cause nmbd to announce itself to the two given IP
2569 addresses using the given workgroup names. If you leave out the
2570 workgroup name then the one given in the "workgroup" option is used
2571 instead. 
2572
2573 The IP addresses you choose would normally be the broadcast addresses
2574 of the remote networks, but can also be the IP addresses of known
2575 browse masters if your network config is that stable.
2576
2577 This option replaces similar functionality from the nmbd lmhosts file.
2578
2579 .SS revalidate (S)
2580
2581 This options controls whether Samba will allow a previously validated
2582 username/password pair to be used to attach to a share. Thus if you
2583 connect to \e\eserver\eshare1 then to \e\eserver\eshare2 it won't
2584 automatically allow the client to request connection to the second
2585 share as the same username as the first without a password.
2586
2587 If "revalidate" is True then the client will be denied automatic
2588 access as the same username.
2589
2590 .B Default:
2591         revalidate = False
2592
2593 .B Example:
2594         revalidate = True
2595
2596 .SS root (G)
2597 See
2598 .B root directory.
2599 .SS root dir (G)
2600 See
2601 .B root directory.
2602 .SS root directory (G)
2603 Synonyms for this parameter are 'root dir' and 'root'.
2604
2605 The server will chroot() to this directory on startup. This is not 
2606 strictly necessary for secure operation. Even without it the server
2607 will deny access to files not in one of the service entries. It may 
2608 also check for, and deny access to, soft links to other parts of the 
2609 filesystem, or attempts to use .. in file names to access other 
2610 directories (depending on the setting of the "wide links" parameter).
2611
2612 Adding a "root dir" entry other than "/" adds an extra level of security, 
2613 but at a price. It absolutely ensures that no access is given to files not
2614 in the sub-tree specified in the "root dir" option, *including* some files 
2615 needed for complete operation of the server. To maintain full operability
2616 of the server you will need to mirror some system files into the "root dir"
2617 tree. In particular you will need to mirror /etc/passwd (or a subset of it),
2618 and any binaries or configuration files needed for printing (if required). 
2619 The set of files that must be mirrored is operating system dependent.
2620
2621 .B Default:
2622         root directory = /
2623
2624 .B Example:
2625         root directory = /homes/smb
2626 .SS root postexec (S)
2627
2628 This is the same as postexec except that the command is run as
2629 root. This is useful for unmounting filesystems (such as cdroms) after
2630 a connection is closed.
2631
2632 .SS root preexec (S)
2633
2634 This is the same as preexec except that the command is run as
2635 root. This is useful for mounting filesystems (such as cdroms) before
2636 a connection is finalised.
2637
2638 .SS security (G)
2639 This option affects how clients respond to Samba.
2640
2641 The option sets the "security mode bit" in replies to protocol negotiations
2642 to turn share level security on or off. Clients decide based on this bit 
2643 whether (and how) to transfer user and password information to the server.
2644
2645 The default is "security=SHARE", mainly because that was the only
2646 option at one stage.
2647
2648 The alternatives are "security = user" or "security = server". 
2649
2650 If your PCs use usernames that are the same as their usernames on the
2651 UNIX machine then you will want to use "security = user". If you
2652 mostly use usernames that don't exist on the UNIX box then use
2653 "security = share".
2654
2655 There is a bug in WfWg that may affect your decision. When in user
2656 level security a WfWg client will totally ignore the password you type
2657 in the "connect drive" dialog box. This makes it very difficult (if
2658 not impossible) to connect to a Samba service as anyone except the
2659 user that you are logged into WfWg as.
2660
2661 If you use "security = server" then Samba will try to validate the
2662 username/password by passing it to another SMB server, such as an NT
2663 box. If this fails it will revert to "security = USER".
2664
2665 See the "password server" option for more details.
2666
2667 .B Default:
2668         security = SHARE
2669
2670 .B Example:
2671         security = USER
2672 .SS server string (G)
2673 This controls what string will show up in the printer comment box in
2674 print manager and next to the IPC connection in "net view". It can be
2675 any string that you wish to show to your users.
2676
2677 It also sets what will appear in browse lists next to the machine name.
2678
2679 A %v will be replaced with the Samba version number.
2680
2681 A %h will be replaced with the hostname.
2682
2683 .B Default:
2684         server string = Samba %v
2685
2686 .B Example:
2687         server string = University of GNUs Samba Server
2688
2689 .SS set directory (S)
2690 If 'set directory = no', then users of the service may not use the setdir
2691 command to change directory.
2692
2693 The setdir command is only implemented in the Digital Pathworks client. See the
2694 Pathworks documentation for details.
2695
2696 .B Default:
2697         set directory = no
2698
2699 .B Example:
2700         set directory = yes
2701
2702 .SS shared file entries (G)
2703 This parameter is only useful when Samba has been compiled with FAST_SHARE_MODES.
2704 It specifies the number of hash bucket entries used for share file locking.
2705 You should never change this parameter unless you have studied the source 
2706 and know what you are doing.
2707
2708 .B Default
2709         shared file entries = 113
2710
2711 .SS shared mem size (G)
2712 This parameter is only useful when Samba has been compiled with FAST_SHARE_MODES.
2713 It specifies the size of the shared memory (in bytes) to use between smbd 
2714 processes. You should never change this parameter unless you have studied 
2715 the source and know what you are doing.
2716
2717 .B Default
2718         shared mem size = 102400
2719
2720 .SS smb passwd file (G)
2721 This option sets the path to the encrypted smbpasswd file. This is a *VERY
2722 DANGEROUS OPTION* if the smb.conf is user writable. By default the path
2723 to the smbpasswd file is compiled into Samba.
2724
2725 .SS smbrun (G)
2726 This sets the full path to the smbrun binary. This defaults to the
2727 value in the Makefile.
2728
2729 You must get this path right for many services to work correctly.
2730
2731 .B Default:
2732 taken from Makefile
2733
2734 .B Example:
2735         smbrun = /usr/local/samba/bin/smbrun
2736
2737 .SS share modes (S)
2738
2739 This enables or disables the honouring of the "share modes" during a
2740 file open. These modes are used by clients to gain exclusive read or
2741 write access to a file. 
2742
2743 These open modes are not directly supported by UNIX, so they are
2744 simulated using lock files in the "lock directory". The "lock
2745 directory" specified in smb.conf must be readable by all users.
2746
2747 The share modes that are enabled by this option are DENY_DOS,
2748 DENY_ALL, DENY_READ, DENY_WRITE, DENY_NONE and DENY_FCB.
2749
2750 Enabling this option gives full share compatibility but may cost a bit
2751 of processing time on the UNIX server. They are enabled by default.
2752
2753 .B Default:
2754         share modes = yes
2755
2756 .B Example:
2757         share modes = no
2758
2759 .SS short preserve case (S)
2760
2761 This controls if new short filenames are created with the case that
2762 the client passes, or if they are forced to be the "default" case.
2763
2764 .B Default:
2765        short preserve case = no
2766
2767 See the section on "NAME MANGLING" for a fuller discussion.
2768
2769 .SS socket address (G)
2770
2771 This option allows you to control what address Samba will listen for
2772 connections on. This is used to support multiple virtual interfaces on
2773 the one server, each with a different configuration.
2774
2775 By default samba will accept connections on any address.
2776
2777 .B Example:
2778         socket address = 192.168.2.20
2779
2780 .SS socket options (G)
2781 This option (which can also be invoked with the -O command line
2782 option) allows you to set socket options to be used when talking with
2783 the client.
2784
2785 Socket options are controls on the networking layer of the operating
2786 systems which allow the connection to be tuned.
2787
2788 This option will typically be used to tune your Samba server for
2789 optimal performance for your local network. There is no way that Samba
2790 can know what the optimal parameters are for your net, so you must
2791 experiment and choose them yourself. I strongly suggest you read the
2792 appropriate documentation for your operating system first (perhaps
2793 "man setsockopt" will help).
2794
2795 You may find that on some systems Samba will say "Unknown socket
2796 option" when you supply an option. This means you either mis-typed it
2797 or you need to add an include file to includes.h for your OS. If the
2798 latter is the case please send the patch to me
2799 (samba-bugs@samba.anu.edu.au).
2800
2801 Any of the supported socket options may be combined in any way you
2802 like, as long as your OS allows it.
2803
2804 This is the list of socket options currently settable using this
2805 option:
2806
2807   SO_KEEPALIVE
2808
2809   SO_REUSEADDR
2810
2811   SO_BROADCAST
2812
2813   TCP_NODELAY
2814
2815   IPTOS_LOWDELAY
2816
2817   IPTOS_THROUGHPUT
2818
2819   SO_SNDBUF *
2820
2821   SO_RCVBUF *
2822
2823   SO_SNDLOWAT *
2824
2825   SO_RCVLOWAT *
2826
2827 Those marked with a * take an integer argument. The others can
2828 optionally take a 1 or 0 argument to enable or disable the option, by
2829 default they will be enabled if you don't specify 1 or 0.
2830
2831 To specify an argument use the syntax SOME_OPTION=VALUE for example
2832 SO_SNDBUF=8192. Note that you must not have any spaces before or after
2833 the = sign.
2834
2835 If you are on a local network then a sensible option might be
2836
2837 socket options = IPTOS_LOWDELAY
2838
2839 If you have an almost unloaded local network and you don't mind a lot
2840 of extra CPU usage in the server then you could try
2841
2842 socket options = IPTOS_LOWDELAY TCP_NODELAY
2843
2844 If you are on a wide area network then perhaps try setting
2845 IPTOS_THROUGHPUT. 
2846
2847 Note that several of the options may cause your Samba server to fail
2848 completely. Use these options with caution!
2849
2850 .B Default:
2851         no socket options
2852
2853 .B Example:
2854         socket options = IPTOS_LOWDELAY 
2855
2856
2857
2858
2859 .SS status (G)
2860 This enables or disables logging of connections to a status file that
2861 .B smbstatus
2862 can read.
2863
2864 With this disabled
2865 .B smbstatus
2866 won't be able to tell you what
2867 connections are active.
2868
2869 .B Default:
2870         status = yes
2871
2872 .B Example:
2873         status = no
2874
2875 .SS strict locking (S)
2876 This is a boolean that controls the handling of file locking in the
2877 server. When this is set to yes the server will check every read and
2878 write access for file locks, and deny access if locks exist. This can
2879 be slow on some systems.
2880
2881 When strict locking is "no" the server does file lock checks only when
2882 the client explicitly asks for them. 
2883
2884 Well behaved clients always ask for lock checks when it is important,
2885 so in the vast majority of cases "strict locking = no" is preferable.
2886
2887 .B Default:
2888         strict locking = no
2889
2890 .B Example:
2891         strict locking = yes
2892
2893 .SS strip dot (G)
2894 This is a boolean that controls whether to strip trailing dots off
2895 filenames. This helps with some CDROMs that have filenames ending in a
2896 single dot.
2897
2898 NOTE: This option is now obsolete, and may be removed in future. You
2899 should use the "mangled map" option instead as it is much more
2900 general. 
2901
2902 .SS syslog (G)
2903 This parameter maps how Samba debug messages are logged onto the
2904 system syslog logging levels. Samba debug level zero maps onto
2905 syslog LOG_ERR, debug level one maps onto LOG_WARNING, debug
2906 level two maps to LOG_NOTICE, debug level three maps onto LOG_INFO.
2907 The paramter sets the threshold for doing the mapping, all Samba
2908 debug messages above this threashold are mapped to syslog LOG_DEBUG
2909 messages.
2910
2911 .B Default:
2912
2913         syslog = 1
2914
2915 .SS syslog only (G)
2916 If this parameter is set then Samba debug messages are logged into
2917 the system syslog only, and not to the debug log files.
2918
2919 .B Default:
2920         syslog only = no
2921
2922 .SS sync always (S)
2923
2924 This is a boolean parameter that controls whether writes will always
2925 be written to stable storage before the write call returns. If this is
2926 false then the server will be guided by the client's request in each
2927 write call (clients can set a bit indicating that a particular write
2928 should be synchronous). If this is true then every write will be
2929 followed by a fsync() call to ensure the data is written to disk.
2930
2931 .B Default:
2932         sync always = no
2933
2934 .B Example:
2935         sync always = yes
2936
2937 .SS time offset (G)
2938 This parameter is a setting in minutes to add to the normal GMT to
2939 local time conversion. This is useful if you are serving a lot of PCs
2940 that have incorrect daylight saving time handling.
2941
2942 .B Default:
2943         time offset = 0
2944
2945 .B Example:
2946         time offset = 60
2947
2948 .SS time server (G)
2949 This parameter determines if nmbd advertises itself as a time server
2950 to Windows clients. The default is False.
2951
2952 .B Default:
2953         time server = False
2954
2955 .B Example:
2956         time server = True
2957
2958 .SS unix realname (G)
2959 This boolean parameter when set causes samba to supply the real name field
2960 from the unix password file to the client. This is useful for setting up
2961 mail clients and WWW browsers on systems used by more than one person.
2962
2963 .B Default:
2964         unix realname = no
2965
2966 .B Example:
2967         unix realname = yes
2968
2969 .SS user (S)
2970 See
2971 .B username.
2972 .SS username (S)
2973 A synonym for this parameter is 'user'.
2974
2975 Multiple users may be specified in a comma-delimited list, in which case the
2976 supplied password will be tested against each username in turn (left to right).
2977
2978 The username= line is needed only when the PC is unable to supply its own
2979 username. This is the case for the coreplus protocol or where your
2980 users have different WfWg usernames to UNIX usernames. In both these
2981 cases you may also be better using the \e\eserver\eshare%user syntax
2982 instead. 
2983
2984 The username= line is not a great solution in many cases as it means Samba
2985 will try to validate the supplied password against each of the
2986 usernames in the username= line in turn. This is slow and a bad idea for
2987 lots of users in case of duplicate passwords. You may get timeouts or
2988 security breaches using this parameter unwisely.
2989
2990 Samba relies on the underlying UNIX security. This parameter does not
2991 restrict who can login, it just offers hints to the Samba server as to
2992 what usernames might correspond to the supplied password. Users can
2993 login as whoever they please and they will be able to do no more
2994 damage than if they started a telnet session. The daemon runs as the
2995 user that they log in as, so they cannot do anything that user cannot
2996 do.
2997
2998 To restrict a service to a particular set of users you can use the
2999 "valid users=" line.
3000
3001 If any of the usernames begin with a @ then the name will be looked up
3002 in the groups file and will expand to a list of all users in the group
3003 of that name. Note that searching though a groups file can take quite
3004 some time, and some clients may time out during the search.
3005
3006 See the section below on username/password validation for more information
3007 on how this parameter determines access to the services.
3008
3009 .B Default:
3010         The guest account if a guest service, else the name of the service.
3011
3012 .B Examples:
3013         username = fred
3014         username = fred, mary, jack, jane, @users, @pcgroup
3015
3016 .SS username map (G)
3017
3018 This option allows you to to specify a file containing a mapping of
3019 usernames from the clients to the server. This can be used for several
3020 purposes. The most common is to map usernames that users use on DOS or
3021 Windows machines to those that the UNIX box uses. The other is to map
3022 multiple users to a single username so that they can more easily share
3023 files.
3024
3025 The map file is parsed line by line. Each line should contain a single
3026 UNIX username on the left then a '=' followed by a list of usernames
3027 on the right. The list of usernames on the right may contain names of
3028 the form @group in which case they will match any UNIX username in
3029 that group. The special client name '*' is a wildcard and matches any
3030 name.
3031
3032 The file is processed on each line by taking the supplied username and
3033 comparing it with each username on the right hand side of the '='
3034 signs. If the supplied name matches any of the names on the right
3035 hand side then it is replaced with the name on the left. Processing
3036 then continues with the next line.
3037
3038 If any line begins with a '#' or a ';' then it is ignored
3039
3040 For example to map from the name "admin" or "administrator" to the UNIX
3041 name "root" you would use
3042
3043         root = admin administrator
3044
3045 Or to map anyone in the UNIX group "system" to the UNIX name "sys" you
3046 would use
3047
3048         sys = @system
3049
3050 You can have as many mappings as you like in a username map file.
3051
3052 Note that the remapping is applied to all occurrences of
3053 usernames. Thus if you connect to "\e\eserver\efred" and "fred" is
3054 remapped to "mary" then you will actually be connecting to
3055 "\e\eserver\emary" and will need to supply a password suitable for
3056 "mary" not "fred". The only exception to this is the username passed
3057 to the "password server" (if you have one). The password server will
3058 receive whatever username the client supplies without modification.
3059
3060 Also note that no reverse mapping is done. The main effect this has is
3061 with printing. Users who have been mapped may have trouble deleting
3062 print jobs as PrintManager under WfWg will think they don't own the
3063 print job.
3064
3065 .B Default
3066         no username map
3067
3068 .B Example
3069         username map = /usr/local/samba/lib/users.map
3070
3071 .SS valid chars (S)
3072
3073 The option allows you to specify additional characters that should be
3074 considered valid by the server in filenames. This is particularly
3075 useful for national character sets, such as adding u-umlaut or a-ring.
3076
3077 The option takes a list of characters in either integer or character
3078 form with spaces between them. If you give two characters with a colon
3079 between them then it will be taken as an lowercase:uppercase pair.
3080
3081 If you have an editor capable of entering the characters into the
3082 config file then it is probably easiest to use this method. Otherwise
3083 you can specify the characters in octal, decimal or hexadecimal form
3084 using the usual C notation.
3085
3086 For example to add the single character 'Z' to the charset (which is a
3087 pointless thing to do as it's already there) you could do one of the
3088 following
3089
3090 valid chars = Z
3091 valid chars = z:Z
3092 valid chars = 0132:0172
3093
3094 The last two examples above actually add two characters, and alter
3095 the uppercase and lowercase mappings appropriately.
3096
3097 Note that you MUST specify this parameter after the "client code page"
3098 parameter if you have both set. If "client code page" is set after
3099 the "valid chars" parameter the "valid chars" settings will be
3100 overwritten.
3101
3102 See also the "client code page" parameter.
3103
3104 .B Default
3105 .br
3106         Samba defaults to using a reasonable set of valid characters
3107 .br
3108         for english systems
3109
3110 .B Example
3111         valid chars = 0345:0305 0366:0326 0344:0304
3112
3113 The above example allows filenames to have the swedish characters in
3114 them. 
3115
3116 NOTE: It is actually quite difficult to correctly produce a "valid
3117 chars" line for a particular system. To automate the process
3118 tino@augsburg.net has written a package called "validchars" which will
3119 automatically produce a complete "valid chars" line for a given client
3120 system. Look in the examples subdirectory for this package.
3121
3122 .SS valid users (S)
3123 This is a list of users that should be allowed to login to this
3124 service. A name starting with @ is interpreted as a UNIX group.
3125
3126 If this is empty (the default) then any user can login. If a username
3127 is in both this list and the "invalid users" list then access is
3128 denied for that user.
3129
3130 The current servicename is substituted for %S. This is useful in the
3131 [homes] section.
3132
3133 See also "invalid users"
3134
3135 .B Default
3136         No valid users list. (anyone can login)
3137
3138 .B Example
3139         valid users = greg, @pcusers
3140
3141
3142 .SS veto files(S)
3143 This is a list of files and directories that are neither visible nor
3144 accessible.  Each entry in the list must be separate by a "/", which
3145 allows spaces to be included in the entry.  Note that '*' and '?' at
3146 present cannot be used to specify multiple files or directories.
3147
3148 .B Default
3149         No files or directories are vetoed.
3150
3151 .B Example
3152         veto files = DesktopFolderDB/TrashFor%m/resource.frk
3153
3154 The above example is based on files that the Macintosh client (DAVE)
3155 creates for internal use.
3156
3157 .SS volume (S)
3158 This allows you to override the volume label returned for a
3159 share. Useful for CDROMs with installation programs that insist on a
3160 particular volume label.
3161
3162 The default is the name of the share
3163
3164 .SS wide links (S)
3165 This parameter controls whether or not links in the UNIX file system may be
3166 followed by the server. Links that point to areas within the directory tree
3167 exported by the server are always allowed; this parameter controls access 
3168 only to areas that are outside the directory tree being exported.
3169
3170 .B Default:
3171         wide links = yes
3172
3173 .B Example:
3174         wide links = no
3175
3176 .SS wins proxy (G)
3177
3178 This is a boolean that controls if nmbd will respond to broadcast name
3179 queries on behalf of other hosts. You may need to set this to no for
3180 some older clients.
3181
3182 .B Default:
3183         wins proxy = no
3184 .SS wins server (G)
3185
3186 This specifies the DNS name (or IP address) of the WINS server that Samba 
3187 should register with. If you have a WINS server on your network then you
3188 should set this to the WINS servers name.
3189
3190 You should point this at your WINS server if you have a multi-subnetted
3191 network.
3192 .B Default:
3193         wins server = 
3194
3195 .SS wins support (G)
3196
3197 This boolean controls if Samba will act as a WINS server. You should
3198 not set this to true unless you have a multi-subnetted network and
3199 you wish a particular nmbd to be your WINS server. Note that you
3200 should *NEVER* set this to true on more than one machine in your
3201 network.
3202
3203 .B Default:
3204         wins support = no
3205 .SS workgroup (G)
3206
3207 This controls what workgroup your server will appear to be in when
3208 queried by clients. 
3209
3210 .B Default:
3211         set in the Makefile
3212
3213 .B Example:
3214         workgroup = MYGROUP
3215
3216 .SS writable (S)
3217 A synonym for this parameter is 'write ok'. An inverted synonym is 'read only'.
3218
3219 If this parameter is 'no', then users of a service may not create or modify
3220 files in the service's directory.
3221
3222 Note that a printable service ('printable = yes') will ALWAYS allow 
3223 writing to the directory (user privileges permitting), but only via
3224 spooling operations.
3225
3226 .B Default:
3227         writable = no
3228
3229 .B Examples:
3230         read only = no
3231         writable = yes
3232         write ok = yes
3233 .SS write list (S)
3234 This is a list of users that are given read-write access to a
3235 service. If the connecting user is in this list then they will be
3236 given write access, no matter what the "read only" option is set
3237 to. The list can include group names using the @group syntax.
3238
3239 Note that if a user is in both the read list and the write list then
3240 they will be given write access.
3241
3242 See also the "read list" option
3243
3244 .B Default:
3245      write list =
3246
3247 .B Example:
3248      write list = admin, root, @staff
3249
3250 .SS write ok (S)
3251 See
3252 .B writable
3253 and
3254 .B read only.
3255 .SS write raw (G)
3256 This parameter controls whether or not the server will support raw writes when
3257 transferring data from clients.
3258
3259 .B Default:
3260         write raw = yes
3261
3262 .B Example:
3263         write raw = no
3264 .SH NOTE ABOUT USERNAME/PASSWORD VALIDATION
3265 There are a number of ways in which a user can connect to a
3266 service. The server follows the following steps in determining if it
3267 will allow a connection to a specified service. If all the steps fail
3268 then the connection request is rejected. If one of the steps pass then
3269 the following steps are not checked.
3270
3271 If the service is marked "guest only = yes" then steps 1 to 5 are skipped
3272
3273 Step 1: If the client has passed a username/password pair and that
3274 username/password pair is validated by the UNIX system's password
3275 programs then the connection is made as that username. Note that this
3276 includes the \e\eserver\eservice%username method of passing a username.
3277
3278 Step 2: If the client has previously registered a username with the
3279 system and now supplies a correct password for that username then the
3280 connection is allowed.
3281
3282 Step 3: The client's netbios name and any previously used user names
3283 are checked against the supplied password, if they match then the
3284 connection is allowed as the corresponding user.
3285
3286 Step 4: If the client has previously validated a username/password
3287 pair with the server and the client has passed the validation token
3288 then that username is used. This step is skipped if "revalidate = yes" 
3289 for this service.
3290
3291 Step 5: If a "user = " field is given in the smb.conf file for the
3292 service and the client has supplied a password, and that password
3293 matches (according to the UNIX system's password checking) with one of
3294 the usernames from the user= field then the connection is made as the
3295 username in the "user=" line. If one of the username in the user= list
3296 begins with a @ then that name expands to a list of names in the group
3297 of the same name.
3298
3299 Step 6: If the service is a guest service then a connection is made as
3300 the username given in the "guest account =" for the service,
3301 irrespective of the supplied password.
3302 .SH WARNINGS
3303 Although the configuration file permits service names to contain spaces, 
3304 your client software may not. Spaces will be ignored in comparisons anyway,
3305 so it shouldn't be a problem - but be aware of the possibility.
3306
3307 On a similar note, many clients - especially DOS clients - limit service
3308 names to eight characters. Smbd has no such limitation, but attempts
3309 to connect from such clients will fail if they truncate the service names.
3310 For this reason you should probably keep your service names down to eight 
3311 characters in length.
3312
3313 Use of the [homes] and [printers] special sections make life for an 
3314 administrator easy, but the various combinations of default attributes can be
3315 tricky. Take extreme care when designing these sections. In particular,
3316 ensure that the permissions on spool directories are correct.
3317 .SH VERSION
3318 This man page is (mostly) correct for version 1.9.16 of the Samba suite, plus some
3319 of the recent patches to it. These notes will necessarily lag behind 
3320 development of the software, so it is possible that your version of 
3321 the server has extensions or parameter semantics that differ from or are not 
3322 covered by this man page. Please notify these to the address below for 
3323 rectification.
3324
3325 Prior to version 1.5.21 of the Samba suite, the configuration file was
3326 radically different (more primitive). If you are using a version earlier than
3327 1.8.05, it is STRONGLY recommended that you upgrade.
3328 .SH OPTIONS
3329 Not applicable.
3330 .SH FILES
3331 Not applicable.
3332 .SH ENVIRONMENT VARIABLES
3333 Not applicable.
3334 .SH SEE ALSO
3335 .BR smbd (8),
3336 .BR smbclient (1),
3337 .BR nmbd (8),
3338 .BR testparm (1), 
3339 .BR testprns (1),
3340 .BR lpq (1),
3341 .BR hosts_access (5)
3342 .SH DIAGNOSTICS
3343 [This section under construction]
3344
3345 Most diagnostics issued by the server are logged in a specified log file. The
3346 log file name is specified at compile time, but may be overridden on the
3347 smbd command line (see
3348 .BR smbd (8)).
3349
3350 The number and nature of diagnostics available depends on the debug level used
3351 by the server. If you have problems, set the debug level to 3 and peruse the
3352 log files.
3353
3354 Most messages are reasonably self-explanatory. Unfortunately, at time of
3355 creation of this man page the source code is still too fluid to warrant
3356 describing each and every diagnostic. At this stage your best bet is still
3357 to grep the source code and inspect the conditions that gave rise to the 
3358 diagnostics you are seeing.
3359 .SH BUGS
3360 None known.
3361
3362 Please send bug reports, comments and so on to:
3363
3364 .RS 3
3365 .B samba-bugs@samba.anu.edu.au (Andrew Tridgell)
3366
3367 .RS 3
3368 or to the mailing list:
3369 .RE
3370
3371 .B samba@listproc.anu.edu.au
3372
3373 .RE
3374 You may also like to subscribe to the announcement channel:
3375
3376 .RS 3
3377 .B samba-announce@listproc.anu.edu.au
3378 .RE
3379
3380 To subscribe to these lists send a message to
3381 listproc@listproc.anu.edu.au with a body of "subscribe samba Your
3382 Name" or "subscribe samba-announce Your Name".
3383
3384 Errors or suggestions for improvements to the Samba man pages should be 
3385 mailed to:
3386
3387 .RS 3
3388 .B samba-bugs@samba.anu.edu.au (Andrew Tridgell)
3389 .RE
3390