mod to directory mask doc
[Samba.git] / docs / manpages / smb.conf.5
blobfc29f1b3ec528dd69c75b63cd48c94e0df5c8a9b
1 .TH SMB.CONF 5 smb.conf smb.conf
2 .SH NAME
3 smb.conf \- configuration file for smbd
4 .SH SYNOPSIS
5 .B smb.conf
6 .SH DESCRIPTION
7 The
8 .B smb.conf
9 file is a configuration file for the Samba suite.
11 .B smb.conf
12 contains runtime configuration information for the
13 .B smbd
14 program. The
15 .B smbd
16 program provides LanManager-like services to clients
17 using the SMB protocol.
18 .SH FILE FORMAT
19 The file consists of sections and parameters. A section begins with the 
20 name of the section in square brackets and continues until the next
21 section begins. Sections contain parameters of the form 'name = value'.
23 The file is line-based - that is, each newline-terminated line represents
24 either a comment, a section name or a parameter.
26 Section and parameter names are not case sensitive.
28 Only the first equals sign in a parameter is significant. Whitespace before 
29 or after the first equals sign is discarded. Leading, trailing and internal
30 whitespace in section and parameter names is irrelevant. Leading and
31 trailing whitespace in a parameter value is discarded. Internal whitespace
32 within a parameter value is retained verbatim.
34 Any line beginning with a semicolon is ignored, as are lines containing 
35 only whitespace.
37 Any line ending in a \e is "continued" on the next line in the
38 customary UNIX fashion.
40 The values following the equals sign in parameters are all either a string
41 (no quotes needed) or a boolean, which may be given as yes/no, 0/1 or
42 true/false. Case is not significant in boolean values, but is preserved
43 in string values. Some items such as create modes are numeric.
44 .SH SERVICE DESCRIPTIONS
45 Each section in the configuration file describes a service. The section name
46 is the service name and the parameters within the section define the service's
47 attributes.
49 There are three special sections, [global], [homes] and [printers], which are
50 described under 'special sections'. The following notes apply to ordinary 
51 service descriptions.
53 A service consists of a directory to which access is being given plus a 
54 description of the access rights which are granted to the user of the 
55 service. Some housekeeping options are also specifiable.
57 Services are either filespace services (used by the client as an extension of
58 their native file systems) or printable services (used by the client to access
59 print services on the host running the server).
61 Services may be guest services, in which case no password is required to
62 access them. A specified guest account is used to define access privileges
63 in this case.
65 Services other than guest services will require a password to access
66 them. The client provides the username. As many clients only provide
67 passwords and not usernames, you may specify a list of usernames to
68 check against the password using the "user=" option in the service
69 definition. 
71 Note that the access rights granted by the server are masked by the access
72 rights granted to the specified or guest user by the host system. The 
73 server does not grant more access than the host system grants.
75 The following sample section defines a file space service. The user has write
76 access to the path /home/bar. The service is accessed via the service name 
77 "foo":
79         [foo]
80                 path = /home/bar
81                 writable = true
83 The following sample section defines a printable service. The service is 
84 readonly, but printable. That is, the only write access permitted is via 
85 calls to open, write to and close a spool file. The 'guest ok' parameter 
86 means access will be permitted as the default guest user (specified elsewhere):
88         [aprinter]
89                 path = /usr/spool/public
90                 read only = true
91                 printable = true
92                 public = true
93 .SH SPECIAL SECTIONS
95 .SS The [global] section
96 .RS 3
97 Parameters in this section apply to the server as a whole, or are defaults
98 for services which do not specifically define certain items. See the notes
99 under 'Parameters' for more information.
102 .SS The [homes] section
103 .RS 3
104 If a section called 'homes' is included in the configuration file, services
105 connecting clients to their home directories can be created on the fly by the
106 server.
108 When the connection request is made, the existing services are scanned. If a
109 match is found, it is used. If no match is found, the requested service name is
110 treated as a user name and looked up in the local passwords file. If the
111 name exists and the correct password has been given, a service is created
112 by cloning the [homes] section.
114 Some modifications are then made to the newly created section:
116 .RS 3
117 The service name is changed from 'homes' to the located username
119 If no path was given, the path is set to the user's home directory.
122 If you decide to use a path= line in your [homes] section then you may
123 find it useful to use the %S macro. For example path=/data/pchome/%S
124 would be useful if you have different home directories for your PCs
125 than for UNIX access.
127 This is a fast and simple way to give a large number of clients access to
128 their home directories with a minimum of fuss.
130 A similar process occurs if the requested service name is "homes", except that
131 the service name is not changed to that of the requesting user. This method
132 of using the [homes] section works well if different users share a client PC.
134 The [homes] section can specify all the parameters a normal service section
135 can specify, though some make more sense than others. The following is a 
136 typical and suitable [homes] section:
138         [homes]
139                 writable = yes
141 An important point:
143 .RS 3
144 If guest access is specified in the [homes] section, all home directories will
145 be accessible to all clients
146 .B without a password.
147 In the very unlikely event
148 that this is actually desirable, it would be wise to also specify read only
149 access.
153 Note that the browseable flag for auto home directories will be
154 inherited from the global browseable flag, not the [homes] browseable
155 flag. This is useful as it means setting browseable=no in the [homes]
156 section will hide the [homes] service but make any auto home
157 directories visible.
159 .SS The [printers] section
160 .RS 3
161 This section works like [homes], but for printers.
163 If a [printers] section occurs in the configuration file, users are able 
164 to connect to any printer specified in the local host's printcap file.
166 When a connection request is made, the existing services are scanned. If a
167 match is found, it is used. If no match is found, but a [homes] section
168 exists, it is used as described above. Otherwise, the requested service name is
169 treated as a printer name and the appropriate printcap file is scanned to
170 see if the requested service name is a valid printer name. If a match is
171 found, a new service is created by cloning the [printers] section.
173 A few modifications are then made to the newly created section:
175 .RS 3
176 The service name is set to the located printer name
178 If no printer name was given, the printer name is set to the located printer
179 name
181 If the service does not permit guest access and no username was given, the 
182 username is set to the located printer name.
185 Note that the [printers] service MUST be printable - if you specify otherwise,
186 the server will refuse to load the configuration file.
188 Typically the path specified would be that of a world-writable spool directory
189 with the sticky bit set on it. A typical [printers] entry would look like this:
191         [printers]
192                 path = /usr/spool/public
193                 writable = no
194                 public = yes
195                 printable = yes 
197 All aliases given for a printer in the printcap file are legitimate printer
198 names as far as the server is concerned. If your printing subsystem doesn't
199 work like that, you will have to set up a pseudo-printcap. This is a file
200 consisting of one or more lines like this:
202         alias|alias|alias|alias...
204 Each alias should be an acceptable printer name for your printing 
205 subsystem. In the [global] section, specify the new file as your printcap.
206 The server will then only recognise names found in your pseudo-printcap,
207 which of course can contain whatever aliases you like. The same technique
208 could be used simply to limit access to a subset of your local printers.
210 An alias, by the way, is defined as any component of the first entry of a 
211 printcap record. Records are separated by newlines, components (if there are 
212 more than one) are separated by vertical bar symbols ("|").
214 .SH PARAMETERS
215 Parameters define the specific attributes of services.
217 Some parameters are specific to the [global] section (eg., security).
218 Some parameters are usable in all sections (eg., create mode). All others are
219 permissible only in normal sections. For the purposes of the following
220 descriptions the [homes] and [printers] sections will be considered normal.
221 The letter 'G' in parentheses indicates that a parameter is specific to the
222 [global] section. The letter 'S' indicates that a parameter can be
223 specified in a service specific section. Note that all S parameters
224 can also be specified in the [global] section - in which case they
225 will define the default behaviour for all services.
227 Parameters are arranged here in alphabetical order - this may not create
228 best bedfellows, but at least you can find them! Where there are synonyms,
229 the preferred synonym is described, others refer to the preferred synonym.
231 .SS VARIABLE SUBSTITUTIONS
233 Many of the strings that are settable in the config file can take
234 substitutions. For example the option "path = /tmp/%u" would be
235 interpreted as "path = /tmp/john" if the user connected with the
236 username john.
238 These substitutions are mostly noted in the descriptions below, but
239 there are some general substitutions which apply whenever they might be
240 relevant. These are:
242 %S = the name of the current service, if any
244 %P = the root directory of the current service, if any
246 %u = user name of the current service, if any
248 %g = primary group name of %u
250 %U = session user name (the user name that the client wanted, not
251 necessarily the same as the one they got)
253 %G = primary group name of %U
255 %H = the home directory of the user given by %u
257 %v = the Samba version
259 %h = the hostname that Samba is running on
261 %m = the netbios name of the client machine (very useful)
263 %L = the netbios name of the server. This allows you to change your
264 config based on what the client calls you. Your server can have a "dual
265 personality".
267 %M = the internet name of the client machine
269 %d = The process id of the current server process
271 %a = the architecture of the remote machine. Only some are recognised,
272 and those may not be 100% reliable. It currently recognises Samba,
273 WfWg, WinNT and Win95. Anything else will be known as "UNKNOWN". If it
274 gets it wrong then sending me a level 3 log should allow me to fix it.
276 %I = The IP address of the client machine
278 %T = the current date and time
280 There are some quite creative things that can be done with these
281 substitutions and other smb.conf options.
283 .SS NAME MANGLING
285 Samba supports "name mangling" so that DOS and Windows clients can use
286 files that don't conform to the 8.3 format. It can also be set to adjust
287 the case of 8.3 format filenames.
289 There are several options that control the way mangling is performed,
290 and they are grouped here rather than listed separately. For the
291 defaults look at the output of the testparm program.
293 All of these options can be set separately for each service (or
294 globally, of course).
296 The options are:
298 "mangle case = yes/no" controls if names that have characters that
299 aren't of the "default" case are mangled. For example, if this is yes
300 then a name like "Mail" would be mangled. Default no.
302 "case sensitive = yes/no" controls whether filenames are case
303 sensitive. If they aren't then Samba must do a filename search and
304 match on passed names. Default no.
306 "default case = upper/lower" controls what the default case is for new
307 filenames. Default lower.
309 "preserve case = yes/no" controls if new files are created with the
310 case that the client passes, or if they are forced to be the "default"
311 case. Default no.
313 "short preserve case = yes/no" controls if new files which conform to 8.3
314 syntax, that is all in upper case and of suitable length, are created
315 upper case, or if they are forced to be the "default" case. This option can
316 be use with "preserve case = yes" to permit long filenames to retain their
317 case, while short names are lowered. Default no.
319 .SS COMPLETE LIST OF GLOBAL PARAMETERS
321 Here is a list of all global parameters. See the section of each
322 parameter for details.  Note that some are synonyms.
324 auto services
326 config file
328 deadtime
330 debuglevel
332 default
334 default service
336 dfree command
338 domain master
340 encrypt passwords
342 getwd cache
344 homedir map
346 hosts equiv
348 include
350 keepalive
352 lock dir
354 load printers
356 lock directory
358 log file
360 log level
362 logon script
364 logon path
366 lpq cache time
368 mangled stack
370 max log size
372 max packet
374 max xmit
376 message command
378 nis homedir
380 null passwords
382 os level
384 packet size
386 passwd chat
388 passwd program
390 password level
392 password server
394 preferred master
396 preload
398 printing
400 printcap name
402 protocol
404 read bmpx
406 read prediction
408 read raw
410 read size
412 remote announce
414 root
416 root dir
418 root directory
420 security
422 server string
424 smbrun
426 socket address
428 socket options
430 status
432 strip dot
434 time offset
436 unix realname
438 username map
440 use rhosts
442 valid chars
444 workgroup
446 write raw
448 .SS COMPLETE LIST OF SERVICE PARAMETERS
450 Here is a list of all service parameters. See the section of each
451 parameter for details. Note that some are synonyms.
453 admin users
455 allow hosts
457 alternate permissions
459 available
461 browseable
463 case sensitive
465 case sig names
467 copy
469 create mask
471 create mode
473 comment
475 default case
477 delete readonly
479 deny hosts
481 directory
483 directory mask
485 directory mode
487 dont descend
489 exec
491 fake oplocks
493 force group
495 force user
497 guest account
499 guest ok
501 guest only
503 hide dot files
505 hosts allow
507 hosts deny
509 invalid users
511 locking
513 lppause command
515 lpq command
517 lpresume command
519 lprm command
521 magic output
523 magic script
525 mangle case
527 mangled names
529 mangling char
531 map archive
533 map hidden
535 map system
537 max connections
539 min print space
541 only guest
543 only user
545 path
547 postexec
549 postscript
551 preserve case
553 print command
555 printer driver
557 print ok
559 printable
561 printer
563 printer name
565 public
567 read only
569 read list
571 revalidate
573 root postexec
575 root preexec
577 set directory
579 share modes
581 short preserve case
583 strict locking
585 sync always
587 user
589 username
591 users
593 valid users
595 volume
597 wide links
599 writable
601 write ok
603 writeable
605 write list
607 .SS EXPLANATION OF EACH PARAMETER
608 .RS 3
610 .SS admin users (G)
612 This is a list of users who will be granted administrative privileges
613 on the share. This means that they will do all file operations as the
614 super-user (root).
616 You should use this option very carefully, as any user in this list
617 will be able to do anything they like on the share, irrespective of
618 file permissions.
620 .B Default:
621         no admin users
623 .B Example:
624         admin users = jason
626 .SS auto services (G)
627 This is a list of services that you want to be automatically added to
628 the browse lists. This is most useful for homes and printers services
629 that would otherwise not be visible.
631 Note that if you just want all printers in your printcap file loaded
632 then the "load printers" option is easier.
634 .B Default:
635         no auto services
637 .B Example:
638         auto services = fred lp colorlp
640 .SS allow hosts (S)
641 A synonym for this parameter is 'hosts allow'.
643 This parameter is a comma delimited set of hosts which are permitted to access
644 a services. If specified in the [global] section, matching hosts will be
645 allowed access to any service that does not specifically exclude them from
646 access. Specific services my have their own list, which override those
647 specified in the [global] section.
649 You can specify the hosts by name or IP number. For example, you could
650 restrict access to only the hosts on a Class C subnet with something like
651 "allow hosts = 150.203.5.". The full syntax of the list is described in
652 the man page
653 .BR hosts_access (5).
655 You can also specify hosts by network/netmask pairs and by netgroup
656 names if your system supports netgroups. The EXCEPT keyword can also
657 be used to limit a wildcard list. The following examples may provide
658 some help:
660 Example 1: allow all IPs in 150.203.*.* except one
662         hosts allow = 150.203. EXCEPT 150.203.6.66
664 Example 2: allow hosts that match the given network/netmask
666         hosts allow = 150.203.15.0/255.255.255.0
668 Example 3: allow a couple of hosts
670         hosts allow = lapland, arvidsjaur
672 Example 4: allow only hosts in netgroup "foonet" or localhost, but 
673 deny access from one particular host
675         hosts allow = @foonet, localhost
676         hosts deny = pirate
678 Note that access still requires suitable user-level passwords.
681 .BR testparm (1)
682 for a way of testing your host access to see if it
683 does what you expect.
685 .B Default:
686         none (i.e., all hosts permitted access)
688 .B Example:
689         allow hosts = 150.203.5. myhost.mynet.edu.au
691 .SS alternate permissions (S)
693 This option affects the way the "read only" DOS attribute is produced
694 for UNIX files. If this is false then the read only bit is set for
695 files on writeable shares which the user cannot write to.
697 If this is true then it is set for files whos user write bit is not set.
699 The latter behaviour is useful for when users copy files from each
700 others directories, and use a file manager that preserves
701 permissions. Without this option they may get annoyed as all copied
702 files will have the "read only" bit set.
704 .B Default:
705         alternate permissions = no
707 .B Example:
708         alternate permissions = yes
710 .SS available (S)
711 This parameter lets you 'turn off' a service. If 'available = no', then
712 ALL attempts to connect to the service will fail. Such failures are logged.
714 .B Default:
715         available = yes
717 .B Example:
718         available = no
719 .SS browseable (S)
720 This controls whether this share is seen in the list of available
721 shares in a net view and in the browse list.
723 .B Default:
724         browseable = Yes
726 .B Example: 
727         browseable = No
728 .SS case sensitive (G)
729 See the discussion on NAME MANGLING.
731 .SS case sig names (G)
732 See "case sensitive"
734 .SS comment (S)
735 This is a text field that is seen when a client does a net view to
736 list what shares are available. It will also be used when browsing is
737 fully supported.
739 .B Default:
740         No comment string
742 .B Example:
743         comment = Fred's Files
745 .SS config file (G)
747 This allows you to override the config file to use, instead of the
748 default (usually smb.conf). There is a chicken and egg problem here as
749 this option is set in the config file! 
751 For this reason, if the name of the config file has changed when the
752 parameters are loaded then it will reload them from the new config
753 file.
755 This option takes the usual substitutions, which can be very useful.
757 If the config file doesn't exist then it won't be loaded (allowing
758 you to special case the config files of just a few clients).
760 .B Example:
761         config file = /usr/local/samba/lib/smb.conf.%m
763 .SS copy (S)
764 This parameter allows you to 'clone' service entries. The specified
765 service is simply duplicated under the current service's name. Any 
766 parameters specified in the current section will override those in the
767 section being copied.
769 This feature lets you set up a 'template' service and create similar 
770 services easily. Note that the service being copied must occur earlier 
771 in the configuration file than the service doing the copying.
773 .B Default:
774         none
776 .B Example:
777         copy = otherservice
778 .SS create mask (S)
779 A synonym for this parameter is 'create mode'.
781 This parameter is the octal modes which are used when converting DOS modes 
782 to UNIX modes.
784 Note that Samba will or this value with 0700 as you must have at least
785 user read, write and execute for Samba to work properly.
787 .B Default:
788         create mask = 0644
790 .B Example:
791         create mask = 0775
792 .SS create mode (S)
794 .B create mask.
795 .SS dead time (G)
796 The value of the parameter (a decimal integer) represents the number of
797 minutes of inactivity before a connection is considered dead, and it
798 is disconnected. The deadtime only takes effect if the number of open files
799 is zero.
801 This is useful to stop a server's resources being exhausted by a large
802 number of inactive connections.
804 Most clients have an auto-reconnect feature when a connection is broken so
805 in most cases this parameter should be transparent to users.
807 Using this parameter with a timeout of a few minutes is recommended
808 for most systems.
810 A deadtime of zero indicates that no auto-disconnection should be performed.
812 .B Default:
813         dead time = 0
815 .B Example:
816         dead time = 15
817 .SS debug level (G)
818 The value of the parameter (an integer) allows the debug level
819 (logging level) to be specified in the
820 .B smb.conf
821 file. This is to give
822 greater flexibility in the configuration of the system.
824 The default will be the debug level specified on the command line.
826 .B Example:
827         debug level = 3
828 .SS default (G)
830 .B default service.
831 .SS default case (S)
833 See the section on "NAME MANGLING" Also note the addition of "short
834 preserve case"
836 .SS default service (G)
837 A synonym for this parameter is 'default'.
839 This parameter specifies the name of a service which will be connected to
840 if the service actually requested cannot be found. Note that the square
841 brackets are NOT given in the parameter value (see example below).
843 There is no default value for this parameter. If this parameter is not given,
844 attempting to connect to a nonexistent service results in an error.
846 Typically the default service would be a public, read-only service.
848 Also note that as of 1.9.14 the apparent service name will be changed to
849 equal that of the requested service, this is very useful as it allows
850 you to use macros like %S to make a wildcard service.
852 Note also that any _ characters in the name of the service used in the
853 default service will get mapped to a /. This allows for interesting
854 things.
857 .B Example:
858         default service = pub
859         
860         [pub]
861              path = /%S
862           
864 .SS delete readonly (S)
865 This parameter allows readonly files to be deleted.  This is not normal DOS
866 semantics, but is allowed by UNIX.
868 This option may be useful for running applications such as rcs, where UNIX
869 file ownership prevents changing file permissions, and DOS semantics prevent
870 deletion of a read only file.
872 .B Default:
873         delete readonly = No
875 .B Example:
876         delete readonly = Yes
877 .SS deny hosts (S)
878 A synonym for this parameter is 'hosts deny'.
880 The opposite of 'allow hosts' - hosts listed here are NOT permitted
881 access to services unless the specific services have their own lists to
882 override this one. Where the lists conflict, the 'allow' list takes precedence.
884 .B Default:
885         none (i.e., no hosts specifically excluded)
887 .B Example:
888         deny hosts = 150.203.4. badhost.mynet.edu.au
889 .SS dfree command (G)
890 The dfree command setting should only be used on systems where a
891 problem occurs with the internal disk space calculations. This has
892 been known to happen with Ultrix, but may occur with other operating
893 systems. The symptom that was seen was an error of "Abort Retry
894 Ignore" at the end of each directory listing.
896 This setting allows the replacement of the internal routines to
897 calculate the total disk space and amount available with an external
898 routine. The example below gives a possible script that might fulfill
899 this function. 
901 The external program will be passed a single parameter indicating a
902 directory in the filesystem being queried. This will typically consist
903 of the string "./". The script should return two integers in ascii. The
904 first should be the total disk space in blocks, and the second should
905 be the number of available blocks. An optional third return value
906 can give the block size in bytes. The default blocksize is 1024 bytes.
908 Note: Your script should NOT be setuid or setgid and should be owned by
909 (and writable only by) root!
911 .B Default:
912         By default internal routines for determining the disk capacity
913 and remaining space will be used.
915 .B Example:
916         dfree command = /usr/local/samba/bin/dfree
918         Where the script dfree (which must be made executable) could be
921         #!/bin/sh
922         df $1 | tail -1 | awk '{print $2" "$4}'
925         or perhaps (on Sys V)
928         #!/bin/sh
929         /usr/bin/df -k $1 | tail -1 | awk '{print $3" "$5}'
932         Note that you may have to replace the command names with full
933 path names on some systems.
934 .SS directory (S)
936 .B path.
938 .SS directory mask (S)
939 A synonym for this parameter is 'directory mode'.
941 This parameter is the octal modes which are used when converting DOS modes 
942 to UNIX modes when creating UNIX directories.
944 Note that Samba will bit-wise 'OR' this value with 0700 as you must have at
945 least user read, write and execute for Samba to work properly.
947 .B Default:
948         directory mask = 0755
950 .B Example:
951         directory mask = 0775
952 .SS directory mode (S)
954 .B directory mask.
955 .SS domain master (G)
957 Enable WAN-wide browse list collation.  Local master browsers on 
958 broadcast-isolated subnets will give samba their local browse lists, and 
959 ask for a complete copy of the browse list for the whole wide area network.
960 Browser clients will then contact their local master browser, and will
961 receive the domain-wide browse list, instead of just the list for their
962 broadcast-isolated subnet.
964 .B Default:
965         domain master = no
967 .SS dont descend (S)
968 There are certain directories on some systems (eg., the /proc tree under
969 Linux) that are either not of interest to clients or are infinitely deep
970 (recursive). This parameter allows you to specify a comma-delimited list
971 of directories that the server should always show as empty.
973 Note that Samba can be very fussy about the exact format of the "dont
974 descend" entries. For example you may need "./proc" instead of just
975 "/proc". Experimentation is the best policy :-)
977 .B Default:
978         none (i.e., all directories are OK to descend)
980 .B Example:
981         dont descend = /proc,/dev
983 .SS encrypt passwords (G)
985 This boolean controls whether encrypted passwords will be negotiated
986 with the client. Note that this option has no effect if you haven't
987 compiled in the necessary des libraries and encryption code. It
988 defaults to no.
990 .SS exec (S)
992 This is an alias for preexec
995 .SS force group (S)
996 This specifies a group name that all connections to this service
997 should be made as. This may be useful for sharing files.
999 .B Default:
1000        no forced group
1002 .B Example:
1003        force group = agroup
1005 .SS force user (S)
1006 This specifies a user name that all connections to this service
1007 should be made as. This may be useful for sharing files. You should
1008 also use it carefully as using it incorrectly can cause security
1009 problems.
1011 This user name only gets used once a connection is established. Thus
1012 clients still need to connect as a valid user and supply a valid
1013 password. Once connected, all file operations will be performed as the
1014 "forced user", not matter what username the client connected as.
1016 .B Default:
1017        no forced user
1019 .B Example:
1020        force user = auser
1022 .SS guest account (S)
1023 This is a username which will be used for access to services which are
1024 specified as 'guest ok' (see below). Whatever privileges this user has
1025 will be available to any client connecting to the guest
1026 service. Typically this user will exist in the password file, but will
1027 not have a valid login. If a username is specified in a given service,
1028 the specified username overrides this one.
1030 One some systems the account "nobody" may not be able to print. Use
1031 another account in this case. You should test this by trying to log in
1032 as your guest user (perhaps by using the "su \-" command) and trying to
1033 print using
1034 .BR lpr .
1036 Note that as of version 1.9 of Samba this option may be set
1037 differently for each service.
1039 .B Default:
1040         specified at compile time
1042 .B Example:
1043         guest account = nobody
1044 .SS getwd cache (G)
1045 This is a tuning option. When this is enabled a cacheing algorithm will
1046 be used to reduce the time taken for getwd() calls. This can have a
1047 significant impact on performance, especially when widelinks is False.
1049 .B Default:
1050         getwd cache = No
1052 .B Example:
1053         getwd cache = Yes
1054 .SS guest ok (S)
1056 .B public.
1057 .SS guest only (S)
1058 If this parameter is 'yes' for a service, then only guest connections to the
1059 service are permitted. This parameter will have no affect if "guest ok" or
1060 "public" is not set for the service.
1062 See the section below on user/password validation for more information about
1063 this option.
1065 .B Default:
1066         guest only = no
1068 .B Example:
1069         guest only = yes
1070 .SS hide dot files (S)
1071 This is a boolean parameter that controls whether files starting with
1072 a dot appear as hidden files.
1074 .B Default:
1075         hide dot files = yes
1077 .B Example:
1078         hide dot files = no
1079 .SS homedir map (G)
1080 If "nis homedir" is true, this parameter specifies the NIS (or YP) map
1081 from which the server for the user's home directory should be extracted.
1082 At present, only the Sun auto.home map format is understood. The form of
1083 the map is:
1085 username        server:/some/file/system
1087 and the program will extract the servername from before the first ':'.
1088 There should probably be a better parsing system that copes with different
1089 map formats and also Amd (another automounter) maps.
1091 NB: The -DNETGROUP option is required in the Makefile for option to work
1092 and on some architectures the line -lrpcsvc needs to be added to the
1093 LIBSM variable. This is required for Solaris 2, FreeBSD and HPUX.
1095 See also "nis homedir"
1097 .B Default:
1098         homedir map = auto.home
1100 .B Example:
1101         homedir map = amd.homedir
1102 .SS hosts allow (S)
1104 .B allow hosts.
1105 .SS hosts deny (S)
1107 .B deny hosts.
1109 .SS group (S)
1110 This is an alias for "force group" and is only kept for compatibility
1111 with old versions of Samba. It may be removed in future versions.
1113 .SS hosts equiv (G)
1114 If this global parameter is a non-null string, it specifies the name of
1115 a file to read for the names of hosts and users who will be allowed access
1116 without specifying a password.
1118 This is not be confused with 
1119 .B allow hosts
1120 which is about hosts access to services and is more useful for guest services.
1121 .B hosts equiv
1122 may be useful for NT clients which will not supply passwords to samba.
1124 NOTE: The use of hosts.equiv can be a major security hole. This is
1125 because you are trusting the PC to supply the correct username. It is
1126 very easy to get a PC to supply a false username. I recommend that the
1127 hosts.equiv option be only used if you really know what you are doing,
1128 or perhaps on a home network where you trust your wife and kids :-)
1130 .B Default
1131         No host equivalences
1133 .B Example
1134         hosts equiv = /etc/hosts.equiv
1136 .SS interfaces (G)
1138 This option allows you to setup multiple network interfaces, so that
1139 Samba can properly handle browsing on all interfaces.
1141 The option takes a list of ip/netmask pairs. The netmask may either be
1142 a bitmask, or a bitlength. 
1144 For example, the following line:
1146 interfaces = 192.168.2.10/24 192.168.3.10/24
1148 would configure two network interfaces with IP addresses 192.168.2.10
1149 and 192.168.3.10. The netmasks of both interfaces would be set to
1150 255.255.255.0. 
1152 You could produce an equivalent result by using:
1154 interfaces = 192.168.2.10/255.255.255.0 192.168.3.10/255.255.255.0
1156 if you prefer that format.
1158 If this option is not set then Samba will attempt to find a primary
1159 interface, but won't attempt to configure more than one interface.
1161 .SS invalid users (S)
1162 This is a list of users that should not be allowed to login to this
1163 service. This is really a "paranoid" check to absolutely ensure an
1164 improper setting does not breach your security.
1166 A name starting with @ is interpreted as a UNIX group.
1168 The current servicename is substituted for %S. This is useful in the
1169 [homes] section.
1171 See also "valid users"
1173 .B Default
1174         No invalid users
1176 .B Example
1177         invalid users = root fred admin @wheel
1179 .SS include (G)
1181 This allows you to include one config file inside another.  The file is
1182 included literally, as though typed in place.
1184 It takes the standard substitutions, except %u, %P and %S
1186 .SS keep alive (G)
1187 The value of the parameter (an integer) represents the number of seconds 
1188 between 'keepalive' packets. If this parameter is zero, no keepalive packets
1189 will be sent. Keepalive packets, if sent, allow the server to tell whether a
1190 client is still present and responding.
1192 Keepalives should, in general, not be needed if the socket being used
1193 has the SO_KEEPALIVE attribute set on it (see "socket
1194 options"). Basically you should only use this option if you strike
1195 difficulties.
1197 .B Default:
1198         keep alive = 0
1200 .B Example:
1201         keep alive = 60
1202 .SS load printers (G)
1203 A boolean variable that controls whether all printers in the printcap
1204 will be loaded for browsing by default. 
1206 .B Default:
1207         load printers = no
1209 .B Example:
1210         load printers = yes
1212 .SS lock directory (G)
1213 This options specifies the directory where lock files will be placed.
1214 The lock files are used to implement the "max connections" option.
1216 .B Default:
1217         lock directory = /tmp/samba
1219 .B Example: 
1220         lock directory = /usr/local/samba/var/locks
1221 .SS locking (S)
1222 This controls whether or not locking will be performed by the server in 
1223 response to lock requests from the client.
1225 If "locking = no", all lock and unlock requests will appear to succeed and 
1226 all lock queries will indicate that the queried lock is clear.
1228 If "locking = yes", real locking will be performed by the server.
1230 This option may be particularly useful for read-only filesystems which
1231 do not need locking (such as cdrom drives).
1233 Be careful about disabling locking either globally or in a specific
1234 service, as lack of locking may result in data corruption.
1236 .B Default:
1237         locking = yes
1239 .B Example:
1240         locking = no
1242 .SS log file (G)
1244 This options allows you to override the name of the Samba log file
1245 (also known as the debug file).
1247 This option takes the standard substitutions, allowing you to have
1248 separate log files for each user or machine.
1250 .B Example:
1251         log file = /usr/local/samba/var/log.%m
1253 .SS log level (G)
1254 see "debug level"
1256 .SS logon script (G)
1258 This parameter specifies the batch file (.bat) or NT command file (.cmd)
1259 to be downloaded and run on a machine when a user successfully logs in.
1260 The file must contain the DOS style cr/lf line endings.  Using a DOS-style
1261 editor to create the file is recommended.
1263 The script must be a relative path to the [netlogon] service.  If the
1264 [netlogon] service specifies a path of /usr/local/samba/netlogon, and
1265 logon script = STARTUP.BAT, then file that will be downloaded is:
1267 .B /usr/local/samba/netlogon/STARTUP.BAT
1269 The contents of the batch file is entirely your choice.  A suggested
1270 command would be to add NET TIME \\\\SERVER /SET /YES, to force every
1271 machine to synchronise clocks with the same time server.  Another use
1272 would be to add NET USE U: \\\\SERVER\\UTILS for commonly used utilities,
1273 or NET USE Q: \\\\SERVER\\ISO9001_QA.
1275 Note that it is particularly important not to allow write access to
1276 the [netlogon] share, or to grant users write permission on the
1277 batch files in a secure environment, as this would allow the batch
1278 files to be arbitrarily modified.
1281 This option takes the standard substitutions, allowing you to have
1282 separate logon scripts for each user or machine.
1284 .B Example:
1285         logon script = scripts/%U.bat
1287 .SS logon path (G)
1289 This parameter specifies the home directory where roaming profiles 
1290 (USER.DAT / USER.MAN files) are stored.
1292 This option takes the standard substitutions, allowing you to have
1293 separate logon scripts for each user or machine.  It also specifies
1294 the directory from which the "desktop", "start menu", "nethood" and
1295 "programs" folders, and their contents, are loaded and displayed
1296 on your Windows 95 client.
1298 The share and the path must be readable by the user for the preferences
1299 and directories to be loaded onto the Windows 95 client.  The share
1300 must be writeable when the logs in for the first time, in order that
1301 the Windows 95 client can create the user.dat and other directories.
1303 Thereafter, the directories and any of contents can, if required,
1304 be made read-only.  It is not adviseable that the USER.DAT file be made
1305 read-only - rename it to USER.MAN to achieve the desired effect
1306 (a MANdatory profile).
1308 .B Default:
1309         logon path = \\\\%L\\%U 
1311 .B Example:
1312         logon path = \\\\PROFILESERVER\\HOME_DIR\\%U
1314 .SS lppause command (S)
1315 This parameter specifies the command to be executed on the server host in
1316 order to stop printing or spooling a specific print job.
1318 This command should be a program or script which takes a printer name and
1319 job number to pause the print job. Currently I don't know of any print
1320 spooler system that can do this with a simple option, except for the PPR
1321 system from Trinity College (ppr\-dist.trincoll.edu/pub/ppr). One way
1322 of implementing this is by using job priorities, where jobs having a too
1323 low priority won't be sent to the printer. See also the
1324 .B lppause
1325 command.
1327 If a %p is given then the printername is put in its place. A %j is
1328 replaced with the job number (an integer).
1329 On HPUX (see printing=hpux), if the -p%p option is added to the lpq
1330 command, the job will show up with the correct status, i.e. if the job
1331 priority is lower than the set fence priority it will have the PAUSED
1332 status, whereas if the priority is equal or higher it will have the
1333 SPOOLED or PRINTING status.
1335 Note that it is good practice to include the absolute path in the lppause
1336 command as the PATH may not be available to the server.
1338 .B Default:
1339         Currently no default value is given to this string
1341 .B Example for HPUX:
1342         lppause command = /usr/bin/lpalt %p-%j -p0
1344 .SS lpq cache time (G)
1346 This controls how long lpq info will be cached for to prevent the lpq
1347 command being called too often. A separate cache is kept for each
1348 variation of the lpq command used by the system, so if you use
1349 different lpq commands for different users then they won't share cache
1350 information.
1352 The cache files are stored in /tmp/lpq.xxxx where xxxx is a hash
1353 of the lpq command in use.
1355 The default is 10 seconds, meaning that the cached results of a
1356 previous identical lpq command will be used if the cached data is less
1357 than 10 seconds old. A large value may be advisable if your lpq
1358 command is very slow.
1360 A value of 0 will disable cacheing completely.
1362 .B Default:
1363         lpq cache time = 10
1365 .B Example:
1366         lpq cache time = 30
1368 .SS lpq command (S)
1369 This parameter specifies the command to be executed on the server host in
1370 order to obtain "lpq"-style printer status information. 
1372 This command should be a program or script which takes a printer name
1373 as its only parameter and outputs printer status information. 
1375 Currently six styles of printer status information are supported; BSD,
1376 SYSV, AIX, HPUX, QNX, LPRNG and PLP. This covers most UNIX systems. You
1377 control which type is expected using the "printing =" option.
1379 Some clients (notably Windows for Workgroups) may not correctly send the
1380 connection number for the printer they are requesting status information
1381 about. To get around this, the server reports on the first printer service
1382 connected to by the client. This only happens if the connection number sent
1383 is invalid.
1385 If a %p is given then the printername is put in its place. Otherwise
1386 it is placed at the end of the command.
1388 Note that it is good practice to include the absolute path in the lpq
1389 command as the PATH may not be available to the server.
1391 .B Default:
1392         depends on the setting of "printing ="
1394 .B Example:
1395         lpq command = /usr/bin/lpq %p
1397 .SS lpresume command (S)
1398 This parameter specifies the command to be executed on the server host in
1399 order to restart or continue printing or spooling a specific print job.
1401 This command should be a program or script which takes a printer name and
1402 job number to resume the print job. See also the lppause command.
1404 If a %p is given then the printername is put in its place. A %j is
1405 replaced with the job number (an integer).
1407 Note that it is good practice to include the absolute path in the lpresume
1408 command as the PATH may not be available to the server.
1410 .B Default:
1411         Currently no default value is given to this string
1413 .B Example for HPUX:
1414         lpresume command = /usr/bin/lpalt %p-%j -p2
1416 .SS lprm command (S)
1417 This parameter specifies the command to be executed on the server host in
1418 order to delete a print job.
1420 This command should be a program or script which takes a printer name
1421 and job number, and deletes the print job.
1423 Currently seven styles of printer control are supported; BSD, SYSV, AIX
1424 HPUX, QNX, LPRNG and PLP. This covers most UNIX systems. You control
1425 which type is expected using the "printing =" option.
1427 If a %p is given then the printername is put in its place. A %j is
1428 replaced with the job number (an integer).
1430 Note that it is good practice to include the absolute path in the lprm
1431 command as the PATH may not be available to the server.
1433 .B Default:
1434         depends on the setting of "printing ="
1436 .B Example 1:
1437         lprm command = /usr/bin/lprm -P%p %j
1439 .B Example 2:
1440         lprm command = /usr/bin/cancel %p-%j
1442 .SS magic output (S)
1443 This parameter specifies the name of a file which will contain output
1444 created by a magic script (see
1445 .I magic script
1446 below).
1448 Warning: If two clients use the same magic script in the same directory the
1449 output file content is undefined.
1450 .B Default:
1451         magic output = <magic script name>.out
1453 .B Example:
1454         magic output = myfile.txt
1455 .SS magic script (S)
1456 This parameter specifies the name of a file which, if opened, will be
1457 executed by the server when the file is closed. This allows a UNIX script
1458 to be sent to the Samba host and executed on behalf of the connected user.
1460 Scripts executed in this way will be deleted upon completion, permissions
1461 permitting.
1463 If the script generates output, output will be sent to the file specified by
1465 .I magic output
1466 parameter (see above).
1468 Note that some shells are unable to interpret scripts containing
1469 carriage-return-linefeed instead of linefeed as the end-of-line
1470 marker. Magic scripts must be executable "as is" on the host, which
1471 for some hosts and some shells will require filtering at the DOS end.
1473 Magic scripts are EXPERIMENTAL and should NOT be relied upon.
1475 .B Default:
1476         None. Magic scripts disabled.
1478 .B Example:
1479         magic script = user.csh
1480 .SS mangled map (S)
1481 This is for those who want to directly map UNIX file names which are
1482 not representable on DOS.  The mangling of names is not always what is
1483 needed.  In particular you may have documents with file extensions
1484 that differ between DOS and UNIX. For example, under UNIX it is common
1485 to use .html for HTML files, whereas under DOS .htm is more commonly
1486 used.
1488 So to map 'html' to 'htm' you put:
1490   mangled map = (*.html *.htm)
1492 One very useful case is to remove the annoying ;1 off the ends of
1493 filenames on some CDROMS (only visible under some UNIXes). To do this
1494 use a map of (*;1 *)
1496 .B default:
1497         no mangled map
1499 .B Example:
1500         mangled map = (*;1 *)
1502 .SS mangle case (S)
1504 See the section on "NAME MANGLING"
1506 .SS mangled names (S)
1507 This controls whether non-DOS names under UNIX should be mapped to
1508 DOS-compatible names ("mangled") and made visible, or whether non-DOS names
1509 should simply be ignored.
1511 See the section on "NAME MANGLING" for details on how to control the
1512 mangling process.
1514 If mangling is used then the mangling algorithm is as follows:
1516 - the first (up to) five alphanumeric characters before the rightmost dot of
1517 the filename are preserved, forced to upper case, and appear as the first (up
1518 to) five characters of the mangled name.
1520 - a tilde ("~") is appended to the first part of the mangled name, followed
1521 by a two-character unique sequence, based on the original root name 
1522 (i.e., the original filename minus its final extension). The final
1523 extension is included in the hash calculation only if it contains any upper
1524 case characters or is longer than three characters.
1526 Note that the character to use may be specified using the "mangling
1527 char" option, if you don't like ~.
1529 - the first three alphanumeric characters of the final extension are preserved,
1530 forced to upper case and appear as the extension of the mangled name. The 
1531 final extension is defined as that part of the original filename after the
1532 rightmost dot. If there are no dots in the filename, the mangled name will
1533 have no extension (except in the case of hidden files - see below).
1535 - files whose UNIX name begins with a dot will be presented as DOS hidden
1536 files. The mangled name will be created as for other filenames, but with the
1537 leading dot removed and "___" as its extension regardless of actual original
1538 extension (that's three underscores).
1541 The two-digit hash value consists of upper case alphanumeric characters.
1543 This algorithm can cause name collisions only if files in a directory share
1544 the same first five alphanumeric characters. The probability of such a clash 
1545 is 1/1300.
1547 The name mangling (if enabled) allows a file to be copied between UNIX
1548 directories from DOS while retaining the long UNIX filename. UNIX files can
1549 be renamed to a new extension from DOS and will retain the same basename. 
1550 Mangled names do not change between sessions.
1552 .B Default:
1553         mangled names = yes
1555 .B Example:
1556         mangled names = no
1557 .SS mangling char (S)
1558 This controls what character is used as the "magic" character in name
1559 mangling. The default is a ~ but this may interfere with some
1560 software. Use this option to set it to whatever you prefer.
1562 .B Default:
1563         mangling char = ~
1565 .B Example:
1566         mangling char = ^
1568 .SS max disk size (G)
1569 This option allows you to put an upper limit on the apparent size of
1570 disks. If you set this option to 100 then all shares will appear to be
1571 not larger than 100 MB in size.
1573 Note that this option does not limit the amount of data you can put on
1574 the disk. In the above case you could still store much more than 100
1575 MB on the disk, but if a client ever asks for the amount of free disk
1576 space or the total disk size then the result will be bounded by the
1577 amount specified in "max disk size".
1579 This option is primarily useful to work around bugs in some pieces of
1580 software that can't handle very large disks, particularly disks over
1581 1GB in size.
1583 A "max disk size" of 0 means no limit.
1585 .B Default:
1586         max disk size = 0
1588 .B Example:
1589         max disk size = 1000
1590 .SS max log size (G)
1592 This option (an integer in kilobytes) specifies the max size the log
1593 file should grow to. Samba periodically checks the size and if it is
1594 exceeded it will rename the file, adding a .old extension.
1596 A size of 0 means no limit.
1598 .B Default:
1599         max log size = 5000
1601 .B Example:
1602         max log size = 1000
1604 .SS max xmit (G)
1606 This option controls the maximum packet size that will be negotiated
1607 by Samba. The default is 65535, which is the maximum. In some cases
1608 you may find you get better performance with a smaller value. A value
1609 below 2048 is likely to cause problems.
1611 .B Default:
1612         max xmit = 65535
1614 .B Example:
1615         max xmit = 8192
1617 .SS mangled stack (G)
1618 This parameter controls the number of mangled names that should be cached in
1619 the Samba server.
1621 This stack is a list of recently mangled base names (extensions are only
1622 maintained if they are longer than 3 characters or contains upper case
1623 characters).
1625 The larger this value, the more likely it is that mangled names can be
1626 successfully converted to correct long UNIX names. However, large stack
1627 sizes will slow most directory access. Smaller stacks save memory in the
1628 server (each stack element costs 256 bytes).
1630 It is not possible to absolutely guarantee correct long file names, so
1631 be prepared for some surprises!
1633 .B Default:
1634         mangled stack = 50
1636 .B Example:
1637         mangled stack = 100
1639 .SS map archive (S)
1640 This controls whether the DOS archive attribute should be mapped to UNIX
1641 execute bits.  The DOS archive bit is set when a file has been modified
1642 since its last backup.  One motivation for this option it to keep Samba/your
1643 PC from making any file it touches from becoming executable under UNIX.
1644 This can be quite annoying for shared source code, documents,  etc...
1646 .B Default:
1647       map archive = yes
1649 .B Example:
1650       map archive = no
1652 .SS map hidden (S)
1653 This controls whether DOS style hidden files should be mapped to UNIX
1654 execute bits.
1656 .B Default:
1657         map hidden = no
1659 .B Example:
1660         map hidden = yes
1661 .SS map system (S)
1662 This controls whether DOS style system files should be mapped to UNIX
1663 execute bits.
1665 .B Default:
1666         map system = no
1668 .B Example:
1669         map system = yes
1670 .SS max connections (S)
1671 This option allows the number of simultaneous connections to a
1672 service to be limited. If "max connections" is greater than 0 then
1673 connections will be refused if this number of connections to the
1674 service are already open. A value of zero mean an unlimited number of
1675 connections may be made.
1677 Record lock files are used to implement this feature. The lock files
1678 will be stored in the directory specified by the "lock directory" option.
1680 .B Default:
1681         max connections = 0
1683 .B Example:
1684         max connections = 10
1685 .SS only user (S)
1686 This is a boolean option that controls whether connections with
1687 usernames not in the user= list will be allowed. By default this
1688 option is disabled so a client can supply a username to be used by
1689 the server.
1691 Note that this also means Samba won't try to deduce usernames from the
1692 service name. This can be annoying for the [homes] section. To get
1693 around this you could use "user = %S" which means your "user" list
1694 will be just the service name, which for home directories is the name
1695 of the user.
1697 .B Default: 
1698         only user = False
1700 .B Example: 
1701         only user = True
1703 .SS fake oplocks (S)
1705 Oplocks are the way that SMB clients get permission from a server to
1706 locally cache file operations. If a server grants an oplock
1707 (opportunistic lock) then the client is free to assume that it is the
1708 only one accessing the file and it will aggressively cache file
1709 data. With some oplock types the client may even cache file open/close
1710 operations. This can give enormous performance benefits.
1712 Samba does not support opportunistic locks because they are very
1713 difficult to do under Unix. Samba can fake them, however, by granting
1714 a oplock whenever a client asks for one. This is controlled using the
1715 smb.conf option "fake oplocks". If you set "fake oplocks = yes" then
1716 you are telling the client that it may aggressively cache the file
1717 data.
1719 By enabling this option on all read-only shares or shares that you know
1720 will only be accessed from one client at a time you will see a big
1721 performance improvement on many operations. If you enable this option
1722 on shares where multiple clients may be accessing the files read-write
1723 at the same time you can get data corruption. Use this option
1724 carefully! 
1726 This option is disabled by default.
1728 .SS message command (G)
1730 This specifies what command to run when the server receives a WinPopup
1731 style message.
1733 This would normally be a command that would deliver the message
1734 somehow. How this is to be done is up to your imagination.
1736 What I use is:
1738    message command = csh -c 'xedit %s;rm %s' &
1740 This delivers the message using xedit, then removes it
1741 afterwards. NOTE THAT IT IS VERY IMPORTANT THAT THIS COMMAND RETURN
1742 IMMEDIATELY. That's why I have the & on the end. If it doesn't return
1743 immediately then your PCs may freeze when sending messages (they
1744 should recover after 30secs, hopefully).
1746 All messages are delivered as the global guest user. The command takes
1747 the standard substitutions, although %u won't work (%U may be better
1748 in this case).
1750 Apart from the standard substitutions, some additional ones apply. In
1751 particular:
1753 %s = the filename containing the message
1755 %t = the destination that the message was sent to (probably the server
1756 name)
1758 %f = who the message is from
1760 You could make this command send mail, or whatever else takes your
1761 fancy. Please let me know of any really interesting ideas you have.
1763 Here's a way of sending the messages as mail to root:
1765 message command = /bin/mail -s 'message from %f on %m' root < %s; rm %s
1767 If you don't have a message command then the message won't be
1768 delivered and Samba will tell the sender there was an
1769 error. Unfortunately WfWg totally ignores the error code and carries
1770 on regardless, saying that the message was delivered.
1772 If you want to silently delete it then try "message command = rm %s".
1774 For the really adventurous, try something like this:
1776 message command = csh -c 'csh < %s |& /usr/local/samba/bin/smbclient \e
1777                   -M %m; rm %s' &
1779 this would execute the command as a script on the server, then give
1780 them the result in a WinPopup message. Note that this could cause a
1781 loop if you send a message from the server using smbclient! You better
1782 wrap the above in a script that checks for this :-)
1784 .B Default:
1785         no message command
1787 .B Example:
1788         message command = csh -c 'xedit %s;rm %s' &
1790 .SS min print space (S)
1792 This sets the minimum amount of free disk space that must be available
1793 before a user will be able to spool a print job. It is specified in
1794 kilobytes. The default is 0, which means no limit.
1796 .B Default:
1797         min print space = 0
1799 .B Example:
1800         min print space = 2000
1802 .SS nis homedir (G)
1803 Get the home share server from a NIS (or YP) map. For unix systems that
1804 use an automounter, the user's home directory will often be mounted on
1805 a workstation on demand from a remote server. When the Samba logon server
1806 is not the actual home directory server, two network hops are required
1807 to access the home directory and this can be very slow especially with 
1808 writing via Samba to an NFS mounted directory. This option allows samba
1809 to return the home share as being on a different server to the logon
1810 server and as long as a samba daemon is running on the home directory 
1811 server, it will be mounted on the Samba client directly from the directory
1812 server. When Samba is returning the home share to the client, it will
1813 consult the NIS (or YP) map specified in "homedir map" and return the
1814 server listed there.
1816 .B Default:
1817         nis homedir = false
1819 .B Example:
1820         nis homedir = true
1822 .SS null passwords (G)
1823 Allow or disallow access to accounts that have null passwords. 
1825 .B Default:
1826         null passwords = no
1828 .B Example:
1829         null passwords = yes
1831 .SS os level (G)
1832 This integer value controls what level Samba advertises itself as for
1833 browse elections. See BROWSING.txt for details.
1835 .SS packet size (G)
1836 The maximum transmit packet size during a raw read. This option is no
1837 longer implemented as of version 1.7.00, and is kept only so old
1838 configuration files do not become invalid.
1840 .SS passwd chat (G)
1841 This string controls the "chat" conversation that takes places
1842 between smbd and the local password changing program to change the
1843 users password. The string describes a sequence of response-receive
1844 pairs that smbd uses to determine what to send to the passwd program
1845 and what to expect back. If the expected output is not received then
1846 the password is not changed.
1848 This chat sequence is often quite site specific, depending on what
1849 local methods are used for password control (such as NIS+ etc).
1851 The string can contain the macros %o and %n which are substituted for
1852 the old and new passwords respectively. It can also contain the
1853 standard macros \en \er \et and \es to give line-feed, carriage-return,
1854 tab and space.
1856 The string can also contain a * which matches any sequence of
1857 characters.
1859 Double quotes can be used to collect strings with spaces in them into
1860 a single string.
1862 If the send string in any part of the chat sequence is a fullstop "."
1863 then no string is sent. Similarly, is the expect string is a fullstop
1864 then no string is expected.
1866 .B Example:
1867         passwd chat = "*Enter OLD password*" %o\en "*Enter NEW password*" %n\en \e
1868                        "*Reenter NEW password*" %n\en "*Password changed*"
1871 .B Default:
1872        passwd chat = *old*password* %o\en *new*password* %n\en *new*password* %n\en *changed*
1874 .SS passwd program (G)
1875 The name of a program that can be used to set user passwords.
1877 This is only necessary if you have enabled remote password changing at
1878 compile time. Any occurrences of %u will be replaced with the user
1879 name.
1881 Also note that many passwd programs insist in "reasonable" passwords,
1882 such as a minimum length, or the inclusion of mixed case chars and
1883 digits. This can pose a problem as some clients (such as Windows for
1884 Workgroups) uppercase the password before sending it. 
1886 .B Default:
1887         passwd program = /bin/passwd
1889 .B Example:
1890         passwd program = /sbin/passwd %u
1892 .SS password level (G)
1893 Some client/server combinations have difficulty with mixed-case passwords.
1894 One offending client is Windows for Workgroups, which for some reason forces
1895 passwords to upper case when using the LANMAN1 protocol, but leaves them alone
1896 when using COREPLUS!
1898 This parameter defines the maximum number of characters that may be upper case
1899 in passwords.
1901 For example, say the password given was "FRED". If
1902 .B password level
1903 is set to 1 (one), the following combinations would be tried if "FRED" failed:
1904 "Fred", "fred", "fRed", "frEd", "freD". If
1905 .B password level was set to 2 (two), the following combinations would also be
1906 tried: "FRed", "FrEd", "FreD", "fREd", "fReD", "frED". And so on.
1908 The higher value this parameter is set to the more likely it is that a mixed
1909 case password will be matched against a single case password. However, you
1910 should be aware that use of this parameter reduces security and increases the
1911 time taken to process a new connection.
1913 A value of zero will cause only two attempts to be made - the password as is
1914 and the password in all-lower case.
1916 If you find the connections are taking too long with this option then
1917 you probably have a slow crypt() routine. Samba now comes with a fast
1918 "ufc crypt" that you can select in the Makefile. You should also make
1919 sure the PASSWORD_LENGTH option is correct for your system in local.h
1920 and includes.h. On most systems only the first 8 chars of a password
1921 are significant so PASSWORD_LENGTH should be 8, but on some longer
1922 passwords are significant. The includes.h file tries to select the
1923 right length for your system.
1925 .B Default:
1926         password level = 0
1928 .B Example:
1929         password level = 4
1931 .SS password server (G)
1933 By specifying the name of another SMB server (such as a WinNT box)
1934 with this option, and using "security = server" you can get Samba to
1935 do all its username/password validation via a remote server.
1937 This options sets the name of the password server to use. It must be a
1938 netbios name, so if the machine's netbios name is different from its
1939 internet name then you may have to add its netbios name to
1940 /etc/hosts.
1942 The password server much be a machine capable of using the "LM1.2X002"
1943 or the "LM NT 0.12" protocol, and it must be in user level security
1944 mode. 
1946 NOTE: Using a password server means your UNIX box (running Samba) is
1947 only as secure as your password server. DO NOT CHOOSE A PASSWORD
1948 SERVER THAT YOU DON'T COMPLETELY TRUST.
1950 Never point a Samba server at itself for password serving. This will
1951 cause a loop and could lock up your Samba server!
1953 The name of the password server takes the standard substitutions, but
1954 probably the only useful one is %m, which means the Samba server will
1955 use the incoming client as the password server. If you use this then
1956 you better trust your clients, and you better restrict them with hosts
1957 allow!
1959 If you list several hosts in the "password server" option then smbd
1960 will try each in turn till it finds one that responds. This is useful
1961 in case your primary server goes down.
1963 .SS path (S)
1964 A synonym for this parameter is 'directory'.
1966 This parameter specifies a directory to which the user of the service is to
1967 be given access. In the case of printable services, this is where print data 
1968 will spool prior to being submitted to the host for printing.
1970 For a printable service offering guest access, the service should be readonly
1971 and the path should be world-writable and have the sticky bit set. This is not
1972 mandatory of course, but you probably won't get the results you expect if you
1973 do otherwise.
1975 Any occurrences of %u in the path will be replaced with the username
1976 that the client is connecting as. Any occurrences of %m will be
1977 replaced by the name of the machine they are connecting from. These
1978 replacements are very useful for setting up pseudo home directories
1979 for users.
1981 Note that this path will be based on 'root dir' if one was specified.
1982 .B Default:
1983         none
1985 .B Example:
1986         path = /home/fred+ 
1988 .SS postexec (S)
1990 This option specifies a command to be run whenever the service is
1991 disconnected. It takes the usual substitutions. The command may be run
1992 as the root on some systems.
1994 An interesting example may be do unmount server resources:
1996 postexec = /etc/umount /cdrom
1998 See also preexec
2000 .B Default:
2001       none (no command executed)
2003 .B Example:
2004       postexec = echo \e"%u disconnected from %S from %m (%I)\e" >> /tmp/log
2006 .SS postscript (S)
2007 This parameter forces a printer to interpret the print files as
2008 postscript. This is done by adding a %! to the start of print output. 
2010 This is most useful when you have lots of PCs that persist in putting
2011 a control-D at the start of print jobs, which then confuses your
2012 printer.
2014 .B Default: 
2015         postscript = False
2017 .B Example: 
2018         postscript = True
2020 .SS preexec (S)
2022 This option specifies a command to be run whenever the service is
2023 connected to. It takes the usual substitutions.
2025 An interesting example is to send the users a welcome message every
2026 time they log in. Maybe a message of the day? Here is an example:
2028 preexec = csh -c 'echo \e"Welcome to %S!\e" | \e
2029        /usr/local/samba/bin/smbclient -M %m -I %I' &
2031 Of course, this could get annoying after a while :-)
2033 See also postexec
2035 .B Default:
2036         none (no command executed)
2038 .B Example:
2039         preexec = echo \e"%u connected to %S from %m (%I)\e" >> /tmp/log
2041 .SS preferred master (G)
2042 This boolean parameter controls if Samba is a preferred master browser
2043 for its workgroup.
2044 On startup, samba will force an election, and it will have a slight
2045 advantage in winning the election.  It is recommended that this 
2046 parameter is used in conjunction with domain master = yes, so that samba 
2047 can guarantee becoming a domain master.  
2049 Use this option with caution, because if there are several hosts
2050 (whether samba servers, Windows 95 or NT) that are preferred master
2051 browsers on the same subnet, they will each periodically and continuously
2052 attempt to become the local master browser.  This will result in
2053 unnecessary broadcast traffic and reduced browsing capabilities.
2056 .B os level = nn
2058 .B Default:
2059         preferred master = yes
2061 .SS preload
2062 This is an alias for "auto services"
2064 .SS preserve case (S)
2066 This controls if new filenames are created with the case that the
2067 client passes, or if they are forced to be the "default" case.
2069 .B Default:
2070        preserve case = no
2072 See the section on "NAME MANGLING" for a fuller discussion.
2074 .SS print command (S)
2075 After a print job has finished spooling to a service, this command will be
2076 used via a system() call to process the spool file. Typically the command 
2077 specified will submit the spool file to the host's printing subsystem, but
2078 there is no requirement that this be the case. The server will not remove the
2079 spool file, so whatever command you specify should remove the spool file when
2080 it has been processed, otherwise you will need to manually remove old spool
2081 files.
2083 The print command is simply a text string. It will be used verbatim,
2084 with two exceptions: All occurrences of "%s" will be replaced by the
2085 appropriate spool file name, and all occurrences of "%p" will be
2086 replaced by the appropriate printer name. The spool file name is
2087 generated automatically by the server, the printer name is discussed
2088 below.
2090 The full path name will be used for the filename if %s is not preceded
2091 by a /. If you don't like this (it can stuff up some lpq output) then
2092 use %f instead. Any occurrences of %f get replaced by the spool
2093 filename without the full path at the front.
2095 The print command MUST contain at least one occurrence of "%s" or %f -
2096 the "%p" is optional. At the time a job is submitted, if no printer
2097 name is supplied the "%p" will be silently removed from the printer
2098 command.
2100 If specified in the [global] section, the print command given will be used
2101 for any printable service that does not have its own print command specified.
2103 If there is neither a specified print command for a printable service nor a 
2104 global print command, spool files will be created but not processed and (most
2105 importantly) not removed.
2107 Note that printing may fail on some UNIXes from the "nobody"
2108 account. If this happens then create an alternative guest account that
2109 can print and set the "guest account" in the [global] section.
2111 You can form quite complex print commands by realising that they are
2112 just passed to a shell. For example the following will log a print
2113 job, print the file, then remove it. Note that ; is the usual
2114 separator for command in shell scripts.
2116 print command = echo Printing %s >> /tmp/print.log; lpr -P %p %s; rm %s
2118 You may have to vary this command considerably depending on how you
2119 normally print files on your system.
2121 .B Default:
2122         print command = lpr -r -P %p %s
2124 .B Example:
2125         print command = /usr/local/samba/bin/myprintscript %p %s
2126 .SS print ok (S)
2128 .B printable.
2129 .SS printable (S)
2130 A synonym for this parameter is 'print ok'.
2132 If this parameter is 'yes', then clients may open, write to and submit spool 
2133 files on the directory specified for the service.
2135 Note that a printable service will ALWAYS allow writing to the service path
2136 (user privileges permitting) via the spooling of print data. The 'read only'
2137 parameter controls only non-printing access to the resource.
2139 .B Default:
2140         printable = no
2142 .B Example:
2143         printable = yes
2145 .SS printing (G)
2146 This parameters controls how printer status information is interpreted
2147 on your system, and also affects the default values for the "print
2148 command", "lpq command" and "lprm command".
2150 Currently six printing styles are supported. They are "printing =
2151 bsd", "printing = sysv", "printing = hpux", "printing = aix",
2152 "printing = qnx" and "printing = plp".
2154 To see what the defaults are for the other print commands when using
2155 these three options use the "testparm" program.
2158 .SS printcap name (G)
2159 This parameter may be used to override the compiled-in default printcap
2160 name used by the server (usually /etc/printcap). See the discussion of the
2161 [printers] section above for reasons why you might want to do this.
2163 For those of you without a printcap (say on SysV) you can just create a
2164 minimal file that looks like a printcap and set "printcap name =" in
2165 [global] to point at it.
2167 A minimal printcap file would look something like this:
2169 print1|My Printer 1
2171 print2|My Printer 2
2173 print3|My Printer 3
2175 print4|My Printer 4
2177 print5|My Printer 5
2179 where the | separates aliases of a printer. The fact that the second
2180 alias has a space in it gives a hint to Samba that it's a comment.
2182 NOTE: Under AIX the default printcap name is "/etc/qconfig". Samba
2183 will assume the file is in AIX "qconfig" format if the string
2184 "/qconfig" appears in the printcap filename.
2186 .B Default:
2187         printcap name = /etc/printcap
2189 .B Example:
2190         printcap name = /etc/myprintcap
2191 .SS printer (S)
2192 A synonym for this parameter is 'printer name'.
2194 This parameter specifies the name of the printer to which print jobs spooled
2195 through a printable service will be sent.
2197 If specified in the [global] section, the printer name given will be used
2198 for any printable service that does not have its own printer name specified.
2200 .B Default:
2201         none (but may be 'lp' on many systems)
2203 .B Example:
2204         printer name = laserwriter
2206 .SS printer driver (S)
2207 This option allows you to control the string that clients receive when
2208 they ask the server for the printer driver associated with a
2209 printer. If you are using Windows95 or WindowsNT then you can use this
2210 to automate the setup of printers on your system.
2212 You need to set this parameter to the exact string (case sensitive)
2213 that describes the appropriate printer driver for your system. 
2214 If you don't know the exact string to use then you should first try
2215 with no "printer driver" option set and the client will give you a
2216 list of printer drivers. The appropriate strings are shown in a
2217 scrollbox after you have chosen the printer manufacturer.
2219 .B Example:
2220         printer driver = HP LaserJet 4L
2222 .SS printer name (S)
2224 .B printer.
2226 .SS protocol (G)
2227 The value of the parameter (a string) is the highest protocol level that will
2228 be supported by the server. 
2230 Possible values are CORE, COREPLUS, LANMAN1, LANMAN2 and NT1. The relative
2231 merits of each are discussed in the README file.
2233 Normally this option should not be set as the automatic negotiation
2234 phase in the SMB protocol takes care of choosing the appropriate protocol.
2236 .B Default:
2237         protocol = NT1
2239 .B Example:
2240         protocol = LANMAN1
2241 .SS public (S)
2242 A synonym for this parameter is 'guest ok'.
2244 If this parameter is 'yes' for a service, then no password is required
2245 to connect to the service. Privileges will be those of the guest
2246 account.
2248 See the section below on user/password validation for more information about
2249 this option.
2251 .B Default:
2252         public = no
2254 .B Example:
2255         public = yes
2256 .SS read list (S)
2257 This is a list of users that are given read-only access to a
2258 service. If the connecting user is in this list then they will
2259 not be given write access, no matter what the "read only" option
2260 is set to. The list can include group names using the @group syntax.
2262 See also the "write list" option
2264 .B Default:
2265      read list =
2267 .B Example:
2268      read list = mary, @students
2270 .SS read only (S)
2272 .B writable
2274 .B write ok.
2275 Note that this is an inverted synonym for writable and write ok.
2276 .SS read prediction (G)
2277 This options enables or disables the read prediction code used to
2278 speed up reads from the server. When enabled the server will try to
2279 pre-read data from the last accessed file that was opened read-only
2280 while waiting for packets.
2282 .SS Default:
2283         read prediction = False
2285 .SS Example:
2286         read prediction = True
2287 .SS read raw (G)
2288 This parameter controls whether or not the server will support raw reads when
2289 transferring data to clients.
2291 If enabled, raw reads allow reads of 65535 bytes in one packet. This
2292 typically provides a major performance benefit.
2294 However, some clients either negotiate the allowable block size incorrectly
2295 or are incapable of supporting larger block sizes, and for these clients you
2296 may need to disable raw reads.
2298 In general this parameter should be viewed as a system tuning tool and left
2299 severely alone. See also
2300 .B write raw.
2302 .B Default:
2303         read raw = yes
2305 .B Example:
2306         read raw = no
2307 .SS read size (G)
2309 The option "read size" affects the overlap of disk reads/writes with
2310 network reads/writes. If the amount of data being transferred in
2311 several of the SMB commands (currently SMBwrite, SMBwriteX and
2312 SMBreadbraw) is larger than this value then the server begins writing
2313 the data before it has received the whole packet from the network, or
2314 in the case of SMBreadbraw, it begins writing to the network before
2315 all the data has been read from disk.
2317 This overlapping works best when the speeds of disk and network access
2318 are similar, having very little effect when the speed of one is much
2319 greater than the other.
2321 The default value is 2048, but very little experimentation has been
2322 done yet to determine the optimal value, and it is likely that the best
2323 value will vary greatly between systems anyway. A value over 65536 is
2324 pointless and will cause you to allocate memory unnecessarily.
2326 .B Default:
2327         read size = 2048
2329 .B Example:
2330         read size = 8192
2332 .SS remote announce (G)
2334 This option allows you to setup nmbd to periodically announce itself
2335 to arbitrary IP addresses with an arbitrary workgroup name. 
2337 This is useful if you want your Samba server to appear in a remote
2338 workgroup for which the normal browse propagation rules don't
2339 work. The remote workgroup can be anywhere that you can send IP
2340 packets to.
2342 For example:
2344        remote announce = 192.168.2.255/SERVERS 192.168.4.255/STAFF
2346 the above line would cause nmbd to announce itself to the two given IP
2347 addresses using the given workgroup names. If you leave out the
2348 workgroup name then the one given in the "workgroup" option is used
2349 instead. 
2351 The IP addresses you choose would normally be the broadcast addresses
2352 of the remote networks, but can also be the IP addresses of known
2353 browse masters if your network config is that stable.
2355 This option replaces similar functionality from the nmbd lmhosts file.
2357 .SS revalidate (S)
2359 This options controls whether Samba will allow a previously validated
2360 username/password pair to be used to attach to a share. Thus if you
2361 connect to \e\eserver\eshare1 then to \e\eserver\eshare2 it won't
2362 automatically allow the client to request connection to the second
2363 share as the same username as the first without a password.
2365 If "revalidate" is True then the client will be denied automatic
2366 access as the same username.
2368 .B Default:
2369         revalidate = False
2371 .B Example:
2372         revalidate = True
2374 .SS root (G)
2376 .B root directory.
2377 .SS root dir (G)
2379 .B root directory.
2380 .SS root directory (G)
2381 Synonyms for this parameter are 'root dir' and 'root'.
2383 The server will chroot() to this directory on startup. This is not 
2384 strictly necessary for secure operation. Even without it the server
2385 will deny access to files not in one of the service entries. It may 
2386 also check for, and deny access to, soft links to other parts of the 
2387 filesystem, or attempts to use .. in file names to access other 
2388 directories (depending on the setting of the "wide links" parameter).
2390 Adding a "root dir" entry other than "/" adds an extra level of security, 
2391 but at a price. It absolutely ensures that no access is given to files not
2392 in the sub-tree specified in the "root dir" option, *including* some files 
2393 needed for complete operation of the server. To maintain full operability
2394 of the server you will need to mirror some system files into the "root dir"
2395 tree. In particular you will need to mirror /etc/passwd (or a subset of it),
2396 and any binaries or configuration files needed for printing (if required). 
2397 The set of files that must be mirrored is operating system dependent.
2399 .B Default:
2400         root directory = /
2402 .B Example:
2403         root directory = /homes/smb
2404 .SS security (G)
2405 This option affects how clients respond to Samba.
2407 The option sets the "security mode bit" in replies to protocol negotiations
2408 to turn share level security on or off. Clients decide based on this bit 
2409 whether (and how) to transfer user and password information to the server.
2411 The default is "security=SHARE", mainly because that was the only
2412 option at one stage.
2414 The alternatives are "security = user" or "security = server". 
2416 If your PCs use usernames that are the same as their usernames on the
2417 UNIX machine then you will want to use "security = user". If you
2418 mostly use usernames that don't exist on the UNIX box then use
2419 "security = share".
2421 There is a bug in WfWg that may affect your decision. When in user
2422 level security a WfWg client will totally ignore the password you type
2423 in the "connect drive" dialog box. This makes it very difficult (if
2424 not impossible) to connect to a Samba service as anyone except the
2425 user that you are logged into WfWg as.
2427 If you use "security = server" then Samba will try to validate the
2428 username/password by passing it to another SMB server, such as an NT
2429 box. If this fails it will revert to "security = USER".
2431 See the "password server" option for more details.
2433 .B Default:
2434         security = SHARE
2436 .B Example:
2437         security = USER
2438 .SS server string (G)
2439 This controls what string will show up in the printer comment box in
2440 print manager and next to the IPC connection in "net view". It can be
2441 any string that you wish to show to your users.
2443 It also sets what will appear in browse lists next to the machine name.
2445 A %v will be replaced with the Samba version number.
2447 A %h will be replaced with the hostname.
2449 .B Default:
2450         server string = Samba %v
2452 .B Example:
2453         server string = University of GNUs Samba Server
2455 .SS smbrun (G)
2456 This sets the full path to the smbrun binary. This defaults to the
2457 value in the Makefile.
2459 You must get this path right for many services to work correctly.
2461 .B Default:
2462 taken from Makefile
2464 .B Example:
2465         smbrun = /usr/local/samba/bin/smbrun
2467 .SS short preserve case (S)
2469 This controls if new short filenames are created with the case that
2470 the client passes, or if they are forced to be the "default" case.
2472 .B Default:
2473        short preserve case = no
2475 See the section on "NAME MANGLING" for a fuller discussion.
2477 .SS root preexec (S)
2479 This is the same as preexec except that the command is run as
2480 root. This is useful for mounting filesystems (such as cdroms) before
2481 a connection is finalised.
2483 .SS root postexec (S)
2485 This is the same as postexec except that the command is run as
2486 root. This is useful for unmounting filesystems (such as cdroms) after
2487 a connection is closed.
2489 .SS set directory (S)
2490 If 'set directory = no', then users of the service may not use the setdir
2491 command to change directory.
2493 The setdir command is only implemented in the Digital Pathworks client. See the
2494 Pathworks documentation for details.
2496 .B Default:
2497         set directory = no
2499 .B Example:
2500         set directory = yes
2502 .SS share modes (S)
2504 This enables or disables the honouring of the "share modes" during a
2505 file open. These modes are used by clients to gain exclusive read or
2506 write access to a file. 
2508 These open modes are not directly supported by UNIX, so they are
2509 simulated using lock files in the "lock directory". The "lock
2510 directory" specified in smb.conf must be readable by all users.
2512 The share modes that are enabled by this option are DENY_DOS,
2513 DENY_ALL, DENY_READ, DENY_WRITE, DENY_NONE and DENY_FCB.
2515 Enabling this option gives full share compatibility but may cost a bit
2516 of processing time on the UNIX server. They are enabled by default.
2518 .B Default:
2519         share modes = yes
2521 .B Example:
2522         share modes = no
2524 .SS socket address (G)
2526 This option allows you to control what address Samba will listen for
2527 connections on. This is used to support multiple virtual interfaces on
2528 the one server, each with a different configuration.
2530 By default samba will accept connections on any address.
2532 .B Example:
2533         socket address = 192.168.2.20
2535 .SS socket options (G)
2536 This option (which can also be invoked with the -O command line
2537 option) allows you to set socket options to be used when talking with
2538 the client.
2540 Socket options are controls on the networking layer of the operating
2541 systems which allow the connection to be tuned.
2543 This option will typically be used to tune your Samba server for
2544 optimal performance for your local network. There is no way that Samba
2545 can know what the optimal parameters are for your net, so you must
2546 experiment and choose them yourself. I strongly suggest you read the
2547 appropriate documentation for your operating system first (perhaps
2548 "man setsockopt" will help).
2550 You may find that on some systems Samba will say "Unknown socket
2551 option" when you supply an option. This means you either mis-typed it
2552 or you need to add an include file to includes.h for your OS. If the
2553 latter is the case please send the patch to me
2554 (samba-bugs@samba.anu.edu.au).
2556 Any of the supported socket options may be combined in any way you
2557 like, as long as your OS allows it.
2559 This is the list of socket options currently settable using this
2560 option:
2562   SO_KEEPALIVE
2564   SO_REUSEADDR
2566   SO_BROADCAST
2568   TCP_NODELAY
2570   IPTOS_LOWDELAY
2572   IPTOS_THROUGHPUT
2574   SO_SNDBUF *
2576   SO_RCVBUF *
2578   SO_SNDLOWAT *
2580   SO_RCVLOWAT *
2582 Those marked with a * take an integer argument. The others can
2583 optionally take a 1 or 0 argument to enable or disable the option, by
2584 default they will be enabled if you don't specify 1 or 0.
2586 To specify an argument use the syntax SOME_OPTION=VALUE for example
2587 SO_SNDBUF=8192. Note that you must not have any spaces before or after
2588 the = sign.
2590 If you are on a local network then a sensible option might be
2592 socket options = IPTOS_LOWDELAY
2594 If you have an almost unloaded local network and you don't mind a lot
2595 of extra CPU usage in the server then you could try
2597 socket options = IPTOS_LOWDELAY TCP_NODELAY
2599 If you are on a wide area network then perhaps try setting
2600 IPTOS_THROUGHPUT. 
2602 Note that several of the options may cause your Samba server to fail
2603 completely. Use these options with caution!
2605 .B Default:
2606         no socket options
2608 .B Example:
2609         socket options = IPTOS_LOWDELAY 
2614 .SS status (G)
2615 This enables or disables logging of connections to a status file that
2616 .B smbstatus
2617 can read.
2619 With this disabled
2620 .B smbstatus
2621 won't be able to tell you what
2622 connections are active.
2624 .B Default:
2625         status = yes
2627 .B Example:
2628         status = no
2630 .SS strip dot (G)
2631 This is a boolean that controls whether to strip trailing dots off
2632 filenames. This helps with some CDROMs that have filenames ending in a
2633 single dot.
2635 NOTE: This option is now obsolete, and may be removed in future. You
2636 should use the "mangled map" option instead as it is much more
2637 general. 
2639 .SS strict locking (S)
2640 This is a boolean that controls the handling of file locking in the
2641 server. When this is set to yes the server will check every read and
2642 write access for file locks, and deny access if locks exist. This can
2643 be slow on some systems.
2645 When strict locking is "no" the server does file lock checks only when
2646 the client explicitly asks for them. 
2648 Well behaved clients always ask for lock checks when it is important,
2649 so in the vast majority of cases "strict locking = no" is preferable.
2651 .B Default:
2652         strict locking = no
2654 .B Example:
2655         strict locking = yes
2657 .SS sync always (S)
2659 This is a boolean parameter that controls whether writes will always
2660 be written to stable storage before the write call returns. If this is
2661 false then the server will be guided by the client's request in each
2662 write call (clients can set a bit indicating that a particular write
2663 should be synchronous). If this is true then every write will be
2664 followed by a fsync() call to ensure the data is written to disk.
2666 .B Default:
2667         sync always = no
2669 .B Example:
2670         sync always = yes
2672 .SS time offset (G)
2673 This parameter is a setting in minutes to add to the normal GMT to
2674 local time conversion. This is useful if you are serving a lot of PCs
2675 that have incorrect daylight saving time handling.
2677 .B Default:
2678         time offset = 0
2680 .B Example:
2681         time offset = 60
2683 .SS unix realname (G)
2684 This boolean parameter when set causes samba to supply the real name field
2685 from the unix password file to the client. This is useful for setting up
2686 mail clients and WWW browsers on systems used by more than one person.
2688 .B Default:
2689         unix realname = no
2691 .B Example:
2692         unix realname = yes
2694 .SS user (S)
2696 .B username.
2697 .SS username (S)
2698 A synonym for this parameter is 'user'.
2700 Multiple users may be specified in a comma-delimited list, in which case the
2701 supplied password will be tested against each username in turn (left to right).
2703 The username= line is needed only when the PC is unable to supply its own
2704 username. This is the case for the coreplus protocol or where your
2705 users have different WfWg usernames to UNIX usernames. In both these
2706 cases you may also be better using the \e\eserver\eshare%user syntax
2707 instead. 
2709 The username= line is not a great solution in many cases as it means Samba
2710 will try to validate the supplied password against each of the
2711 usernames in the username= line in turn. This is slow and a bad idea for
2712 lots of users in case of duplicate passwords. You may get timeouts or
2713 security breaches using this parameter unwisely.
2715 Samba relies on the underlying UNIX security. This parameter does not
2716 restrict who can login, it just offers hints to the Samba server as to
2717 what usernames might correspond to the supplied password. Users can
2718 login as whoever they please and they will be able to do no more
2719 damage than if they started a telnet session. The daemon runs as the
2720 user that they log in as, so they cannot do anything that user cannot
2723 To restrict a service to a particular set of users you can use the
2724 "valid users=" line.
2726 If any of the usernames begin with a @ then the name will be looked up
2727 in the groups file and will expand to a list of all users in the group
2728 of that name. Note that searching though a groups file can take quite
2729 some time, and some clients may time out during the search.
2731 See the section below on username/password validation for more information
2732 on how this parameter determines access to the services.
2734 .B Default:
2735         The guest account if a guest service, else the name of the service.
2737 .B Examples:
2738         username = fred
2739         username = fred, mary, jack, jane, @users, @pcgroup
2741 .SS username map (G)
2743 This option allows you to to specify a file containing a mapping of
2744 usernames from the clients to the server. This can be used for several
2745 purposes. The most common is to map usernames that users use on DOS or
2746 Windows machines to those that the UNIX box uses. The other is to map
2747 multiple users to a single username so that they can more easily share
2748 files.
2750 The map file is parsed line by line. Each line should contain a single
2751 UNIX username on the left then a '=' followed by a list of usernames
2752 on the right. The list of usernames on the right may contain names of
2753 the form @group in which case they will match any UNIX username in
2754 that group. The special client name '*' is a wildcard and matches any
2755 name.
2757 The file is processed on each line by taking the supplied username and
2758 comparing it with each username on the right hand side of the '='
2759 signs. If the supplied name matches any of the names on the right
2760 hand side then it is replaced with the name on the left. Processing
2761 then continues with the next line.
2763 If any line begins with a '#' or a ';' then it is ignored
2765 For example to map from the name "admin" or "administrator" to the UNIX
2766 name "root" you would use
2768         root = admin administrator
2770 Or to map anyone in the UNIX group "system" to the UNIX name "sys" you
2771 would use
2773         sys = @system
2775 You can have as many mappings as you like in a username map file.
2777 Note that the remapping is applied to all occurrences of
2778 usernames. Thus if you connect to "\e\eserver\efred" and "fred" is
2779 remapped to "mary" then you will actually be connecting to
2780 "\e\eserver\emary" and will need to supply a password suitable for
2781 "mary" not "fred". The only exception to this is the username passed
2782 to the "password server" (if you have one). The password server will
2783 receive whatever username the client supplies without modification.
2785 Also note that no reverse mapping is done. The main effect this has is
2786 with printing. Users who have been mapped may have trouble deleting
2787 print jobs as PrintManager under WfWg will think they don't own the
2788 print job.
2790 .B Default
2791         no username map
2793 .B Example
2794         username map = /usr/local/samba/lib/users.map
2796 .SS valid chars (S)
2798 The option allows you to specify additional characters that should be
2799 considered valid by the server in filenames. This is particularly
2800 useful for national character sets, such as adding u-umlaut or a-ring.
2802 The option takes a list of characters in either integer or character
2803 form with spaces between them. If you give two characters with a colon
2804 between them then it will be taken as an lowercase:uppercase pair.
2806 If you have an editor capable of entering the characters into the
2807 config file then it is probably easiest to use this method. Otherwise
2808 you can specify the characters in octal, decimal or hexadecimal form
2809 using the usual C notation.
2811 For example to add the single character 'Z' to the charset (which is a
2812 pointless thing to do as it's already there) you could do one of the
2813 following
2815 valid chars = Z
2816 valid chars = z:Z
2817 valid chars = 0132:0172
2819 The last two examples above actually add two characters, and alter
2820 the uppercase and lowercase mappings appropriately.
2822 .B Default
2824         Samba defaults to using a reasonable set of valid characters
2826         for english systems
2828 .B Example
2829         valid chars = 0345:0305 0366:0326 0344:0304
2831 The above example allows filenames to have the swedish characters in
2832 them. 
2834 NOTE: It is actually quite difficult to correctly produce a "valid
2835 chars" line for a particular system. To automate the process
2836 tino@augsburg.net has written a package called "validchars" which will
2837 automatically produce a complete "valid chars" line for a given client
2838 system. Look in the examples subdirectory for this package.
2840 .SS valid users (S)
2841 This is a list of users that should be allowed to login to this
2842 service. A name starting with @ is interpreted as a UNIX group.
2844 If this is empty (the default) then any user can login. If a username
2845 is in both this list and the "invalid users" list then access is
2846 denied for that user.
2848 The current servicename is substituted for %S. This is useful in the
2849 [homes] section.
2851 See also "invalid users"
2853 .B Default
2854         No valid users list. (anyone can login)
2856 .B Example
2857         valid users = greg, @pcusers
2859 .SS volume (S)
2860 This allows you to override the volume label returned for a
2861 share. Useful for CDROMs with installation programs that insist on a
2862 particular volume label.
2864 The default is the name of the share
2866 .SS wide links (S)
2867 This parameter controls whether or not links in the UNIX file system may be
2868 followed by the server. Links that point to areas within the directory tree
2869 exported by the server are always allowed; this parameter controls access 
2870 only to areas that are outside the directory tree being exported.
2872 .B Default:
2873         wide links = yes
2875 .B Example:
2876         wide links = no
2878 .SS wins proxy (G)
2880 This is a boolean that controls if nmbd will respond to broadcast name
2881 queries on behalf of other hosts. You may need to set this to no for
2882 some older clients.
2884 .B Default:
2885         wins proxy = no
2886 .SS wins support (G)
2888 This boolean controls if Samba will act as a WINS server. You should
2889 normally set this to true unless you already have another WINS server
2890 on the network.
2892 .B Default:
2893         wins support = yes
2894 .SS wins server (G)
2896 This specifies the DNS name of the WINS server that Samba should
2897 register with. If you have a WINS server on your network then you
2898 should set this to the WINS servers name.
2900 This option only takes effect if Samba is not acting as a WINS server
2901 itself. 
2903 .B Default:
2904         wins server = 
2905 .SS workgroup (G)
2907 This controls what workgroup your server will appear to be in when
2908 queried by clients. 
2910 .B Default:
2911         set in the Makefile
2913 .B Example:
2914         workgroup = MYGROUP
2916 .SS write ok (S)
2918 .B writable
2920 .B read only.
2921 .SS writable (S)
2922 A synonym for this parameter is 'write ok'. An inverted synonym is 'read only'.
2924 If this parameter is 'no', then users of a service may not create or modify
2925 files in the service's directory.
2927 Note that a printable service ('printable = yes') will ALWAYS allow 
2928 writing to the directory (user privileges permitting), but only via
2929 spooling operations.
2931 .B Default:
2932         writable = no
2934 .B Examples:
2935         read only = no
2936         writable = yes
2937         write ok = yes
2938 .SS write list (S)
2939 This is a list of users that are given read-write access to a
2940 service. If the connecting user is in this list then they will be
2941 given write access, no matter what the "read only" option is set
2942 to. The list can include group names using the @group syntax.
2944 Note that if a user is in both the read list and the write list then
2945 they will be given write access.
2947 See also the "read list" option
2949 .B Default:
2950      write list =
2952 .B Example:
2953      write list = admin, root, @staff
2955 .SS write raw (G)
2956 This parameter controls whether or not the server will support raw writes when
2957 transferring data from clients.
2959 .B Default:
2960         write raw = yes
2962 .B Example:
2963         write raw = no
2964 .SH NOTE ABOUT USERNAME/PASSWORD VALIDATION
2965 There are a number of ways in which a user can connect to a
2966 service. The server follows the following steps in determining if it
2967 will allow a connection to a specified service. If all the steps fail
2968 then the connection request is rejected. If one of the steps pass then
2969 the following steps are not checked.
2971 If the service is marked "guest only = yes" then steps 1 to 5 are skipped
2973 Step 1: If the client has passed a username/password pair and that
2974 username/password pair is validated by the UNIX system's password
2975 programs then the connection is made as that username. Note that this
2976 includes the \e\eserver\eservice%username method of passing a username.
2978 Step 2: If the client has previously registered a username with the
2979 system and now supplies a correct password for that username then the
2980 connection is allowed.
2982 Step 3: The client's netbios name and any previously used user names
2983 are checked against the supplied password, if they match then the
2984 connection is allowed as the corresponding user.
2986 Step 4: If the client has previously validated a username/password
2987 pair with the server and the client has passed the validation token
2988 then that username is used. This step is skipped if "revalidate = yes" 
2989 for this service.
2991 Step 5: If a "user = " field is given in the smb.conf file for the
2992 service and the client has supplied a password, and that password
2993 matches (according to the UNIX system's password checking) with one of
2994 the usernames from the user= field then the connection is made as the
2995 username in the "user=" line. If one of the username in the user= list
2996 begins with a @ then that name expands to a list of names in the group
2997 of the same name.
2999 Step 6: If the service is a guest service then a connection is made as
3000 the username given in the "guest account =" for the service,
3001 irrespective of the supplied password.
3002 .SH WARNINGS
3003 Although the configuration file permits service names to contain spaces, 
3004 your client software may not. Spaces will be ignored in comparisons anyway,
3005 so it shouldn't be a problem - but be aware of the possibility.
3007 On a similar note, many clients - especially DOS clients - limit service
3008 names to eight characters. Smbd has no such limitation, but attempts
3009 to connect from such clients will fail if they truncate the service names.
3010 For this reason you should probably keep your service names down to eight 
3011 characters in length.
3013 Use of the [homes] and [printers] special sections make life for an 
3014 administrator easy, but the various combinations of default attributes can be
3015 tricky. Take extreme care when designing these sections. In particular,
3016 ensure that the permissions on spool directories are correct.
3017 .SH VERSION
3018 This man page is (mostly) correct for version 1.9.00 of the Samba suite, plus some
3019 of the recent patches to it. These notes will necessarily lag behind 
3020 development of the software, so it is possible that your version of 
3021 the server has extensions or parameter semantics that differ from or are not 
3022 covered by this man page. Please notify these to the address below for 
3023 rectification.
3025 Prior to version 1.5.21 of the Samba suite, the configuration file was
3026 radically different (more primitive). If you are using a version earlier than
3027 1.8.05, it is STRONGLY recommended that you upgrade.
3028 .SH OPTIONS
3029 Not applicable.
3030 .SH FILES
3031 Not applicable.
3032 .SH ENVIRONMENT VARIABLES
3033 Not applicable.
3034 .SH SEE ALSO
3035 .BR smbd (8),
3036 .BR smbclient (1),
3037 .BR nmbd (8),
3038 .BR testparm (1), 
3039 .BR testprns (1),
3040 .BR lpq (1),
3041 .BR hosts_access (5)
3042 .SH DIAGNOSTICS
3043 [This section under construction]
3045 Most diagnostics issued by the server are logged in a specified log file. The
3046 log file name is specified at compile time, but may be overridden on the
3047 smbd command line (see
3048 .BR smbd (8)).
3050 The number and nature of diagnostics available depends on the debug level used
3051 by the server. If you have problems, set the debug level to 3 and peruse the
3052 log files.
3054 Most messages are reasonably self-explanatory. Unfortunately, at time of
3055 creation of this man page the source code is still too fluid to warrant
3056 describing each and every diagnostic. At this stage your best bet is still
3057 to grep the source code and inspect the conditions that gave rise to the 
3058 diagnostics you are seeing.
3059 .SH BUGS
3060 None known.
3062 Please send bug reports, comments and so on to:
3064 .RS 3
3065 .B samba-bugs@samba.anu.edu.au (Andrew Tridgell)
3067 .RS 3
3068 or to the mailing list:
3071 .B samba@listproc.anu.edu.au
3074 You may also like to subscribe to the announcement channel:
3076 .RS 3
3077 .B samba-announce@listproc.anu.edu.au
3080 To subscribe to these lists send a message to
3081 listproc@listproc.anu.edu.au with a body of "subscribe samba Your
3082 Name" or "subscribe samba-announce Your Name".
3084 Errors or suggestions for improvements to the Samba man pages should be 
3085 mailed to:
3087 .RS 3
3088 .B samba-bugs@samba.anu.edu.au (Andrew Tridgell)