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