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