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