1 mailto(samba-bugs@samba.org)
3 manpage(smb.conf htmlcommand((5)))(5)(23 Oct 1998)(Samba)(SAMBA)
6 manpagename(smb.conf)(The configuration file for the Samba suite)
11 bf(smb.conf) The bf(smb.conf) file is a configuration file for the
12 Samba suite. bf(smb.conf) contains runtime configuration information
13 for the Samba programs. The bf(smb.conf) file is designed to be
14 configured and administered by the url(bf(swat (8)))(swat.8.html)
15 program. The complete description of the file format and possible
16 parameters held within are here for reference purposes.
19 manpagesection(FILE FORMAT)
21 The file consists of sections and parameters. A section begins with
22 the name of the section in square brackets and continues until the
23 next section begins. Sections contain parameters of the form
27 The file is line-based - that is, each newline-terminated line
28 represents either a comment, a section name or a parameter.
30 Section and parameter names are not case sensitive.
32 Only the first equals sign in a parameter is significant. Whitespace
33 before or after the first equals sign is discarded. Leading, trailing
34 and internal whitespace in section and parameter names is
35 irrelevant. Leading and trailing whitespace in a parameter value is
36 discarded. Internal whitespace within a parameter value is retained
39 Any line beginning with a semicolon (';') or a hash ('#') character is
40 ignored, as are lines containing only whitespace.
42 Any line ending in a tt('\') is "continued" on the next line in the
43 customary UNIX fashion.
45 The values following the equals sign in parameters are all either a
46 string (no quotes needed) or a boolean, which may be given as yes/no,
47 0/1 or true/false. Case is not significant in boolean values, but is
48 preserved in string values. Some items such as create modes are
51 label(SECTIONDESCRIPTIONS)
52 manpagesection(SECTION DESCRIPTIONS)
54 Each section in the configuration file (except for the
55 link(bf([global]))(global) section) describes a shared resource (known
56 as a em("share")). The section name is the name of the shared resource
57 and the parameters within the section define the shares attributes.
59 There are three special sections, link(bf([global]))(global),
60 link(bf([homes]))(homes) and link(bf([printers]))(printers), which are
61 described under link(bf('special sections'))(SPECIALSECTIONS). The
62 following notes apply to ordinary section descriptions.
64 A share consists of a directory to which access is being given plus
65 a description of the access rights which are granted to the user of
66 the service. Some housekeeping options are also specifiable.
68 Sections are either filespace services (used by the client as an
69 extension of their native file systems) or printable services (used by
70 the client to access print services on the host running the server).
72 Sections may be designated link(bf(guest))(guestok) services, in which
73 case no password is required to access them. A specified UNIX
74 link(bf(guest account))(guestaccount) is used to define access
75 privileges in this case.
77 Sections other than guest services will require a password to access
78 them. The client provides the username. As older clients only provide
79 passwords and not usernames, you may specify a list of usernames to
80 check against the password using the link(bf("user="))(user) option in
81 the share definition. For modern clients such as Windows 95/98 and
82 Windows NT, this should not be necessary.
84 Note that the access rights granted by the server are masked by the
85 access rights granted to the specified or guest UNIX user by the host
86 system. The server does not grant more access than the host system
89 The following sample section defines a file space share. The user has
90 write access to the path tt(/home/bar). The share is accessed via
101 The following sample section defines a printable share. The share
102 is readonly, but printable. That is, the only write access permitted
103 is via calls to open, write to and close a spool file. The
104 link(bf('guest ok'))(guestok) parameter means access will be permitted
105 as the default guest user (specified elsewhere):
109 path = /usr/spool/public
115 label(SPECIALSECTIONS)
116 manpagesection(SPECIAL SECTIONS)
121 dit(bf(The [global] section))
123 Parameters in this section apply to the server as a whole, or are
124 defaults for sections which do not specifically define certain
125 items. See the notes under link(bf('PARAMETERS'))(PARAMETERS) for more
129 dit(bf(The [homes] section))
131 If a section called tt('homes') is included in the configuration file,
132 services connecting clients to their home directories can be created
133 on the fly by the server.
135 When the connection request is made, the existing sections are
136 scanned. If a match is found, it is used. If no match is found, the
137 requested section name is treated as a user name and looked up in the
138 local password file. If the name exists and the correct password has
139 been given, a share is created by cloning the [homes] section.
141 Some modifications are then made to the newly created share:
145 it() The share name is changed from tt('homes') to the located
148 it() If no path was given, the path is set to the user's home
153 If you decide to use a link(bf(path=))(path) line in your [homes]
154 section then you may find it useful to use the link(bf(%S))(percentS)
157 tt(path=/data/pchome/%S)
159 would be useful if you have different home directories for your PCs
160 than for UNIX access.
162 This is a fast and simple way to give a large number of clients access
163 to their home directories with a minimum of fuss.
165 A similar process occurs if the requested section name is tt("homes"),
166 except that the share name is not changed to that of the requesting
167 user. This method of using the [homes] section works well if different
168 users share a client PC.
170 The [homes] section can specify all the parameters a normal service
171 section can specify, though some make more sense than others. The
172 following is a typical and suitable [homes] section:
179 An important point is that if guest access is specified in the [homes]
180 section, all home directories will be visible to all clients
181 bf(without a password). In the very unlikely event that this is
182 actually desirable, it would be wise to also specify link(bf(read only
185 Note that the link(bf(browseable))(browseable) flag for auto home
186 directories will be inherited from the global browseable flag, not the
187 [homes] browseable flag. This is useful as it means setting
188 browseable=no in the [homes] section will hide the [homes] share but
189 make any auto home directories visible.
192 dit(bf(The [printers] section))
194 This section works like link(bf([homes]))(homes), but for printers.
196 If a [printers] section occurs in the configuration file, users are
197 able to connect to any printer specified in the local host's printcap
200 When a connection request is made, the existing sections are
201 scanned. If a match is found, it is used. If no match is found, but a
202 link(bf([homes]))(homes) section exists, it is used as described
203 above. Otherwise, the requested section name is treated as a printer
204 name and the appropriate printcap file is scanned to see if the
205 requested section name is a valid printer share name. If a match is
206 found, a new printer share is created by cloning the [printers]
209 A few modifications are then made to the newly created share:
213 it() The share name is set to the located printer name
215 it() If no printer name was given, the printer name is set to the
218 it() If the share does not permit guest access and no username was
219 given, the username is set to the located printer name.
223 Note that the [printers] service MUST be printable - if you specify
224 otherwise, the server will refuse to load the configuration file.
226 Typically the path specified would be that of a world-writeable spool
227 directory with the sticky bit set on it. A typical [printers] entry
228 would look like this:
232 path = /usr/spool/public
238 All aliases given for a printer in the printcap file are legitimate
239 printer names as far as the server is concerned. If your printing
240 subsystem doesn't work like that, you will have to set up a
241 pseudo-printcap. This is a file consisting of one or more lines like
244 verb( alias|alias|alias|alias... )
246 Each alias should be an acceptable printer name for your printing
247 subsystem. In the link(bf([global]))(global) section, specify the new
248 file as your printcap. The server will then only recognize names
249 found in your pseudo-printcap, which of course can contain whatever
250 aliases you like. The same technique could be used simply to limit
251 access to a subset of your local printers.
253 An alias, by the way, is defined as any component of the first entry
254 of a printcap record. Records are separated by newlines, components
255 (if there are more than one) are separated by vertical bar symbols
258 NOTE: On SYSV systems which use lpstat to determine what printers are
259 defined on the system you may be able to use link(bf("printcap name =
260 lpstat"))(printcapname) to automatically obtain a list of
261 printers. See the link(bf("printcap name"))(printcapname) option for
267 manpagesection(PARAMETERS)
269 Parameters define the specific attributes of sections.
271 Some parameters are specific to the link(bf([global]))(global) section
272 (e.g., link(bf(security))(security)). Some parameters are usable in
273 all sections (e.g., link(bf(create mode))(createmode)). All others are
274 permissible only in normal sections. For the purposes of the following
275 descriptions the link(bf([homes]))(homes) and
276 link(bf([printers]))(printers) sections will be considered normal.
277 The letter tt('G') in parentheses indicates that a parameter is
278 specific to the link(bf([global]))(global) section. The letter tt('S')
279 indicates that a parameter can be specified in a service specific
280 section. Note that all tt('S') parameters can also be specified in the
281 link(bf([global]))(global) section - in which case they will define
282 the default behavior for all services.
284 Parameters are arranged here in alphabetical order - this may not
285 create best bedfellows, but at least you can find them! Where there
286 are synonyms, the preferred synonym is described, others refer to the
289 label(VARIABLESUBSTITUTIONS)
290 manpagesection(VARIABLE SUBSTITUTIONS)
292 Many of the strings that are settable in the config file can take
293 substitutions. For example the option link(bf(tt("path =
294 /tmp/%u")))(path) would be interpreted as tt("path = /tmp/john") if
295 the user connected with the username john.
297 These substitutions are mostly noted in the descriptions below, but
298 there are some general substitutions which apply whenever they might
299 be relevant. These are:
304 it() bf(%S) = the name of the current service, if any.
307 it() bf(%P) = the root directory of the current service, if any.
310 it() bf(%u) = user name of the current service, if any.
313 it() bf(%g) = primary group name of link(bf(%u))(percentu).
316 it() bf(%U) = session user name (the user name that
317 the client wanted, not necessarily the same as the one they got).
320 it() bf(%G) = primary group name of link(bf(%U))(percentU).
323 it() bf(%H) = the home directory of the user given by link(bf(%u))(percentu).
326 it() bf(%v) = the Samba version.
329 it() bf(%h) = the internet hostname that Samba is running on.
332 it() bf(%m) = the NetBIOS name of the client machine (very useful).
335 it() bf(%L) = the NetBIOS name of the server. This allows you to change your
336 config based on what the client calls you. Your server can have a "dual
340 it() bf(%M) = the internet name of the client machine.
343 it() bf(%N) = the name of your NIS home directory server. This is
344 obtained from your NIS auto.map entry. If you have not compiled Samba
345 with the bf(--with-automount) option then this value will be the same
346 as link(bf(%L))(percentL).
349 it() bf(%p) = the path of the service's home directory, obtained from your NIS
350 auto.map entry. The NIS auto.map entry is split up as "%N:%p".
353 it() bf(%R) = the selected protocol level after protocol
354 negotiation. It can be one of CORE, COREPLUS, LANMAN1, LANMAN2 or NT1.
357 it() bf(%d) = The process id of the current server process.
360 it() bf(%a) = the architecture of the remote
361 machine. Only some are recognized, and those may not be 100%
362 reliable. It currently recognizes Samba, WfWg, WinNT and
363 Win95. Anything else will be known as "UNKNOWN". If it gets it wrong
364 then sending a level 3 log to email(samba-bugs@samba.org)
365 should allow it to be fixed.
368 it() bf(%I) = The IP address of the client machine.
371 it() bf(%T) = the current date and time.
375 There are some quite creative things that can be done with these
376 substitutions and other smb.conf options.
379 manpagesection(NAME MANGLING)
381 Samba supports em("name mangling") so that DOS and Windows clients can
382 use files that don't conform to the 8.3 format. It can also be set to
383 adjust the case of 8.3 format filenames.
385 There are several options that control the way mangling is performed,
386 and they are grouped here rather than listed separately. For the
387 defaults look at the output of the testparm program.
389 All of these options can be set separately for each service (or
390 globally, of course).
394 label(manglecaseoption)
395 bf("mangle case = yes/no") controls if names that have characters that
396 aren't of the "default" case are mangled. For example, if this is yes
397 then a name like tt("Mail") would be mangled. Default em(no).
399 label(casesensitiveoption)
400 bf("case sensitive = yes/no") controls whether filenames are case
401 sensitive. If they aren't then Samba must do a filename search and
402 match on passed names. Default em(no).
404 label(defaultcaseoption)
405 bf("default case = upper/lower") controls what the default case is for new
406 filenames. Default em(lower).
408 label(preservecaseoption)
409 bf("preserve case = yes/no") controls if new files are created with the
410 case that the client passes, or if they are forced to be the tt("default")
411 case. Default em(Yes).
413 label(shortpreservecaseoption)
415 bf("short preserve case = yes/no") controls if new files which conform
416 to 8.3 syntax, that is all in upper case and of suitable length, are
417 created upper case, or if they are forced to be the tt("default")
418 case. This option can be use with link(bf("preserve case =
419 yes"))(preservecaseoption) to permit long filenames to retain their
420 case, while short names are lowered. Default em(Yes).
422 By default, Samba 2.0 has the same semantics as a Windows NT
423 server, in that it is case insensitive but case preserving.
425 label(NOTEABOUTUSERNAMEPASSWORDVALIDATION)
426 manpagesection(NOTE ABOUT USERNAME/PASSWORD VALIDATION)
428 There are a number of ways in which a user can connect to a
429 service. The server follows the following steps in determining if it
430 will allow a connection to a specified service. If all the steps fail
431 then the connection request is rejected. If one of the steps pass then
432 the following steps are not checked.
434 If the service is marked link(bf("guest only = yes"))(guestonly) then
435 steps 1 to 5 are skipped.
439 eit() Step 1: If the client has passed a username/password pair and
440 that username/password pair is validated by the UNIX system's password
441 programs then the connection is made as that username. Note that this
442 includes the tt(\\server\service%username) method of passing a
445 eit() Step 2: If the client has previously registered a username with
446 the system and now supplies a correct password for that username then
447 the connection is allowed.
449 eit() Step 3: The client's netbios name and any previously used user
450 names are checked against the supplied password, if they match then
451 the connection is allowed as the corresponding user.
453 eit() Step 4: If the client has previously validated a
454 username/password pair with the server and the client has passed the
455 validation token then that username is used. This step is skipped if
456 link(bf("revalidate = yes"))(revalidate) for this service.
458 eit() Step 5: If a link(bf("user = "))(user) field is given in the
459 smb.conf file for the service and the client has supplied a password,
460 and that password matches (according to the UNIX system's password
461 checking) with one of the usernames from the link(bf(user=))(user)
462 field then the connection is made as the username in the
463 link(bf("user="))(user) line. If one of the username in the
464 link(bf(user=))(user) list begins with a tt('@') then that name
465 expands to a list of names in the group of the same name.
467 eit() Step 6: If the service is a guest service then a connection is
468 made as the username given in the link(bf("guest account
469 ="))(guestaccount) for the service, irrespective of the supplied
474 label(COMPLETELISTOFGLOBALPARAMETERS)
475 manpagesection(COMPLETE LIST OF GLOBAL PARAMETERS)
477 Here is a list of all global parameters. See the section of each
478 parameter for details. Note that some are synonyms.
482 it() link(bf(announce as))(announceas)
484 it() link(bf(announce version))(announceversion)
486 it() link(bf(auto services))(autoservices)
488 it() link(bf(bind interfaces only))(bindinterfacesonly)
490 it() link(bf(browse list))(browselist)
492 it() link(bf(change notify timeout))(changenotifytimeout)
494 it() link(bf(character set))(characterset)
496 it() link(bf(client code page))(clientcodepage)
498 it() link(bf(coding system))(codingsystem)
500 it() link(bf(config file))(configfile)
502 it() link(bf(deadtime))(deadtime)
504 it() link(bf(debug timestamp))(debugtimestamp)
506 it() link(bf(debuglevel))(debuglevel)
508 it() link(bf(default))(default)
510 it() link(bf(default service))(defaultservice)
512 it() link(bf(dfree command))(dfreecommand)
514 it() link(bf(dns proxy))(dnsproxy)
516 it() link(bf(domain admin group))(domainadmingroup)
518 it() link(bf(domain admin users))(domainadminusers)
520 it() link(bf(domain controller))(domaincontroller)
522 it() link(bf(domain group map))(domaingroupmap)
524 it() link(bf(domain groups))(domaingroups)
526 it() link(bf(domain guest group))(domainguestgroup)
528 it() link(bf(domain guest users))(domainguestusers)
530 it() link(bf(domain logons))(domainlogons)
532 it() link(bf(domain master))(domainmaster)
534 it() link(bf(encrypt passwords))(encryptpasswords)
536 it() link(bf(getwd cache))(getwdcache)
538 it() link(bf(homedir map))(homedirmap)
540 it() link(bf(hosts equiv))(hostsequiv)
542 it() link(bf(interfaces))(interfaces)
544 it() link(bf(keepalive))(keepalive)
546 it() link(bf(kernel oplocks))(kerneloplocks)
548 it() link(bf(ldap filter))(ldapfilter)
550 it() link(bf(ldap port))(ldapport)
552 it() link(bf(ldap root))(ldaproot)
554 it() link(bf(ldap root passwd))(ldaprootpasswd)
556 it() link(bf(ldap server))(ldapserver)
558 it() link(bf(ldap suffix))(ldapsuffix)
560 it() link(bf(lm announce))(lmannounce)
562 it() link(bf(lm interval))(lminterval)
564 it() link(bf(load printers))(loadprinters)
566 it() link(bf(local group map))(localgroupmap)
568 it() link(bf(local master))(localmaster)
570 it() link(bf(lock dir))(lockdir)
572 it() link(bf(lock directory))(lockdirectory)
574 it() link(bf(log file))(logfile)
576 it() link(bf(log level))(loglevel)
578 it() link(bf(logon drive))(logondrive)
580 it() link(bf(logon home))(logonhome)
582 it() link(bf(logon path))(logonpath)
584 it() link(bf(logon script))(logonscript)
586 it() link(bf(lpq cache time))(lpqcachetime)
588 it() link(bf(machine password timeout))(machinepasswordtimeout)
590 it() link(bf(mangled stack))(mangledstack)
592 it() link(bf(max disk size))(maxdisksize)
594 it() link(bf(max log size))(maxlogsize)
596 it() link(bf(max mux))(maxmux)
598 it() link(bf(max open files))(maxopenfiles)
600 it() link(bf(max packet))(maxpacket)
602 it() link(bf(max ttl))(maxttl)
604 it() link(bf(max wins ttl))(maxwinsttl)
606 it() link(bf(max xmit))(maxxmit)
608 it() link(bf(message command))(messagecommand)
610 it() link(bf(min wins ttl))(minwinsttl)
612 it() link(bf(name resolve order))(nameresolveorder)
614 it() link(bf(netbios aliases))(netbiosaliases)
616 it() link(bf(netbios name))(netbiosname)
618 it() link(bf(nis homedir))(nishomedir)
620 it() link(bf(nt pipe support))(ntpipesupport)
622 it() link(bf(nt smb support))(ntsmbsupport)
624 it() link(bf(null passwords))(nullpasswords)
626 it() link(bf(ole locking compatibility))(olelockingcompatibility)
628 it() link(bf(os level))(oslevel)
630 it() link(bf(packet size))(packetsize)
632 it() link(bf(panic action))(panicaction)
634 it() link(bf(passwd chat))(passwdchat)
636 it() link(bf(passwd chat debug))(passwdchatdebug)
638 it() link(bf(passwd program))(passwdprogram)
640 it() link(bf(password level))(passwordlevel)
642 it() link(bf(password server))(passwordserver)
644 it() link(bf(prefered master))(preferedmaster)
646 it() link(bf(preferred master))(preferredmaster)
648 it() link(bf(preload))(preload)
650 it() link(bf(printcap))(printcap)
652 it() link(bf(printcap name))(printcapname)
654 it() link(bf(printer driver file))(printerdriverfile)
656 it() link(bf(protocol))(protocol)
658 it() link(bf(read bmpx))(readbmpx)
660 it() link(bf(read prediction))(readprediction)
662 it() link(bf(read raw))(readraw)
664 it() link(bf(read size))(readsize)
666 it() link(bf(remote announce))(remoteannounce)
668 it() link(bf(remote browse sync))(remotebrowsesync)
670 it() link(bf(root))(root)
672 it() link(bf(root dir))(rootdir)
674 it() link(bf(root directory))(rootdirectory)
676 it() link(bf(security))(security)
678 it() link(bf(server string))(serverstring)
680 it() link(bf(shared mem size))(sharedmemsize)
682 it() link(bf(smb passwd file))(smbpasswdfile)
684 it() link(bf(smbrun))(smbrun)
686 it() link(bf(socket address))(socketaddress)
688 it() link(bf(socket options))(socketoptions)
690 it() link(bf(ssl))(ssl)
692 it() link(bf(ssl CA certDir))(sslCAcertDir)
694 it() link(bf(ssl CA certFile))(sslCAcertFile)
696 it() link(bf(ssl ciphers))(sslciphers)
698 it() link(bf(ssl client cert))(sslclientcert)
700 it() link(bf(ssl client key))(sslclientkey)
702 it() link(bf(ssl compatibility))(sslcompatibility)
704 it() link(bf(ssl hosts))(sslhosts)
706 it() link(bf(ssl hosts resign))(sslhostsresign)
708 it() link(bf(ssl require clientcert))(sslrequireclientcert)
710 it() link(bf(ssl require servercert))(sslrequireservercert)
712 it() link(bf(ssl server cert))(sslservercert)
714 it() link(bf(ssl server key))(sslserverkey)
716 it() link(bf(ssl version))(sslversion)
718 it() link(bf(stat cache))(statcache)
720 it() link(bf(stat cache size))(statcachesize)
722 it() link(bf(strip dot))(stripdot)
724 it() link(bf(syslog))(syslog)
726 it() link(bf(syslog only))(syslogonly)
728 it() link(bf(time offset))(timeoffset)
730 it() link(bf(time server))(timeserver)
732 it() link(bf(timestamp logs))(timestamplogs)
734 it() link(bf(unix password sync))(unixpasswordsync)
736 it() link(bf(unix realname))(unixrealname)
738 it() link(bf(update encrypted))(updateencrypted)
740 it() link(bf(use rhosts))(userhosts)
742 it() link(bf(username level))(usernamelevel)
744 it() link(bf(username map))(usernamemap)
746 it() link(bf(valid chars))(validchars)
748 it() link(bf(wins proxy))(winsproxy)
750 it() link(bf(wins server))(winsserver)
752 it() link(bf(wins support))(winssupport)
754 it() link(bf(workgroup))(workgroup)
756 it() link(bf(write raw))(writeraw)
760 label(COMPLETELISTOFSERVICEPARAMETERS)
761 manpagesection(COMPLETE LIST OF SERVICE PARAMETERS)
763 Here is a list of all service parameters. See the section of each
764 parameter for details. Note that some are synonyms.
768 it() link(bf(admin users))(adminusers)
770 it() link(bf(allow hosts))(allowhosts)
772 it() link(bf(alternate permissions))(alternatepermissions)
774 it() link(bf(available))(available)
776 it() link(bf(blocking locks))(blockinglocks)
778 it() link(bf(browsable))(browsable)
780 it() link(bf(browseable))(browseable)
782 it() link(bf(case sensitive))(casesensitive)
784 it() link(bf(casesignames))(casesignames)
786 it() link(bf(comment))(comment)
788 it() link(bf(copy))(copy)
790 it() link(bf(create mask))(createmask)
792 it() link(bf(create mode))(createmode)
794 it() link(bf(default case))(defaultcase)
796 it() link(bf(delete readonly))(deletereadonly)
798 it() link(bf(delete veto files))(deletevetofiles)
800 it() link(bf(deny hosts))(denyhosts)
802 it() link(bf(directory))(directory)
804 it() link(bf(directory mask))(directorymask)
806 it() link(bf(directory mode))(directorymode)
808 it() link(bf(dont descend))(dontdescend)
810 it() link(bf(dos filetime resolution))(dosfiletimeresolution)
812 it() link(bf(dos filetimes))(dosfiletimes)
814 it() link(bf(exec))(exec)
816 it() link(bf(fake directory create times))(fakedirectorycreatetimes)
818 it() link(bf(fake oplocks))(fakeoplocks)
820 it() link(bf(follow symlinks))(followsymlinks)
822 it() link(bf(force create mode))(forcecreatemode)
824 it() link(bf(force directory mode))(forcedirectorymode)
826 it() link(bf(force group))(forcegroup)
828 it() link(bf(force user))(forceuser)
830 it() link(bf(fstype))(fstype)
832 it() link(bf(group))(group)
834 it() link(bf(guest account))(guestaccount)
836 it() link(bf(guest ok))(guestok)
838 it() link(bf(guest only))(guestonly)
840 it() link(bf(hide dot files))(hidedotfiles)
842 it() link(bf(hide files))(hidefiles)
844 it() link(bf(hosts allow))(hostsallow)
846 it() link(bf(hosts deny))(hostsdeny)
848 it() link(bf(include))(include)
850 it() link(bf(invalid users))(invalidusers)
852 it() link(bf(locking))(locking)
854 it() link(bf(lppause command))(lppausecommand)
856 it() link(bf(lpq command))(lpqcommand)
858 it() link(bf(lpresume command))(lpresumecommand)
860 it() link(bf(lprm command))(lprmcommand)
862 it() link(bf(magic output))(magicoutput)
864 it() link(bf(magic script))(magicscript)
866 it() link(bf(mangle case))(manglecase)
868 it() link(bf(mangled map))(mangledmap)
870 it() link(bf(mangled names))(manglednames)
872 it() link(bf(mangling char))(manglingchar)
874 it() link(bf(map archive))(maparchive)
876 it() link(bf(map hidden))(maphidden)
878 it() link(bf(map system))(mapsystem)
880 it() link(bf(map to guest))(maptoguest)
882 it() link(bf(max connections))(maxconnections)
884 it() link(bf(min print space))(minprintspace)
886 it() link(bf(only guest))(onlyguest)
888 it() link(bf(only user))(onlyuser)
890 it() link(bf(oplocks))(oplocks)
892 it() link(bf(path))(path)
894 it() link(bf(postexec))(postexec)
896 it() link(bf(postscript))(postscript)
898 it() link(bf(preexec))(preexec)
900 it() link(bf(preserve case))(preservecase)
902 it() link(bf(print command))(printcommand)
904 it() link(bf(print ok))(printok)
906 it() link(bf(printable))(printable)
908 it() link(bf(printer))(printer)
910 it() link(bf(printer driver))(printerdriver)
912 it() link(bf(printer driver location))(printerdriverlocation)
914 it() link(bf(printer name))(printername)
916 it() link(bf(printing))(printing)
918 it() link(bf(public))(public)
920 it() link(bf(queuepause command))(queuepausecommand)
922 it() link(bf(queueresume command))(queueresumecommand)
924 it() link(bf(read list))(readlist)
926 it() link(bf(read only))(readonly)
928 it() link(bf(revalidate))(revalidate)
930 it() link(bf(root postexec))(rootpostexec)
932 it() link(bf(root preexec))(rootpreexec)
934 it() link(bf(set directory))(setdirectory)
936 it() link(bf(share modes))(sharemodes)
938 it() link(bf(short preserve case))(shortpreservecase)
940 it() link(bf(status))(status)
942 it() link(bf(strict locking))(strictlocking)
944 it() link(bf(strict sync))(strictsync)
946 it() link(bf(sync always))(syncalways)
948 it() link(bf(user))(user)
950 it() link(bf(username))(username)
952 it() link(bf(users))(users)
954 it() link(bf(valid users))(validusers)
956 it() link(bf(veto files))(vetofiles)
958 it() link(bf(veto oplock files))(vetooplockfiles)
960 it() link(bf(volume))(volume)
962 it() link(bf(wide links))(widelinks)
964 it() link(bf(writable))(writable)
966 it() link(bf(write list))(writelist)
968 it() link(bf(write ok))(writeok)
970 it() link(bf(writeable))(writeable)
974 label(EXPLANATIONOFEACHPARAMETER)
975 manpagesection(EXPLANATION OF EACH PARAMETER)
980 dit(bf(admin users (S)))
982 This is a list of users who will be granted administrative privileges
983 on the share. This means that they will do all file operations as the
986 You should use this option very carefully, as any user in this list
987 will be able to do anything they like on the share, irrespective of
994 tt( admin users = jason)
997 dit(bf(allow hosts (S)))
999 A synonym for this parameter is link(bf('hosts allow'))(hostsallow)
1001 This parameter is a comma, space, or tab delimited set of hosts which
1002 are permitted to access a service.
1004 If specified in the link(bf([global]))(global) section then it will
1005 apply to all services, regardless of whether the individual service
1006 has a different setting.
1008 You can specify the hosts by name or IP number. For example, you could
1009 restrict access to only the hosts on a Class C subnet with something
1010 like tt("allow hosts = 150.203.5."). The full syntax of the list is
1011 described in the man page bf(hosts_access (5)). Note that this man
1012 page may not be present on your system, so a brief description will
1015 em(NOTE:) IF you wish to allow the url(bf(smbpasswd
1016 (8)))(smbpasswd.html.8) program to be run by local users to change
1017 their Samba passwords using the local url(bf(smbd (8)))(smbd.8.html)
1018 daemon, then you em(MUST) ensure that the localhost is listed in your
1019 bf(allow hosts) list, as url(bf(smbpasswd (8)))(smbpasswd.html.8) runs
1020 in client-server mode and is seen by the local
1021 url(bf(smbd))(smbd.8.html) process as just another client.
1023 You can also specify hosts by network/netmask pairs and by netgroup
1024 names if your system supports netgroups. The em(EXCEPT) keyword can also
1025 be used to limit a wildcard list. The following examples may provide
1028 bf(Example 1): allow localhost and all IPs in 150.203.*.* except one
1030 tt( hosts allow = localhost, 150.203. EXCEPT 150.203.6.66)
1032 bf(Example 2): allow localhost and hosts that match the given network/netmask
1034 tt( hosts allow = localhost, 150.203.15.0/255.255.255.0)
1036 bf(Example 3): allow a localhost plus a couple of hosts
1038 tt( hosts allow = localhost, lapland, arvidsjaur)
1040 bf(Example 4): allow only hosts in NIS netgroup "foonet" or localhost, but
1041 deny access from one particular host
1043 tt( hosts allow = @foonet, localhost)
1044 tt( hosts deny = pirate)
1046 Note that access still requires suitable user-level passwords.
1048 See url(bf(testparm (1)))(testparm.1.html) for a way of testing your
1049 host access to see if it does what you expect.
1052 tt( none (i.e., all hosts permitted access))
1055 tt( allow hosts = 150.203.5. localhost myhost.mynet.edu.au)
1057 label(alternatepermissions)
1058 dit(bf(alternate permissions (S)))
1060 This is a deprecated parameter. It no longer has any effect in Samba2.0.
1061 In previous versions of Samba it affected the way the DOS "read only"
1062 attribute was mapped for a file. In Samba2.0 a file is marked "read only"
1063 if the UNIX file does not have the 'w' bit set for the owner of the file,
1064 regardless if the owner of the file is the currently logged on user or not.
1067 dit(bf(announce as (G)))
1069 This specifies what type of server url(bf(nmbd))(nmbd.8.html) will
1070 announce itself as, to a network neighborhood browse list. By default
1071 this is set to Windows NT. The valid options are : "NT", "Win95" or
1072 "WfW" meaning Windows NT, Windows 95 and Windows for Workgroups
1073 respectively. Do not change this parameter unless you have a specific
1074 need to stop Samba appearing as an NT server as this may prevent Samba
1075 servers from participating as browser servers correctly.
1078 tt( announce as = NT)
1081 tt( announce as = Win95)
1083 label(announceversion)
1084 dit(bf(announce version (G)))
1086 This specifies the major and minor version numbers that nmbd will use
1087 when announcing itself as a server. The default is 4.2. Do not change
1088 this parameter unless you have a specific need to set a Samba server
1089 to be a downlevel server.
1092 tt( announce version = 4.2)
1095 tt( announce version = 2.0)
1099 dit(bf(auto services (G)))
1101 This is a list of services that you want to be automatically added to
1102 the browse lists. This is most useful for homes and printers services
1103 that would otherwise not be visible.
1105 Note that if you just want all printers in your printcap file loaded
1106 then the link(bf("load printers"))(loadprinters) option is easier.
1109 tt( no auto services)
1112 tt( auto services = fred lp colorlp)
1115 dit(bf(available (S)))
1117 This parameter lets you em('turn off') a service. If tt('available = no'),
1118 then em(ALL) attempts to connect to the service will fail. Such failures
1122 tt( available = yes)
1127 label(bindinterfacesonly)
1128 dit(bf(bind interfaces only (G)))
1130 This global parameter allows the Samba admin to limit what interfaces
1131 on a machine will serve smb requests. If affects file service
1132 url(bf(smbd))(smbd.8.html) and name service url(bf(nmbd))(nmbd.8.html)
1133 in slightly different ways.
1135 For name service it causes url(bf(nmbd))(nmbd.8.html) to bind to ports
1136 137 and 138 on the interfaces listed in the
1137 link(bf('interfaces'))(interfaces)
1138 parameter. url(bf(nmbd))(nmbd.8.html) also binds to the 'all
1139 addresses' interface (0.0.0.0) on ports 137 and 138 for the purposes
1140 of reading broadcast messages. If this option is not set then
1141 url(bf(nmbd))(nmbd.8.html) will service name requests on all of these
1142 sockets. If bf("bind interfaces only") is set then
1143 url(bf(nmbd))(nmbd.8.html) will check the source address of any
1144 packets coming in on the broadcast sockets and discard any that don't
1145 match the broadcast addresses of the interfaces in the
1146 link(bf('interfaces'))(interfaces) parameter list. As unicast packets
1147 are received on the other sockets it allows url(bf(nmbd))(nmbd.8.html)
1148 to refuse to serve names to machines that send packets that arrive
1149 through any interfaces not listed in the
1150 link(bf("interfaces"))(interfaces) list. IP Source address spoofing
1151 does defeat this simple check, however so it must not be used
1152 seriously as a security feature for url(bf(nmbd))(nmbd.8.html).
1154 For file service it causes url(bf(smbd))(smbd.8.html) to bind only to
1155 the interface list given in the link(bf('interfaces'))(interfaces)
1156 parameter. This restricts the networks that url(bf(smbd))(smbd.8.html)
1157 will serve to packets coming in those interfaces. Note that you
1158 should not use this parameter for machines that are serving PPP or
1159 other intermittent or non-broadcast network interfaces as it will not
1160 cope with non-permanent interfaces.
1162 In addition, to change a users SMB password, the
1163 url(bf(smbpasswd))(smbpasswd.8.html) by default connects to the
1164 em("localhost" - 127.0.0.1) address as an SMB client to issue the
1165 password change request. If bf("bind interfaces only") is set then
1166 unless the network address em(127.0.0.1) is added to the
1167 link(bf('interfaces'))(interfaces) parameter list then
1168 url(bf(smbpasswd))(smbpasswd.8.html) will fail to connect in it's
1169 default mode. url(bf(smbpasswd))(smbpasswd.8.html) can be forced to
1170 use the primary IP interface of the local host by using its
1171 url(bf("-r remote machine"))(smbpasswd.8.html#minusr) parameter, with
1172 bf("remote machine") set to the IP name of the primary interface
1176 tt( bind interfaces only = False)
1179 tt( bind interfaces only = True)
1181 label(blockinglocks)
1182 dit(bf(blocking locks (S)))
1184 This parameter controls the behavior of url(bf(smbd))(smbd.8.html) when
1185 given a request by a client to obtain a byte range lock on a region
1186 of an open file, and the request has a time limit associated with it.
1188 If this parameter is set and the lock range requested cannot be
1189 immediately satisfied, Samba 2.0 will internally queue the lock
1190 request, and periodically attempt to obtain the lock until the
1191 timeout period expires.
1193 If this parameter is set to "False", then Samba 2.0 will behave
1194 as previous versions of Samba would and will fail the lock
1195 request immediately if the lock range cannot be obtained.
1197 This parameter can be set per share.
1200 tt( blocking locks = True)
1203 tt( blocking locks = False)
1206 dit(bf(browseable (S)))
1208 Synonym for link(bf(browseable))(browseable).
1211 dit(bf(browse list(G)))
1213 This controls whether url(bf(smbd))(smbd.8.html) will serve a browse
1214 list to a client doing a NetServerEnum call. Normally set to true. You
1215 should never need to change this.
1218 tt( browse list = Yes)
1223 This controls whether this share is seen in the list of available
1224 shares in a net view and in the browse list.
1227 tt( browseable = Yes)
1230 tt( browseable = No)
1232 label(casesensitive)
1233 dit(bf(case sensitive (G)))
1235 See the discussion in the section link(bf(NAME MANGLING))(NAMEMANGLING).
1238 dit(bf(casesignames (G)))
1240 Synonym for link(bf("case sensitive"))(casesensitive).
1242 label(changenotifytimeout)
1243 dit(bf(change notify timeout (G)))
1245 One of the new NT SMB requests that Samba 2.0 supports is the
1246 "ChangeNotify" requests. This SMB allows a client to tell a server to
1247 em("watch") a particular directory for any changes and only reply to
1248 the SMB request when a change has occurred. Such constant scanning of
1249 a directory is expensive under UNIX, hence an
1250 url(bf(smbd))(smbd.8.html) daemon only performs such a scan on each
1251 requested directory once every bf(change notify timeout) seconds.
1253 bf(change notify timeout) is specified in units of seconds.
1256 tt( change notify timeout = 60)
1259 tt( change notify timeout = 300)
1261 Would change the scan time to every 5 minutes.
1264 dit(bf(character set (G)))
1266 This allows a smbd to map incoming filenames from a DOS Code page (see
1267 the link(bf(client code page))(clientcodepage) parameter) to several
1268 built in UNIX character sets. The built in code page translations are:
1272 it() bf(ISO8859-1) Western European UNIX character set. The parameter
1273 link(bf(client code page))(clientcodepage) em(MUST) be set to code
1274 page 850 if the bf(character set) parameter is set to iso8859-1
1275 in order for the conversion to the UNIX character set to be done
1278 it() bf(ISO8859-2) Eastern European UNIX character set. The parameter
1279 link(bf(client code page))(clientcodepage) em(MUST) be set to code
1280 page 852 if the bf(character set) parameter is set to ISO8859-2
1281 in order for the conversion to the UNIX character set to be done
1284 it() bf(ISO8859-5) Russian Cyrillic UNIX character set. The parameter
1285 link(bf(client code page))(clientcodepage) em(MUST) be set to code
1286 page 866 if the bf(character set) parameter is set to ISO8859-2
1287 in order for the conversion to the UNIX character set to be done
1290 it() bf(KOI8-R) Alternate mapping for Russian Cyrillic UNIX
1291 character set. The parameter link(bf(client code
1292 page))(clientcodepage) em(MUST) be set to code page 866 if the
1293 bf(character set) parameter is set to KOI8-R in order for the
1294 conversion to the UNIX character set to be done correctly.
1298 em(BUG). These MSDOS code page to UNIX character set mappings should
1299 be dynamic, like the loading of MS DOS code pages, not static.
1301 See also link(bf(client code page))(clientcodepage). Normally this
1302 parameter is not set, meaning no filename translation is done.
1305 tt( character set = <empty string>)
1308 tt( character set = ISO8859-1)
1310 label(clientcodepage)
1311 dit(bf(client code page (G)))
1313 This parameter specifies the DOS code page that the clients accessing
1314 Samba are using. To determine what code page a Windows or DOS client
1315 is using, open a DOS command prompt and type the command "chcp". This
1316 will output the code page. The default for USA MS-DOS, Windows 95, and
1317 Windows NT releases is code page 437. The default for western european
1318 releases of the above operating systems is code page 850.
1320 This parameter tells url(bf(smbd))(smbd.8.html) which of the
1321 tt(codepage.XXX) files to dynamically load on startup. These files,
1322 described more fully in the manual page url(bf(make_smbcodepage
1323 (1)))(make_smbcodepage.1.html), tell url(bf(smbd))(smbd.8.html) how
1324 to map lower to upper case characters to provide the case insensitivity
1325 of filenames that Windows clients expect.
1327 Samba currently ships with the following code page files :
1331 it() bf(Code Page 437 - MS-DOS Latin US)
1333 it() bf(Code Page 737 - Windows '95 Greek)
1335 it() bf(Code Page 850 - MS-DOS Latin 1)
1337 it() bf(Code Page 852 - MS-DOS Latin 2)
1339 it() bf(Code Page 861 - MS-DOS Icelandic)
1341 it() bf(Code Page 866 - MS-DOS Cyrillic)
1343 it() bf(Code Page 932 - MS-DOS Japanese SJIS)
1345 it() bf(Code Page 936 - MS-DOS Simplified Chinese)
1347 it() bf(Code Page 949 - MS-DOS Korean Hangul)
1349 it() bf(Code Page 950 - MS-DOS Traditional Chinese)
1353 Thus this parameter may have any of the values 437, 737, 850, 852,
1354 861, 932, 936, 949, or 950. If you don't find the codepage you need,
1355 read the comments in one of the other codepage files and the
1356 url(bf(make_smbcodepage (1)))(make_smbcodepage.1.html) man page and
1357 write one. Please remember to donate it back to the Samba user
1360 This parameter co-operates with the link(bf("valid
1361 chars"))(validchars) parameter in determining what characters are
1362 valid in filenames and how capitalization is done. If you set both
1363 this parameter and the link(bf("valid chars"))(validchars) parameter
1364 the bf("client code page") parameter em(MUST) be set before the
1365 link(bf("valid chars"))(validchars) parameter in the bf(smb.conf)
1366 file. The link(bf("valid chars"))(validchars) string will then augment
1367 the character settings in the "client code page" parameter.
1369 If not set, bf("client code page") defaults to 850.
1371 See also : link(bf("valid chars"))(validchars)
1374 tt( client code page = 850)
1377 tt( client code page = 936)
1380 dit(bf(codingsystem (G)))
1382 This parameter is used to determine how incoming Shift-JIS Japanese
1383 characters are mapped from the incoming link(bf("client code
1384 page"))(clientcodepage) used by the client, into file names in the
1385 UNIX filesystem. Only useful if link(bf("client code
1386 page"))(clientcodepage) is set to 932 (Japanese Shift-JIS).
1392 it() bf(SJIS) Shift-JIS. Does no conversion of the incoming filename.
1394 it() bf(JIS8, J8BB, J8BH, J8@B, J8@J, J8@H ) Convert from incoming
1395 Shift-JIS to eight bit JIS code with different shift-in, shift out
1398 it() bf(JIS7, J7BB, J7BH, J7@B, J7@J, J7@H ) Convert from incoming
1399 Shift-JIS to seven bit JIS code with different shift-in, shift out
1402 it() bf(JUNET, JUBB, JUBH, JU@B, JU@J, JU@H ) Convert from incoming
1403 Shift-JIS to JUNET code with different shift-in, shift out codes.
1405 it() bf(EUC) Convert an incoming Shift-JIS character to EUC code.
1407 it() bf(HEX) Convert an incoming Shift-JIS character to a 3 byte hex
1408 representation, i.e. tt(:AB).
1410 it() bf(CAP) Convert an incoming Shift-JIS character to the 3 byte hex
1411 representation used by the Columbia AppleTalk Program (CAP),
1412 i.e. tt(:AB). This is used for compatibility between Samba and CAP.
1417 dit(bf(comment (S)))
1419 This is a text field that is seen next to a share when a client does a
1420 queries the server, either via the network neighborhood or via "net
1421 view" to list what shares are available.
1423 If you want to set the string that is displayed next to the machine
1424 name then see the server string command.
1427 tt( No comment string)
1430 tt( comment = Fred's Files)
1433 dit(bf(config file (G)))
1435 This allows you to override the config file to use, instead of the
1436 default (usually bf(smb.conf)). There is a chicken and egg problem
1437 here as this option is set in the config file!
1439 For this reason, if the name of the config file has changed when the
1440 parameters are loaded then it will reload them from the new config
1443 This option takes the usual substitutions, which can be very useful.
1445 If the config file doesn't exist then it won't be loaded (allowing you
1446 to special case the config files of just a few clients).
1449 tt( config file = /usr/local/samba/lib/smb.conf.%m)
1454 This parameter allows you to em('clone') service entries. The specified
1455 service is simply duplicated under the current service's name. Any
1456 parameters specified in the current section will override those in the
1457 section being copied.
1459 This feature lets you set up a 'template' service and create similar
1460 services easily. Note that the service being copied must occur earlier
1461 in the configuration file than the service doing the copying.
1467 tt( copy = otherservice)
1470 dit(bf(create mask (S)))
1472 A synonym for this parameter is link(bf('create mode'))(createmode).
1474 When a file is created, the necessary permissions are calculated
1475 according to the mapping from DOS modes to UNIX permissions, and the
1476 resulting UNIX mode is then bit-wise 'AND'ed with this parameter.
1477 This parameter may be thought of as a bit-wise MASK for the UNIX modes
1478 of a file. Any bit em(*not*) set here will be removed from the modes set
1479 on a file when it is created.
1481 The default value of this parameter removes the 'group' and 'other'
1482 write and execute bits from the UNIX modes.
1484 Following this Samba will bit-wise 'OR' the UNIX mode created from
1485 this parameter with the value of the "force create mode" parameter
1486 which is set to 000 by default.
1488 This parameter does not affect directory modes. See the parameter
1489 link(bf('directory mode'))(directorymode) for details.
1491 See also the link(bf("force create mode"))(forcecreatemode) parameter
1492 for forcing particular mode bits to be set on created files. See also
1493 the link(bf("directory mode"))(directorymode) parameter for masking
1494 mode bits on created directories.
1497 tt( create mask = 0744)
1500 tt( create mask = 0775)
1503 dit(bf(create mode (S)))
1505 This is a synonym for link(bf(create mask))(createmask).
1508 dit(bf(deadtime (G)))
1510 The value of the parameter (a decimal integer) represents the number
1511 of minutes of inactivity before a connection is considered dead, and
1512 it is disconnected. The deadtime only takes effect if the number of
1515 This is useful to stop a server's resources being exhausted by a large
1516 number of inactive connections.
1518 Most clients have an auto-reconnect feature when a connection is
1519 broken so in most cases this parameter should be transparent to users.
1521 Using this parameter with a timeout of a few minutes is recommended
1524 A deadtime of zero indicates that no auto-disconnection should be
1533 label(debugtimestamp)
1534 dit(bf(debug timestamp (G)))
1536 Samba2.0 debug log messages are timestamped by default. If you are
1537 running at a high link(bf("debug level"))(debuglevel) these timestamps
1538 can be distracting. This boolean parameter allows them to be turned
1542 tt( debug timestamp = Yes)
1545 tt( debug timestamp = No)
1548 dit(bf(debug level (G)))
1550 The value of the parameter (an integer) allows the debug level
1551 (logging level) to be specified in the bf(smb.conf) file. This is to
1552 give greater flexibility in the configuration of the system.
1554 The default will be the debug level specified on the command line
1555 or level zero if none was specified.
1558 tt( debug level = 3)
1561 dit(bf(default (G)))
1563 A synonym for link(bf(default service))(defaultservice).
1566 dit(bf(default case (S)))
1568 See the section on link(bf("NAME MANGLING"))(NAMEMANGLING). Also note
1569 the link(bf("short preserve case"))(shortpreservecase) parameter.
1571 label(default service)
1572 dit(bf(default service (G)))
1574 This parameter specifies the name of a service which will be connected
1575 to if the service actually requested cannot be found. Note that the
1576 square brackets are em(NOT) given in the parameter value (see example
1579 There is no default value for this parameter. If this parameter is not
1580 given, attempting to connect to a nonexistent service results in an
1583 Typically the default service would be a link(bf(guest ok))(guestok),
1584 link(bf(read-only))(readonly) service.
1586 Also note that the apparent service name will be changed to equal that
1587 of the requested service, this is very useful as it allows you to use
1588 macros like link(bf(%S))(percentS) to make a wildcard service.
1590 Note also that any tt('_') characters in the name of the service used
1591 in the default service will get mapped to a tt('/'). This allows for
1597 default service = pub
1603 label(deletereadonly)
1604 dit(bf(delete readonly (S)))
1606 This parameter allows readonly files to be deleted. This is not
1607 normal DOS semantics, but is allowed by UNIX.
1609 This option may be useful for running applications such as rcs, where
1610 UNIX file ownership prevents changing file permissions, and DOS
1611 semantics prevent deletion of a read only file.
1614 tt( delete readonly = No)
1617 tt( delete readonly = Yes)
1619 label(deletevetofiles)
1620 dit(bf(delete veto files (S)))
1622 This option is used when Samba is attempting to delete a directory
1623 that contains one or more vetoed directories (see the link(bf('veto
1624 files'))(vetofiles) option). If this option is set to False (the
1625 default) then if a vetoed directory contains any non-vetoed files or
1626 directories then the directory delete will fail. This is usually what
1629 If this option is set to True, then Samba will attempt to recursively
1630 delete any files and directories within the vetoed directory. This can
1631 be useful for integration with file serving systems such as bf(NetAtalk),
1632 which create meta-files within directories you might normally veto
1633 DOS/Windows users from seeing (e.g. tt(.AppleDouble))
1635 Setting tt('delete veto files = True') allows these directories to be
1636 transparently deleted when the parent directory is deleted (so long
1637 as the user has permissions to do so).
1639 See also the link(bf(veto files))(vetofiles) parameter.
1642 tt( delete veto files = False)
1645 tt( delete veto files = True)
1648 dit(bf(deny hosts (S)))
1650 The opposite of link(bf('allow hosts'))(allowhosts) - hosts listed
1651 here are em(NOT) permitted access to services unless the specific
1652 services have their own lists to override this one. Where the lists
1653 conflict, the link(bf('allow'))(allowhosts) list takes precedence.
1656 tt( none (i.e., no hosts specifically excluded))
1659 tt( deny hosts = 150.203.4. badhost.mynet.edu.au)
1662 dit(bf(dfree command (G)))
1664 The dfree command setting should only be used on systems where a
1665 problem occurs with the internal disk space calculations. This has
1666 been known to happen with Ultrix, but may occur with other operating
1667 systems. The symptom that was seen was an error of "Abort Retry
1668 Ignore" at the end of each directory listing.
1670 This setting allows the replacement of the internal routines to
1671 calculate the total disk space and amount available with an external
1672 routine. The example below gives a possible script that might fulfill
1675 The external program will be passed a single parameter indicating a
1676 directory in the filesystem being queried. This will typically consist
1677 of the string tt("./"). The script should return two integers in
1678 ascii. The first should be the total disk space in blocks, and the
1679 second should be the number of available blocks. An optional third
1680 return value can give the block size in bytes. The default blocksize
1683 Note: Your script should em(NOT) be setuid or setgid and should be
1684 owned by (and writeable only by) root!
1687 tt( By default internal routines for determining the disk capacity
1688 and remaining space will be used.)
1691 tt( dfree command = /usr/local/samba/bin/dfree)
1693 Where the script dfree (which must be made executable) could be:
1697 df $1 | tail -1 | awk '{print $2" "$4}'
1700 or perhaps (on Sys V based systems):
1704 /usr/bin/df -k $1 | tail -1 | awk '{print $3" "$5}'
1707 Note that you may have to replace the command names with full
1708 path names on some systems.
1711 dit(bf(directory (S)))
1713 Synonym for link(bf(path))(path).
1715 label(directorymask)
1716 dit(bf(directory mask (S)))
1718 This parameter is the octal modes which are used when converting DOS
1719 modes to UNIX modes when creating UNIX directories.
1721 When a directory is created, the necessary permissions are calculated
1722 according to the mapping from DOS modes to UNIX permissions, and the
1723 resulting UNIX mode is then bit-wise 'AND'ed with this parameter.
1724 This parameter may be thought of as a bit-wise MASK for the UNIX modes
1725 of a directory. Any bit em(*not*) set here will be removed from the
1726 modes set on a directory when it is created.
1728 The default value of this parameter removes the 'group' and 'other'
1729 write bits from the UNIX mode, allowing only the user who owns the
1730 directory to modify it.
1732 Following this Samba will bit-wise 'OR' the UNIX mode created from
1733 this parameter with the value of the "force directory mode"
1734 parameter. This parameter is set to 000 by default (i.e. no extra mode
1737 See the link(bf("force directory mode"))(forcedirectorymode) parameter
1738 to cause particular mode bits to always be set on created directories.
1740 See also the link(bf("create mode"))(createmode) parameter for masking
1741 mode bits on created files.
1744 tt( directory mask = 0755)
1747 tt( directory mask = 0775)
1749 label(directorymode)
1750 dit(bf(directory mode (S)))
1752 Synonym for link(bf(directory mask))(directorymask).
1755 dit(bf(dns proxy (G)))
1757 Specifies that url(bf(nmbd))(nmbd.8.html) when acting as a WINS
1758 server and finding that a NetBIOS name has not been registered, should
1759 treat the NetBIOS name word-for-word as a DNS name and do a lookup
1760 with the DNS server for that name on behalf of the name-querying
1763 Note that the maximum length for a NetBIOS name is 15 characters, so
1764 the DNS name (or DNS alias) can likewise only be 15 characters,
1767 url(bf(nmbd))(nmbd.8.html) spawns a second copy of itself to do the
1768 DNS name lookup requests, as doing a name lookup is a blocking action.
1770 See also the parameter link(bf(wins support))(winssupport).
1773 tt( dns proxy = yes)
1775 label(domainadmingroup)
1776 bf(domain admin group (G))
1778 This is an bf(EXPERIMENTAL) parameter that is part of the unfinished
1779 Samba NT Domain Controller Code. It has been removed as of November 98.
1780 To work with the latest code builds that may have more support for
1781 Samba NT Domain Controller functionality please subscribe to the
1782 mailing list bf(Samba-ntdom) available by sending email to
1783 email(listproc@samba.org)
1785 label(domainadminusers)
1786 dit(bf(domain admin users (G)))
1788 This is an bf(EXPERIMENTAL) parameter that is part of the unfinished
1789 Samba NT Domain Controller Code. It has been removed as of November 98.
1790 To work with the latest code builds that may have more support for
1791 Samba NT Domain Controller functionality please subscribe to the
1792 mailing list bf(Samba-ntdom) available by sending email to
1793 email(listproc@samba.org)
1795 label(domain controller)
1796 dit(bf(domain controller (G)))
1798 This is a bf(DEPRECATED) parameter. It is currently not used within
1799 the Samba source and should be removed from all current smb.conf
1800 files. It is left behind for compatibility reasons.
1802 label(domaingroupmap)
1803 dit(bf(domain group map (G)))
1805 This option allows you to specify a file containing unique mappings
1806 of individual NT Domain Group names (in any domain) to UNIX group
1807 names. This allows NT domain groups to be presented correctly to
1808 NT users, despite the lack of native support for the NT Security model
1809 (based on VAX/VMS) in UNIX. The reader is advised to become familiar
1810 with the NT Domain system and its administration.
1812 This option is used in conjunction with link(bf('local group map'))(localgroupmap)
1813 and link(bf('username map'))(usernamemap). The use of these three
1814 options is trivial and often unnecessary in the case where Samba is
1815 not expected to interact with any other SAM databases (whether local
1816 workstations or Domain Controllers).
1819 The map file is parsed line by line. If any line begins with a tt('#')
1820 or a tt(';') then it is ignored. Each line should contain a single UNIX
1821 group name on the left then an NT Domain Group name on the right.
1822 The line can be either of the form:
1824 tt( UNIXgroupname \\DOMAIN_NAME\\DomainGroupName )
1828 tt( UNIXgroupname DomainGroupName )
1830 In the case where Samba is either an bf(EXPERIMENTAL) Domain Controller
1831 or it is a member of a domain using link(bf("security = domain"))(security),
1832 the latter format can be used: the default Domain name is the Samba Server's
1833 Domain name, specified by link(bf("workgroup = MYGROUP"))(workgroup).
1835 Any UNIX groups that are em(NOT) specified in this map file are assumed
1836 to be Domain Groups.
1838 In this case, when Samba is an bf(EXPERIMENTAL) Domain Controller, Samba
1839 will present em(ALL) such unspecified UNIX groups as its own NT Domain
1840 Groups, with the same name.
1842 In the case where Samba is member of a domain using
1843 link(bf("security = domain"))(security), Samba will check the UNIX name with
1844 its Domain Controller (see link(bf("password server"))(passwordserver))
1845 as if it was an NT Domain Group. If the UNIX group is not an NT Group,
1846 such unspecified (unmapped) UNIX groups which also are not NT Domain
1847 Groups are treated as Local Groups in the Samba Server's local SAM database.
1848 NT Administrators will recognise these as Workstation Local Groups,
1849 which are managed by running bf(USRMGR.EXE) and selecting a remote
1850 Domain named "\\WORKSTATION_NAME", or by running bf(MUSRMGR.EXE) on
1851 a local Workstation.
1853 Note that adding an entry to map an arbitrary NT group in an arbitrary
1854 Domain to an arbitrary UNIX group requires the following: that the UNIX
1855 group exists on the UNIX server; that the NT Domain Group exists in the
1856 specified NT Domain; that the UNIX Server knows about the specified Domain;
1857 that all the UNIX users (who are expecting to access the Samba
1858 Server as the correct NT user and with the correct NT group permissions)
1859 in the UNIX group be mapped to the correct NT Domain users in the specified
1860 NT Domain using link(bf('username map'))(usernamemap).
1864 dit(bf(domain groups (G)))
1866 This is an bf(EXPERIMENTAL) parameter that is part of the unfinished
1867 Samba NT Domain Controller Code. It has been removed as of November 98.
1868 To work with the latest code builds that may have more support for
1869 Samba NT Domain Controller functionality please subscribe to the
1870 mailing list bf(Samba-ntdom) available by sending email to
1871 email(listproc@samba.org)
1873 label(domainguestgroup)
1874 dit(bf(domain guest group (G)))
1876 This is an bf(EXPERIMENTAL) parameter that is part of the unfinished
1877 Samba NT Domain Controller Code. It has been removed as of November 98.
1878 To work with the latest code builds that may have more support for
1879 Samba NT Domain Controller functionality please subscribe to the
1880 mailing list bf(Samba-ntdom) available by sending email to
1881 email(listproc@samba.org)
1883 label(domainguestusers)
1884 dit(bf(domain guest users (G)))
1886 This is an bf(EXPERIMENTAL) parameter that is part of the unfinished
1887 Samba NT Domain Controller Code. It has been removed as of November 98.
1888 To work with the latest code builds that may have more support for
1889 Samba NT Domain Controller functionality please subscribe to the
1890 mailing list bf(Samba-ntdom) available by sending email to
1891 email(listproc@samba.org)
1894 dit(bf(domain logons (G)))
1896 If set to true, the Samba server will serve Windows 95/98 Domain
1897 logons for the link(bf(workgroup))(workgroup) it is in. For more
1898 details on setting up this feature see the file DOMAINS.txt in the
1899 Samba documentation directory tt(docs/) shipped with the source code.
1901 Note that Win95/98 Domain logons are em(NOT) the same as Windows
1902 NT Domain logons. NT Domain logons require a Primary Domain Controller
1903 (PDC) for the Domain. It is intended that in a future release Samba
1904 will be able to provide this functionality for Windows NT clients
1908 tt( domain logons = no)
1911 dit(bf(domain master (G)))
1913 Tell url(bf(nmbd))(nmbd.8.html) to enable WAN-wide browse list
1914 collation. Setting this option causes url(bf(nmbd))(nmbd.8.html) to
1915 claim a special domain specific NetBIOS name that identifies it as a
1916 domain master browser for its given
1917 link(bf(workgroup))(workgroup). Local master browsers in the same
1918 link(bf(workgroup))(workgroup) on broadcast-isolated subnets will give
1919 this url(bf(nmbd))(nmbd.8.html) their local browse lists, and then
1920 ask url(bf(smbd))(smbd.8.html) for a complete copy of the browse list
1921 for the whole wide area network. Browser clients will then contact
1922 their local master browser, and will receive the domain-wide browse
1923 list, instead of just the list for their broadcast-isolated subnet.
1925 Note that Windows NT Primary Domain Controllers expect to be able to
1926 claim this link(bf(workgroup))(workgroup) specific special NetBIOS
1927 name that identifies them as domain master browsers for that
1928 link(bf(workgroup))(workgroup) by default (i.e. there is no way to
1929 prevent a Windows NT PDC from attempting to do this). This means that
1930 if this parameter is set and url(bf(nmbd))(nmbd.8.html) claims the
1931 special name for a link(bf(workgroup))(workgroup) before a Windows NT
1932 PDC is able to do so then cross subnet browsing will behave strangely
1936 tt( domain master = no)
1939 dit(bf(dont descend (S)))
1941 There are certain directories on some systems (e.g., the tt(/proc) tree
1942 under Linux) that are either not of interest to clients or are
1943 infinitely deep (recursive). This parameter allows you to specify a
1944 comma-delimited list of directories that the server should always show
1947 Note that Samba can be very fussy about the exact format of the "dont
1948 descend" entries. For example you may need tt("./proc") instead of
1949 just tt("/proc"). Experimentation is the best policy :-)
1952 tt( none (i.e., all directories are OK to descend))
1955 tt( dont descend = /proc,/dev)
1957 label(dosfiletimeresolution)
1958 dit(bf(dos filetime resolution (S)))
1960 Under the DOS and Windows FAT filesystem, the finest granularity on
1961 time resolution is two seconds. Setting this parameter for a share
1962 causes Samba to round the reported time down to the nearest two second
1963 boundary when a query call that requires one second resolution is made
1964 to url(bf(smbd))(smbd.8.html).
1966 This option is mainly used as a compatibility option for Visual C++
1967 when used against Samba shares. If oplocks are enabled on a share,
1968 Visual C++ uses two different time reading calls to check if a file
1969 has changed since it was last read. One of these calls uses a
1970 one-second granularity, the other uses a two second granularity. As
1971 the two second call rounds any odd second down, then if the file has a
1972 timestamp of an odd number of seconds then the two timestamps will not
1973 match and Visual C++ will keep reporting the file has changed. Setting
1974 this option causes the two timestamps to match, and Visual C++ is
1978 tt( dos filetime resolution = False)
1981 tt( dos filetime resolution = True)
1983 label(dos filetimes)
1984 dit(bf(dos filetimes (S)))
1986 Under DOS and Windows, if a user can write to a file they can change
1987 the timestamp on it. Under POSIX semantics, only the owner of the file
1988 or root may change the timestamp. By default, Samba runs with POSIX
1989 semantics and refuses to change the timestamp on a file if the user
1990 smbd is acting on behalf of is not the file owner. Setting this option
1991 to True allows DOS semantics and smbd will change the file timestamp as
1995 tt( dos filetimes = False)
1998 tt( dos filetimes = True)
2000 label(encryptpasswords)
2001 dit(bf(encrypt passwords (G)))
2003 This boolean controls whether encrypted passwords will be negotiated
2004 with the client. Note that Windows NT 4.0 SP3 and above and also
2005 Windows 98 will by default expect encrypted passwords unless a
2006 registry entry is changed. To use encrypted passwords in Samba see the
2007 file ENCRYPTION.txt in the Samba documentation directory tt(docs/)
2008 shipped with the source code.
2010 In order for encrypted passwords to work correctly
2011 url(bf(smbd))(smbd.8.html) must either have access to a local
2012 url(bf(smbpasswd (5)))(smbpasswd.5.html) file (see the
2013 url(bf(smbpasswd (8)))(smbpasswd.8.html) program for information on
2014 how to set up and maintain this file), or set the
2015 link(bf(security=))(security) parameter to either
2016 link(bf("server"))(securityequalserver) or
2017 link(bf("domain"))(securityequaldomain) which causes
2018 url(bf(smbd))(smbd.8.html) to authenticate against another server.
2023 This is a synonym for link(bf(preexec))(preexec).
2025 label(fake directory create times)
2026 dit(bf(fake directory create times (S)))
2028 NTFS and Windows VFAT file systems keep a create time for all files
2029 and directories. This is not the same as the ctime - status change
2030 time - that Unix keeps, so Samba by default reports the earliest of
2031 the various times Unix does keep. Setting this parameter for a share
2032 causes Samba to always report midnight 1-1-1980 as the create time for
2035 This option is mainly used as a compatibility option for Visual C++
2036 when used against Samba shares. Visual C++ generated makefiles have
2037 the object directory as a dependency for each object file, and a make
2038 rule to create the directory. Also, when NMAKE compares timestamps it
2039 uses the creation time when examining a directory. Thus the object
2040 directory will be created if it does not exist, but once it does exist
2041 it will always have an earlier timestamp than the object files it
2044 However, Unix time semantics mean that the create time reported by
2045 Samba will be updated whenever a file is created or deleted in the
2046 directory. NMAKE therefore finds all object files in the object
2047 directory bar the last one built are out of date compared to the
2048 directory and rebuilds them. Enabling this option ensures directories
2049 always predate their contents and an NMAKE build will proceed as
2053 tt( fake directory create times = False)
2056 tt( fake directory create times = True)
2059 dit(bf(fake oplocks (S)))
2061 Oplocks are the way that SMB clients get permission from a server to
2062 locally cache file operations. If a server grants an oplock
2063 (opportunistic lock) then the client is free to assume that it is the
2064 only one accessing the file and it will aggressively cache file
2065 data. With some oplock types the client may even cache file open/close
2066 operations. This can give enormous performance benefits.
2068 When you set tt("fake oplocks = yes") url(bf(smbd))(smbd.8.html) will
2069 always grant oplock requests no matter how many clients are using the
2072 It is generally much better to use the real link(bf(oplocks))(oplocks)
2073 support rather than this parameter.
2075 If you enable this option on all read-only shares or shares that you
2076 know will only be accessed from one client at a time such as
2077 physically read-only media like CDROMs, you will see a big performance
2078 improvement on many operations. If you enable this option on shares
2079 where multiple clients may be accessing the files read-write at the
2080 same time you can get data corruption. Use this option carefully!
2082 This option is disabled by default.
2084 label(followsymlinks)
2085 dit(bf(follow symlinks (S)))
2087 This parameter allows the Samba administrator to stop
2088 url(bf(smbd))(smbd.8.html) from following symbolic links in a
2089 particular share. Setting this parameter to em("No") prevents any file
2090 or directory that is a symbolic link from being followed (the user
2091 will get an error). This option is very useful to stop users from
2092 adding a symbolic link to tt(/etc/passwd) in their home directory for
2093 instance. However it will slow filename lookups down slightly.
2095 This option is enabled (i.e. url(bf(smbd))(smbd.8.html) will follow
2096 symbolic links) by default.
2098 label(forcecreatemode)
2099 dit(bf(force create mode (S)))
2101 This parameter specifies a set of UNIX mode bit permissions that will
2102 em(*always*) be set on a file created by Samba. This is done by
2103 bitwise 'OR'ing these bits onto the mode bits of a file that is being
2104 created. The default for this parameter is (in octal) 000. The modes
2105 in this parameter are bitwise 'OR'ed onto the file mode after the mask
2106 set in the link(bf("create mask"))(createmask) parameter is applied.
2108 See also the parameter link(bf("create mask"))(createmask) for details
2109 on masking mode bits on created files.
2112 tt( force create mode = 000)
2115 tt( force create mode = 0755)
2117 would force all created files to have read and execute permissions set
2118 for 'group' and 'other' as well as the read/write/execute bits set for
2121 label(forcedirectorymode)
2122 dit(bf(force directory mode (S)))
2124 This parameter specifies a set of UNIX mode bit permissions that will
2125 em(*always*) be set on a directory created by Samba. This is done by
2126 bitwise 'OR'ing these bits onto the mode bits of a directory that is
2127 being created. The default for this parameter is (in octal) 0000 which
2128 will not add any extra permission bits to a created directory. This
2129 operation is done after the mode mask in the parameter
2130 link(bf("directory mask"))(directorymask) is applied.
2132 See also the parameter link(bf("directory mask"))(directorymask) for
2133 details on masking mode bits on created directories.
2136 tt( force directory mode = 000)
2139 tt( force directory mode = 0755)
2141 would force all created directories to have read and execute
2142 permissions set for 'group' and 'other' as well as the
2143 read/write/execute bits set for the 'user'.
2146 dit(bf(force group (S)))
2148 This specifies a UNIX group name that will be assigned as the default
2149 primary group for all users connecting to this service. This is useful
2150 for sharing files by ensuring that all access to files on service will
2151 use the named group for their permissions checking. Thus, by assigning
2152 permissions for this group to the files and directories within this
2153 service the Samba administrator can restrict or allow sharing of these
2157 tt( no forced group)
2160 tt( force group = agroup)
2163 dit(bf(force user (S)))
2165 This specifies a UNIX user name that will be assigned as the default
2166 user for all users connecting to this service. This is useful for
2167 sharing files. You should also use it carefully as using it
2168 incorrectly can cause security problems.
2170 This user name only gets used once a connection is established. Thus
2171 clients still need to connect as a valid user and supply a valid
2172 password. Once connected, all file operations will be performed as the
2173 tt("forced user"), no matter what username the client connected as.
2175 This can be very useful.
2181 tt( force user = auser)
2186 This parameter allows the administrator to configure the string that
2187 specifies the type of filesystem a share is using that is reported by
2188 url(bf(smbd))(smbd.8.html) when a client queries the filesystem type
2189 for a share. The default type is bf("NTFS") for compatibility with
2190 Windows NT but this can be changed to other strings such as "Samba" or
2200 dit(bf(getwd cache (G)))
2202 This is a tuning option. When this is enabled a caching algorithm
2203 will be used to reduce the time taken for getwd() calls. This can have
2204 a significant impact on performance, especially when the
2205 link(bf(widelinks))(widelinks) parameter is set to False.
2208 tt( getwd cache = No)
2211 tt( getwd cache = Yes)
2216 Synonym for link(bf("force group"))(forcegroup).
2219 dit(bf(guest account (S)))
2221 This is a username which will be used for access to services which are
2222 specified as link(bf('guest ok'))(guestok) (see below). Whatever
2223 privileges this user has will be available to any client connecting to
2224 the guest service. Typically this user will exist in the password
2225 file, but will not have a valid login. The user account bf("ftp") is
2226 often a good choice for this parameter. If a username is specified in
2227 a given service, the specified username overrides this one.
2229 One some systems the default guest account "nobody" may not be able to
2230 print. Use another account in this case. You should test this by
2231 trying to log in as your guest user (perhaps by using the tt("su -")
2232 command) and trying to print using the system print command such as
2233 bf(lpr (1)) or bf(lp (1)).
2236 tt( specified at compile time, usually "nobody")
2239 tt( guest account = ftp)
2242 dit(bf(guest ok (S)))
2244 If this parameter is em('yes') for a service, then no password is
2245 required to connect to the service. Privileges will be those of the
2246 link(bf(guest account))(guestaccount).
2248 See the section below on link(bf(security))(security) for more
2249 information about this option.
2258 dit(bf(guest only (S)))
2260 If this parameter is em('yes') for a service, then only guest
2261 connections to the service are permitted. This parameter will have no
2262 affect if link(bf("guest ok"))(guestok) or link(bf("public"))(public)
2263 is not set for the service.
2265 See the section below on link(bf(security))(security) for more
2266 information about this option.
2269 tt( guest only = no)
2272 tt( guest only = yes)
2275 dit(bf(hide dot files (S)))
2277 This is a boolean parameter that controls whether files starting with
2278 a dot appear as hidden files.
2281 tt( hide dot files = yes)
2284 tt( hide dot files = no)
2288 dit(bf(hide files(S)))
2290 This is a list of files or directories that are not visible but are
2291 accessible. The DOS 'hidden' attribute is applied to any files or
2292 directories that match.
2294 Each entry in the list must be separated by a tt('/'), which allows
2295 spaces to be included in the entry. tt('*') and tt('?') can be used
2296 to specify multiple files or directories as in DOS wildcards.
2298 Each entry must be a Unix path, not a DOS path and must not include the
2299 Unix directory separator tt('/').
2301 Note that the case sensitivity option is applicable in hiding files.
2303 Setting this parameter will affect the performance of Samba, as it
2304 will be forced to check all files and directories for a match as they
2307 See also link(bf("hide dot files"))(hidedotfiles), link(bf("veto
2308 files"))(vetofiles) and link(bf("case sensitive"))(casesensitive).
2312 No files or directories are hidden by this option (dot files are
2313 hidden by default because of the "hide dot files" option).
2317 tt( hide files = /.*/DesktopFolderDB/TrashFor%m/resource.frk/)
2319 The above example is based on files that the Macintosh SMB client
2320 (DAVE) available from url(bf(Thursby))(www.thursby.com) creates for
2321 internal use, and also still hides all files beginning with a dot.
2324 dit(bf(homedir map (G)))
2326 If link(bf("nis homedir"))(nishomedir) is true, and
2327 url(bf(smbd))(smbd.8.html) is also acting as a Win95/98 link(bf(logon
2328 server))(domainlogons) then this parameter specifies the NIS (or YP)
2329 map from which the server for the user's home directory should be
2330 extracted. At present, only the Sun auto.home map format is
2331 understood. The form of the map is:
2333 tt(username server:/some/file/system)
2335 and the program will extract the servername from before the first
2336 tt(':'). There should probably be a better parsing system that copes
2337 with different map formats and also Amd (another automounter) maps.
2339 NB: A working NIS is required on the system for this option to work.
2341 See also link(bf("nis homedir"))(nishomedir), link(bf(domain
2342 logons))(domainlogons).
2345 tt( homedir map = auto.home)
2348 tt( homedir map = amd.homedir)
2351 dit(bf(hosts allow (S)))
2353 Synonym for link(bf(allow hosts))(allowhosts).
2356 dit(bf(hosts deny (S)))
2358 Synonym for link(bf(denyhosts))(denyhosts).
2361 dit(bf(hosts equiv (G)))
2363 If this global parameter is a non-null string, it specifies the name
2364 of a file to read for the names of hosts and users who will be allowed
2365 access without specifying a password.
2367 This is not be confused with link(bf(allow hosts))(allowhosts) which
2368 is about hosts access to services and is more useful for guest
2369 services. bf(hosts equiv) may be useful for NT clients which will not
2370 supply passwords to samba.
2372 NOTE: The use of bf(hosts equiv) can be a major security hole. This is
2373 because you are trusting the PC to supply the correct username. It is
2374 very easy to get a PC to supply a false username. I recommend that the
2375 bf(hosts equiv) option be only used if you really know what you are
2376 doing, or perhaps on a home network where you trust your spouse and
2377 kids. And only if you em(really) trust them :-).
2380 tt( No host equivalences)
2383 tt( hosts equiv = /etc/hosts.equiv)
2386 dit(bf(include (G)))
2388 This allows you to include one config file inside another. The file
2389 is included literally, as though typed in place.
2391 It takes the standard substitutions, except link(bf(%u))(percentu),
2392 link(bf(%P))(percentP) and link(bf(%S))(percentS).
2395 dit(bf(interfaces (G)))
2397 This option allows you to setup multiple network interfaces, so that
2398 Samba can properly handle browsing on all interfaces.
2400 The option takes a list of ip/netmask pairs. The netmask may either be
2401 a bitmask, or a bitlength.
2403 For example, the following line:
2405 tt(interfaces = 192.168.2.10/24 192.168.3.10/24)
2407 would configure two network interfaces with IP addresses 192.168.2.10
2408 and 192.168.3.10. The netmasks of both interfaces would be set to
2411 You could produce an equivalent result by using:
2413 tt(interfaces = 192.168.2.10/255.255.255.0 192.168.3.10/255.255.255.0)
2415 if you prefer that format.
2417 If this option is not set then Samba will attempt to find a primary
2418 interface, but won't attempt to configure more than one interface.
2420 See also link(bf("bind interfaces only"))(bindinterfacesonly).
2423 dit(bf(invalid users (S)))
2425 This is a list of users that should not be allowed to login to this
2426 service. This is really a em("paranoid") check to absolutely ensure an
2427 improper setting does not breach your security.
2429 A name starting with a tt('@') is interpreted as an NIS netgroup first
2430 (if your system supports NIS), and then as a UNIX group if the name
2431 was not found in the NIS netgroup database.
2433 A name starting with tt('+') is interpreted only by looking in the
2434 UNIX group database. A name starting with tt('&') is interpreted only
2435 by looking in the NIS netgroup database (this requires NIS to be
2436 working on your system). The characters tt('+') and tt('&') may be
2437 used at the start of the name in either order so the value
2438 tt("+&group") means check the UNIX group database, followed by the NIS
2439 netgroup database, and the value tt("&+group") means check the NIS
2440 netgroup database, followed by the UNIX group database (the same as
2441 the tt('@') prefix).
2443 The current servicename is substituted for
2444 link(bf(%S))(percentS). This is useful in the link(bf([homes]))(homes)
2447 See also link(bf("valid users"))(validusers).
2450 tt( No invalid users)
2453 tt( invalid users = root fred admin @wheel)
2456 dit(bf(keepalive (G)))
2458 The value of the parameter (an integer) represents the number of
2459 seconds between bf('keepalive') packets. If this parameter is zero, no
2460 keepalive packets will be sent. Keepalive packets, if sent, allow the
2461 server to tell whether a client is still present and responding.
2463 Keepalives should, in general, not be needed if the socket being used
2464 has the SO_KEEPALIVE attribute set on it (see link(bf("socket
2465 options"))(socketoptions)). Basically you should only use this option
2466 if you strike difficulties.
2472 tt( keep alive = 60)
2474 label(kerneloplocks)
2475 dit(bf(kernel oplocks (G)))
2477 For UNIXs that support kernel based link(bf(oplocks))(oplocks)
2478 (currently only IRIX but hopefully also Linux and FreeBSD soon) this
2479 parameter allows the use of them to be turned on or off.
2481 Kernel oplocks support allows Samba link(bf(oplocks))(oplocks) to be
2482 broken whenever a local UNIX process or NFS operation accesses a file
2483 that url(bf(smbd))(smbd.8.html) has oplocked. This allows complete
2484 data consistency between SMB/CIFS, NFS and local file access (and is a
2485 em(very) cool feature :-).
2487 This parameter defaults to em("On") on systems that have the support,
2488 and em("off") on systems that don't. You should never need to touch
2492 dit(bf(ldap filter (G)))
2494 This parameter is part of the em(EXPERIMENTAL) Samba support for a
2495 password database stored on an LDAP server back-end. These options
2496 are only available if your version of Samba was configured with
2497 the bf(--with-ldap) option.
2499 This parameter specifies an LDAP search filter used to search for a
2500 user name in the LDAP database. It must contain the string
2501 link(bf(%u))(percentU) which will be replaced with the user being
2508 dit(bf(ldap port (G)))
2510 This parameter is part of the em(EXPERIMENTAL) Samba support for a
2511 password database stored on an LDAP server back-end. These options
2512 are only available if your version of Samba was configured with
2513 the bf(--with-ldap) option.
2515 This parameter specifies the TCP port number to use to contact
2519 tt( ldap port = 389.)
2522 dit(bf(ldap root (G)))
2524 This parameter is part of the em(EXPERIMENTAL) Samba support for a
2525 password database stored on an LDAP server back-end. These options
2526 are only available if your version of Samba was configured with
2527 the bf(--with-ldap) option.
2529 This parameter specifies the entity to bind to the LDAP server
2530 as (essentially the LDAP username) in order to be able to perform
2531 queries and modifications on the LDAP database.
2533 See also link(bf(ldap root passwd))(ldaprootpasswd).
2536 tt( empty string (no user defined))
2538 label(ldaprootpasswd)
2539 dit(bf(ldap root passwd (G)))
2541 This parameter is part of the em(EXPERIMENTAL) Samba support for a
2542 password database stored on an LDAP server back-end. These options
2543 are only available if your version of Samba was configured with
2544 the bf(--with-ldap) option.
2546 This parameter specifies the password for the entity to bind to the
2547 LDAP server as (the password for this LDAP username) in order to be
2548 able to perform queries and modifications on the LDAP database.
2550 em(BUGS:) This parameter should em(NOT) be a readable parameter
2551 in the bf(smb.conf) file and will be removed once a correct
2552 storage place is found.
2554 See also link(bf(ldap root))(ldaproot).
2560 dit(bf(ldap server (G)))
2562 This parameter is part of the em(EXPERIMENTAL) Samba support for a
2563 password database stored on an LDAP server back-end. These options
2564 are only available if your version of Samba was configured with
2565 the bf(--with-ldap) option.
2567 This parameter specifies the DNS name of the LDAP server to use
2568 for SMB/CIFS authentication purposes.
2571 tt( ldap server = localhost)
2574 dit(bf(ldap suffix (G)))
2576 This parameter is part of the em(EXPERIMENTAL) Samba support for a
2577 password database stored on an LDAP server back-end. These options
2578 are only available if your version of Samba was configured with
2579 the bf(--with-ldap) option.
2581 This parameter specifies the tt("dn") or LDAP em("distinguished name")
2582 that tells url(bf(smbd))(smbd.8.html) to start from when searching
2583 for an entry in the LDAP password database.
2589 dit(bf(lm announce (G)))
2591 This parameter determines if url(bf(nmbd))(nmbd.8.html) will produce
2592 Lanman announce broadcasts that are needed by bf(OS/2) clients in order
2593 for them to see the Samba server in their browse list. This parameter
2594 can have three values, tt("true"), tt("false"), or tt("auto"). The
2595 default is tt("auto"). If set to tt("false") Samba will never produce
2596 these broadcasts. If set to tt("true") Samba will produce Lanman
2597 announce broadcasts at a frequency set by the parameter link(bf("lm
2598 interval"))(lminterval). If set to tt("auto") Samba will not send Lanman
2599 announce broadcasts by default but will listen for them. If it hears
2600 such a broadcast on the wire it will then start sending them at a
2601 frequency set by the parameter link(bf("lm interval"))(lminterval).
2603 See also link(bf("lm interval"))(lminterval).
2606 tt( lm announce = auto)
2609 tt( lm announce = true)
2612 dit(bf(lm interval (G)))
2614 If Samba is set to produce Lanman announce broadcasts needed by
2615 bf(OS/2) clients (see the link(bf("lm announce"))(lmannounce)
2616 parameter) then this parameter defines the frequency in seconds with
2617 which they will be made. If this is set to zero then no Lanman
2618 announcements will be made despite the setting of the link(bf("lm
2619 announce"))(lmannounce) parameter.
2621 See also link(bf("lm announce"))(lmannounce).
2624 tt( lm interval = 60)
2627 tt( lm interval = 120)
2630 dit(bf(load printers (G)))
2632 A boolean variable that controls whether all printers in the printcap
2633 will be loaded for browsing by default. See the
2634 link(bf("printers"))(printers) section for more details.
2637 tt( load printers = yes)
2640 tt( load printers = no)
2642 label(localgroupmap)
2643 dit(bf(local group map (G)))
2645 This option allows you to specify a file containing unique mappings
2646 of individual NT Local Group names (in any domain) to UNIX group
2647 names. This allows NT Local groups (aliases) to be presented correctly to
2648 NT users, despite the lack of native support for the NT Security model
2649 (based on VAX/VMS) in UNIX. The reader is advised to become familiar
2650 with the NT Domain system and its administration.
2652 This option is used in conjunction with link(bf('domain group map'))(domaingroupmap)
2653 and link(bf('username map'))(usernamemap). The use of these three
2654 options is trivial and often unnecessary in the case where Samba
2655 is not expected to interact with any other SAM databases (whether local
2656 workstations or Domain Controllers).
2659 The map file is parsed line by line. If any line begins with a tt('#')
2660 or a tt(';') then it is ignored. Each line should contain a single UNIX
2661 group name on the left then an NT Local Group name on the right.
2662 The line can be either of the form:
2664 tt( UNIXgroupname \\DOMAIN_NAME\\LocalGroupName )
2668 tt( UNIXgroupname LocalGroupName )
2670 In the case where Samba is either an bf(EXPERIMENTAL) Domain Controller
2671 or it is a member of a domain using link(bf("security = domain"))(security),
2672 the latter format can be used: the default Domain name is the Samba Server's
2673 Domain name, specified by link(bf("workgroup = MYGROUP"))(workgroup).
2675 Any UNIX groups that are em(NOT) specified in this map file are treated
2676 as Local Groups depending on the role of the Samba Server.
2678 When Samba is an bf(EXPERIMENTAL) Domain Controller, Samba
2679 will present em(ALL) unspecified UNIX groups as its own NT Domain
2680 Groups, with the same name, and em(NOT) as Local Groups.
2682 In the case where Samba is member of a domain using
2683 link(bf("security = domain"))(security), Samba will check the UNIX name with
2684 its Domain Controller (see link(bf("password server"))(passwordserver))
2685 as if it was an NT Domain Group. If the UNIX group is not an NT Group,
2686 such unspecified (unmapped) UNIX groups which also are not NT Domain
2687 Groups are treated as Local Groups in the Samba Server's local SAM database.
2688 NT Administrators will recognise these as Workstation Local Groups,
2689 which are managed by running bf(USRMGR.EXE) and selecting a remote
2690 Domain named "\\WORKSTATION_NAME", or by running bf(MUSRMGR.EXE) on
2691 a local Workstation.
2693 Note that adding an entry to map an arbitrary NT group in an arbitrary
2694 Domain to an arbitrary UNIX group requires the following: that the UNIX
2695 group exists on the UNIX server; that the NT Local Group exists in the
2696 specified NT Domain; that the UNIX Server knows about the specified Domain;
2697 that all the UNIX users (who are expecting to access the Samba
2698 Server as the correct NT user and with the correct NT group permissions)
2699 in the UNIX group be mapped to the correct NT Domain users in the specified
2700 NT Domain using link(bf('username map'))(usernamemap).
2704 dit(bf(local master (G)))
2706 This option allows url(bf(nmbd))(nmbd.8.html) to try and become a
2707 local master browser on a subnet. If set to False then
2708 url(bf(nmbd))(nmbd.8.html) will not attempt to become a local master
2709 browser on a subnet and will also lose in all browsing elections. By
2710 default this value is set to true. Setting this value to true doesn't
2711 mean that Samba will em(become) the local master browser on a subnet,
2712 just that url(bf(nmbd))(nmbd.8.html) will em(participate) in
2713 elections for local master browser.
2715 Setting this value to False will cause url(bf(nmbd))(nmbd.8.html)
2716 em(never) to become a local master browser.
2719 tt( local master = yes)
2722 dit(bf(lock dir (G)))
2724 Synonym for link(bf("lock directory"))(lockdirectory).
2726 label(lockdirectory)
2727 dit(bf(lock directory (G)))
2729 This option specifies the directory where lock files will be placed.
2730 The lock files are used to implement the link(bf("max
2731 connections"))(maxconnections) option.
2734 tt( lock directory = /tmp/samba)
2737 tt( lock directory = /usr/local/samba/var/locks)
2740 dit(bf(locking (S)))
2742 This controls whether or not locking will be performed by the server
2743 in response to lock requests from the client.
2745 If tt("locking = no"), all lock and unlock requests will appear to
2746 succeed and all lock queries will indicate that the queried lock is
2749 If tt("locking = yes"), real locking will be performed by the server.
2751 This option em(may) be useful for read-only filesystems which em(may)
2752 not need locking (such as cdrom drives), although setting this
2753 parameter of tt("no") is not really recommended even in this case.
2755 Be careful about disabling locking either globally or in a specific
2756 service, as lack of locking may result in data corruption. You should
2757 never need to set this parameter.
2766 dit(bf(log file (G)))
2768 This options allows you to override the name of the Samba log file
2769 (also known as the debug file).
2771 This option takes the standard substitutions, allowing you to have
2772 separate log files for each user or machine.
2775 tt( log file = /usr/local/samba/var/log.%m)
2778 dit(bf(log level (G)))
2780 Synonym for link(bf("debug level"))(debuglevel).
2783 dit(bf(logon drive (G)))
2785 This parameter specifies the local path to which the home directory
2786 will be connected (see link(bf("logon home"))(logonhome)) and is only
2787 used by NT Workstations.
2789 Note that this option is only useful if Samba is set up as a
2790 link(bf(logon server))(domainlogons).
2793 tt( logon drive = h:)
2796 dit(bf(logon home (G)))
2798 This parameter specifies the home directory location when a Win95/98 or
2799 NT Workstation logs into a Samba PDC. It allows you to do
2801 tt("NET USE H: /HOME")
2803 from a command prompt, for example.
2805 This option takes the standard substitutions, allowing you to have
2806 separate logon scripts for each user or machine.
2808 Note that this option is only useful if Samba is set up as a
2809 link(bf(logon server))(domainlogons).
2812 tt( logon home = "\\remote_smb_server\%U")
2815 tt( logon home = "\\%N\%U")
2818 dit(bf(logon path (G)))
2820 This parameter specifies the home directory where roaming profiles
2821 (USER.DAT / USER.MAN files for Windows 95/98) are stored.
2823 This option takes the standard substitutions, allowing you to have
2824 separate logon scripts for each user or machine. It also specifies
2825 the directory from which the tt("desktop"), tt("start menu"),
2826 tt("network neighborhood") and tt("programs") folders, and their
2827 contents, are loaded and displayed on your Windows 95/98 client.
2829 The share and the path must be readable by the user for the
2830 preferences and directories to be loaded onto the Windows 95/98
2831 client. The share must be writeable when the logs in for the first
2832 time, in order that the Windows 95/98 client can create the user.dat
2833 and other directories.
2835 Thereafter, the directories and any of the contents can, if required, be
2836 made read-only. It is not advisable that the USER.DAT file be made
2837 read-only - rename it to USER.MAN to achieve the desired effect (a
2838 em(MAN)datory profile).
2840 Windows clients can sometimes maintain a connection to the [homes]
2841 share, even though there is no user logged in. Therefore, it is vital
2842 that the logon path does not include a reference to the homes share
2843 (i.e. setting this parameter to tt(\\%N\HOMES\profile_path) will cause
2846 This option takes the standard substitutions, allowing you to have
2847 separate logon scripts for each user or machine.
2849 Note that this option is only useful if Samba is set up as a
2850 link(bf(logon server))(domainlogons).
2853 tt( logon path = \\%N\%U\profile)
2856 tt( logon path = \\PROFILESERVER\HOME_DIR\%U\PROFILE)
2859 dit(bf(logon script (G)))
2861 This parameter specifies the batch file (.bat) or NT command file
2862 (.cmd) to be downloaded and run on a machine when a user successfully
2863 logs in. The file must contain the DOS style cr/lf line endings.
2864 Using a DOS-style editor to create the file is recommended.
2866 The script must be a relative path to the tt([netlogon]) service. If
2867 the tt([netlogon]) service specifies a link(bf(path))(path) of
2868 /usr/local/samba/netlogon, and logon script = STARTUP.BAT, then the
2869 file that will be downloaded is:
2871 tt(/usr/local/samba/netlogon/STARTUP.BAT)
2873 The contents of the batch file is entirely your choice. A suggested
2874 command would be to add tt(NET TIME \\SERVER /SET /YES), to force every
2875 machine to synchronize clocks with the same time server. Another use
2876 would be to add tt(NET USE U: \\SERVER\UTILS) for commonly used
2877 utilities, or tt(NET USE Q: \\SERVER\ISO9001_QA) for example.
2879 Note that it is particularly important not to allow write access to
2880 the tt([netlogon]) share, or to grant users write permission on the
2881 batch files in a secure environment, as this would allow the batch
2882 files to be arbitrarily modified and security to be breached.
2884 This option takes the standard substitutions, allowing you to have
2885 separate logon scripts for each user or machine.
2887 Note that this option is only useful if Samba is set up as a
2888 link(bf(logon server))(domainlogons).
2891 tt( logon script = scripts\%U.bat)
2893 label(lppausecommand)
2894 dit(bf(lppause command (S)))
2896 This parameter specifies the command to be executed on the server host
2897 in order to stop printing or spooling a specific print job.
2899 This command should be a program or script which takes a printer name
2900 and job number to pause the print job. One way of implementing this is
2901 by using job priorities, where jobs having a too low priority won't be
2902 sent to the printer.
2904 If a tt("%p") is given then the printername is put in its place. A
2905 tt("%j") is replaced with the job number (an integer). On HPUX (see
2906 link(bf(printing=hpux))(printing)), if the tt("-p%p") option is added
2907 to the lpq command, the job will show up with the correct status,
2908 i.e. if the job priority is lower than the set fence priority it will
2909 have the PAUSED status, whereas if the priority is equal or higher it
2910 will have the SPOOLED or PRINTING status.
2912 Note that it is good practice to include the absolute path in the
2913 lppause command as the PATH may not be available to the server.
2915 See also the link(bf("printing"))(printing) parameter.
2918 Currently no default value is given to this string, unless the
2919 value of the link(bf("printing"))(printing) parameter is tt(SYSV), in
2920 which case the default is :
2922 tt( lp -i %p-%j -H hold)
2924 or if the value of the link(bf("printing"))(printing) parameter is tt(softq),
2925 then the default is:
2927 tt( qstat -s -j%j -h)
2929 bf(Example for HPUX:)
2930 lppause command = /usr/bin/lpalt %p-%j -p0
2933 dit(bf(lpq cache time (G)))
2935 This controls how long lpq info will be cached for to prevent the
2936 bf(lpq) command being called too often. A separate cache is kept for
2937 each variation of the bf(lpq) command used by the system, so if you
2938 use different bf(lpq) commands for different users then they won't
2939 share cache information.
2941 The cache files are stored in tt(/tmp/lpq.xxxx) where xxxx is a hash of
2942 the bf(lpq) command in use.
2944 The default is 10 seconds, meaning that the cached results of a
2945 previous identical bf(lpq) command will be used if the cached data is
2946 less than 10 seconds old. A large value may be advisable if your
2947 bf(lpq) command is very slow.
2949 A value of 0 will disable caching completely.
2951 See also the link(bf("printing"))(printing) parameter.
2954 tt( lpq cache time = 10)
2957 tt( lpq cache time = 30)
2960 dit(bf(lpq command (S)))
2962 This parameter specifies the command to be executed on the server host
2963 in order to obtain tt("lpq")-style printer status information.
2965 This command should be a program or script which takes a printer name
2966 as its only parameter and outputs printer status information.
2968 Currently eight styles of printer status information are supported;
2969 BSD, AIX, LPRNG, PLP, SYSV, HPUX, QNX and SOFTQ. This covers most UNIX
2970 systems. You control which type is expected using the
2971 link(bf("printing ="))(printing) option.
2973 Some clients (notably Windows for Workgroups) may not correctly send
2974 the connection number for the printer they are requesting status
2975 information about. To get around this, the server reports on the first
2976 printer service connected to by the client. This only happens if the
2977 connection number sent is invalid.
2979 If a tt(%p) is given then the printername is put in its place. Otherwise
2980 it is placed at the end of the command.
2982 Note that it is good practice to include the absolute path in the bf(lpq
2983 command) as the PATH may not be available to the server.
2985 See also the link(bf("printing"))(printing) parameter.
2988 tt( depends on the setting of printing =)
2991 tt( lpq command = /usr/bin/lpq %p)
2993 label(lpresumecommand)
2994 dit(bf(lpresume command (S)))
2996 This parameter specifies the command to be executed on the server host
2997 in order to restart or continue printing or spooling a specific print
3000 This command should be a program or script which takes a printer name
3001 and job number to resume the print job. See also the link(bf("lppause
3002 command"))(lppausecommand) parameter.
3004 If a tt(%p) is given then the printername is put in its place. A
3005 tt(%j) is replaced with the job number (an integer).
3007 Note that it is good practice to include the absolute path in the bf(lpresume
3008 command) as the PATH may not be available to the server.
3010 See also the link(bf("printing"))(printing) parameter.
3014 Currently no default value is given to this string, unless the
3015 value of the link(bf("printing"))(printing) parameter is tt(SYSV), in
3016 which case the default is :
3018 tt( lp -i %p-%j -H resume)
3020 or if the value of the link(bf("printing"))(printing) parameter is tt(softq),
3021 then the default is:
3023 tt( qstat -s -j%j -r)
3025 bf(Example for HPUX:)
3026 tt( lpresume command = /usr/bin/lpalt %p-%j -p2)
3029 dit(bf(lprm command (S)))
3031 This parameter specifies the command to be executed on the server host
3032 in order to delete a print job.
3034 This command should be a program or script which takes a printer name
3035 and job number, and deletes the print job.
3037 If a tt(%p) is given then the printername is put in its place. A
3038 tt(%j) is replaced with the job number (an integer).
3040 Note that it is good practice to include the absolute path in the
3041 bf(lprm command) as the PATH may not be available to the server.
3043 See also the link(bf("printing"))(printing) parameter.
3046 tt( depends on the setting of "printing =")
3049 tt( lprm command = /usr/bin/lprm -P%p %j)
3052 tt( lprm command = /usr/bin/cancel %p-%j)
3054 label(machinepasswordtimeout)
3055 dit(bf(machine password timeout (G)))
3057 If a Samba server is a member of an Windows NT Domain (see the
3058 link(bf("security=domain"))(securityequaldomain)) parameter) then
3059 periodically a running url(bf(smbd))(smbd.8.html) process will try and
3060 change the bf(MACHINE ACCOUNT PASWORD) stored in the file called
3061 tt(<Domain>.<Machine>.mac) where tt(<Domain>) is the name of the
3062 Domain we are a member of and tt(<Machine>) is the primary
3063 link(bf("NetBIOS name"))(netbiosname) of the machine
3064 url(bf(smbd))(smbd.8.html) is running on. This parameter specifies how
3065 often this password will be changed, in seconds. The default is one
3066 week (expressed in seconds), the same as a Windows NT Domain member
3069 See also url(bf(smbpasswd (8)))(smbpasswd.8.html), and the
3070 link(bf("security=domain"))(securityequaldomain)) parameter.
3073 tt( machine password timeout = 604800)
3076 dit(bf(magic output (S)))
3078 This parameter specifies the name of a file which will contain output
3079 created by a magic script (see the link(bf("magic
3080 script"))(magicscript) parameter below).
3082 Warning: If two clients use the same link(bf("magic
3083 script"))(magicscript) in the same directory the output file content
3087 tt( magic output = <magic script name>.out)
3090 tt( magic output = myfile.txt)
3093 dit(bf(magic script (S)))
3095 This parameter specifies the name of a file which, if opened, will be
3096 executed by the server when the file is closed. This allows a UNIX
3097 script to be sent to the Samba host and executed on behalf of the
3100 Scripts executed in this way will be deleted upon completion,
3101 permissions permitting.
3103 If the script generates output, output will be sent to the file
3104 specified by the link(bf("magic output"))(magicoutput) parameter (see
3107 Note that some shells are unable to interpret scripts containing
3108 carriage-return-linefeed instead of linefeed as the end-of-line
3109 marker. Magic scripts must be executable em("as is") on the host,
3110 which for some hosts and some shells will require filtering at the DOS
3113 Magic scripts are em(EXPERIMENTAL) and should em(NOT) be relied upon.
3116 tt( None. Magic scripts disabled.)
3119 tt( magic script = user.csh)
3122 dit(bf(mangle case (S)))
3124 See the section on link(bf("NAME MANGLING"))(NAMEMANGLING).
3127 dit(bf(mangled map (S)))
3129 This is for those who want to directly map UNIX file names which can
3130 not be represented on Windows/DOS. The mangling of names is not always
3131 what is needed. In particular you may have documents with file
3132 extensions that differ between DOS and UNIX. For example, under UNIX
3133 it is common to use tt(".html") for HTML files, whereas under
3134 Windows/DOS tt(".htm") is more commonly used.
3136 So to map tt("html") to tt("htm") you would use:
3138 tt( mangled map = (*.html *.htm))
3140 One very useful case is to remove the annoying tt(";1") off the ends
3141 of filenames on some CDROMS (only visible under some UNIXs). To do
3142 this use a map of (*;1 *).
3148 tt( mangled map = (*;1 *))
3151 dit(bf(mangled names (S)))
3153 This controls whether non-DOS names under UNIX should be mapped to
3154 DOS-compatible names ("mangled") and made visible, or whether non-DOS
3155 names should simply be ignored.
3157 See the section on link(bf("NAME MANGLING"))(NAMEMANGLING) for details
3158 on how to control the mangling process.
3160 If mangling is used then the mangling algorithm is as follows:
3164 it() The first (up to) five alphanumeric characters before the
3165 rightmost dot of the filename are preserved, forced to upper case, and
3166 appear as the first (up to) five characters of the mangled name.
3168 it() A tilde tt("~") is appended to the first part of the mangled
3169 name, followed by a two-character unique sequence, based on the
3170 original root name (i.e., the original filename minus its final
3171 extension). The final extension is included in the hash calculation
3172 only if it contains any upper case characters or is longer than three
3175 Note that the character to use may be specified using the
3176 link(bf("mangling char"))(manglingchar) option, if you don't like
3179 it() The first three alphanumeric characters of the final extension
3180 are preserved, forced to upper case and appear as the extension of the
3181 mangled name. The final extension is defined as that part of the
3182 original filename after the rightmost dot. If there are no dots in the
3183 filename, the mangled name will have no extension (except in the case
3184 of link(bf("hidden files"))(hidefiles) - see below).
3186 it() Files whose UNIX name begins with a dot will be presented as DOS
3187 hidden files. The mangled name will be created as for other filenames,
3188 but with the leading dot removed and tt("___") as its extension regardless
3189 of actual original extension (that's three underscores).
3193 The two-digit hash value consists of upper case alphanumeric
3196 This algorithm can cause name collisions only if files in a directory
3197 share the same first five alphanumeric characters. The probability of
3198 such a clash is 1/1300.
3200 The name mangling (if enabled) allows a file to be copied between UNIX
3201 directories from Windows/DOS while retaining the long UNIX
3202 filename. UNIX files can be renamed to a new extension from
3203 Windows/DOS and will retain the same basename. Mangled names do not
3204 change between sessions.
3207 tt( mangled names = yes)
3210 tt( mangled names = no)
3213 dit(bf(mangling char (S)))
3215 This controls what character is used as the em("magic") character in
3216 link(bf(name mangling))(manglednames). The default is a tt('~') but
3217 this may interfere with some software. Use this option to set it to
3218 whatever you prefer.
3221 tt( mangling char = ~)
3224 tt( mangling char = ^)
3227 dit(bf(mangled stack (G)))
3229 This parameter controls the number of mangled names that should be
3230 cached in the Samba server url(bf(smbd))(smbd.8.html).
3232 This stack is a list of recently mangled base names (extensions are
3233 only maintained if they are longer than 3 characters or contains upper
3236 The larger this value, the more likely it is that mangled names can be
3237 successfully converted to correct long UNIX names. However, large
3238 stack sizes will slow most directory access. Smaller stacks save
3239 memory in the server (each stack element costs 256 bytes).
3241 It is not possible to absolutely guarantee correct long file names, so
3242 be prepared for some surprises!
3245 tt( mangled stack = 50)
3248 tt( mangled stack = 100)
3251 dit(bf(map archive (S)))
3253 This controls whether the DOS archive attribute should be mapped to
3254 the UNIX owner execute bit. The DOS archive bit is set when a file
3255 has been modified since its last backup. One motivation for this
3256 option it to keep Samba/your PC from making any file it touches from
3257 becoming executable under UNIX. This can be quite annoying for shared
3258 source code, documents, etc...
3260 Note that this requires the link(bf("create mask"))(createmask)
3261 parameter to be set such that owner execute bit is not masked out
3262 (i.e. it must include 100). See the parameter link(bf("create
3263 mask"))(createmask) for details.
3266 tt( map archive = yes)
3269 tt( map archive = no)
3272 dit(bf(map hidden (S)))
3274 This controls whether DOS style hidden files should be mapped to the
3275 UNIX world execute bit.
3277 Note that this requires the link(bf("create mask"))(createmask) to be
3278 set such that the world execute bit is not masked out (i.e. it must
3279 include 001). See the parameter link(bf("create mask"))(createmask)
3283 tt( map hidden = no)
3286 tt( map hidden = yes)
3289 dit(bf(map system (S)))
3291 This controls whether DOS style system files should be mapped to the
3292 UNIX group execute bit.
3294 Note that this requires the link(bf("create mask"))(createmask) to be
3295 set such that the group execute bit is not masked out (i.e. it must
3296 include 010). See the parameter link(bf("create mask"))(createmask)
3300 tt( map system = no)
3303 tt( map system = yes)
3306 dit(bf(map to guest (G)))
3308 This parameter is only useful in link(bf(security))(security) modes
3309 other than link(bf("security=share"))(securityequalshare) - i.e. user,
3312 This parameter can take three different values, which tell
3313 url(bf(smbd))(smbd.8.html) what to do with user login requests that
3314 don't match a valid UNIX user in some way.
3316 The three settings are :
3320 it() bf("Never") - Means user login requests with an invalid password
3321 are rejected. This is the default.
3323 it() bf("Bad User") - Means user logins with an invalid password are
3324 rejected, unless the username does not exist, in which case it is
3325 treated as a guest login and mapped into the link(bf("guest
3326 account"))(guestaccount).
3328 it() bf("Bad Password") - Means user logins with an invalid
3329 password are treated as a guest login and mapped into the
3330 link(bf("guest account"))(guestaccount). Note that this can
3331 cause problems as it means that any user incorrectly typing their
3332 password will be silently logged on a bf("guest") - and
3333 will not know the reason they cannot access files they think
3334 they should - there will have been no message given to them
3335 that they got their password wrong. Helpdesk services will
3336 em(*hate*) you if you set the bf("map to guest") parameter
3341 Note that this parameter is needed to set up bf("Guest") share
3342 services when using link(bf(security))(security) modes other than
3343 share. This is because in these modes the name of the resource being
3344 requested is em(*not*) sent to the server until after the server has
3345 successfully authenticated the client so the server cannot make
3346 authentication decisions at the correct time (connection to the
3347 share) for bf("Guest") shares.
3349 For people familiar with the older Samba releases, this parameter
3350 maps to the old compile-time setting of the GUEST_SESSSETUP value
3354 tt( map to guest = Never)
3356 tt( map to guest = Bad User)
3358 label(maxconnections)
3359 dit(bf(max connections (S)))
3361 This option allows the number of simultaneous connections to a service
3362 to be limited. If bf("max connections") is greater than 0 then
3363 connections will be refused if this number of connections to the
3364 service are already open. A value of zero mean an unlimited number of
3365 connections may be made.
3367 Record lock files are used to implement this feature. The lock files
3368 will be stored in the directory specified by the link(bf("lock
3369 directory"))(lockdirectory) option.
3372 tt( max connections = 0)
3375 tt( max connections = 10)
3378 dit(bf(max disk size (G)))
3380 This option allows you to put an upper limit on the apparent size of
3381 disks. If you set this option to 100 then all shares will appear to be
3382 not larger than 100 MB in size.
3384 Note that this option does not limit the amount of data you can put on
3385 the disk. In the above case you could still store much more than 100
3386 MB on the disk, but if a client ever asks for the amount of free disk
3387 space or the total disk size then the result will be bounded by the
3388 amount specified in bf("max disk size").
3390 This option is primarily useful to work around bugs in some pieces of
3391 software that can't handle very large disks, particularly disks over
3394 A bf("max disk size") of 0 means no limit.
3397 tt( max disk size = 0)
3400 tt( max disk size = 1000)
3403 dit(bf(max log size (G)))
3405 This option (an integer in kilobytes) specifies the max size the log
3406 file should grow to. Samba periodically checks the size and if it is
3407 exceeded it will rename the file, adding a tt(".old") extension.
3409 A size of 0 means no limit.
3412 tt( max log size = 5000)
3415 tt( max log size = 1000)
3418 dit(bf(max mux (G)))
3420 This option controls the maximum number of outstanding simultaneous
3421 SMB operations that samba tells the client it will allow. You should
3422 never need to set this parameter.
3428 dit(bf(maxopenfiles (G)))
3430 This parameter limits the maximum number of open files that one
3431 url(bf(smbd))(smbd.8.html) file serving process may have open for
3432 a client at any one time. The default for this parameter is set
3433 very high (10,000) as Samba uses only one bit per unopened file.
3435 The limit of the number of open files is usually set by the
3436 UNIX per-process file descriptor limit rather than this parameter
3437 so you should never need to touch this parameter.
3440 tt( max open files = 10000)
3443 dit(bf(max packet (G)))
3445 Synonym for label(bf("packet size"))(packetsize).
3448 dit(bf(max ttl (G)))
3450 This option tells url(bf(nmbd))(nmbd.8.html) what the default 'time
3451 to live' of NetBIOS names should be (in seconds) when
3452 url(bf(nmbd))(nmbd.8.html) is requesting a name using either a
3453 broadcast packet or from a WINS server. You should never need to
3454 change this parameter. The default is 3 days.
3457 tt( max ttl = 259200)
3460 dit(bf(max wins ttl (G)))
3462 This option tells url(bf(nmbd))(nmbd.8.html) when acting as a WINS
3463 server link(bf((wins support =true)))(winssupport) what the maximum
3464 'time to live' of NetBIOS names that url(bf(nmbd))(nmbd.8.html) will
3465 grant will be (in seconds). You should never need to change this
3466 parameter. The default is 6 days (518400 seconds).
3468 See also the link(bf("min wins ttl"))(minwinsttl) parameter.
3471 tt( max wins ttl = 518400)
3474 dit(bf(max xmit (G)))
3476 This option controls the maximum packet size that will be negotiated
3477 by Samba. The default is 65535, which is the maximum. In some cases
3478 you may find you get better performance with a smaller value. A value
3479 below 2048 is likely to cause problems.
3482 tt( max xmit = 65535)
3485 tt( max xmit = 8192)
3487 label(messagecommand)
3488 dit(bf(message command (G)))
3490 This specifies what command to run when the server receives a WinPopup
3493 This would normally be a command that would deliver the message
3494 somehow. How this is to be done is up to your imagination.
3498 tt( message command = csh -c 'xedit %s;rm %s' &)
3500 This delivers the message using bf(xedit), then removes it
3501 afterwards. em(NOTE THAT IT IS VERY IMPORTANT THAT THIS COMMAND RETURN
3502 IMMEDIATELY). That's why I have the tt('&') on the end. If it doesn't
3503 return immediately then your PCs may freeze when sending messages
3504 (they should recover after 30secs, hopefully).
3506 All messages are delivered as the global guest user. The command takes
3507 the standard substitutions, although link(bf(%u))(percentu) won't work
3508 (link(bf(%U))(percentU) may be better in this case).
3510 Apart from the standard substitutions, some additional ones apply. In
3515 it() tt("%s") = the filename containing the message.
3517 it() tt("%t") = the destination that the message was sent to (probably the server
3520 it() tt("%f") = who the message is from.
3524 You could make this command send mail, or whatever else takes your
3525 fancy. Please let us know of any really interesting ideas you have.
3527 Here's a way of sending the messages as mail to root:
3529 tt(message command = /bin/mail -s 'message from %f on %m' root < %s; rm %s)
3531 If you don't have a message command then the message won't be
3532 delivered and Samba will tell the sender there was an
3533 error. Unfortunately WfWg totally ignores the error code and carries
3534 on regardless, saying that the message was delivered.
3536 If you want to silently delete it then try:
3538 tt("message command = rm %s").
3541 tt( no message command)
3544 tt( message command = csh -c 'xedit %s;rm %s' &)
3546 label(minprintspace)
3547 dit(bf(min print space (S)))
3549 This sets the minimum amount of free disk space that must be available
3550 before a user will be able to spool a print job. It is specified in
3551 kilobytes. The default is 0, which means a user can always spool a print
3554 See also the link(bf(printing))(printing) parameter.
3557 tt( min print space = 0)
3560 tt( min print space = 2000)
3563 dit(bf(min wins ttl (G)))
3565 This option tells url(bf(nmbd))(nmbd.8.html) when acting as a WINS
3566 server link(bf((wins support = true)))(winssupport) what the minimum
3567 'time to live' of NetBIOS names that url(bf(nmbd))(nmbd.8.html) will
3568 grant will be (in seconds). You should never need to change this
3569 parameter. The default is 6 hours (21600 seconds).
3572 tt( min wins ttl = 21600)
3575 label(nameresolveorder)
3576 dit(bf(name resolve order (G)))
3578 This option is used by the programs in the Samba suite to determine
3579 what naming services and in what order to resolve host names to IP
3580 addresses. The option takes a space separated string of different name
3583 The options are :"lmhosts", "host", "wins" and "bcast". They cause
3584 names to be resolved as follows :
3588 it() bf(lmhosts) : Lookup an IP address in the Samba lmhosts file.
3590 it() bf(host) : Do a standard host name to IP address resolution,
3591 using the system /etc/hosts, NIS, or DNS lookups. This method of name
3592 resolution is operating system depended for instance on IRIX or
3593 Solaris this may be controlled by the em(/etc/nsswitch.conf) file).
3595 it() bf(wins) : Query a name with the IP address listed in the
3596 link(bf(wins server))(winsserver) parameter. If no WINS server has
3597 been specified this method will be ignored.
3599 it() bf(bcast) : Do a broadcast on each of the known local interfaces
3600 listed in the link(bf(interfaces))(interfaces) parameter. This is the
3601 least reliable of the name resolution methods as it depends on the
3602 target host being on a locally connected subnet.
3607 tt( name resolve order = lmhosts host wins bcast)
3610 tt( name resolve order = lmhosts bcast host)
3612 This will cause the local lmhosts file to be examined first, followed
3613 by a broadcast attempt, followed by a normal system hostname lookup.
3615 label(netbiosaliases)
3616 dit(bf(netbios aliases (G)))
3618 This is a list of NetBIOS names that url(bf(nmbd))(nmbd.8.html) will
3619 advertise as additional names by which the Samba server is known. This
3620 allows one machine to appear in browse lists under multiple names. If
3621 a machine is acting as a link(bf(browse server))(localmaster) or
3622 link(bf(logon server))(domainlogons) none of these names will be
3623 advertised as either browse server or logon servers, only the primary
3624 name of the machine will be advertised with these capabilities.
3626 See also link(bf("netbios name"))(netbiosname).
3629 tt( empty string (no additional names))
3632 tt( netbios aliases = TEST TEST1 TEST2)
3635 dit(bf(netbios name (G)))
3637 This sets the NetBIOS name by which a Samba server is known. By
3638 default it is the same as the first component of the host's DNS name.
3639 If a machine is a link(bf(browse server))(localmaster) or
3640 link(bf(logon server))(domainlogons) this name (or the first component
3641 of the hosts DNS name) will be the name that these services are
3644 See also link(bf("netbios aliases"))(netbiosaliases).
3647 tt( Machine DNS name.)
3650 tt( netbios name = MYNAME)
3653 dit(bf(nis homedir (G)))
3655 Get the home share server from a NIS map. For UNIX systems that use an
3656 automounter, the user's home directory will often be mounted on a
3657 workstation on demand from a remote server.
3659 When the Samba logon server is not the actual home directory server,
3660 but is mounting the home directories via NFS then two network hops
3661 would be required to access the users home directory if the logon
3662 server told the client to use itself as the SMB server for home
3663 directories (one over SMB and one over NFS). This can be very
3666 This option allows Samba to return the home share as being on a
3667 different server to the logon server and as long as a Samba daemon is
3668 running on the home directory server, it will be mounted on the Samba
3669 client directly from the directory server. When Samba is returning the
3670 home share to the client, it will consult the NIS map specified in
3671 link(bf("homedir map"))(homedirmap) and return the server listed
3674 Note that for this option to work there must be a working NIS
3675 system and the Samba server with this option must also be a
3676 link(bf(logon server))(domainlogons).
3679 tt( nis homedir = false)
3682 tt( nis homedir = true)
3684 label(ntpipesupport)
3685 dit(bf(nt pipe support (G)))
3687 This boolean parameter controls whether url(bf(smbd))(smbd.8.html)
3688 will allow Windows NT clients to connect to the NT SMB specific
3689 tt(IPC$) pipes. This is a developer debugging option and can be left
3693 tt( nt pipe support = yes)
3696 dit(bf(nt smb support (G)))
3698 This boolean parameter controls whether url(bf(smbd))(smbd.8.html)
3699 will negotiate NT specific SMB support with Windows NT
3700 clients. Although this is a developer debugging option and should be
3701 left alone, benchmarking has discovered that Windows NT clients give
3702 faster performance with this option set to tt("no"). This is still
3703 being investigated. If this option is set to tt("no") then Samba
3704 offers exactly the same SMB calls that versions prior to Samba2.0
3705 offered. This information may be of use if any users are having
3706 problems with NT SMB support.
3709 tt( nt support = yes)
3711 label(nullpasswords)
3712 dit(bf(null passwords (G)))
3714 Allow or disallow client access to accounts that have null passwords.
3716 See also url(bf(smbpasswd (5)))(smbpasswd.5.html).
3719 tt( null passwords = no)
3722 tt( null passwords = yes)
3724 label(olelockingcompatibility)
3725 dit(bf(ole locking compatibility (G)))
3727 This parameter allows an administrator to turn off the byte range lock
3728 manipulation that is done within Samba to give compatibility for OLE
3729 applications. Windows OLE applications use byte range locking as a
3730 form of inter-process communication, by locking ranges of bytes around
3731 the 2^32 region of a file range. This can cause certain UNIX lock
3732 managers to crash or otherwise cause problems. Setting this parameter
3733 to tt("no") means you trust your UNIX lock manager to handle such cases
3737 tt( ole locking compatibility = yes)
3740 tt( ole locking compatibility = no)
3743 dit(bf(only guest (S)))
3745 A synonym for link(bf("guest only"))(guestonly).
3748 dit(bf(only user (S)))
3750 This is a boolean option that controls whether connections with
3751 usernames not in the link(bf(user=))(user) list will be allowed. By
3752 default this option is disabled so a client can supply a username to
3753 be used by the server.
3755 Note that this also means Samba won't try to deduce usernames from the
3756 service name. This can be annoying for the link(bf([homes]))(homes)
3757 section. To get around this you could use "link(bf(user))(user) =
3758 link(bf(%S))(percentS)" which means your link(bf("user"))(user) list
3759 will be just the service name, which for home directories is the name
3762 See also the link(bf(user))(user) parameter.
3765 tt( only user = False)
3768 tt( only user = True)
3771 dit(bf(oplocks (S)))
3773 This boolean option tells smbd whether to issue oplocks (opportunistic
3774 locks) to file open requests on this share. The oplock code can
3775 dramatically (approx. 30% or more) improve the speed of access to files
3776 on Samba servers. It allows the clients to aggressively cache files
3777 locally and you may want to disable this option for unreliable network
3778 environments (it is turned on by default in Windows NT Servers). For
3779 more information see the file Speed.txt in the Samba docs/ directory.
3781 Oplocks may be selectively turned off on certain files on a per share basis.
3782 See the 'veto oplock files' parameter. On some systems oplocks are recognized
3783 by the underlying operating system. This allows data synchronization between
3784 all access to oplocked files, whether it be via Samba or NFS or a local
3785 UNIX process. See the link(bf(kernel oplocks))(kerneloplocks) parameter
3792 tt( oplocks = False)
3795 dit(bf(os level (G)))
3797 This integer value controls what level Samba advertises itself as for
3798 browse elections. The value of this parameter determines whether
3799 url(bf(nmbd))(nmbd.8.html) has a chance of becoming a local master
3800 browser for the link(bf(WORKGROUP))(workgroup) in the local broadcast
3801 area. The default is zero, which means url(bf(nmbd))(nmbd.8.html) will
3802 lose elections to Windows machines. See BROWSING.txt in the Samba
3803 docs/ directory for details.
3809 tt( os level = 65 ; This will win against any NT Server)
3812 dit(bf(packet size (G)))
3814 This is a deprecated parameter that how no effect on the current
3815 Samba code. It is left in the parameter list to prevent breaking
3816 old bf(smb.conf) files.
3819 dit(bf(panic action (G)))
3821 This is a Samba developer option that allows a system command to be
3822 called when either url(bf(smbd))(smbd.8.html) or
3823 url(bf(nmbd))(nmbd.8.html) crashes. This is usually used to draw
3824 attention to the fact that a problem occurred.
3827 tt( panic action = <empty string>)
3830 dit(bf(passwd chat (G)))
3832 This string controls the em("chat") conversation that takes places
3833 between url(bf(smbd))(smbd.8.html) and the local password changing
3834 program to change the users password. The string describes a sequence
3835 of response-receive pairs that url(bf(smbd))(smbd.8.html) uses to
3836 determine what to send to the link(bf(passwd))(passwdprogram) program
3837 and what to expect back. If the expected output is not received then
3838 the password is not changed.
3840 This chat sequence is often quite site specific, depending on what
3841 local methods are used for password control (such as NIS etc).
3843 The string can contain the macros tt("%o") and tt("%n") which are
3844 substituted for the old and new passwords respectively. It can also
3845 contain the standard macros tt("\n"), tt("\r"), tt("\t") and tt("\s")
3846 to give line-feed, carriage-return, tab and space.
3848 The string can also contain a tt('*') which matches any sequence of
3851 Double quotes can be used to collect strings with spaces in them into
3854 If the send string in any part of the chat sequence is a fullstop
3855 tt(".") then no string is sent. Similarly, is the expect string is a
3856 fullstop then no string is expected.
3858 Note that if the link(bf("unix password sync"))(unixpasswordsync)
3859 parameter is set to true, then this sequence is called em(*AS ROOT*)
3860 when the SMB password in the smbpasswd file is being changed, without
3861 access to the old password cleartext. In this case the old password
3862 cleartext is set to tt("") (the empty string).
3864 See also link(bf("unix password sync"))(unixpasswordsync),
3865 link(bf("passwd program"))(passwdprogram) and link(bf("passwd chat
3866 debug"))(passwdchatdebug).
3869 verb( passwd chat = "*Enter OLD password*" %o\n "*Enter NEW password*" %n\n \
3870 "*Reenter NEW password*" %n\n "*Password changed*"
3874 verb( passwd chat = *old*password* %o\n *new*password* %n\n *new*password* %n\n *changed*)
3876 label(passwdchatdebug)
3877 dit(bf(passwd chat debug (G)))
3879 This boolean specifies if the passwd chat script parameter is run in
3880 tt("debug") mode. In this mode the strings passed to and received from
3881 the passwd chat are printed in the url(bf(smbd))(smbd.8.html) log with
3882 a link(bf("debug level"))(debuglevel) of 100. This is a dangerous
3883 option as it will allow plaintext passwords to be seen in the
3884 url(bf(smbd))(smbd.8.html) log. It is available to help Samba admins
3885 debug their link(bf("passwd chat"))(passwdchat) scripts when calling
3886 the link(bf("passwd program"))(passwdprogram) and should be turned off
3887 after this has been done. This parameter is off by default.
3889 See also link(bf("passwd chat"))(passwdchat"), link(bf("passwd
3890 program"))(passwdprogram).
3893 tt( passwd chat debug = True)
3896 tt( passwd chat debug = False)
3898 label(passwdprogram)
3899 dit(bf(passwd program (G)))
3901 The name of a program that can be used to set UNIX user passwords.
3902 Any occurrences of link(bf(%u))(percentu) will be replaced with the
3903 user name. The user name is checked for existence before calling the
3904 password changing program.
3906 Also note that many passwd programs insist in em("reasonable")
3907 passwords, such as a minimum length, or the inclusion of mixed case
3908 chars and digits. This can pose a problem as some clients (such as
3909 Windows for Workgroups) uppercase the password before sending it.
3911 em(Note) that if the link(bf("unix password sync"))(unixpasswordsync)
3912 parameter is set to tt("True") then this program is called em(*AS
3913 ROOT*) before the SMB password in the
3914 url(bf(smbpasswd))(smbpasswd.5.html) file is changed. If this UNIX
3915 password change fails, then url(bf(smbd))(smbd.8.html) will fail to
3916 change the SMB password also (this is by design).
3918 If the link(bf("unix password sync"))(unixpasswordsync) parameter is
3919 set this parameter em(MUST USE ABSOLUTE PATHS) for em(ALL) programs
3920 called, and must be examined for security implications. Note that by
3921 default link(bf("unix password sync"))(unixpasswordsync) is set to
3924 See also link(bf("unix password sync"))(unixpasswordsync).
3927 tt( passwd program = /bin/passwd)
3930 tt( passwd program = /sbin/passwd %u)
3932 label(passwordlevel)
3933 dit(bf(password level (G)))
3935 Some client/server combinations have difficulty with mixed-case
3936 passwords. One offending client is Windows for Workgroups, which for
3937 some reason forces passwords to upper case when using the LANMAN1
3938 protocol, but leaves them alone when using COREPLUS!
3940 This parameter defines the maximum number of characters that may be
3941 upper case in passwords.
3943 For example, say the password given was tt("FRED"). If bf(password
3944 level) is set to 1, the following combinations would be tried if
3947 tt("Fred"), tt("fred"), tt("fRed"), tt("frEd"), tt("freD")
3949 If bf(password level) was set to 2, the following combinations would
3952 tt("FRed"), tt("FrEd"), tt("FreD"), tt("fREd"), tt("fReD"),
3957 The higher value this parameter is set to the more likely it is that a
3958 mixed case password will be matched against a single case
3959 password. However, you should be aware that use of this parameter
3960 reduces security and increases the time taken to process a new
3963 A value of zero will cause only two attempts to be made - the password
3964 as is and the password in all-lower case.
3967 tt( password level = 0)
3970 tt( password level = 4)
3972 label(passwordserver)
3973 dit(bf(password server (G)))
3975 By specifying the name of another SMB server (such as a WinNT box)
3976 with this option, and using link(bf("security = domain"))(security) or
3977 link(bf("security = server"))(security) you can get Samba to do all
3978 its username/password validation via a remote server.
3980 This options sets the name of the password server to use. It must be a
3981 NetBIOS name, so if the machine's NetBIOS name is different from its
3982 internet name then you may have to add its NetBIOS name to the lmhosts
3983 file which is stored in the same directory as the bf(smb.conf) file.
3985 The name of the password server is looked up using the parameter
3986 link(bf("name resolve order="))(nameresolveorder) and so may resolved
3987 by any method and order described in that parameter.
3989 The password server much be a machine capable of using the "LM1.2X002"
3990 or the "LM NT 0.12" protocol, and it must be in user level security
3993 NOTE: Using a password server means your UNIX box (running Samba) is
3994 only as secure as your password server. em(DO NOT CHOOSE A PASSWORD
3995 SERVER THAT YOU DON'T COMPLETELY TRUST).
3997 Never point a Samba server at itself for password serving. This will
3998 cause a loop and could lock up your Samba server!
4000 The name of the password server takes the standard substitutions, but
4001 probably the only useful one is link(bf(%m))(percentm), which means
4002 the Samba server will use the incoming client as the password
4003 server. If you use this then you better trust your clients, and you
4004 better restrict them with hosts allow!
4006 If the link(bf("security"))(security) parameter is set to
4007 bf("domain"), then the list of machines in this option must be a list
4008 of Primary or Backup Domain controllers for the
4009 link(bf(Domain))(workgroup), as the Samba server is cryptographicly
4010 in that domain, and will use cryptographicly authenticated RPC calls
4011 to authenticate the user logging on. The advantage of using
4012 link(bf("security=domain"))(securityequaldomain) is that if you list
4013 several hosts in the bf("password server") option then
4014 url(bf(smbd))(smbd.8.html) will try each in turn till it finds one
4015 that responds. This is useful in case your primary server goes down.
4017 If the link(bf("security"))(security) parameter is set to
4018 link(bf("server"))(securityequalserver), then there are different
4019 restrictions that link(bf("security=domain"))(securityequaldomain)
4020 doesn't suffer from:
4024 it() You may list several password servers in the bf("password server")
4025 parameter, however if an url(bf(smbd))(smbd.8.html) makes a connection
4026 to a password server, and then the password server fails, no more
4027 users will be able to be authenticated from this
4028 url(bf(smbd))(smbd.8.html). This is a restriction of the SMB/CIFS
4029 protocol when in link(bf("security=server"))(securityequalserver) mode
4030 and cannot be fixed in Samba.
4032 it() If you are using a Windows NT server as your password server then
4033 you will have to ensure that your users are able to login from the
4034 Samba server, as when in
4035 link(bf("security=server"))(securityequalserver) mode the network
4036 logon will appear to come from there rather than from the users
4041 See also the link(bf("security"))(security) parameter.
4044 tt( password server = <empty string>)
4047 tt( password server = NT-PDC, NT-BDC1, NT-BDC2)
4052 This parameter specifies a directory to which the user of the service
4053 is to be given access. In the case of printable services, this is
4054 where print data will spool prior to being submitted to the host for
4057 For a printable service offering guest access, the service should be
4058 readonly and the path should be world-writeable and have the sticky bit
4059 set. This is not mandatory of course, but you probably won't get the
4060 results you expect if you do otherwise.
4062 Any occurrences of link(bf(%u))(percentu) in the path will be replaced
4063 with the UNIX username that the client is using on this
4064 connection. Any occurrences of link(bf(%m))(percentm) will be replaced
4065 by the NetBIOS name of the machine they are connecting from. These
4066 replacements are very useful for setting up pseudo home directories
4069 Note that this path will be based on link(bf("root dir"))(rootdir) if
4076 tt( path = /home/fred)
4079 dit(bf(postexec (S)))
4081 This option specifies a command to be run whenever the service is
4082 disconnected. It takes the usual substitutions. The command may be run
4083 as the root on some systems.
4085 An interesting example may be do unmount server resources:
4087 tt(postexec = /etc/umount /cdrom)
4089 See also link(bf(preexec))(preexec).
4092 tt( none (no command executed))
4095 tt( postexec = echo "%u disconnected from %S from %m (%I)" >> /tmp/log)
4098 dit(bf(postscript (S)))
4100 This parameter forces a printer to interpret the print files as
4101 postscript. This is done by adding a tt(%!) to the start of print output.
4103 This is most useful when you have lots of PCs that persist in putting
4104 a control-D at the start of print jobs, which then confuses your
4108 tt( postscript = False)
4111 tt( postscript = True)
4114 dit(bf(preexec (S)))
4116 This option specifies a command to be run whenever the service is
4117 connected to. It takes the usual substitutions.
4119 An interesting example is to send the users a welcome message every
4120 time they log in. Maybe a message of the day? Here is an example:
4123 preexec = csh -c 'echo \"Welcome to %S!\" | \
4124 /usr/local/samba/bin/smbclient -M %m -I %I' &
4127 Of course, this could get annoying after a while :-)
4129 See also link(bf(postexec))(postexec).
4132 tt( none (no command executed))
4135 tt( preexec = echo \"%u connected to %S from %m (%I)\" >> /tmp/log)
4137 label(preferredmaster)
4138 dit(bf(preferred master (G)))
4140 This boolean parameter controls if url(bf(nmbd))(nmbd.8.html) is a
4141 preferred master browser for its workgroup.
4143 If this is set to true, on startup, url(bf(nmbd))(nmbd.8.html) will
4144 force an election, and it will have a slight advantage in winning the
4145 election. It is recommended that this parameter is used in
4146 conjunction with link(bf("domain master = yes"))(domainmaster), so
4147 that url(bf(nmbd))(nmbd.8.html) can guarantee becoming a domain
4150 Use this option with caution, because if there are several hosts
4151 (whether Samba servers, Windows 95 or NT) that are preferred master
4152 browsers on the same subnet, they will each periodically and
4153 continuously attempt to become the local master browser. This will
4154 result in unnecessary broadcast traffic and reduced browsing
4157 See also link(bf(os level))(oslevel).
4160 tt( preferred master = no)
4163 tt( preferred master = yes)
4165 label(preferedmaster)
4166 dit(bf(prefered master (G)))
4168 Synonym for link(bf("preferred master"))(preferredmaster) for people
4169 who cannot spell :-).
4173 Synonym for link(bf("auto services"))(autoservices).
4176 dit(bf(preserve case (S)))
4178 This controls if new filenames are created with the case that the
4179 client passes, or if they are forced to be the tt("default") case.
4182 tt( preserve case = yes)
4184 See the section on link(bf("NAME MANGLING"))(NAMEMANGLING) for a
4188 dit(bf(print command (S)))
4190 After a print job has finished spooling to a service, this command
4191 will be used via a tt(system()) call to process the spool
4192 file. Typically the command specified will submit the spool file to
4193 the host's printing subsystem, but there is no requirement that this
4194 be the case. The server will not remove the spool file, so whatever
4195 command you specify should remove the spool file when it has been
4196 processed, otherwise you will need to manually remove old spool files.
4198 The print command is simply a text string. It will be used verbatim,
4199 with two exceptions: All occurrences of tt("%s") will be replaced by
4200 the appropriate spool file name, and all occurrences of tt("%p") will
4201 be replaced by the appropriate printer name. The spool file name is
4202 generated automatically by the server, the printer name is discussed
4205 The full path name will be used for the filename if tt("%s") is not
4206 preceded by a tt('/'). If you don't like this (it can stuff up some
4207 lpq output) then use tt("%f") instead. Any occurrences of tt("%f") get
4208 replaced by the spool filename without the full path at the front.
4210 The print command em(MUST) contain at least one occurrence of tt("%s")
4211 or tt("%f") - the tt("%p") is optional. At the time a job is
4212 submitted, if no printer name is supplied the tt("%p") will be
4213 silently removed from the printer command.
4215 If specified in the link(bf("[global]"))(global) section, the print
4216 command given will be used for any printable service that does not
4217 have its own print command specified.
4219 If there is neither a specified print command for a printable service
4220 nor a global print command, spool files will be created but not
4221 processed and (most importantly) not removed.
4223 Note that printing may fail on some UNIXs from the tt("nobody")
4224 account. If this happens then create an alternative guest account that
4225 can print and set the link(bf("guest account"))(guestaccount) in the
4226 link(bf("[global]"))(global) section.
4228 You can form quite complex print commands by realizing that they are
4229 just passed to a shell. For example the following will log a print
4230 job, print the file, then remove it. Note that tt(';') is the usual
4231 separator for command in shell scripts.
4233 tt(print command = echo Printing %s >> /tmp/print.log; lpr -P %p %s; rm %s)
4235 You may have to vary this command considerably depending on how you
4236 normally print files on your system. The default for the parameter
4237 varies depending on the setting of the link(bf("printing="))(printing)
4241 For link(bf("printing="))(printing) BSD, AIX, QNX, LPRNG or PLP :
4242 tt( print command = lpr -r -P%p %s)
4244 For link(bf("printing="))(printing) SYS or HPUX :
4245 tt( print command = lp -c -d%p %s; rm %s)
4247 For link(bf("printing="))(printing) SOFTQ :
4248 tt( print command = lp -d%p -s %s; rm %s)
4251 tt( print command = /usr/local/samba/bin/myprintscript %p %s)
4254 dit(bf(print ok (S)))
4256 Synonym for link(bf(printable))(printable).
4259 dit(bf(printable (S)))
4261 If this parameter is tt("yes"), then clients may open, write to and
4262 submit spool files on the directory specified for the service.
4264 Note that a printable service will ALWAYS allow writing to the service
4265 path (user privileges permitting) via the spooling of print data. The
4266 link(bf("read only"))(readonly) parameter controls only non-printing
4267 access to the resource.
4273 tt( printable = yes)
4276 dit(bf(printcap (G)))
4278 Synonym for link(bf(printcapname))(printcapname).
4281 dit(bf(printcap name (G)))
4283 This parameter may be used to override the compiled-in default
4284 printcap name used by the server (usually /etc/printcap). See the
4285 discussion of the link(bf([printers]))(printers) section above for
4286 reasons why you might want to do this.
4288 On System V systems that use bf(lpstat) to list available printers you
4289 can use tt("printcap name = lpstat") to automatically obtain lists of
4290 available printers. This is the default for systems that define SYSV
4291 at configure time in Samba (this includes most System V based
4292 systems). If bf("printcap name") is set to bf(lpstat) on these systems
4293 then Samba will launch tt("lpstat -v") and attempt to parse the output
4294 to obtain a printer list.
4296 A minimal printcap file would look something like this:
4306 where the tt('|') separates aliases of a printer. The fact that the
4307 second alias has a space in it gives a hint to Samba that it's a
4310 em(NOTE): Under AIX the default printcap name is
4311 tt("/etc/qconfig"). Samba will assume the file is in AIX tt("qconfig")
4312 format if the string tt("/qconfig") appears in the printcap filename.
4315 tt( printcap name = /etc/printcap)
4318 tt( printcap name = /etc/myprintcap)
4321 dit(bf(printer (S)))
4323 This parameter specifies the name of the printer to which print jobs
4324 spooled through a printable service will be sent.
4326 If specified in the link(bf([global]))(global) section, the printer
4327 name given will be used for any printable service that does not have
4328 its own printer name specified.
4331 none (but may be tt("lp") on many systems)
4334 printer name = laserwriter
4336 label(printerdriver)
4337 dit(bf(printer driver (S)))
4339 This option allows you to control the string that clients receive when
4340 they ask the server for the printer driver associated with a
4341 printer. If you are using Windows95 or WindowsNT then you can use this
4342 to automate the setup of printers on your system.
4344 You need to set this parameter to the exact string (case sensitive)
4345 that describes the appropriate printer driver for your system. If you
4346 don't know the exact string to use then you should first try with no
4347 bf("printer driver") option set and the client will give you a list of
4348 printer drivers. The appropriate strings are shown in a scrollbox
4349 after you have chosen the printer manufacturer.
4351 See also link(bf("printer driver file"))(printerdriverfile).
4354 printer driver = HP LaserJet 4L
4356 label(printerdriverfile)
4357 dit(bf(printer driver file (G)))
4359 This parameter tells Samba where the printer driver definition file,
4360 used when serving drivers to Windows 95 clients, is to be found. If
4361 this is not set, the default is :
4363 tt(SAMBA_INSTALL_DIRECTORY/lib/printers.def)
4365 This file is created from Windows 95 tt("msprint.def") files found on
4366 the Windows 95 client system. For more details on setting up serving
4367 of printer drivers to Windows 95 clients, see the documentation file
4368 in the docs/ directory, PRINTER_DRIVER.txt.
4371 tt( None (set in compile).)
4374 tt( printer driver file = /usr/local/samba/printers/drivers.def)
4376 See also link(bf("printer driver location"))(printerdriverlocation).
4378 label(printerdriverlocation)
4379 dit(bf(printer driver location (S)))
4381 This parameter tells clients of a particular printer share where to
4382 find the printer driver files for the automatic installation of
4383 drivers for Windows 95 machines. If Samba is set up to serve printer
4384 drivers to Windows 95 machines, this should be set to
4386 tt(\\MACHINE\aPRINTER$)
4388 Where MACHINE is the NetBIOS name of your Samba server, and PRINTER$
4389 is a share you set up for serving printer driver files. For more
4390 details on setting this up see the documentation file in the docs/
4391 directory, PRINTER_DRIVER.txt.
4397 tt( printer driver location = \\MACHINE\PRINTER$)
4399 See also link(bf("printer driver file"))(printerdriverfile).
4402 dit(bf(printer name (S)))
4404 Synonym for link(bf(printer))(printer).
4407 dit(bf(printing (S)))
4409 This parameters controls how printer status information is interpreted
4410 on your system, and also affects the default values for the
4411 link(bf("print command"))(printcommand), link(bf("lpq
4412 command"))(lpqcommand) link(bf("lppause command"))(lppausecommand),
4413 link(bf("lpresume command"))(lpresumecommand), and link(bf("lprm
4414 command"))(lprmcommand).
4416 Currently eight printing styles are supported. They are
4417 bf("printing=BSD"), bf("printing=AIX"), bf("printing=LPRNG"),
4419 bf("printing=SYSV"),bf("printing="HPUX"),bf("printing=QNX") and
4420 bf("printing=SOFTQ").
4422 To see what the defaults are for the other print commands when using
4423 these three options use the url(bf("testparm"))(testparm) program.
4425 This option can be set on a per printer basis
4427 See also the discussion in the link(bf([printers]))(printers) section.
4430 dit(bf(protocol (G)))
4432 The value of the parameter (a string) is the highest protocol level
4433 that will be supported by the server.
4435 Possible values are :
4439 it() CORE: Earliest version. No concept of user names.
4441 it() COREPLUS: Slight improvements on CORE for efficiency.
4443 it() LANMAN1: First em("modern") version of the protocol. Long
4446 it() LANMAN2: Updates to Lanman1 protocol.
4448 it() NT1: Current up to date version of the protocol. Used by Windows
4453 Normally this option should not be set as the automatic negotiation
4454 phase in the SMB protocol takes care of choosing the appropriate
4461 tt( protocol = LANMAN1)
4466 Synonym for link(bf("guest ok"))(guestok).
4468 label(queuepausecommand)
4469 dit(bf(queuepause command (S)))
4471 This parameter specifies the command to be executed on the server host
4472 in order to pause the printerqueue.
4474 This command should be a program or script which takes a printer name
4475 as its only parameter and stops the printerqueue, such that no longer
4476 jobs are submitted to the printer.
4478 This command is not supported by Windows for Workgroups, but can be
4479 issued from the Printer's window under Windows 95 & NT.
4481 If a tt("%p") is given then the printername is put in its
4482 place. Otherwise it is placed at the end of the command.
4484 Note that it is good practice to include the absolute path in the
4485 command as the PATH may not be available to the server.
4488 tt( depends on the setting of "printing =")
4491 tt( queuepause command = disable %p)
4493 label(queueresumecommand)
4494 dit(bf(queueresume command (S)))
4496 This parameter specifies the command to be executed on the server host
4497 in order to resume the printerqueue. It is the command to undo the
4498 behavior that is caused by the previous parameter
4499 (link(bf("queuepause command))(queuepausecommand)).
4501 This command should be a program or script which takes a printer name
4502 as its only parameter and resumes the printerqueue, such that queued
4503 jobs are resubmitted to the printer.
4505 This command is not supported by Windows for Workgroups, but can be
4506 issued from the Printer's window under Windows 95 & NT.
4508 If a tt("%p") is given then the printername is put in its
4509 place. Otherwise it is placed at the end of the command.
4511 Note that it is good practice to include the absolute path in the
4512 command as the PATH may not be available to the server.
4515 tt( depends on the setting of "printing =")
4518 tt( queuepause command = enable %p)
4521 dit(bf(read bmpx (G)))
4523 This boolean parameter controls whether url(bf(smbd))(smbd.8.html)
4524 will support the "Read Block Multiplex" SMB. This is now rarely used
4525 and defaults to off. You should never need to set this parameter.
4531 dit(bf(read list (S)))
4533 This is a list of users that are given read-only access to a
4534 service. If the connecting user is in this list then they will not be
4535 given write access, no matter what the link(bf("read only"))(readonly)
4536 option is set to. The list can include group names using the syntax
4537 described in the link(bf("invalid users"))(invalidusers) parameter.
4539 See also the link(bf("write list"))(writelist) parameter and
4540 the link(bf("invalid users"))(invalidusers) parameter.
4543 tt( read list = <empty string>)
4546 tt( read list = mary, @students)
4549 dit(bf(read only (S)))
4551 Note that this is an inverted synonym for
4552 link(bf("writeable"))(writeable) and link(bf("write ok"))(writeok).
4554 See also link(bf("writeable"))(writeable) and link(bf("write
4557 label(readprediction)
4558 dit(bf(read prediction (G)))
4560 em(NOTE): This code is currently disabled in Samba2.0 and
4561 may be removed at a later date. Hence this parameter has
4564 This options enables or disables the read prediction code used to
4565 speed up reads from the server. When enabled the server will try to
4566 pre-read data from the last accessed file that was opened read-only
4567 while waiting for packets.
4570 tt( read prediction = False)
4573 dit(bf(read raw (G)))
4575 This parameter controls whether or not the server will support the raw
4576 read SMB requests when transferring data to clients.
4578 If enabled, raw reads allow reads of 65535 bytes in one packet. This
4579 typically provides a major performance benefit.
4581 However, some clients either negotiate the allowable block size
4582 incorrectly or are incapable of supporting larger block sizes, and for
4583 these clients you may need to disable raw reads.
4585 In general this parameter should be viewed as a system tuning tool and left
4586 severely alone. See also link(bf("write raw"))(writeraw).
4592 dit(bf(read size (G)))
4594 The option bf("read size") affects the overlap of disk reads/writes
4595 with network reads/writes. If the amount of data being transferred in
4596 several of the SMB commands (currently SMBwrite, SMBwriteX and
4597 SMBreadbraw) is larger than this value then the server begins writing
4598 the data before it has received the whole packet from the network, or
4599 in the case of SMBreadbraw, it begins writing to the network before
4600 all the data has been read from disk.
4602 This overlapping works best when the speeds of disk and network access
4603 are similar, having very little effect when the speed of one is much
4604 greater than the other.
4606 The default value is 2048, but very little experimentation has been
4607 done yet to determine the optimal value, and it is likely that the
4608 best value will vary greatly between systems anyway. A value over
4609 65536 is pointless and will cause you to allocate memory
4613 tt( read size = 2048)
4616 tt( read size = 8192)
4618 label(remoteannounce)
4619 dit(bf(remote announce (G)))
4621 This option allows you to setup url(bf(nmbd))(nmbd.8.html) to
4622 periodically announce itself to arbitrary IP addresses with an
4623 arbitrary workgroup name.
4625 This is useful if you want your Samba server to appear in a remote
4626 workgroup for which the normal browse propagation rules don't
4627 work. The remote workgroup can be anywhere that you can send IP
4632 tt( remote announce = 192.168.2.255/SERVERS 192.168.4.255/STAFF)
4634 the above line would cause nmbd to announce itself to the two given IP
4635 addresses using the given workgroup names. If you leave out the
4636 workgroup name then the one given in the
4637 link(bf("workgroup"))(workgroup) parameter is used instead.
4639 The IP addresses you choose would normally be the broadcast addresses
4640 of the remote networks, but can also be the IP addresses of known
4641 browse masters if your network config is that stable.
4643 See the documentation file BROWSING.txt in the docs/ directory.
4646 tt( remote announce = <empty string>)
4649 tt( remote announce = 192.168.2.255/SERVERS 192.168.4.255/STAFF)