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