preparing for release of 2.0.0 alpha 5
[Samba/gbeck.git] / docs / manpages / smb.conf.5
blob63d256ae5b739bd4d81d498f2715ee23c1326f8d
1 .TH SMB.CONF 5 "17 Sep 1998" "smb.conf 2.0.0-alpha5"
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 NOTE: On SYSV systems which use lpstat to determine what printers are
215 defined on the system you may be able to use "printcap name = lpstat" 
216 to automatically obtain a list of printers. See the "printcap name"
217 option for more detils.
220 .SH PARAMETERS
221 Parameters define the specific attributes of services.
223 Some parameters are specific to the [global] section (eg., security).
224 Some parameters are usable in all sections (eg., create mode). All others are
225 permissible only in normal sections. For the purposes of the following
226 descriptions the [homes] and [printers] sections will be considered normal.
227 The letter 'G' in parentheses indicates that a parameter is specific to the
228 [global] section. The letter 'S' indicates that a parameter can be
229 specified in a service specific section. Note that all S parameters
230 can also be specified in the [global] section - in which case they
231 will define the default behaviour for all services.
233 Parameters are arranged here in alphabetical order - this may not create
234 best bedfellows, but at least you can find them! Where there are synonyms,
235 the preferred synonym is described, others refer to the preferred synonym.
237 .SS VARIABLE SUBSTITUTIONS
239 Many of the strings that are settable in the config file can take
240 substitutions. For example the option "path = /tmp/%u" would be
241 interpreted as "path = /tmp/john" if the user connected with the
242 username john.
244 These substitutions are mostly noted in the descriptions below, but
245 there are some general substitutions which apply whenever they might be
246 relevant. These are:
248 %S = the name of the current service, if any
250 %P = the root directory of the current service, if any
252 %u = user name of the current service, if any
254 %g = primary group name of %u
256 %U = session user name (the user name that the client wanted, not
257 necessarily the same as the one they got)
259 %G = primary group name of %U
261 %H = the home directory of the user given by %u
263 %v = the Samba version
265 %h = the hostname that Samba is running on
267 %m = the netbios name of the client machine (very useful)
269 %L = the netbios name of the server. This allows you to change your
270 config based on what the client calls you. Your server can have a "dual
271 personality".
273 %M = the internet name of the client machine
275 %N = the name of your NIS home directory server.  This is obtained from
276 your NIS auto.map entry.  If you have not compiled Samba with -DAUTOMOUNT
277 then this value will be the same as %L.
279 %p = the path of the service's home directory, obtained from your NIS
280 auto.map entry. The NIS auto.map entry is split up as "%N:%p".
282 %R = the selected protocol level after protocol negotiation. As of 
283 Samba 1.9.18 it can be one of CORE, COREPLUS, LANMAN1, LANMAN2 or NT1.
285 %d = The process id of the current server process
287 %a = the architecture of the remote machine. Only some are recognised,
288 and those may not be 100% reliable. It currently recognises Samba,
289 WfWg, WinNT and Win95. Anything else will be known as "UNKNOWN". If it
290 gets it wrong then sending me a level 3 log should allow me to fix it.
292 %I = The IP address of the client machine
294 %T = the current date and time
296 There are some quite creative things that can be done with these
297 substitutions and other smb.conf options.
299 .SS NAME MANGLING
301 Samba supports "name mangling" so that DOS and Windows clients can use
302 files that don't conform to the 8.3 format. It can also be set to adjust
303 the case of 8.3 format filenames.
305 There are several options that control the way mangling is performed,
306 and they are grouped here rather than listed separately. For the
307 defaults look at the output of the testparm program.
309 All of these options can be set separately for each service (or
310 globally, of course).
312 The options are:
314 "mangle case = yes/no" controls if names that have characters that
315 aren't of the "default" case are mangled. For example, if this is yes
316 then a name like "Mail" would be mangled. Default no.
318 "case sensitive = yes/no" controls whether filenames are case
319 sensitive. If they aren't then Samba must do a filename search and
320 match on passed names. Default no.
322 "default case = upper/lower" controls what the default case is for new
323 filenames. Default lower.
325 "preserve case = yes/no" controls if new files are created with the
326 case that the client passes, or if they are forced to be the "default"
327 case. Default no.
329 "short preserve case = yes/no" controls if new files which conform to 8.3
330 syntax, that is all in upper case and of suitable length, are created
331 upper case, or if they are forced to be the "default" case. This option can
332 be use with "preserve case = yes" to permit long filenames to retain their
333 case, while short names are lowered. Default no.
335 .SS COMPLETE LIST OF GLOBAL PARAMETERS
337 Here is a list of all global parameters. See the section of each
338 parameter for details.  Note that some are synonyms.
340 announce as
342 announce version
344 auto services
346 bind interfaces only
348 browse list
350 character set
352 client code page
354 config file
356 deadtime
358 debuglevel
360 default
362 default service
364 dfree command
366 dns proxy
368 domain controller
370 domain logons
372 domain master
374 encrypt passwords
376 getwd cache
378 hide files
380 hide dot files
382 homedir map
384 hosts equiv
386 include
388 interfaces
390 keepalive
392 lm announce
394 lm interval
396 lock dir
398 load printers
400 local master
402 lock directory
404 log file
406 log level
408 logon drive
410 logon home
412 logon path
414 logon script
416 lpq cache time
418 mangled stack
420 max log size
422 max mux
424 max packet
426 max ttl
428 max xmit
430 max wins ttl
432 message command
434 min wins ttl
436 name resolve order
438 netbios aliases
440 netbios name
442 nis homedir
444 null passwords
446 os level
448 packet size
450 passwd chat
452 passwd program
454 password level
456 password server
458 preferred master
460 preload
462 printcap name
464 printer driver file
466 protocol
468 read bmpx
470 read prediction
472 read raw
474 read size
476 remote announce
478 remote browse sync
480 root
482 root dir
484 root directory
486 security
488 server string
490 shared file entries
492 shared mem size
494 smb passwd file
496 smbrun
498 socket address
500 socket options
502 status
504 strip dot
506 syslog
508 syslog only
510 time offset
512 time server
514 unix realname
516 username level
518 username map
520 use rhosts
522 valid chars
524 wins proxy
526 wins server
528 wins support
530 workgroup
532 write raw
534 .SS COMPLETE LIST OF SERVICE PARAMETERS
536 Here is a list of all service parameters. See the section of each
537 parameter for details. Note that some are synonyms.
539 admin users
541 allow hosts
543 alternate permissions
545 available
547 browseable
549 case sensitive
551 case sig names
553 copy
555 create mask
557 create mode
559 comment
561 default case
563 delete readonly
565 delete veto files
567 deny hosts
569 directory
571 directory mask
573 directory mode
575 dont descend
577 dos filetimes
579 dos filetime resolution
581 exec
583 fake directory create times
585 fake oplocks
587 follow symlinks
589 force create mode
591 force directory mode
593 force group
595 force user
597 guest account
599 guest ok
601 guest only
603 hide dot files
605 hosts allow
607 hosts deny
609 invalid users
611 locking
613 lppause command
615 lpq command
617 lpresume command
619 lprm command
621 magic output
623 magic script
625 mangle case
627 mangled names
629 mangling char
631 map archive
633 map hidden
635 map system
637 max connections
639 min print space
641 networkstation user login
643 only guest
645 only user
647 oplocks
649 path
651 postexec
653 postscript
655 preserve case
657 print command
659 printer driver
661 printer driver location
663 printing
665 print ok
667 printable
669 printer
671 printer name
673 public
675 read only
677 read list
679 revalidate
681 root postexec
683 root preexec
685 set directory
687 share modes
689 short preserve case
691 strict locking
693 sync always
695 user
697 username
699 users
701 valid users
703 veto files
705 veto oplock files
707 volume
709 wide links
711 writable
713 write ok
715 writeable
717 write list
719 .SS EXPLANATION OF EACH PARAMETER
720 .RS 3
722 .SS admin users (S)
724 This is a list of users who will be granted administrative privileges
725 on the share. This means that they will do all file operations as the
726 super-user (root).
728 You should use this option very carefully, as any user in this list
729 will be able to do anything they like on the share, irrespective of
730 file permissions.
732 .B Default:
733         no admin users
735 .B Example:
736         admin users = jason
738 .SS announce as (G)
740 This specifies what type of server nmbd will announce itself as in
741 browse lists. By default this is set to Windows NT. The valid options
742 are "NT", "Win95" or "WfW" meaining Windows NT, Windows 95 and
743 Windows for Workgroups respectively. Do not change this parameter
744 unless you have a specific need to stop Samba appearing as an NT
745 server as this may prevent Samba servers from participating as
746 browser servers correctly.
748 .B Default:
749     announce as = NT
751 .B Example
752     announce as = Win95
754 .SS announce version (G)
756 This specifies the major and minor version numbers that nmbd
757 will use when announcing itself as a server. The default is 4.2.
758 Do not change this parameter unless you have a specific need to
759 set a Samba server to be a downlevel server.
761 .B Default:
762    announce version = 4.2
764 .B Example:
765    announce version = 2.0
767 .SS auto services (G)
768 This is a list of services that you want to be automatically added to
769 the browse lists. This is most useful for homes and printers services
770 that would otherwise not be visible.
772 Note that if you just want all printers in your printcap file loaded
773 then the "load printers" option is easier.
775 .B Default:
776         no auto services
778 .B Example:
779         auto services = fred lp colorlp
781 .SS allow hosts (S)
782 A synonym for this parameter is 'hosts allow'.
784 This parameter is a comma delimited set of hosts which are permitted to access
785 a service. 
787 If specified in the [global] section then it will apply to all
788 services, regardless of whether the individual service has a different
789 setting. 
791 You can specify the hosts by name or IP number. For example, you could
792 restrict access to only the hosts on a Class C subnet with something like
793 "allow hosts = 150.203.5.". The full syntax of the list is described in
794 the man page
795 .BR hosts_access (5).
797 You can also specify hosts by network/netmask pairs and by netgroup
798 names if your system supports netgroups. The EXCEPT keyword can also
799 be used to limit a wildcard list. The following examples may provide
800 some help:
802 Example 1: allow all IPs in 150.203.*.* except one
804         hosts allow = 150.203. EXCEPT 150.203.6.66
806 Example 2: allow hosts that match the given network/netmask
808         hosts allow = 150.203.15.0/255.255.255.0
810 Example 3: allow a couple of hosts
812         hosts allow = lapland, arvidsjaur
814 Example 4: allow only hosts in netgroup "foonet" or localhost, but 
815 deny access from one particular host
817         hosts allow = @foonet, localhost
818         hosts deny = pirate
820 Note that access still requires suitable user-level passwords.
823 .BR testparm (1)
824 for a way of testing your host access to see if it
825 does what you expect.
827 .B Default:
828         none (i.e., all hosts permitted access)
830 .B Example:
831         allow hosts = 150.203.5. myhost.mynet.edu.au
833 .SS alternate permissions (S)
835 This option is deprecated and is only included for backward
836 compatibility. 
838 .SS available (S)
839 This parameter lets you 'turn off' a service. If 'available = no', then
840 ALL attempts to connect to the service will fail. Such failures are logged.
842 .B Default:
843         available = yes
845 .B Example:
846         available = no
848 .SS bind interfaces only (G)
849 This global parameter (new for 1.9.18) allows the Samba admin to limit
850 what interfaces on a machine will serve smb requests. If affects file service
851 (smbd) and name service (nmbd) in slightly different ways.
853 For name service it causes nmbd to bind to ports 137 and 138 on
854 the interfaces listed in the 'interfaces' parameter. nmbd also binds
855 to the 'all addresses' interface (0.0.0.0) on ports 137 and 138
856 for the purposes of reading broadcast messages. If this option is
857 not set then nmbd will service name requests on all of these
858 sockets. If "bind interfaces only" is set then nmbd will check
859 the source address of any packets coming in on the broadcast
860 sockets and discard any that don't match the broadcast addresses
861 of the interfaces in the 'interfaces' parameter list. As unicast
862 packets are received on the other sockets it allows nmbd to
863 refuse to serve names to machines that send packets that arrive
864 through any interfaces not listed in the 'interfaces' list.
865 IP Source address spoofing does defeat this simple check, however
866 so it must not be used seriously as a security feature for nmbd.
868 For file service it causes smbd to bind only to the interface
869 list given in the 'interfaces' parameter. This restricts the
870 networks that smbd will serve to packets coming in those interfaces.
871 Note that you should not use this parameter for machines that
872 are serving ppp or other intermittant or non-broadcast network
873 interfaces as it will not cope with non-permanent interfaces.
875 .B Default:
876        bind interfaces only = False
878 .B Example:
879        bind interfaces only = True
881 .SS browseable (S)
882 This controls whether this share is seen in the list of available
883 shares in a net view and in the browse list.
885 .B Default:
886         browseable = Yes
888 .B Example: 
889         browseable = No
890 .SS browse list(G)
891 This controls whether the smbd will serve a browse list to a client
892 doing a NetServerEnum call. Normally set to true. You should never
893 need to change this.
895 .B Default:
896         browse list = Yes
898 .SS case sensitive (G)
899 See the discussion on NAME MANGLING.
901 .SS case sig names (G)
902 See "case sensitive"
904 .SS character set (G)
905 This allows a smbd to map incoming characters from a DOS 850 Code page
906 to either a Western European (ISO8859-1) or Easter European (ISO8859-2)
907 code page. Normally not set, meaning no filename translation is done.
909 .B Default
911         character set =
913 .B Example
915         character set = iso8859-1
917 .SS client code page (G)
918 Currently (Samba 1.9.17 and above) this may be set to one of two
919 values, 850 or 437. It specifies the base DOS code page that the
920 clients accessing Samba are using. To determine this, open a DOS
921 command prompt and type the command "chcp". This will output the
922 code page. The default for USA MS-DOS, Windows 95, and Windows NT
923 releases is code page 437. The default for western european 
924 releases of the above operating systems is code page 850.
926 This parameter co-operates with the "valid chars" parameter in
927 determining what characters are valid in filenames and how
928 capitalization is done. It has been added as a convenience for
929 clients whose code page is either 437 or 850 so a convoluted
930 "valid chars" string does not have to be determined. If you
931 set both this parameter and the "valid chars" parameter the 
932 "client code page" parameter MUST be set before the "valid chars"
933 in the smb.conf file. The "valid chars" string will then augment
934 the character settings in the "client code page" parameter.
936 If "client code page" is set to a value other than 850 or 437
937 it will default to 850.
939 See also : "valid chars".
941 .B Default
943         client code page = 850
945 .B Example
947         client code page = 437
949 .SS comment (S)
950 This is a text field that is seen next to a share when a client does a
951 net view to list what shares are available.
953 If you want to set the string that is displayed next to the machine
954 name then see the server string command.
956 .B Default:
957         No comment string
959 .B Example:
960         comment = Fred's Files
962 .SS config file (G)
964 This allows you to override the config file to use, instead of the
965 default (usually smb.conf). There is a chicken and egg problem here as
966 this option is set in the config file! 
968 For this reason, if the name of the config file has changed when the
969 parameters are loaded then it will reload them from the new config
970 file.
972 This option takes the usual substitutions, which can be very useful.
974 If the config file doesn't exist then it won't be loaded (allowing
975 you to special case the config files of just a few clients).
977 .B Example:
978         config file = /usr/local/samba/lib/smb.conf.%m
980 .SS copy (S)
981 This parameter allows you to 'clone' service entries. The specified
982 service is simply duplicated under the current service's name. Any 
983 parameters specified in the current section will override those in the
984 section being copied.
986 This feature lets you set up a 'template' service and create similar 
987 services easily. Note that the service being copied must occur earlier 
988 in the configuration file than the service doing the copying.
990 .B Default:
991         none
993 .B Example:
994         copy = otherservice
995 .SS create mask (S)
996 A synonym for this parameter is 'create mode'.
998 When a file is created, the neccessary permissions are calculated
999 according to the mapping from DOS modes to UNIX permissions, and
1000 the resulting UNIX mode is then bit-wise 'AND'ed with this parameter.
1001 This parameter may be thought of as a bit-wise MASK for the UNIX
1002 modes of a file. Any bit *not* set here will be removed from the
1003 modes set on a file when it is created.
1005 The default value of this parameter removes the 'group' and 'other' 
1006 write and execute bits from the UNIX modes.
1008 Following this Samba will bit-wise 'OR' the UNIX mode created from
1009 this parameter with the value of the "force create mode" parameter 
1010 which is set to 000 by default.
1012 For Samba 1.9.17 and above this parameter no longer affects directory
1013 modes. See the parameter 'directory mode' for details.
1015 See also the "force create mode" parameter for forcing particular
1016 mode bits to be set on created files.
1017 See also the "directory mode" parameter for masking mode bits on created
1018 directories.
1020 .B Default:
1021         create mask = 0744
1023 .B Example:
1024         create mask = 0775
1025 .SS create mode (S)
1027 .B create mask.
1029 .SS deadtime (G)
1030 The value of the parameter (a decimal integer) represents the number of
1031 minutes of inactivity before a connection is considered dead, and it
1032 is disconnected. The deadtime only takes effect if the number of open files
1033 is zero.
1035 This is useful to stop a server's resources being exhausted by a large
1036 number of inactive connections.
1038 Most clients have an auto-reconnect feature when a connection is broken so
1039 in most cases this parameter should be transparent to users.
1041 Using this parameter with a timeout of a few minutes is recommended
1042 for most systems.
1044 A deadtime of zero indicates that no auto-disconnection should be performed.
1046 .B Default:
1047         deadtime = 0
1049 .B Example:
1050         deadtime = 15
1051 .SS debug level (G)
1052 The value of the parameter (an integer) allows the debug level
1053 (logging level) to be specified in the
1054 .B smb.conf
1055 file. This is to give
1056 greater flexibility in the configuration of the system.
1058 The default will be the debug level specified on the command line.
1060 .B Example:
1061         debug level = 3
1062 .SS default (G)
1064 .B default service.
1065 .SS default case (S)
1067 See the section on "NAME MANGLING" Also note the addition of "short
1068 preserve case"
1070 .SS default service (G)
1071 A synonym for this parameter is 'default'.
1073 This parameter specifies the name of a service which will be connected to
1074 if the service actually requested cannot be found. Note that the square
1075 brackets are NOT given in the parameter value (see example below).
1077 There is no default value for this parameter. If this parameter is not given,
1078 attempting to connect to a nonexistent service results in an error.
1080 Typically the default service would be a public, read-only service.
1082 Also note that as of 1.9.14 the apparent service name will be changed to
1083 equal that of the requested service, this is very useful as it allows
1084 you to use macros like %S to make a wildcard service.
1086 Note also that any _ characters in the name of the service used in the
1087 default service will get mapped to a /. This allows for interesting
1088 things.
1091 .B Example:
1092         default service = pub
1093         
1094         [pub]
1095              path = /%S
1096           
1098 .SS delete readonly (S)
1099 This parameter allows readonly files to be deleted.  This is not normal DOS
1100 semantics, but is allowed by UNIX.
1102 This option may be useful for running applications such as rcs, where UNIX
1103 file ownership prevents changing file permissions, and DOS semantics prevent
1104 deletion of a read only file.
1106 .B Default:
1107         delete readonly = No
1109 .B Example:
1110         delete readonly = Yes
1111 .SS deny hosts (S)
1112 A synonym for this parameter is 'hosts deny'.
1114 The opposite of 'allow hosts' - hosts listed here are NOT permitted
1115 access to services unless the specific services have their own lists to
1116 override this one. Where the lists conflict, the 'allow' list takes precedence.
1118 .B Default:
1119         none (i.e., no hosts specifically excluded)
1121 .B Example:
1122         deny hosts = 150.203.4. badhost.mynet.edu.au
1124 .SS delete veto files (S)
1126 This option is used when Samba is attempting to delete a directory
1127 that contains one or more vetoed directories (see the 'veto files' option).
1128 If this option is set to False (the default) then if a vetoed directory
1129 contains any non-vetoed files or directories then the directory delete 
1130 will fail. This is usually what you want. 
1132 If this option is set to True, then Samba will attempt
1133 to recursively delete any files and directories within the vetoed
1134 directory. This can be useful for integration with file serving
1135 systems such as Netatalk, which create meta-files within directories
1136 you might normally veto DOS/Windows users from seeing (eg. .AppleDouble)
1138 Setting 'delete veto files = True' allows these directories to be 
1139 transparently deleted when the parent directory is deleted (so long
1140 as the user has permissions to do so).
1142 .B Default:
1143     delete veto files = False
1145 .B Example:
1146     delete veto files = True
1149 .B veto files
1151 .SS dfree command (G)
1152 The dfree command setting should only be used on systems where a
1153 problem occurs with the internal disk space calculations. This has
1154 been known to happen with Ultrix, but may occur with other operating
1155 systems. The symptom that was seen was an error of "Abort Retry
1156 Ignore" at the end of each directory listing.
1158 This setting allows the replacement of the internal routines to
1159 calculate the total disk space and amount available with an external
1160 routine. The example below gives a possible script that might fulfill
1161 this function. 
1163 The external program will be passed a single parameter indicating a
1164 directory in the filesystem being queried. This will typically consist
1165 of the string "./". The script should return two integers in ascii. The
1166 first should be the total disk space in blocks, and the second should
1167 be the number of available blocks. An optional third return value
1168 can give the block size in bytes. The default blocksize is 1024 bytes.
1170 Note: Your script should NOT be setuid or setgid and should be owned by
1171 (and writable only by) root!
1173 .B Default:
1174         By default internal routines for determining the disk capacity
1175 and remaining space will be used.
1177 .B Example:
1178         dfree command = /usr/local/samba/bin/dfree
1180         Where the script dfree (which must be made executable) could be
1183         #!/bin/sh
1184         df $1 | tail -1 | awk '{print $2" "$4}'
1187         or perhaps (on Sys V)
1190         #!/bin/sh
1191         /usr/bin/df -k $1 | tail -1 | awk '{print $3" "$5}'
1194         Note that you may have to replace the command names with full
1195 path names on some systems.
1196 .SS directory (S)
1198 .B path.
1200 .SS directory mask (S)
1201 A synonym for this parameter is 'directory mode'.
1203 This parameter is the octal modes which are used when converting DOS modes 
1204 to UNIX modes when creating UNIX directories.
1206 When a directory is created, the neccessary permissions are calculated
1207 according to the mapping from DOS modes to UNIX permissions, and
1208 the resulting UNIX mode is then bit-wise 'AND'ed with this parameter.
1209 This parameter may be thought of as a bit-wise MASK for the UNIX
1210 modes of a directory. Any bit *not* set here will be removed from the
1211 modes set on a directory when it is created.
1213 The default value of this parameter removes the 'group' and 'other'
1214 write bits from the UNIX mode, allowing only the user who owns the
1215 directory to modify it.
1217 Following this Samba will bit-wise 'OR' the UNIX mode created from
1218 this parameter with the value of the "force directory mode" parameter. 
1219 This parameter is set to 000 by default (ie. no extra mode bits are added).
1221 See the "force directory mode" parameter to cause particular mode
1222 bits to always be set on created directories.
1224 See also the "create mode" parameter for masking mode bits on created
1225 files.
1227 .B Default:
1228         directory mask = 0755
1230 .B Example:
1231         directory mask = 0775
1233 .SS directory mode (S)
1235 .B directory mask.
1237 .SS dns proxy (G)
1239 Specifies that nmbd should (as a WINS server), on finding that a NetBIOS
1240 name has not been registered, treat the NetBIOS name word-for-word as
1241 a DNS name.
1243 Note that the maximum length for a NetBIOS name is 15
1244 characters, so the DNS name (or DNS alias) can likewise only be 15
1245 characters, maximum.
1247 Note also that nmbd will block completely until the DNS name is resolved.
1248 This will result in temporary loss of browsing and WINS services.
1249 Enable this option only if you are certain that DNS resolution is fast,
1250 or you can live with the consequences of periodic pauses in nmbd service.
1252 .B Default:
1253          dns proxy = yes
1255 .SS domain controller (G)
1257 Specifies the DNS name or IP address of the machine to refer domain 
1258 logons from Win95 machines to. You should never need to set this parameter.
1260 .B Default:
1261          domain controller = no
1263 .SS domain logons (G)
1265 If set to true, the Samba server will serve Windows 95 domain logons
1266 for the workgroup it is in. For more details on setting up this feature
1267 see the file DOMAINS.txt in the Samba source documentation directory.
1269 .B Default:
1270          domain logons = no
1272 .SS domain master (G)
1274 Enable WAN-wide browse list collation.  Local master browsers on 
1275 broadcast-isolated subnets will give samba their local browse lists, and 
1276 ask for a complete copy of the browse list for the whole wide area network.
1277 Browser clients will then contact their local master browser, and will
1278 receive the domain-wide browse list, instead of just the list for their
1279 broadcast-isolated subnet.
1281 .B Default:
1282         domain master = no
1284 .SS dont descend (S)
1285 There are certain directories on some systems (eg., the /proc tree under
1286 Linux) that are either not of interest to clients or are infinitely deep
1287 (recursive). This parameter allows you to specify a comma-delimited list
1288 of directories that the server should always show as empty.
1290 Note that Samba can be very fussy about the exact format of the "dont
1291 descend" entries. For example you may need "./proc" instead of just
1292 "/proc". Experimentation is the best policy :-)
1294 .B Default:
1295         none (i.e., all directories are OK to descend)
1297 .B Example:
1298         dont descend = /proc,/dev
1300 .SS dos filetimes (S)
1301 Under DOS and Windows, if a user can write to a file they can change
1302 the timestamp on it. Under POSIX semantics, only the owner of the file
1303 or root may change the timestamp. By default, Samba runs with POSIX
1304 semantics and refuses to change the timestamp on a file if the user
1305 smbd is acting on behalf of is not the file owner. Setting this option
1306 to True allows DOS semantics and smbd will change the file timstamp as 
1307 DOS requires. This is a correct implementation of a previous compile-time
1308 options (UTIME_WORKAROUND) which was broken and is now removed.
1310 .B Default:
1311         dos filetimes = False
1313 .B Example:
1314         dos filetimes = True
1316 .SS dos filetime resolution (S)
1317 Under the DOS and Windows FAT filesystem, the finest granulatity on
1318 time resolution is two seconds. Setting this parameter for a share
1319 causes Samba to round the reported time down to the nearest two
1320 second boundary when a query call that requires one second resolution
1321 is made to smbd. 
1323 This option is mainly used as a compatibility option for Visual C++ 
1324 when used against Samba shares. If oplocks are enabled on a share,
1325 Visual C++ uses two different time reading calls to check if a file 
1326 has changed since it was last read. One of these calls uses a one-second 
1327 granularity, the other uses a two second granularity. As the two second 
1328 call rounds any odd second down, then if the file has a timestamp of an 
1329 odd number of seconds then the two timestamps will not match and Visual 
1330 C++ will keep reporting the file has changed. Setting this option causes 
1331 the two timestamps to match, and Visual C++ is happy.
1333 .B Default:
1334         dos filetime resolution = False
1336 .B Example:
1337         dos filetime resolution = True
1339 .SS encrypt passwords (G)
1341 This boolean controls whether encrypted passwords will be negotiated
1342 with the client. Note that Windows NT 4.0 SP3 and above will by default
1343 expect encrypted passwords unless a registry entry is changed. To use
1344 encrypted passwords in Samba see the file docs/ENCRYPTION.txt.
1346 .SS exec (S)
1348 This is an alias for preexec
1350 .SS fake directory create times (S)
1351 NTFS and Windows VFAT file systems keep a create time for all files
1352 and directories. This is not the same as the ctime - status change
1353 time - that Unix keeps, so Samba by default reports the earliest
1354 of the various times Unix does keep. Setting this parameter for a
1355 share causes Samba to always report midnight 1-1-1980 as
1356 the create time for directories.
1358 This option is mainly used as a compatibility option for Visual C++ 
1359 when used against Samba shares. Visual C++ generated makefiles
1360 have the object directory as a dependency for each object file,
1361 and a make rule to create the directory. Also, when NMAKE
1362 compares timestamps it uses the creation time when examining
1363 a directory. Thus the object directory will be created if it does
1364 not exist, but once it does exist it will always have an earlier
1365 timestamp than the object files it contains.
1367 However, Unix time semantics mean that the create time reported
1368 by Samba will be updated whenever a file is created or deleted
1369 in the directory. NMAKE therefore finds all object files in the
1370 object directory bar the last one built are out of date compared
1371 to the directory and rebuilds them. Enabling this option ensures
1372 directories always predate their contents and an NMAKE build will
1373 proceed as expected.
1375 .B Default:
1376         fake directory create times = False
1378 .B Example:
1379         fake directory create times = True
1381 .SS fake oplocks (S)
1383 Oplocks are the way that SMB clients get permission from a server to
1384 locally cache file operations. If a server grants an oplock
1385 (opportunistic lock) then the client is free to assume that it is the
1386 only one accessing the file and it will aggressively cache file
1387 data. With some oplock types the client may even cache file open/close
1388 operations. This can give enormous performance benefits.
1390 When you set "fake oplocks = yes" Samba will always grant oplock
1391 requests no matter how many clients are using the file. 
1393 By enabling this option on all read-only shares or shares that you know
1394 will only be accessed from one client at a time you will see a big
1395 performance improvement on many operations. If you enable this option
1396 on shares where multiple clients may be accessing the files read-write
1397 at the same time you can get data corruption. Use this option
1398 carefully! 
1400 It is generally much better to use the real oplock support except for
1401 physically read-only media such as CDROMs.
1403 This option is disabled by default.
1405 .SS follow symlinks (S)
1407 This parameter allows the Samba administrator to stop smbd from
1408 following symbolic links in a particular share. Setting this
1409 parameter to "No" prevents any file or directory that is a 
1410 symbolic link from being followed (the user will get an error).
1411 This option is very useful to stop users from adding a symbolic
1412 link to /etc/pasword in their home directory for instance.
1413 However it will slow filename lookups down slightly.
1415 This option is enabled (ie. smbd will follow symbolic links)
1416 by default.
1418 .SS force create mode (S)
1419 This parameter specifies a set of UNIX mode bit permissions that
1420 will *always* be set on a file created by Samba. This is done
1421 by bitwise 'OR'ing these bits onto the mode bits of a file that
1422 is being created. The default for this parameter is (in octel)
1423 000. The modes in this parameter are bitwise 'OR'ed onto the
1424 file mode after the mask set in the "create mask" parameter
1425 is applied.
1427 See also the parameter "create mask" for details on masking mode
1428 bits on created files.
1430 .B Default:
1431        force create mode = 000
1433 .B Example:
1434        force create mode = 0755
1436 would force all created files to have read and execute permissions
1437 set for 'group' and 'other' as well as the read/write/execute bits 
1438 set for the 'user'.
1440 .SS force directory mode (S)
1441 This parameter specifies a set of UNIX mode bit permissions that
1442 will *always* be set on a directory created by Samba. This is done
1443 by bitwise 'OR'ing these bits onto the mode bits of a directory that
1444 is being created. The default for this parameter is (in octel)
1445 0000 which will not add any extra permission bits to a created
1446 directory. This operation is done after the mode mask in the parameter 
1447 "directory mask" is applied.
1449 See also the parameter "directory mask" for details on masking mode
1450 bits on created directories.
1452 .B Default:
1453        force directory mode = 000
1455 .B Example:
1456        force directory mode = 0755
1458 would force all created directories to have read and execute permissions
1459 set for 'group' and 'other' as well as the read/write/execute bits 
1460 set for the 'user'.
1462 .SS force group (S)
1463 This specifies a group name that all connections to this service
1464 should be made as. This may be useful for sharing files.
1466 .B Default:
1467        no forced group
1469 .B Example:
1470        force group = agroup
1472 .SS force user (S)
1473 This specifies a user name that all connections to this service
1474 should be made as. This may be useful for sharing files. You should
1475 also use it carefully as using it incorrectly can cause security
1476 problems.
1478 This user name only gets used once a connection is established. Thus
1479 clients still need to connect as a valid user and supply a valid
1480 password. Once connected, all file operations will be performed as the
1481 "forced user", not matter what username the client connected as.
1483 .B Default:
1484        no forced user
1486 .B Example:
1487        force user = auser
1489 .SS getwd cache (G)
1490 This is a tuning option. When this is enabled a cacheing algorithm will
1491 be used to reduce the time taken for getwd() calls. This can have a
1492 significant impact on performance, especially when widelinks is False.
1494 .B Default:
1495         getwd cache = No
1497 .B Example:
1498         getwd cache = Yes
1500 .SS group (S)
1501 This is an alias for "force group" and is only kept for compatibility
1502 with old versions of Samba. It may be removed in future versions.
1504 .SS guest account (S)
1505 This is a username which will be used for access to services which are
1506 specified as 'guest ok' (see below). Whatever privileges this user has
1507 will be available to any client connecting to the guest
1508 service. Typically this user will exist in the password file, but will
1509 not have a valid login. If a username is specified in a given service,
1510 the specified username overrides this one.
1512 One some systems the account "nobody" may not be able to print. Use
1513 another account in this case. You should test this by trying to log in
1514 as your guest user (perhaps by using the "su \-" command) and trying to
1515 print using
1516 .BR lpr .
1518 Note that as of version 1.9 of Samba this option may be set
1519 differently for each service.
1521 .B Default:
1522         specified at compile time
1524 .B Example:
1525         guest account = nobody
1526 .SS guest ok (S)
1528 .B public.
1529 .SS guest only (S)
1530 If this parameter is 'yes' for a service, then only guest connections to the
1531 service are permitted. This parameter will have no affect if "guest ok" or
1532 "public" is not set for the service.
1534 See the section below on user/password validation for more information about
1535 this option.
1537 .B Default:
1538         guest only = no
1540 .B Example:
1541         guest only = yes
1542 .SS hide dot files (S)
1543 This is a boolean parameter that controls whether files starting with
1544 a dot appear as hidden files.
1546 .B Default:
1547         hide dot files = yes
1549 .B Example:
1550         hide dot files = no
1553 .SS hide files(S)
1554 This is a list of files or directories that are not visible but are
1555 accessible.  The DOS 'hidden' attribute is applied to any files or
1556 directories that match.
1558 Each entry in the list must be separated by a "/", which allows spaces
1559 to be included in the entry.  '*' and '?' can be used to specify multiple 
1560 files or directories as in DOS wildcards.
1562 Each entry must be a unix path, not a DOS path and must not include the 
1563 unix directory separator "/".
1565 Note that the case sensitivity option is applicable in hiding files.
1567 Setting this parameter will affect the performance of Samba, as
1568 it will be forced to check all files and directories for a match
1569 as they are scanned.
1571 See also "hide dot files", "veto files" and "case sensitive"
1573 .B Default
1574         No files or directories are hidden by this option (dot files are
1575     hidden by default because of the "hide dot files" option).
1577 .B Example
1578         hide files = /.*/DesktopFolderDB/TrashFor%m/resource.frk/
1580 The above example is based on files that the Macintosh client (DAVE)
1581 creates for internal use, and also still hides all files beginning with
1582 a dot.
1584 .SS homedir map (G)
1585 If "nis homedir" is true, this parameter specifies the NIS (or YP) map
1586 from which the server for the user's home directory should be extracted.
1587 At present, only the Sun auto.home map format is understood. The form of
1588 the map is:
1590 username        server:/some/file/system
1592 and the program will extract the servername from before the first ':'.
1593 There should probably be a better parsing system that copes with different
1594 map formats and also Amd (another automounter) maps.
1596 NB: The -DNETGROUP option is required in the Makefile for option to work
1597 and on some architectures the line -lrpcsvc needs to be added to the
1598 LIBSM variable. This is required for Solaris 2, FreeBSD and HPUX.
1600 See also "nis homedir"
1602 .B Default:
1603         homedir map = auto.home
1605 .B Example:
1606         homedir map = amd.homedir
1607 .SS hosts allow (S)
1609 .B allow hosts.
1610 .SS hosts deny (S)
1612 .B deny hosts.
1614 .SS hosts equiv (G)
1615 If this global parameter is a non-null string, it specifies the name of
1616 a file to read for the names of hosts and users who will be allowed access
1617 without specifying a password.
1619 This is not be confused with 
1620 .B allow hosts
1621 which is about hosts access to services and is more useful for guest services.
1622 .B hosts equiv
1623 may be useful for NT clients which will not supply passwords to samba.
1625 NOTE: The use of hosts.equiv can be a major security hole. This is
1626 because you are trusting the PC to supply the correct username. It is
1627 very easy to get a PC to supply a false username. I recommend that the
1628 hosts.equiv option be only used if you really know what you are doing,
1629 or perhaps on a home network where you trust your wife and kids :-)
1631 .B Default
1632         No host equivalences
1634 .B Example
1635         hosts equiv = /etc/hosts.equiv
1637 .SS include (G)
1639 This allows you to include one config file inside another.  The file is
1640 included literally, as though typed in place.
1642 It takes the standard substitutions, except %u, %P and %S
1644 .SS interfaces (G)
1646 This option allows you to setup multiple network interfaces, so that
1647 Samba can properly handle browsing on all interfaces.
1649 The option takes a list of ip/netmask pairs. The netmask may either be
1650 a bitmask, or a bitlength. 
1652 For example, the following line:
1654 interfaces = 192.168.2.10/24 192.168.3.10/24
1656 would configure two network interfaces with IP addresses 192.168.2.10
1657 and 192.168.3.10. The netmasks of both interfaces would be set to
1658 255.255.255.0. 
1660 You could produce an equivalent result by using:
1662 interfaces = 192.168.2.10/255.255.255.0 192.168.3.10/255.255.255.0
1664 if you prefer that format.
1666 If this option is not set then Samba will attempt to find a primary
1667 interface, but won't attempt to configure more than one interface.
1669 .SS invalid users (S)
1670 This is a list of users that should not be allowed to login to this
1671 service. This is really a "paranoid" check to absolutely ensure an
1672 improper setting does not breach your security.
1674 A name starting with @ is interpreted as a UNIX group.
1676 The current servicename is substituted for %S. This is useful in the
1677 [homes] section.
1679 See also "valid users"
1681 .B Default
1682         No invalid users
1684 .B Example
1685         invalid users = root fred admin @wheel
1687 .SS keepalive (G)
1688 The value of the parameter (an integer) represents the number of seconds 
1689 between 'keepalive' packets. If this parameter is zero, no keepalive packets
1690 will be sent. Keepalive packets, if sent, allow the server to tell whether a
1691 client is still present and responding.
1693 .B Default:
1694         keep alive = 300
1696 .B Example:
1697         keep alive = 60
1699 .SS lm announce (G)
1701 This parameter determines if Samba will produce Lanman announce
1702 broadcasts that are needed by OS/2 clients in order for them to
1703 see the Samba server in their browse list. This parameter can
1704 have three values, true, false, or auto. The default is auto.
1705 If set to False Samba will never produce these broadcasts. If
1706 set to true Samba will produce Lanman announce broadcasts at
1707 a frequency set by the parameter 'lm interval'. If set to auto
1708 Samba will not send Lanman announce broadcasts by default but
1709 will listen for them. If it hears such a broadcast on the wire
1710 it will then start sending them at a frequency set by the parameter 
1711 'lm interval'.
1713 See also "lm interval".
1715 .B Default:
1716        lm announce = auto
1718 .B Example:
1719        lm announce = true
1721 .SS lm interval (G)
1723 If Samba is set to produce Lanman announce broadcasts needed
1724 by OS/2 clients (see the "lm announce" parameter) this parameter
1725 defines the frequency in seconds with which they will be made.
1726 If this is set to zero then no Lanman announcements will be
1727 made despite the setting of the "lm announce" parameter.
1729 See also "lm announce".
1731 .B Default:
1732         lm interval = 60
1734 .B Example:
1735         lm interval = 120
1737 .SS load printers (G)
1738 A boolean variable that controls whether all printers in the printcap
1739 will be loaded for browsing by default. 
1741 .B Default:
1742         load printers = yes
1744 .B Example:
1745         load printers = no
1747 .SS local master (G)
1748 This option allows the nmbd to become a local master browser on a
1749 subnet. If set to False then nmbd will not attempt to become a local
1750 master browser on a subnet and will also lose in all browsing elections. 
1751 By default this value is set to true. Setting this value to true doesn't 
1752 mean that Samba will become the local master browser on a subnet, just 
1753 that the nmbd will participate in elections for local master browser.
1755 .B Default:
1756         local master = yes
1758 .SS lock directory (G)
1759 This option specifies the directory where lock files will be placed.
1760 The lock files are used to implement the "max connections" option.
1762 .B Default:
1763         lock directory = /tmp/samba
1765 .B Example: 
1766         lock directory = /usr/local/samba/var/locks
1768 .SS locking (S)
1769 This controls whether or not locking will be performed by the server in 
1770 response to lock requests from the client.
1772 If "locking = no", all lock and unlock requests will appear to succeed and 
1773 all lock queries will indicate that the queried lock is clear.
1775 If "locking = yes", real locking will be performed by the server.
1777 This option may be particularly useful for read-only filesystems which
1778 do not need locking (such as cdrom drives).
1780 Be careful about disabling locking either globally or in a specific
1781 service, as lack of locking may result in data corruption.
1783 .B Default:
1784         locking = yes
1786 .B Example:
1787         locking = no
1789 .SS log file (G)
1791 This options allows you to override the name of the Samba log file
1792 (also known as the debug file).
1794 This option takes the standard substitutions, allowing you to have
1795 separate log files for each user or machine.
1797 .B Example:
1798         log file = /usr/local/samba/var/log.%m
1800 .SS log level (G)
1801 see "debug level"
1803 .SS logon drive (G)
1805 This parameter specifies the local path to which the home directory
1806 will be connected (see "logon home") and is only used by NT Workstations.
1808 .B Example:
1809         logon drive = h:
1811 .SS logon home (G)
1813 This parameter specifies the home directory location when a Win95 or
1814 NT Workstation logs into a Samba PDC.  It allows you to do "NET USE
1815 H: /HOME" from a command prompt, for example.
1818 This option takes the standard substitutions, allowing you to have
1819 separate logon scripts for each user or machine.
1821 .B Example:
1822         logon home = "\\\\remote_smb_server\\%U"
1824 .B Default:
1825         logon home = "\\\\%N\\%U"
1827 .SS logon path (G)
1829 This parameter specifies the home directory where roaming profiles 
1830 (USER.DAT / USER.MAN files for Windows 95) are stored.
1832 This option takes the standard substitutions, allowing you to have
1833 separate logon scripts for each user or machine.  It also specifies
1834 the directory from which the "desktop", "start menu", "nethood" and
1835 "programs" folders, and their contents, are loaded and displayed
1836 on your Windows 95 client.
1838 The share and the path must be readable by the user for the preferences
1839 and directories to be loaded onto the Windows 95 client.  The share
1840 must be writeable when the logs in for the first time, in order that
1841 the Windows 95 client can create the user.dat and other directories.
1843 Thereafter, the directories and any of contents can, if required,
1844 be made read-only.  It is not adviseable that the USER.DAT file be made
1845 read-only - rename it to USER.MAN to achieve the desired effect
1846 (a MANdatory profile).
1848 Windows clients can sometimes maintain a connection to the [homes]
1849 share, even though there is no user logged in.  Therefore, it is
1850 vital that the logon path does not include a reference to the
1851 homes share (i.e \\\\%N\\HOMES\profile_path will cause problems).
1854 This option takes the standard substitutions, allowing you to have
1855 separate logon scripts for each user or machine.
1857 .B Default:
1858         logon path = \\\\%N\\%U\\profile
1860 .B Example:
1861         logon path = \\\\PROFILESERVER\\HOME_DIR\\%U\\PROFILE
1863 .SS logon script (G)
1865 This parameter specifies the batch file (.bat) or NT command file (.cmd)
1866 to be downloaded and run on a machine when a user successfully logs in.
1867 The file must contain the DOS style cr/lf line endings.  Using a DOS-style
1868 editor to create the file is recommended.
1870 The script must be a relative path to the [netlogon] service.  If the
1871 [netlogon] service specifies a path of /usr/local/samba/netlogon, and
1872 logon script = STARTUP.BAT, then file that will be downloaded is:
1874 .B /usr/local/samba/netlogon/STARTUP.BAT
1876 The contents of the batch file is entirely your choice.  A suggested
1877 command would be to add NET TIME \\\\SERVER /SET /YES, to force every
1878 machine to synchronise clocks with the same time server.  Another use
1879 would be to add NET USE U: \\\\SERVER\\UTILS for commonly used utilities,
1880 or NET USE Q: \\\\SERVER\\ISO9001_QA.
1882 Note that it is particularly important not to allow write access to
1883 the [netlogon] share, or to grant users write permission on the
1884 batch files in a secure environment, as this would allow the batch
1885 files to be arbitrarily modified.
1888 This option takes the standard substitutions, allowing you to have
1889 separate logon scripts for each user or machine.
1891 .B Example:
1892         logon script = scripts/%U.bat
1894 .SS lppause command (S)
1895 This parameter specifies the command to be executed on the server host in
1896 order to stop printing or spooling a specific print job.
1898 This command should be a program or script which takes a printer name and
1899 job number to pause the print job. Currently I don't know of any print
1900 spooler system that can do this with a simple option, except for the PPR
1901 system from Trinity College (ppr\-dist.trincoll.edu/pub/ppr). One way
1902 of implementing this is by using job priorities, where jobs having a too
1903 low priority won't be sent to the printer. See also the
1904 .B lppause
1905 command.
1907 If a %p is given then the printername is put in its place. A %j is
1908 replaced with the job number (an integer).
1909 On HPUX (see printing=hpux), if the -p%p option is added to the lpq
1910 command, the job will show up with the correct status, i.e. if the job
1911 priority is lower than the set fence priority it will have the PAUSED
1912 status, whereas if the priority is equal or higher it will have the
1913 SPOOLED or PRINTING status.
1915 Note that it is good practice to include the absolute path in the lppause
1916 command as the PATH may not be available to the server.
1918 .B Default:
1919         Currently no default value is given to this string
1921 .B Example for HPUX:
1922         lppause command = /usr/bin/lpalt %p-%j -p0
1924 .SS lpq cache time (G)
1926 This controls how long lpq info will be cached for to prevent the lpq
1927 command being called too often. A separate cache is kept for each
1928 variation of the lpq command used by the system, so if you use
1929 different lpq commands for different users then they won't share cache
1930 information.
1932 The cache files are stored in /tmp/lpq.xxxx where xxxx is a hash
1933 of the lpq command in use.
1935 The default is 10 seconds, meaning that the cached results of a
1936 previous identical lpq command will be used if the cached data is less
1937 than 10 seconds old. A large value may be advisable if your lpq
1938 command is very slow.
1940 A value of 0 will disable cacheing completely.
1942 .B Default:
1943         lpq cache time = 10
1945 .B Example:
1946         lpq cache time = 30
1948 .SS lpq command (S)
1949 This parameter specifies the command to be executed on the server host in
1950 order to obtain "lpq"-style printer status information. 
1952 This command should be a program or script which takes a printer name
1953 as its only parameter and outputs printer status information. 
1955 Currently six styles of printer status information are supported; BSD,
1956 SYSV, AIX, HPUX, QNX, LPRNG and PLP. This covers most UNIX systems. You
1957 control which type is expected using the "printing =" option.
1959 Some clients (notably Windows for Workgroups) may not correctly send the
1960 connection number for the printer they are requesting status information
1961 about. To get around this, the server reports on the first printer service
1962 connected to by the client. This only happens if the connection number sent
1963 is invalid.
1965 If a %p is given then the printername is put in its place. Otherwise
1966 it is placed at the end of the command.
1968 Note that it is good practice to include the absolute path in the lpq
1969 command as the PATH may not be available to the server.
1971 .B Default:
1972         depends on the setting of "printing ="
1974 .B Example:
1975         lpq command = /usr/bin/lpq %p
1977 .SS lpresume command (S)
1978 This parameter specifies the command to be executed on the server host in
1979 order to restart or continue printing or spooling a specific print job.
1981 This command should be a program or script which takes a printer name and
1982 job number to resume the print job. See also the lppause command.
1984 If a %p is given then the printername is put in its place. A %j is
1985 replaced with the job number (an integer).
1987 Note that it is good practice to include the absolute path in the lpresume
1988 command as the PATH may not be available to the server.
1990 .B Default:
1991         Currently no default value is given to this string
1993 .B Example for HPUX:
1994         lpresume command = /usr/bin/lpalt %p-%j -p2
1996 .SS lprm command (S)
1997 This parameter specifies the command to be executed on the server host in
1998 order to delete a print job.
2000 This command should be a program or script which takes a printer name
2001 and job number, and deletes the print job.
2003 Currently seven styles of printer control are supported; BSD, SYSV, AIX
2004 HPUX, QNX, LPRNG and PLP. This covers most UNIX systems. You control
2005 which type is expected using the "printing =" option.
2007 If a %p is given then the printername is put in its place. A %j is
2008 replaced with the job number (an integer).
2010 Note that it is good practice to include the absolute path in the lprm
2011 command as the PATH may not be available to the server.
2013 .B Default:
2014         depends on the setting of "printing ="
2016 .B Example 1:
2017         lprm command = /usr/bin/lprm -P%p %j
2019 .B Example 2:
2020         lprm command = /usr/bin/cancel %p-%j
2022 .SS magic output (S)
2023 This parameter specifies the name of a file which will contain output
2024 created by a magic script (see
2025 .I magic script
2026 below).
2028 Warning: If two clients use the same magic script in the same directory the
2029 output file content is undefined.
2030 .B Default:
2031         magic output = <magic script name>.out
2033 .B Example:
2034         magic output = myfile.txt
2035 .SS magic script (S)
2036 This parameter specifies the name of a file which, if opened, will be
2037 executed by the server when the file is closed. This allows a UNIX script
2038 to be sent to the Samba host and executed on behalf of the connected user.
2040 Scripts executed in this way will be deleted upon completion, permissions
2041 permitting.
2043 If the script generates output, output will be sent to the file specified by
2045 .I magic output
2046 parameter (see above).
2048 Note that some shells are unable to interpret scripts containing
2049 carriage-return-linefeed instead of linefeed as the end-of-line
2050 marker. Magic scripts must be executable "as is" on the host, which
2051 for some hosts and some shells will require filtering at the DOS end.
2053 Magic scripts are EXPERIMENTAL and should NOT be relied upon.
2055 .B Default:
2056         None. Magic scripts disabled.
2058 .B Example:
2059         magic script = user.csh
2061 .SS mangle case (S)
2063 See the section on "NAME MANGLING"
2065 .SS mangled map (S)
2066 This is for those who want to directly map UNIX file names which are
2067 not representable on DOS.  The mangling of names is not always what is
2068 needed.  In particular you may have documents with file extensions
2069 that differ between DOS and UNIX. For example, under UNIX it is common
2070 to use .html for HTML files, whereas under DOS .htm is more commonly
2071 used.
2073 So to map 'html' to 'htm' you put:
2075   mangled map = (*.html *.htm)
2077 One very useful case is to remove the annoying ;1 off the ends of
2078 filenames on some CDROMS (only visible under some UNIXes). To do this
2079 use a map of (*;1 *)
2081 .B default:
2082         no mangled map
2084 .B Example:
2085         mangled map = (*;1 *)
2087 .SS mangled names (S)
2088 This controls whether non-DOS names under UNIX should be mapped to
2089 DOS-compatible names ("mangled") and made visible, or whether non-DOS names
2090 should simply be ignored.
2092 See the section on "NAME MANGLING" for details on how to control the
2093 mangling process.
2095 If mangling is used then the mangling algorithm is as follows:
2097 - the first (up to) five alphanumeric characters before the rightmost dot of
2098 the filename are preserved, forced to upper case, and appear as the first (up
2099 to) five characters of the mangled name.
2101 - a tilde ("~") is appended to the first part of the mangled name, followed
2102 by a two-character unique sequence, based on the original root name 
2103 (i.e., the original filename minus its final extension). The final
2104 extension is included in the hash calculation only if it contains any upper
2105 case characters or is longer than three characters.
2107 Note that the character to use may be specified using the "mangling
2108 char" option, if you don't like ~.
2110 - the first three alphanumeric characters of the final extension are preserved,
2111 forced to upper case and appear as the extension of the mangled name. The 
2112 final extension is defined as that part of the original filename after the
2113 rightmost dot. If there are no dots in the filename, the mangled name will
2114 have no extension (except in the case of hidden files - see below).
2116 - files whose UNIX name begins with a dot will be presented as DOS hidden
2117 files. The mangled name will be created as for other filenames, but with the
2118 leading dot removed and "___" as its extension regardless of actual original
2119 extension (that's three underscores).
2122 The two-digit hash value consists of upper case alphanumeric characters.
2124 This algorithm can cause name collisions only if files in a directory share
2125 the same first five alphanumeric characters. The probability of such a clash 
2126 is 1/1300.
2128 The name mangling (if enabled) allows a file to be copied between UNIX
2129 directories from DOS while retaining the long UNIX filename. UNIX files can
2130 be renamed to a new extension from DOS and will retain the same basename. 
2131 Mangled names do not change between sessions.
2133 .B Default:
2134         mangled names = yes
2136 .B Example:
2137         mangled names = no
2138 .SS mangling char (S)
2139 This controls what character is used as the "magic" character in name
2140 mangling. The default is a ~ but this may interfere with some
2141 software. Use this option to set it to whatever you prefer.
2143 .B Default:
2144         mangling char = ~
2146 .B Example:
2147         mangling char = ^
2149 .SS mangled stack (G)
2150 This parameter controls the number of mangled names that should be cached in
2151 the Samba server.
2153 This stack is a list of recently mangled base names (extensions are only
2154 maintained if they are longer than 3 characters or contains upper case
2155 characters).
2157 The larger this value, the more likely it is that mangled names can be
2158 successfully converted to correct long UNIX names. However, large stack
2159 sizes will slow most directory access. Smaller stacks save memory in the
2160 server (each stack element costs 256 bytes).
2162 It is not possible to absolutely guarantee correct long file names, so
2163 be prepared for some surprises!
2165 .B Default:
2166         mangled stack = 50
2168 .B Example:
2169         mangled stack = 100
2171 .SS map archive (S)
2172 This controls whether the DOS archive attribute should be mapped to the
2173 UNIX owner execute bit.  The DOS archive bit is set when a file has been modified
2174 since its last backup.  One motivation for this option it to keep Samba/your
2175 PC from making any file it touches from becoming executable under UNIX.
2176 This can be quite annoying for shared source code, documents,  etc...
2178 Note that this requires the 'create mask' to be set such that owner
2179 execute bit is not masked out (ie. it must include 100). See the 
2180 parameter "create mask" for details.
2182 .B Default:
2183       map archive = yes
2185 .B Example:
2186       map archive = no
2188 .SS map hidden (S)
2189 This controls whether DOS style hidden files should be mapped to the
2190 UNIX world execute bit.
2192 Note that this requires the 'create mask' to be set such that the world
2193 execute bit is not masked out (ie. it must include 001). 
2194 See the parameter "create mask" for details.
2196 .B Default:
2197         map hidden = no
2199 .B Example:
2200         map hidden = yes
2201 .SS map system (S)
2202 This controls whether DOS style system files should be mapped to the
2203 UNIX group execute bit.
2205 Note that this requires the 'create mask' to be set such that the group
2206 execute bit is not masked out (ie. it must include 010). See the parameter 
2207 "create mask" for details.
2209 .B Default:
2210         map system = no
2212 .B Example:
2213         map system = yes
2214 .SS max connections (S)
2215 This option allows the number of simultaneous connections to a
2216 service to be limited. If "max connections" is greater than 0 then
2217 connections will be refused if this number of connections to the
2218 service are already open. A value of zero mean an unlimited number of
2219 connections may be made.
2221 Record lock files are used to implement this feature. The lock files
2222 will be stored in the directory specified by the "lock directory" option.
2224 .B Default:
2225         max connections = 0
2227 .B Example:
2228         max connections = 10
2230 .SS max disk size (G)
2231 This option allows you to put an upper limit on the apparent size of
2232 disks. If you set this option to 100 then all shares will appear to be
2233 not larger than 100 MB in size.
2235 Note that this option does not limit the amount of data you can put on
2236 the disk. In the above case you could still store much more than 100
2237 MB on the disk, but if a client ever asks for the amount of free disk
2238 space or the total disk size then the result will be bounded by the
2239 amount specified in "max disk size".
2241 This option is primarily useful to work around bugs in some pieces of
2242 software that can't handle very large disks, particularly disks over
2243 1GB in size.
2245 A "max disk size" of 0 means no limit.
2247 .B Default:
2248         max disk size = 0
2250 .B Example:
2251         max disk size = 1000
2253 .SS max log size (G)
2255 This option (an integer in kilobytes) specifies the max size the log
2256 file should grow to. Samba periodically checks the size and if it is
2257 exceeded it will rename the file, adding a .old extension.
2259 A size of 0 means no limit.
2261 .B Default:
2262         max log size = 5000
2264 .B Example:
2265         max log size = 1000
2267 .SS max mux (G)
2269 This option controls the maximum number of outstanding simultaneous SMB 
2270 operations that samba tells the client it will allow. You should never need 
2271 to set this parameter.
2273 .B Default:
2274         max mux = 50
2276 .SS max packet (G)
2278 A synonym for this parameter is 'packet size'.
2280 .SS max ttl (G)
2282 This option tells nmbd what the default 'time to live' of NetBIOS
2283 names should be (in seconds) when nmbd is requesting a name using
2284 either a broadcast or from a WINS server. You should never need to 
2285 change this parameter.
2287 .B Default:
2288         max ttl = 14400
2290 .SS max wins ttl (G)
2292 This option tells nmbd when acting as a WINS server (wins support = true)
2293 what the maximum 'time to live' of NetBIOS names that nmbd will grant will
2294 be (in seconds). You should never need to change this parameter.     
2295 The default is 3 days (259200 seconds).
2297 .B Default:
2298         max wins ttl = 259200
2300 .SS max xmit (G)
2302 This option controls the maximum packet size that will be negotiated
2303 by Samba. The default is 65535, which is the maximum. In some cases
2304 you may find you get better performance with a smaller value. A value
2305 below 2048 is likely to cause problems.
2307 .B Default:
2308         max xmit = 65535
2310 .B Example:
2311         max xmit = 8192
2313 .SS message command (G)
2315 This specifies what command to run when the server receives a WinPopup
2316 style message.
2318 This would normally be a command that would deliver the message
2319 somehow. How this is to be done is up to your imagination.
2321 What I use is:
2323    message command = csh -c 'xedit %s;rm %s' &
2325 This delivers the message using xedit, then removes it
2326 afterwards. NOTE THAT IT IS VERY IMPORTANT THAT THIS COMMAND RETURN
2327 IMMEDIATELY. That's why I have the & on the end. If it doesn't return
2328 immediately then your PCs may freeze when sending messages (they
2329 should recover after 30secs, hopefully).
2331 All messages are delivered as the global guest user. The command takes
2332 the standard substitutions, although %u won't work (%U may be better
2333 in this case).
2335 Apart from the standard substitutions, some additional ones apply. In
2336 particular:
2338 %s = the filename containing the message
2340 %t = the destination that the message was sent to (probably the server
2341 name)
2343 %f = who the message is from
2345 You could make this command send mail, or whatever else takes your
2346 fancy. Please let me know of any really interesting ideas you have.
2348 Here's a way of sending the messages as mail to root:
2350 message command = /bin/mail -s 'message from %f on %m' root < %s; rm %s
2352 If you don't have a message command then the message won't be
2353 delivered and Samba will tell the sender there was an
2354 error. Unfortunately WfWg totally ignores the error code and carries
2355 on regardless, saying that the message was delivered.
2357 If you want to silently delete it then try "message command = rm %s".
2359 For the really adventurous, try something like this:
2361 message command = csh -c 'csh < %s |& /usr/local/samba/bin/smbclient \e
2362                   -M %m; rm %s' &
2364 this would execute the command as a script on the server, then give
2365 them the result in a WinPopup message. Note that this could cause a
2366 loop if you send a message from the server using smbclient! You better
2367 wrap the above in a script that checks for this :-)
2369 .B Default:
2370         no message command
2372 .B Example:
2373         message command = csh -c 'xedit %s;rm %s' &
2375 .SS min print space (S)
2377 This sets the minimum amount of free disk space that must be available
2378 before a user will be able to spool a print job. It is specified in
2379 kilobytes. The default is 0, which means no limit.
2381 .B Default:
2382         min print space = 0
2384 .B Example:
2385         min print space = 2000
2387 .SS min wins ttl (G)
2389 This option tells nmbd when acting as a WINS server (wins support = true)
2390 what the minimum 'time to live' of NetBIOS names that nmbd will grant will
2391 be (in seconds). You should never need to change this parameter.
2392 The default is 6 hours (21600 seconds).
2394 .B Default:
2395         min wins ttl = 21600
2397 .SS name resolve order (G)
2399 This option is used by the programs smbd, nmbd and smbclient to determine
2400 what naming services and in what order to resolve host names to IP addresses.
2401 This option is most useful in smbclient. The option takes a space separated
2402 string of different name resolution options. These are "lmhosts", "host",
2403 "wins" and "bcast". They cause names to be resolved as follows :
2405 lmhosts : Lookup an IP address in the Samba lmhosts file.
2406 host    : Do a standard host name to IP address resolution, using the
2407           system /etc/hosts, NIS, or DNS lookups. This method of name
2408           resolution is operating system depended (for instance on Solaris
2409           this may be controlled by the /etc/nsswitch.conf file).
2410 wins    : Query a name with the IP address listed in the "wins server ="
2411           parameter. If no WINS server has been specified this method will
2412           be ignored.
2413 bcast   : Do a broadcast on each of the known local interfaces listed in
2414           the "interfaces =" parameter. This is the least reliable of the
2415           name resolution methods as it depends on the target host being
2416           on a locally connected subnet.
2418 The default order is lmhosts, host, wins, bcast and these name resolution
2419 methods will be attempted in this order.
2421 This option was first introduced in Samba 1.9.18p4.
2423 .B Default:
2424         name resolve order = lmhosts host wins bcast
2426 .Example:
2427         name resolve order = lmhosts bcast host
2429 This will cause the local lmhosts file to be examined first, followed
2430 by a broadcast attempt, followed by a normal system hostname lookup.
2432 .SS netbios aliases (G)
2434 This is a list of names that nmbd will advertise as additional
2435 names by which the Samba server is known. This allows one machine
2436 to appear in browse lists under multiple names. If a machine is
2437 acting as a browse server or logon server none of these names
2438 will be advertised as either browse server or logon servers, only
2439 the primary name of the machine will be advertised with these
2440 capabilities.
2442 See also 'netbios name'.
2444 .B Example:
2445    netbios aliases = TEST TEST1 TEST2
2447 .SS netbios name (G)
2449 This sets the NetBIOS name by which a Samba server is known. By
2450 default it is the same as the first component of the host's DNS name.
2451 If a machine is a browse server or logon server this name (or the
2452 first component of the hosts DNS name) will be the name that these
2453 services are advertised under.
2455 See also 'netbios aliases'.
2457 .B Example:
2458    netbios name = MYNAME
2460 .SS nis homedir (G)
2461 Get the home share server from a NIS (or YP) map. For unix systems that
2462 use an automounter, the user's home directory will often be mounted on
2463 a workstation on demand from a remote server. When the Samba logon server
2464 is not the actual home directory server, two network hops are required
2465 to access the home directory and this can be very slow especially with 
2466 writing via Samba to an NFS mounted directory. This option allows samba
2467 to return the home share as being on a different server to the logon
2468 server and as long as a samba daemon is running on the home directory 
2469 server, it will be mounted on the Samba client directly from the directory
2470 server. When Samba is returning the home share to the client, it will
2471 consult the NIS (or YP) map specified in "homedir map" and return the
2472 server listed there.
2474 .B Default:
2475         nis homedir = false
2477 .B Example:
2478         nis homedir = true
2480 .SS networkstation user login (G)
2481 This global parameter (new for 1.9.18p3) affects server level security.
2482 With this set (recommended) samba will do a full NetWkstaUserLogon to
2483 confirm that the client really should have login rights. This can cause
2484 problems with machines in trust relationships in which case you can
2485 disable it here, but be warned, we have heard that some NT machines
2486 will then allow anyone in with any password! Make sure you test it.
2488 .B Default:
2489         networkstation user login = yes
2491 .B Example:
2492         networkstation user login = no
2494 .SS null passwords (G)
2495 Allow or disallow access to accounts that have null passwords. 
2497 .B Default:
2498         null passwords = no
2500 .B Example:
2501         null passwords = yes
2503 .SS only guest (S)
2504 A synonym for this command is 'guest only'.
2506 .SS only user (S)
2507 This is a boolean option that controls whether connections with
2508 usernames not in the user= list will be allowed. By default this
2509 option is disabled so a client can supply a username to be used by
2510 the server.
2512 Note that this also means Samba won't try to deduce usernames from the
2513 service name. This can be annoying for the [homes] section. To get
2514 around this you could use "user = %S" which means your "user" list
2515 will be just the service name, which for home directories is the name
2516 of the user.
2518 .B Default: 
2519         only user = False
2521 .B Example: 
2522         only user = True
2524 .SS oplocks (S)
2525 This boolean option tells smbd whether to issue oplocks (opportunistic
2526 locks) to file open requests on this share. The oplock code was introduced in
2527 Samba 1.9.18 and can dramatically (approx 30% or more) improve the speed
2528 of access to files on Samba servers. It allows the clients to agressively
2529 cache files locally and you may want to disable this option for unreliable
2530 network environments (it is turned on by default in Windows NT Servers).
2531 For more information see the file Speed.txt in the Samba docs/ directory.
2533 Oplocks may be selectively turned off on certain files on a per share basis.
2534 See the 'veto oplock files' parameter.
2536 .B Default:
2537     oplocks = True
2539 .B Example:
2540     oplocks = False
2543 .SS os level (G)
2544 This integer value controls what level Samba advertises itself as for
2545 browse elections. See BROWSING.txt for details.
2547 .SS packet size (G)
2548 The maximum transmit packet size during a raw read. This option is no
2549 longer implemented as of version 1.7.00, and is kept only so old
2550 configuration files do not become invalid.
2552 .SS passwd chat (G)
2553 This string controls the "chat" conversation that takes places
2554 between smbd and the local password changing program to change the
2555 users password. The string describes a sequence of response-receive
2556 pairs that smbd uses to determine what to send to the passwd program
2557 and what to expect back. If the expected output is not received then
2558 the password is not changed.
2560 This chat sequence is often quite site specific, depending on what
2561 local methods are used for password control (such as NIS+ etc).
2563 The string can contain the macros %o and %n which are substituted for
2564 the old and new passwords respectively. It can also contain the
2565 standard macros \en \er \et and \es to give line-feed, carriage-return,
2566 tab and space.
2568 The string can also contain a * which matches any sequence of
2569 characters.
2571 Double quotes can be used to collect strings with spaces in them into
2572 a single string.
2574 If the send string in any part of the chat sequence is a fullstop "."
2575 then no string is sent. Similarly, is the expect string is a fullstop
2576 then no string is expected.
2578 .B Example:
2579         passwd chat = "*Enter OLD password*" %o\en "*Enter NEW password*" %n\en \e
2580                        "*Reenter NEW password*" %n\en "*Password changed*"
2583 .B Default:
2584        passwd chat = *old*password* %o\en *new*password* %n\en *new*password* %n\en *changed*
2586 .SS passwd program (G)
2587 The name of a program that can be used to set user passwords.
2589 This is only necessary if you have enabled remote password changing at
2590 compile time. Any occurrences of %u will be replaced with the user
2591 name.
2593 Also note that many passwd programs insist in "reasonable" passwords,
2594 such as a minimum length, or the inclusion of mixed case chars and
2595 digits. This can pose a problem as some clients (such as Windows for
2596 Workgroups) uppercase the password before sending it. 
2598 .B Default:
2599         passwd program = /bin/passwd
2601 .B Example:
2602         passwd program = /sbin/passwd %u
2604 .SS password level (G)
2605 Some client/server combinations have difficulty with mixed-case passwords.
2606 One offending client is Windows for Workgroups, which for some reason forces
2607 passwords to upper case when using the LANMAN1 protocol, but leaves them alone
2608 when using COREPLUS!
2610 This parameter defines the maximum number of characters that may be upper case
2611 in passwords.
2613 For example, say the password given was "FRED". If
2614 .B password level
2615 is set to 1 (one), the following combinations would be tried if "FRED" failed:
2616 "Fred", "fred", "fRed", "frEd", "freD". If
2617 .B password level was set to 2 (two), the following combinations would also be
2618 tried: "FRed", "FrEd", "FreD", "fREd", "fReD", "frED". And so on.
2620 The higher value this parameter is set to the more likely it is that a mixed
2621 case password will be matched against a single case password. However, you
2622 should be aware that use of this parameter reduces security and increases the
2623 time taken to process a new connection.
2625 A value of zero will cause only two attempts to be made - the password as is
2626 and the password in all-lower case.
2628 If you find the connections are taking too long with this option then
2629 you probably have a slow crypt() routine. Samba now comes with a fast
2630 "ufc crypt" that you can select in the Makefile. You should also make
2631 sure the PASSWORD_LENGTH option is correct for your system in local.h
2632 and includes.h. On most systems only the first 8 chars of a password
2633 are significant so PASSWORD_LENGTH should be 8, but on some longer
2634 passwords are significant. The includes.h file tries to select the
2635 right length for your system.
2637 .B Default:
2638         password level = 0
2640 .B Example:
2641         password level = 4
2643 .SS password server (G)
2645 By specifying the name of another SMB server (such as a WinNT box)
2646 with this option, and using "security = server" you can get Samba to
2647 do all its username/password validation via a remote server.
2649 This options sets the name of the password server to use. It must be a
2650 netbios name, so if the machine's netbios name is different from its
2651 internet name then you may have to add its netbios name to
2652 /etc/hosts.
2654 Note that with Samba 1.9.18p4 and above the name of the password
2655 server is looked up using the parameter "name resolve order=" and
2656 so may resolved by any method and order described in that parameter.
2658 The password server much be a machine capable of using the "LM1.2X002"
2659 or the "LM NT 0.12" protocol, and it must be in user level security
2660 mode. 
2662 NOTE: Using a password server means your UNIX box (running Samba) is
2663 only as secure as your password server. DO NOT CHOOSE A PASSWORD
2664 SERVER THAT YOU DON'T COMPLETELY TRUST.
2666 Never point a Samba server at itself for password serving. This will
2667 cause a loop and could lock up your Samba server!
2669 The name of the password server takes the standard substitutions, but
2670 probably the only useful one is %m, which means the Samba server will
2671 use the incoming client as the password server. If you use this then
2672 you better trust your clients, and you better restrict them with hosts
2673 allow!
2675 If you list several hosts in the "password server" option then smbd
2676 will try each in turn till it finds one that responds. This is useful
2677 in case your primary server goes down.
2679 If you are using a WindowsNT server as your password server then you
2680 will have to ensure that your users are able to login from the Samba 
2681 server, as the network logon will appear to come from there rather
2682 than from the users workstation.
2684 .SS path (S)
2685 A synonym for this parameter is 'directory'.
2687 This parameter specifies a directory to which the user of the service is to
2688 be given access. In the case of printable services, this is where print data 
2689 will spool prior to being submitted to the host for printing.
2691 For a printable service offering guest access, the service should be readonly
2692 and the path should be world-writable and have the sticky bit set. This is not
2693 mandatory of course, but you probably won't get the results you expect if you
2694 do otherwise.
2696 Any occurrences of %u in the path will be replaced with the username
2697 that the client is connecting as. Any occurrences of %m will be
2698 replaced by the name of the machine they are connecting from. These
2699 replacements are very useful for setting up pseudo home directories
2700 for users.
2702 Note that this path will be based on 'root dir' if one was specified.
2703 .B Default:
2704         none
2706 .B Example:
2707         path = /home/fred+ 
2709 .SS postexec (S)
2711 This option specifies a command to be run whenever the service is
2712 disconnected. It takes the usual substitutions. The command may be run
2713 as the root on some systems.
2715 An interesting example may be do unmount server resources:
2717 postexec = /etc/umount /cdrom
2719 See also preexec
2721 .B Default:
2722       none (no command executed)
2724 .B Example:
2725       postexec = echo \e"%u disconnected from %S from %m (%I)\e" >> /tmp/log
2727 .SS postscript (S)
2728 This parameter forces a printer to interpret the print files as
2729 postscript. This is done by adding a %! to the start of print output. 
2731 This is most useful when you have lots of PCs that persist in putting
2732 a control-D at the start of print jobs, which then confuses your
2733 printer.
2735 .B Default: 
2736         postscript = False
2738 .B Example: 
2739         postscript = True
2741 .SS preexec (S)
2743 This option specifies a command to be run whenever the service is
2744 connected to. It takes the usual substitutions.
2746 An interesting example is to send the users a welcome message every
2747 time they log in. Maybe a message of the day? Here is an example:
2749 preexec = csh -c 'echo \e"Welcome to %S!\e" | \e
2750        /usr/local/samba/bin/smbclient -M %m -I %I' &
2752 Of course, this could get annoying after a while :-)
2754 See also postexec
2756 .B Default:
2757         none (no command executed)
2759 .B Example:
2760         preexec = echo \e"%u connected to %S from %m (%I)\e" >> /tmp/log
2762 .SS preferred master (G)
2763 This boolean parameter controls if Samba is a preferred master browser
2764 for its workgroup.
2765 If this is set to true, on startup, samba will force an election, 
2766 and it will have a slight advantage in winning the election.  
2767 It is recommended that this parameter is used in conjunction 
2768 with domain master = yes, so that samba can guarantee becoming 
2769 a domain master.  
2771 Use this option with caution, because if there are several hosts
2772 (whether samba servers, Windows 95 or NT) that are preferred master
2773 browsers on the same subnet, they will each periodically and continuously
2774 attempt to become the local master browser.  This will result in
2775 unnecessary broadcast traffic and reduced browsing capabilities.
2778 .B os level = nn
2780 .B Default:
2781         preferred master = no
2783 .SS preload
2784 This is an alias for "auto services"
2786 .SS preserve case (S)
2788 This controls if new filenames are created with the case that the
2789 client passes, or if they are forced to be the "default" case.
2791 .B Default:
2792        preserve case = no
2794 See the section on "NAME MANGLING" for a fuller discussion.
2796 .SS print command (S)
2797 After a print job has finished spooling to a service, this command will be
2798 used via a system() call to process the spool file. Typically the command 
2799 specified will submit the spool file to the host's printing subsystem, but
2800 there is no requirement that this be the case. The server will not remove the
2801 spool file, so whatever command you specify should remove the spool file when
2802 it has been processed, otherwise you will need to manually remove old spool
2803 files.
2805 The print command is simply a text string. It will be used verbatim,
2806 with two exceptions: All occurrences of "%s" will be replaced by the
2807 appropriate spool file name, and all occurrences of "%p" will be
2808 replaced by the appropriate printer name. The spool file name is
2809 generated automatically by the server, the printer name is discussed
2810 below.
2812 The full path name will be used for the filename if %s is not preceded
2813 by a /. If you don't like this (it can stuff up some lpq output) then
2814 use %f instead. Any occurrences of %f get replaced by the spool
2815 filename without the full path at the front.
2817 The print command MUST contain at least one occurrence of "%s" or %f -
2818 the "%p" is optional. At the time a job is submitted, if no printer
2819 name is supplied the "%p" will be silently removed from the printer
2820 command.
2822 If specified in the [global] section, the print command given will be used
2823 for any printable service that does not have its own print command specified.
2825 If there is neither a specified print command for a printable service nor a 
2826 global print command, spool files will be created but not processed and (most
2827 importantly) not removed.
2829 Note that printing may fail on some UNIXes from the "nobody"
2830 account. If this happens then create an alternative guest account that
2831 can print and set the "guest account" in the [global] section.
2833 You can form quite complex print commands by realising that they are
2834 just passed to a shell. For example the following will log a print
2835 job, print the file, then remove it. Note that ; is the usual
2836 separator for command in shell scripts.
2838 print command = echo Printing %s >> /tmp/print.log; lpr -P %p %s; rm %s
2840 You may have to vary this command considerably depending on how you
2841 normally print files on your system.
2843 .B Default:
2844         print command = lpr -r -P %p %s
2846 .B Example:
2847         print command = /usr/local/samba/bin/myprintscript %p %s
2848 .SS print ok (S)
2850 .B printable.
2851 .SS printable (S)
2852 A synonym for this parameter is 'print ok'.
2854 If this parameter is 'yes', then clients may open, write to and submit spool 
2855 files on the directory specified for the service.
2857 Note that a printable service will ALWAYS allow writing to the service path
2858 (user privileges permitting) via the spooling of print data. The 'read only'
2859 parameter controls only non-printing access to the resource.
2861 .B Default:
2862         printable = no
2864 .B Example:
2865         printable = yes
2867 .SS printcap name (G)
2868 This parameter may be used to override the compiled-in default printcap
2869 name used by the server (usually /etc/printcap). See the discussion of the
2870 [printers] section above for reasons why you might want to do this.
2872 On SystemV systems that use lpstat to list available printers you
2873 can use "printcap name = lpstat" to automatically obtain lists of
2874 available printers. This is the default for systems that define 
2875 SYSV at compile time in Samba (this includes most SystemV based
2876 systems). If "printcap name" is set to lpstat on these systems then
2877 Samba will launch "lpstat -v" and attempt to parse the output to
2878 obtain a printer list.
2880 A minimal printcap file would look something like this:
2882 print1|My Printer 1
2884 print2|My Printer 2
2886 print3|My Printer 3
2888 print4|My Printer 4
2890 print5|My Printer 5
2892 where the | separates aliases of a printer. The fact that the second
2893 alias has a space in it gives a hint to Samba that it's a comment.
2895 NOTE: Under AIX the default printcap name is "/etc/qconfig". Samba
2896 will assume the file is in AIX "qconfig" format if the string
2897 "/qconfig" appears in the printcap filename.
2899 .B Default:
2900         printcap name = /etc/printcap
2902 .B Example:
2903         printcap name = /etc/myprintcap
2905 .SS printer (S)
2906 A synonym for this parameter is 'printer name'.
2908 This parameter specifies the name of the printer to which print jobs spooled
2909 through a printable service will be sent.
2911 If specified in the [global] section, the printer name given will be used
2912 for any printable service that does not have its own printer name specified.
2914 .B Default:
2915         none (but may be 'lp' on many systems)
2917 .B Example:
2918         printer name = laserwriter
2920 .SS printer driver (S)
2921 This option allows you to control the string that clients receive when
2922 they ask the server for the printer driver associated with a
2923 printer. If you are using Windows95 or WindowsNT then you can use this
2924 to automate the setup of printers on your system.
2926 You need to set this parameter to the exact string (case sensitive)
2927 that describes the appropriate printer driver for your system. 
2928 If you don't know the exact string to use then you should first try
2929 with no "printer driver" option set and the client will give you a
2930 list of printer drivers. The appropriate strings are shown in a
2931 scrollbox after you have chosen the printer manufacturer.
2933 .B Example:
2934         printer driver = HP LaserJet 4L
2936 .SS printer name (S)
2938 .B printer.
2940 .SS printer driver file (G)
2941 This parameter tells Samba where the printer driver definition file,
2942 used when serving drivers to Windows 95 clients, is to be found. If
2943 this is not set, the default is :
2945 SAMBA_INSTALL_DIRECTORY/lib/printers.def
2947 This file is created from Windows 95 'msprint.def' files found on the
2948 Windows 95 client system. For more details on setting up serving of
2949 printer drivers to Windows 95 clients, see the documentation file
2950 docs/PRINTER_DRIVER.txt.
2952 .B Default:
2953     None (set in compile).
2955 .B Example:
2956     printer driver file = /usr/local/samba/printers/drivers.def
2958 Related parameters.
2959 .B printer driver location
2961 .SS printer driver location (S)
2962 This parameter tells clients of a particular printer share where
2963 to find the printer driver files for the automatic installation
2964 of drivers for Windows 95 machines. If Samba is set up to serve
2965 printer drivers to Windows 95 machines, this should be set to
2967 \e\eMACHINE\ePRINTER$
2969 Where MACHINE is the NetBIOS name of your Samba server, and PRINTER$ 
2970 is a share you set up for serving printer driver files. For more 
2971 details on setting this up see the documentation file 
2972 docs/PRINTER_DRIVER.txt.
2974 .B Default:
2975     None
2977 .B Example:
2978     printer driver location = \e\eMACHINE\ePRINTER$
2980 Related paramerers.
2981 .B printer driver file
2984 .SS printing (S)
2985 This parameters controls how printer status information is interpreted
2986 on your system, and also affects the default values for the "print
2987 command", "lpq command" and "lprm command".
2989 Currently six printing styles are supported. They are "printing =
2990 bsd", "printing = sysv", "printing = hpux", "printing = aix",
2991 "printing = qnx" and "printing = plp".
2993 To see what the defaults are for the other print commands when using
2994 these three options use the "testparm" program.
2996 As of version 1.9.18 of Samba this option can be set on a per printer basis
2998 .SS protocol (G)
2999 The value of the parameter (a string) is the highest protocol level that will
3000 be supported by the server. 
3002 Possible values are CORE, COREPLUS, LANMAN1, LANMAN2 and NT1. The relative
3003 merits of each are discussed in the README file.
3005 Normally this option should not be set as the automatic negotiation
3006 phase in the SMB protocol takes care of choosing the appropriate protocol.
3008 .B Default:
3009         protocol = NT1
3011 .B Example:
3012         protocol = LANMAN1
3013 .SS public (S)
3014 A synonym for this parameter is 'guest ok'.
3016 If this parameter is 'yes' for a service, then no password is required
3017 to connect to the service. Privileges will be those of the guest
3018 account.
3020 See the section below on user/password validation for more information about
3021 this option.
3023 .B Default:
3024         public = no
3026 .B Example:
3027         public = yes
3028 .SS read list (S)
3029 This is a list of users that are given read-only access to a
3030 service. If the connecting user is in this list then they will
3031 not be given write access, no matter what the "read only" option
3032 is set to. The list can include group names using the @group syntax.
3034 See also the "write list" option
3036 .B Default:
3037      read list =
3039 .B Example:
3040      read list = mary, @students
3042 .SS read only (S)
3044 .B writable
3046 .B write ok.
3047 Note that this is an inverted synonym for writable and write ok.
3048 .SS read prediction (G)
3049 This options enables or disables the read prediction code used to
3050 speed up reads from the server. When enabled the server will try to
3051 pre-read data from the last accessed file that was opened read-only
3052 while waiting for packets.
3054 .SS Default:
3055         read prediction = False
3057 .SS Example:
3058         read prediction = True
3059 .SS read raw (G)
3060 This parameter controls whether or not the server will support raw reads when
3061 transferring data to clients.
3063 If enabled, raw reads allow reads of 65535 bytes in one packet. This
3064 typically provides a major performance benefit.
3066 However, some clients either negotiate the allowable block size incorrectly
3067 or are incapable of supporting larger block sizes, and for these clients you
3068 may need to disable raw reads.
3070 In general this parameter should be viewed as a system tuning tool and left
3071 severely alone. See also
3072 .B write raw.
3074 .B Default:
3075         read raw = yes
3077 .B Example:
3078         read raw = no
3079 .SS read size (G)
3081 The option "read size" affects the overlap of disk reads/writes with
3082 network reads/writes. If the amount of data being transferred in
3083 several of the SMB commands (currently SMBwrite, SMBwriteX and
3084 SMBreadbraw) is larger than this value then the server begins writing
3085 the data before it has received the whole packet from the network, or
3086 in the case of SMBreadbraw, it begins writing to the network before
3087 all the data has been read from disk.
3089 This overlapping works best when the speeds of disk and network access
3090 are similar, having very little effect when the speed of one is much
3091 greater than the other.
3093 The default value is 2048, but very little experimentation has been
3094 done yet to determine the optimal value, and it is likely that the best
3095 value will vary greatly between systems anyway. A value over 65536 is
3096 pointless and will cause you to allocate memory unnecessarily.
3098 .B Default:
3099         read size = 2048
3101 .B Example:
3102         read size = 8192
3104 .SS remote announce (G)
3106 This option allows you to setup nmbd to periodically announce itself
3107 to arbitrary IP addresses with an arbitrary workgroup name. 
3109 This is useful if you want your Samba server to appear in a remote
3110 workgroup for which the normal browse propagation rules don't
3111 work. The remote workgroup can be anywhere that you can send IP
3112 packets to.
3114 For example:
3116        remote announce = 192.168.2.255/SERVERS 192.168.4.255/STAFF
3118 the above line would cause nmbd to announce itself to the two given IP
3119 addresses using the given workgroup names. If you leave out the
3120 workgroup name then the one given in the "workgroup" option is used
3121 instead. 
3123 The IP addresses you choose would normally be the broadcast addresses
3124 of the remote networks, but can also be the IP addresses of known
3125 browse masters if your network config is that stable.
3127 This option replaces similar functionality from the nmbd lmhosts file.
3129 .SS remote browse sync (G)
3131 This option allows you to setup nmbd to periodically request synchronisation
3132 of browse lists with the master browser of a samba server that is on a remote
3133 segment. This option will allow you to gain browse lists for multiple
3134 workgroups across routed networks. This is done in a manner that does not work
3135 with any non-samba servers.
3137 This is useful if you want your Samba server and all local clients
3138 to appear in a remote workgroup for which the normal browse propagation
3139 rules don't work. The remote workgroup can be anywhere that you can send IP
3140 packets to.
3142 For example:
3144        remote browse sync = 192.168.2.255 192.168.4.255
3146 the above line would cause nmbd to request the master browser on the
3147 specified subnets or addresses to synchronise their browse lists with
3148 the local server.
3150 The IP addresses you choose would normally be the broadcast addresses
3151 of the remote networks, but can also be the IP addresses of known
3152 browse masters if your network config is that stable. If a machine IP
3153 address is given Samba makes NO attempt to validate that the remote
3154 machine is available, is listening, nor that it is in fact the browse
3155 master on it's segment.
3158 .SS revalidate (S)
3160 This options controls whether Samba will allow a previously validated
3161 username/password pair to be used to attach to a share. Thus if you
3162 connect to \e\eserver\eshare1 then to \e\eserver\eshare2 it won't
3163 automatically allow the client to request connection to the second
3164 share as the same username as the first without a password.
3166 If "revalidate" is True then the client will be denied automatic
3167 access as the same username.
3169 .B Default:
3170         revalidate = False
3172 .B Example:
3173         revalidate = True
3175 .SS root (G)
3177 .B root directory.
3178 .SS root dir (G)
3180 .B root directory.
3181 .SS root directory (G)
3182 Synonyms for this parameter are 'root dir' and 'root'.
3184 The server will chroot() to this directory on startup. This is not 
3185 strictly necessary for secure operation. Even without it the server
3186 will deny access to files not in one of the service entries. It may 
3187 also check for, and deny access to, soft links to other parts of the 
3188 filesystem, or attempts to use .. in file names to access other 
3189 directories (depending on the setting of the "wide links" parameter).
3191 Adding a "root dir" entry other than "/" adds an extra level of security, 
3192 but at a price. It absolutely ensures that no access is given to files not
3193 in the sub-tree specified in the "root dir" option, *including* some files 
3194 needed for complete operation of the server. To maintain full operability
3195 of the server you will need to mirror some system files into the "root dir"
3196 tree. In particular you will need to mirror /etc/passwd (or a subset of it),
3197 and any binaries or configuration files needed for printing (if required). 
3198 The set of files that must be mirrored is operating system dependent.
3200 .B Default:
3201         root directory = /
3203 .B Example:
3204         root directory = /homes/smb
3205 .SS root postexec (S)
3207 This is the same as postexec except that the command is run as
3208 root. This is useful for unmounting filesystems (such as cdroms) after
3209 a connection is closed.
3211 .SS root preexec (S)
3213 This is the same as preexec except that the command is run as
3214 root. This is useful for mounting filesystems (such as cdroms) before
3215 a connection is finalised.
3217 .SS security (G)
3218 This option affects how clients respond to Samba.
3220 The option sets the "security mode bit" in replies to protocol negotiations
3221 to turn share level security on or off. Clients decide based on this bit 
3222 whether (and how) to transfer user and password information to the server.
3224 The default is "security=SHARE", mainly because that was the only
3225 option at one stage.
3227 The alternatives are "security = user" or "security = server". 
3229 If your PCs use usernames that are the same as their usernames on the
3230 UNIX machine then you will want to use "security = user". If you
3231 mostly use usernames that don't exist on the UNIX box then use
3232 "security = share".
3234 There is a bug in WfWg that may affect your decision. When in user
3235 level security a WfWg client will totally ignore the password you type
3236 in the "connect drive" dialog box. This makes it very difficult (if
3237 not impossible) to connect to a Samba service as anyone except the
3238 user that you are logged into WfWg as.
3240 If you use "security = server" then Samba will try to validate the
3241 username/password by passing it to another SMB server, such as an NT
3242 box. If this fails it will revert to "security = USER".
3244 See the "password server" option for more details.
3246 .B Default:
3247         security = SHARE
3249 .B Example:
3250         security = USER
3251 .SS server string (G)
3252 This controls what string will show up in the printer comment box in
3253 print manager and next to the IPC connection in "net view". It can be
3254 any string that you wish to show to your users.
3256 It also sets what will appear in browse lists next to the machine name.
3258 A %v will be replaced with the Samba version number.
3260 A %h will be replaced with the hostname.
3262 .B Default:
3263         server string = Samba %v
3265 .B Example:
3266         server string = University of GNUs Samba Server
3268 .SS set directory (S)
3269 If 'set directory = no', then users of the service may not use the setdir
3270 command to change directory.
3272 The setdir command is only implemented in the Digital Pathworks client. See the
3273 Pathworks documentation for details.
3275 .B Default:
3276         set directory = no
3278 .B Example:
3279         set directory = yes
3281 .SS shared file entries (G)
3282 This parameter has been removed (as of Samba 1.9.18 and above). The new
3283 System V shared memory code prohibits the user from allocating the
3284 share hash bucket size directly.
3286 .SS shared mem size (G)
3287 This parameter is only useful when Samba has been compiled with FAST_SHARE_MODES.
3288 It specifies the size of the shared memory (in bytes) to use between smbd 
3289 processes. You should never change this parameter unless you have studied 
3290 the source and know what you are doing. This parameter defaults to 1024
3291 multiplied by the setting of the maximum number of open files in the
3292 file local.h in the Samba source code. MAX_OPEN_FILES is normally set
3293 to 100, so this parameter defaults to 102400 bytes.
3295 .B Default
3296         shared mem size = 102400
3298 .SS smb passwd file (G)
3299 This option sets the path to the encrypted smbpasswd file. This is a *VERY
3300 DANGEROUS OPTION* if the smb.conf is user writable. By default the path
3301 to the smbpasswd file is compiled into Samba.
3303 .SS smbrun (G)
3304 This sets the full path to the smbrun binary. This defaults to the
3305 value in the Makefile.
3307 You must get this path right for many services to work correctly.
3309 .B Default:
3310 taken from Makefile
3312 .B Example:
3313         smbrun = /usr/local/samba/bin/smbrun
3315 .SS share modes (S)
3317 This enables or disables the honouring of the "share modes" during a
3318 file open. These modes are used by clients to gain exclusive read or
3319 write access to a file. 
3321 These open modes are not directly supported by UNIX, so they are
3322 simulated using lock files in the "lock directory". The "lock
3323 directory" specified in smb.conf must be readable by all users.
3325 The share modes that are enabled by this option are DENY_DOS,
3326 DENY_ALL, DENY_READ, DENY_WRITE, DENY_NONE and DENY_FCB.
3328 Enabling this option gives full share compatibility but may cost a bit
3329 of processing time on the UNIX server. They are enabled by default.
3331 .B Default:
3332         share modes = yes
3334 .B Example:
3335         share modes = no
3337 .SS short preserve case (S)
3339 This controls if new short filenames are created with the case that
3340 the client passes, or if they are forced to be the "default" case.
3342 .B Default:
3343        short preserve case = no
3345 See the section on "NAME MANGLING" for a fuller discussion.
3347 .SS socket address (G)
3349 This option allows you to control what address Samba will listen for
3350 connections on. This is used to support multiple virtual interfaces on
3351 the one server, each with a different configuration.
3353 By default samba will accept connections on any address.
3355 .B Example:
3356         socket address = 192.168.2.20
3358 .SS socket options (G)
3359 This option (which can also be invoked with the -O command line
3360 option) allows you to set socket options to be used when talking with
3361 the client.
3363 Socket options are controls on the networking layer of the operating
3364 systems which allow the connection to be tuned.
3366 This option will typically be used to tune your Samba server for
3367 optimal performance for your local network. There is no way that Samba
3368 can know what the optimal parameters are for your net, so you must
3369 experiment and choose them yourself. I strongly suggest you read the
3370 appropriate documentation for your operating system first (perhaps
3371 "man setsockopt" will help).
3373 You may find that on some systems Samba will say "Unknown socket
3374 option" when you supply an option. This means you either mis-typed it
3375 or you need to add an include file to includes.h for your OS. If the
3376 latter is the case please send the patch to me
3377 (samba-bugs@samba.anu.edu.au).
3379 Any of the supported socket options may be combined in any way you
3380 like, as long as your OS allows it.
3382 This is the list of socket options currently settable using this
3383 option:
3385   SO_KEEPALIVE
3387   SO_REUSEADDR
3389   SO_BROADCAST
3391   TCP_NODELAY
3393   IPTOS_LOWDELAY
3395   IPTOS_THROUGHPUT
3397   SO_SNDBUF *
3399   SO_RCVBUF *
3401   SO_SNDLOWAT *
3403   SO_RCVLOWAT *
3405 Those marked with a * take an integer argument. The others can
3406 optionally take a 1 or 0 argument to enable or disable the option, by
3407 default they will be enabled if you don't specify 1 or 0.
3409 To specify an argument use the syntax SOME_OPTION=VALUE for example
3410 SO_SNDBUF=8192. Note that you must not have any spaces before or after
3411 the = sign.
3413 If you are on a local network then a sensible option might be
3415 socket options = IPTOS_LOWDELAY
3417 If you have an almost unloaded local network and you don't mind a lot
3418 of extra CPU usage in the server then you could try
3420 socket options = IPTOS_LOWDELAY TCP_NODELAY
3422 If you are on a wide area network then perhaps try setting
3423 IPTOS_THROUGHPUT. 
3425 Note that several of the options may cause your Samba server to fail
3426 completely. Use these options with caution!
3428 .B Default:
3429         no socket options
3431 .B Example:
3432         socket options = IPTOS_LOWDELAY 
3437 .SS status (G)
3438 This enables or disables logging of connections to a status file that
3439 .B smbstatus
3440 can read.
3442 With this disabled
3443 .B smbstatus
3444 won't be able to tell you what
3445 connections are active.
3447 .B Default:
3448         status = yes
3450 .B Example:
3451         status = no
3453 .SS strict locking (S)
3454 This is a boolean that controls the handling of file locking in the
3455 server. When this is set to yes the server will check every read and
3456 write access for file locks, and deny access if locks exist. This can
3457 be slow on some systems.
3459 When strict locking is "no" the server does file lock checks only when
3460 the client explicitly asks for them. 
3462 Well behaved clients always ask for lock checks when it is important,
3463 so in the vast majority of cases "strict locking = no" is preferable.
3465 .B Default:
3466         strict locking = no
3468 .B Example:
3469         strict locking = yes
3471 .SS strip dot (G)
3472 This is a boolean that controls whether to strip trailing dots off
3473 UNIX filenames. This helps with some CDROMs that have filenames ending in a
3474 single dot.
3476 .B Default:
3477         strip dot = no
3479 .B Example:
3480     strip dot = yes
3482 .SS syslog (G)
3483 This parameter maps how Samba debug messages are logged onto the
3484 system syslog logging levels. Samba debug level zero maps onto
3485 syslog LOG_ERR, debug level one maps onto LOG_WARNING, debug
3486 level two maps to LOG_NOTICE, debug level three maps onto LOG_INFO.
3487 The paramter sets the threshold for doing the mapping, all Samba
3488 debug messages above this threashold are mapped to syslog LOG_DEBUG
3489 messages.
3491 .B Default:
3493         syslog = 1
3495 .SS syslog only (G)
3496 If this parameter is set then Samba debug messages are logged into
3497 the system syslog only, and not to the debug log files.
3499 .B Default:
3500         syslog only = no
3502 .SS sync always (S)
3504 This is a boolean parameter that controls whether writes will always
3505 be written to stable storage before the write call returns. If this is
3506 false then the server will be guided by the client's request in each
3507 write call (clients can set a bit indicating that a particular write
3508 should be synchronous). If this is true then every write will be
3509 followed by a fsync() call to ensure the data is written to disk.
3511 .B Default:
3512         sync always = no
3514 .B Example:
3515         sync always = yes
3517 .SS time offset (G)
3518 This parameter is a setting in minutes to add to the normal GMT to
3519 local time conversion. This is useful if you are serving a lot of PCs
3520 that have incorrect daylight saving time handling.
3522 .B Default:
3523         time offset = 0
3525 .B Example:
3526         time offset = 60
3528 .SS time server (G)
3529 This parameter determines if nmbd advertises itself as a time server
3530 to Windows clients. The default is False.
3532 .B Default:
3533         time server = False
3535 .B Example:
3536         time server = True
3538 .SS unix realname (G)
3539 This boolean parameter when set causes samba to supply the real name field
3540 from the unix password file to the client. This is useful for setting up
3541 mail clients and WWW browsers on systems used by more than one person.
3543 .B Default:
3544         unix realname = no
3546 .B Example:
3547         unix realname = yes
3549 .SS user (S)
3551 .B username.
3552 .SS username (S)
3553 A synonym for this parameter is 'user'.
3555 Multiple users may be specified in a comma-delimited list, in which case the
3556 supplied password will be tested against each username in turn (left to right).
3558 The username= line is needed only when the PC is unable to supply its own
3559 username. This is the case for the coreplus protocol or where your
3560 users have different WfWg usernames to UNIX usernames. In both these
3561 cases you may also be better using the \e\eserver\eshare%user syntax
3562 instead. 
3564 The username= line is not a great solution in many cases as it means Samba
3565 will try to validate the supplied password against each of the
3566 usernames in the username= line in turn. This is slow and a bad idea for
3567 lots of users in case of duplicate passwords. You may get timeouts or
3568 security breaches using this parameter unwisely.
3570 Samba relies on the underlying UNIX security. This parameter does not
3571 restrict who can login, it just offers hints to the Samba server as to
3572 what usernames might correspond to the supplied password. Users can
3573 login as whoever they please and they will be able to do no more
3574 damage than if they started a telnet session. The daemon runs as the
3575 user that they log in as, so they cannot do anything that user cannot
3578 To restrict a service to a particular set of users you can use the
3579 "valid users=" line.
3581 If any of the usernames begin with a @ then the name will be looked up
3582 in the groups file and will expand to a list of all users in the group
3583 of that name. Note that searching though a groups file can take quite
3584 some time, and some clients may time out during the search.
3586 See the section below on username/password validation for more information
3587 on how this parameter determines access to the services.
3589 .B Default:
3590         The guest account if a guest service, else the name of the service.
3592 .B Examples:
3593         username = fred
3594         username = fred, mary, jack, jane, @users, @pcgroup
3596 .SS username level (G)
3598 This option helps Samba to try and 'guess' at the real UNIX username,
3599 as many DOS clients send an all-uppercase username. By default Samba
3600 tries all lowercase, followed by the username with the first letter
3601 capitalized, and fails if the username is not found on the UNIX machine.
3603 If this parameter is set to non-zero the behaviour changes. This 
3604 parameter is a number that specifies the number of uppercase combinations 
3605 to try whilst trying to determine the UNIX user name. The higher the number
3606 the more combinations will be tried, but the slower the discovery
3607 of usernames will be. Use this parameter when you have strange
3608 usernames on your UNIX machine, such as 'AstrangeUser'.
3610 .B Default:
3611     username level = 0
3613 .B Example:
3614     username level = 5
3616 .SS username map (G)
3618 This option allows you to to specify a file containing a mapping of
3619 usernames from the clients to the server. This can be used for several
3620 purposes. The most common is to map usernames that users use on DOS or
3621 Windows machines to those that the UNIX box uses. The other is to map
3622 multiple users to a single username so that they can more easily share
3623 files.
3625 The map file is parsed line by line. Each line should contain a single
3626 UNIX username on the left then a '=' followed by a list of usernames
3627 on the right. The list of usernames on the right may contain names of
3628 the form @group in which case they will match any UNIX username in
3629 that group. The special client name '*' is a wildcard and matches any
3630 name.
3632 The file is processed on each line by taking the supplied username and
3633 comparing it with each username on the right hand side of the '='
3634 signs. If the supplied name matches any of the names on the right
3635 hand side then it is replaced with the name on the left. Processing
3636 then continues with the next line.
3638 If any line begins with a '#' or a ';' then it is ignored
3640 If any line begins with an ! then the processing will stop after that
3641 line if a mapping was done by the line. Otherwise mapping continues
3642 with every line being processed. Using ! is most useful when you have
3643 a wildcard mapping line later in the file.
3645 For example to map from the name "admin" or "administrator" to the UNIX
3646 name "root" you would use
3648         root = admin administrator
3650 Or to map anyone in the UNIX group "system" to the UNIX name "sys" you
3651 would use
3653         sys = @system
3655 You can have as many mappings as you like in a username map file.
3657 You can map Windows usernames that have spaces in them by using double
3658 quotes around the name. For example:
3660         tridge = "Andrew Tridgell"
3662 would map the windows username "Andrew Tridgell" to the unix username
3663 tridge.
3665 The following example would map mary and fred to the unix user sys,
3666 and map the rest to guest. Note the use of the ! to tell Samba to stop
3667 processing if it gets a match on that line.
3669         !sys = mary fred
3670         guest = *
3673 Note that the remapping is applied to all occurrences of
3674 usernames. Thus if you connect to "\e\eserver\efred" and "fred" is
3675 remapped to "mary" then you will actually be connecting to
3676 "\e\eserver\emary" and will need to supply a password suitable for
3677 "mary" not "fred". The only exception to this is the username passed
3678 to the "password server" (if you have one). The password server will
3679 receive whatever username the client supplies without modification.
3681 Also note that no reverse mapping is done. The main effect this has is
3682 with printing. Users who have been mapped may have trouble deleting
3683 print jobs as PrintManager under WfWg will think they don't own the
3684 print job.
3686 .B Default
3687         no username map
3689 .B Example
3690         username map = /usr/local/samba/lib/users.map
3692 .SS valid chars (S)
3694 The option allows you to specify additional characters that should be
3695 considered valid by the server in filenames. This is particularly
3696 useful for national character sets, such as adding u-umlaut or a-ring.
3698 The option takes a list of characters in either integer or character
3699 form with spaces between them. If you give two characters with a colon
3700 between them then it will be taken as an lowercase:uppercase pair.
3702 If you have an editor capable of entering the characters into the
3703 config file then it is probably easiest to use this method. Otherwise
3704 you can specify the characters in octal, decimal or hexadecimal form
3705 using the usual C notation.
3707 For example to add the single character 'Z' to the charset (which is a
3708 pointless thing to do as it's already there) you could do one of the
3709 following
3711 valid chars = Z
3712 valid chars = z:Z
3713 valid chars = 0132:0172
3715 The last two examples above actually add two characters, and alter
3716 the uppercase and lowercase mappings appropriately.
3718 Note that you MUST specify this parameter after the "client code page"
3719 parameter if you have both set. If "client code page" is set after
3720 the "valid chars" parameter the "valid chars" settings will be
3721 overwritten.
3723 See also the "client code page" parameter.
3725 .B Default
3727         Samba defaults to using a reasonable set of valid characters
3729         for english systems
3731 .B Example
3732         valid chars = 0345:0305 0366:0326 0344:0304
3734 The above example allows filenames to have the swedish characters in
3735 them. 
3737 NOTE: It is actually quite difficult to correctly produce a "valid
3738 chars" line for a particular system. To automate the process
3739 tino@augsburg.net has written a package called "validchars" which will
3740 automatically produce a complete "valid chars" line for a given client
3741 system. Look in the examples subdirectory for this package.
3743 .SS valid users (S)
3744 This is a list of users that should be allowed to login to this
3745 service. A name starting with @ is interpreted as a UNIX group.
3747 If this is empty (the default) then any user can login. If a username
3748 is in both this list and the "invalid users" list then access is
3749 denied for that user.
3751 The current servicename is substituted for %S. This is useful in the
3752 [homes] section.
3754 See also "invalid users"
3756 .B Default
3757         No valid users list. (anyone can login)
3759 .B Example
3760         valid users = greg, @pcusers
3763 .SS veto files(S)
3764 This is a list of files and directories that are neither visible nor
3765 accessible.  Each entry in the list must be separated by a "/", which
3766 allows spaces to be included in the entry.  '*' and '?' can be used to
3767 specify multiple files or directories as in DOS wildcards.
3769 Each entry must be a unix path, not a DOS path and must not include the 
3770 unix directory separator "/".
3772 Note that the case sensitivity option is applicable in vetoing files.
3774 One feature of the veto files parameter that it is important to be
3775 aware of, is that if a directory contains nothing but files that
3776 match the veto files parameter (which means that Windows/DOS clients
3777 cannot ever see them) is deleted, the veto files within that directory
3778 *are automatically deleted* along with it, if the user has UNIX permissions
3779 to do so.
3781 Setting this parameter will affect the performance of Samba, as
3782 it will be forced to check all files and directories for a match
3783 as they are scanned.
3785 See also "hide files" and "case sensitive"
3787 .B Default
3788         No files or directories are vetoed.
3790 .B Examples
3791     Example 1.
3792     Veto any files containing the word Security, 
3793     any ending in .tmp, and any directory containing the
3794     word root.
3796         veto files = /*Security*/*.tmp/*root*/
3798     Example 2.
3799     Veto the Apple specific files that a NetAtalk server
3800     creates.
3802     veto files = /.AppleDouble/.bin/.AppleDesktop/Network Trash Folder/
3804 .SS veto oplock files (S)
3805 This parameter is only valid when the 'oplocks' parameter is turned on
3806 for a share. It allows the Samba administrator to selectively turn off
3807 the granting of oplocks on selected files that match a wildcarded list,
3808 similar to the wildcarded list used in the 'veto files' parameter.
3810 .B Default
3811     No files are vetoed for oplock grants.
3813 .B Examples
3814 You might want to do this on files that you know will be heavily
3815 contended for by clients. A good example of this is in the NetBench
3816 SMB benchmark program, which causes heavy client contention for files
3817 ending in .SEM. To cause Samba not to grant oplocks on these files
3818 you would use the line (either in the [global] section or in the section
3819 for the particular NetBench share :
3821      veto oplock files = /*.SEM/
3823 .SS volume (S)
3824 This allows you to override the volume label returned for a
3825 share. Useful for CDROMs with installation programs that insist on a
3826 particular volume label.
3828 The default is the name of the share
3830 .SS wide links (S)
3831 This parameter controls whether or not links in the UNIX file system may be
3832 followed by the server. Links that point to areas within the directory tree
3833 exported by the server are always allowed; this parameter controls access 
3834 only to areas that are outside the directory tree being exported.
3836 .B Default:
3837         wide links = yes
3839 .B Example:
3840         wide links = no
3842 .SS wins proxy (G)
3844 This is a boolean that controls if nmbd will respond to broadcast name
3845 queries on behalf of other hosts. You may need to set this to no for
3846 some older clients.
3848 .B Default:
3849         wins proxy = no
3850 .SS wins server (G)
3852 This specifies the DNS name (or IP address) of the WINS server that Samba 
3853 should register with. If you have a WINS server on your network then you
3854 should set this to the WINS servers name.
3856 You should point this at your WINS server if you have a multi-subnetted
3857 network.
3858 .B Default:
3859         wins server = 
3861 .SS wins support (G)
3863 This boolean controls if the nmbd process in Samba will act as a WINS server. 
3864 You should not set this to true unless you have a multi-subnetted network and
3865 you wish a particular nmbd to be your WINS server. Note that you
3866 should *NEVER* set this to true on more than one machine in your
3867 network.
3869 .B Default:
3870         wins support = no
3872 .SS workgroup (G)
3874 This controls what workgroup your server will appear to be in when
3875 queried by clients. 
3877 .B Default:
3878         set in the Makefile
3880 .B Example:
3881         workgroup = MYGROUP
3883 .SS writable (S)
3884 A synonym for this parameter is 'write ok'. An inverted synonym is 'read only'.
3886 If this parameter is 'no', then users of a service may not create or modify
3887 files in the service's directory.
3889 Note that a printable service ('printable = yes') will ALWAYS allow 
3890 writing to the directory (user privileges permitting), but only via
3891 spooling operations.
3893 .B Default:
3894         writable = no
3896 .B Examples:
3897         read only = no
3898         writable = yes
3899         write ok = yes
3900 .SS write list (S)
3901 This is a list of users that are given read-write access to a
3902 service. If the connecting user is in this list then they will be
3903 given write access, no matter what the "read only" option is set
3904 to. The list can include group names using the @group syntax.
3906 Note that if a user is in both the read list and the write list then
3907 they will be given write access.
3909 See also the "read list" option
3911 .B Default:
3912      write list =
3914 .B Example:
3915      write list = admin, root, @staff
3917 .SS write ok (S)
3919 .B writable
3921 .B read only.
3922 .SS write raw (G)
3923 This parameter controls whether or not the server will support raw writes when
3924 transferring data from clients.
3926 .B Default:
3927         write raw = yes
3929 .B Example:
3930         write raw = no
3932 .SH NOTE ABOUT USERNAME/PASSWORD VALIDATION
3933 There are a number of ways in which a user can connect to a
3934 service. The server follows the following steps in determining if it
3935 will allow a connection to a specified service. If all the steps fail
3936 then the connection request is rejected. If one of the steps pass then
3937 the following steps are not checked.
3939 If the service is marked "guest only = yes" then steps 1 to 5 are skipped
3941 Step 1: If the client has passed a username/password pair and that
3942 username/password pair is validated by the UNIX system's password
3943 programs then the connection is made as that username. Note that this
3944 includes the \e\eserver\eservice%username method of passing a username.
3946 Step 2: If the client has previously registered a username with the
3947 system and now supplies a correct password for that username then the
3948 connection is allowed.
3950 Step 3: The client's netbios name and any previously used user names
3951 are checked against the supplied password, if they match then the
3952 connection is allowed as the corresponding user.
3954 Step 4: If the client has previously validated a username/password
3955 pair with the server and the client has passed the validation token
3956 then that username is used. This step is skipped if "revalidate = yes" 
3957 for this service.
3959 Step 5: If a "user = " field is given in the smb.conf file for the
3960 service and the client has supplied a password, and that password
3961 matches (according to the UNIX system's password checking) with one of
3962 the usernames from the user= field then the connection is made as the
3963 username in the "user=" line. If one of the username in the user= list
3964 begins with a @ then that name expands to a list of names in the group
3965 of the same name.
3967 Step 6: If the service is a guest service then a connection is made as
3968 the username given in the "guest account =" for the service,
3969 irrespective of the supplied password.
3970 .SH WARNINGS
3971 Although the configuration file permits service names to contain spaces, 
3972 your client software may not. Spaces will be ignored in comparisons anyway,
3973 so it shouldn't be a problem - but be aware of the possibility.
3975 On a similar note, many clients - especially DOS clients - limit service
3976 names to eight characters. Smbd has no such limitation, but attempts
3977 to connect from such clients will fail if they truncate the service names.
3978 For this reason you should probably keep your service names down to eight 
3979 characters in length.
3981 Use of the [homes] and [printers] special sections make life for an 
3982 administrator easy, but the various combinations of default attributes can be
3983 tricky. Take extreme care when designing these sections. In particular,
3984 ensure that the permissions on spool directories are correct.
3985 .SH VERSION
3986 This man page is (mostly) correct for version 1.9.18 of the Samba suite, plus some
3987 of the recent patches to it. These notes will necessarily lag behind 
3988 development of the software, so it is possible that your version of 
3989 the server has extensions or parameter semantics that differ from or are not 
3990 covered by this man page. Please notify these to the address below for 
3991 rectification.
3993 Prior to version 1.5.21 of the Samba suite, the configuration file was
3994 radically different (more primitive). If you are using a version earlier than
3995 1.8.05, it is STRONGLY recommended that you upgrade.
3996 .SH OPTIONS
3997 Not applicable.
3998 .SH FILES
3999 Not applicable.
4000 .SH ENVIRONMENT VARIABLES
4001 Not applicable.
4002 .SH SEE ALSO
4003 .BR smbd (8),
4004 .BR smbclient (1),
4005 .BR nmbd (8),
4006 .BR testparm (1), 
4007 .BR testprns (1),
4008 .BR lpq (1),
4009 .BR hosts_access (5)
4010 .SH DIAGNOSTICS
4011 [This section under construction]
4013 Most diagnostics issued by the server are logged in a specified log file. The
4014 log file name is specified at compile time, but may be overridden on the
4015 smbd command line (see
4016 .BR smbd (8)).
4018 The number and nature of diagnostics available depends on the debug level used
4019 by the server. If you have problems, set the debug level to 3 and peruse the
4020 log files.
4022 Most messages are reasonably self-explanatory. Unfortunately, at time of
4023 creation of this man page the source code is still too fluid to warrant
4024 describing each and every diagnostic. At this stage your best bet is still
4025 to grep the source code and inspect the conditions that gave rise to the 
4026 diagnostics you are seeing.
4027 .SH BUGS
4028 None known.
4030 Please send bug reports, comments and so on to:
4032 .RS 3
4033 .B samba-bugs@samba.anu.edu.au (Andrew Tridgell)
4035 .RS 3
4036 or to the mailing list:
4039 .B samba@listproc.anu.edu.au
4042 You may also like to subscribe to the announcement channel:
4044 .RS 3
4045 .B samba-announce@listproc.anu.edu.au
4048 To subscribe to these lists send a message to
4049 listproc@listproc.anu.edu.au with a body of "subscribe samba Your
4050 Name" or "subscribe samba-announce Your Name".
4052 Errors or suggestions for improvements to the Samba man pages should be 
4053 mailed to:
4055 .RS 3
4056 .B samba-bugs@samba.anu.edu.au (Andrew Tridgell)