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