1 mailto(samba-bugs@samba.anu.edu.au)
3 manpage(smb.conf)(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(SERVICEDESCRIPTIONS)
52 manpagesection(SERVICE DESCRIPTIONS)
54 Each section in the configuration file describes a service. The
55 section name is the service name and the parameters within the section
56 define the service's attributes.
58 There are three special sections, link(bf([global]))(global),
59 link(bf([homes]))(homes) and link(bf([printers]))(printers), which are
60 described under link(bf('special sections'))(specialsections). The
61 following notes apply to ordinary service descriptions.
63 A service consists of a directory to which access is being given plus
64 a description of the access rights which are granted to the user of
65 the service. Some housekeeping options are also specifiable.
67 Services are either filespace services (used by the client as an
68 extension of their native file systems) or printable services (used by
69 the client to access print services on the host running the server).
71 Services may be guest services, in which case no password is required
72 to access them. A specified UNIX guest account is used to define
73 access privileges in this case.
75 Services other than guest services will require a password to access
76 them. The client provides the username. As older clients only provide
77 passwords and not usernames, you may specify a list of usernames to
78 check against the password using the link(bf("user="))(user) option in
79 the service definition. For modern clients such as Windows 95/98 and
80 Windows NT, this should not be neccessary.
82 Note that the access rights granted by the server are masked by the
83 access rights granted to the specified or guest UNIX user by the host
84 system. The server does not grant more access than the host system
87 The following sample section defines a file space service. The user
88 has write access to the path tt(/home/bar). The service is accessed via
89 the service name "foo":
99 The following sample section defines a printable service. The service
100 is readonly, but printable. That is, the only write access permitted
101 is via calls to open, write to and close a spool file. The
102 link(bf('guest ok'))(guestok) parameter means access will be permitted
103 as the default guest user (specified elsewhere):
107 path = /usr/spool/public
113 label(SPECIALSECTIONS)
114 manpagesection(SPECIAL SECTIONS)
119 dit(bf(The [global] section))
121 Parameters in this section apply to the server as a whole, or are
122 defaults for services which do not specifically define certain
123 items. See the notes under link(bf('Parameters'))(Parameters) for more
127 dit(bf(The [homes] section))
129 If a section called tt('homes') is included in the configuration file,
130 services connecting clients to their home directories can be created
131 on the fly by the server.
133 When the connection request is made, the existing services are
134 scanned. If a match is found, it is used. If no match is found, the
135 requested service name is treated as a user name and looked up in the
136 local passwords file. If the name exists and the correct password has
137 been given, a service is created by cloning the [homes] section.
139 Some modifications are then made to the newly created section:
143 it() The service name is changed from tt('homes') to the located
146 it() If no path was given, the path is set to the user's home
151 If you decide to use a link(bf(path=))(path) line in your [homes]
152 section then you may find it useful to use the link(bf(%S))(percentS)
155 tt(path=/data/pchome/%S)
157 would be useful if you have different home directories for your PCs
158 than for UNIX access.
160 This is a fast and simple way to give a large number of clients access
161 to their home directories with a minimum of fuss.
163 A similar process occurs if the requested service name is tt("homes"),
164 except that the service name is not changed to that of the requesting
165 user. This method of using the [homes] section works well if different
166 users share a client PC.
168 The [homes] section can specify all the parameters a normal service
169 section can specify, though some make more sense than others. The
170 following is a typical and suitable [homes] section:
177 An important point is that if guest access is specified in the [homes]
178 section, all home directories will be visible to all clients
179 bf(without a password). In the very unlikely event that this is
180 actually desirable, it would be wise to also specify link(bf(read only
183 Note that the link(bf(browseable))(browseable) flag for auto home
184 directories will be inherited from the global browseable flag, not the
185 [homes] browseable flag. This is useful as it means setting
186 browseable=no in the [homes] section will hide the [homes] service but
187 make any auto home directories visible.
190 dit(bf(The [printers] section))
192 This section works like link(bf([homes]))(homes), but for printers.
194 If a [printers] section occurs in the configuration file, users are
195 able to connect to any printer specified in the local host's printcap
198 When a connection request is made, the existing services are
199 scanned. If a match is found, it is used. If no match is found, but a
200 link(bf([homes]))(homes) section exists, it is used as described
201 above. Otherwise, the requested service name is treated as a printer
202 name and the appropriate printcap file is scanned to see if the
203 requested service name is a valid printer name. If a match is found, a
204 new service is created by cloning the [printers] section.
206 A few modifications are then made to the newly created section:
210 it() The service name is set to the located printer name
212 it() If no printer name was given, the printer name is set to the
215 it() If the service does not permit guest access and no username was
216 given, the username is set to the located printer name.
220 Note that the [printers] service MUST be printable - if you specify
221 otherwise, the server will refuse to load the configuration file.
223 Typically the path specified would be that of a world-writable spool
224 directory with the sticky bit set on it. A typical [printers] entry
225 would look like this:
229 path = /usr/spool/public
235 All aliases given for a printer in the printcap file are legitimate
236 printer names as far as the server is concerned. If your printing
237 subsystem doesn't work like that, you will have to set up a
238 pseudo-printcap. This is a file consisting of one or more lines like
241 verb( alias|alias|alias|alias... )
243 Each alias should be an acceptable printer name for your printing
244 subsystem. In the link(bf([global]))(global) section, specify the new
245 file as your printcap. The server will then only recognise names
246 found in your pseudo-printcap, which of course can contain whatever
247 aliases you like. The same technique could be used simply to limit
248 access to a subset of your local printers.
250 An alias, by the way, is defined as any component of the first entry
251 of a printcap record. Records are separated by newlines, components
252 (if there are more than one) are separated by vertical bar symbols
255 NOTE: On SYSV systems which use lpstat to determine what printers are
256 defined on the system you may be able to use link(bf("printcap name =
257 lpstat"))(printcapname) to automatically obtain a list of
258 printers. See the link(bf("printcap name"))(printcapname) option for
264 manpagesection(PARAMETERS)
266 Parameters define the specific attributes of services.
268 Some parameters are specific to the link(bf([global]))(global) section
269 (eg., link(bf(security))(security)). Some parameters are usable in
270 all sections (eg., link(bf(create mode))(createmode)). All others are
271 permissible only in normal sections. For the purposes of the following
272 descriptions the link(bf([homes]))(homes) and
273 link(bf([printers]))(printers) sections will be considered normal.
274 The letter tt('G') in parentheses indicates that a parameter is
275 specific to the link(bf([global]))(global) section. The letter tt('S')
276 indicates that a parameter can be specified in a service specific
277 section. Note that all tt('S') parameters can also be specified in the
278 link(bf([global]))(global) section - in which case they will define
279 the default behaviour for all services.
281 Parameters are arranged here in alphabetical order - this may not
282 create best bedfellows, but at least you can find them! Where there
283 are synonyms, the preferred synonym is described, others refer to the
286 label(VARIABLESUBSTITUTIONS)
287 manpagesection(VARIABLE SUBSTITUTIONS)
289 Many of the strings that are settable in the config file can take
290 substitutions. For example the option link(bf(tt("path =
291 /tmp/%u")))(path) would be interpreted as tt("path = /tmp/john") if
292 the user connected with the username john.
294 These substitutions are mostly noted in the descriptions below, but
295 there are some general substitutions which apply whenever they might
296 be relevant. These are:
301 it() bf(%S) = the name of the current service, if any.
304 it() bf(%P) = the root directory of the current service, if any.
307 it() bf(%u) = user name of the current service, if any.
310 it() bf(%g) = primary group name of link(bf(%u))(percentu).
313 it() bf(%U) = session user name (the user name that
314 the client wanted, not necessarily the same as the one they got).
317 it() bf(%G) = primary group name of link(bf(%U))(percentU).
320 it() bf(%H) = the home directory of the user given by link(bf(%u))(percentu).
323 it() bf(%v) = the Samba version.
326 it() bf(%h) = the internet hostname that Samba is running on.
329 it() bf(%m) = the netbios name of the client machine (very useful).
332 it() bf(%L) = the netbios name of the server. This allows you to change your
333 config based on what the client calls you. Your server can have a "dual
337 it() bf(%M) = the internet name of the client machine.
340 it() bf(%N) = the name of your NIS home directory server. This is
341 obtained from your NIS auto.map entry. If you have not compiled Samba
342 with the bf(--with-automount) option then this value will be the same
343 as link(bf(%L))(percentL).
346 it() bf(%p) = the path of the service's home directory, obtained from your NIS
347 auto.map entry. The NIS auto.map entry is split up as "%N:%p".
350 it() bf(%R) = the selected protocol level after protocol
351 negotiation. It can be one of CORE, COREPLUS, LANMAN1, LANMAN2 or NT1.
354 it() bf(%d) = The process id of the current server process.
357 it() bf(%a) = the architecture of the remote machine. Only some are recognised,
358 and those may not be 100% reliable. It currently recognises Samba,
359 WfWg, WinNT and Win95. Anything else will be known as "UNKNOWN". If it
360 gets it wrong then sending a level 3 log to
361 email(samba-bugs@samba.anu.edu.au) should allow it to be fixed.
364 it() bf(%I) = The IP address of the client machine.
367 it() bf(%T) = the current date and time.
371 There are some quite creative things that can be done with these
372 substitutions and other smb.conf options.
375 manpagesection(NAME MANGLING)
377 Samba supports em("name mangling") so that DOS and Windows clients can
378 use files that don't conform to the 8.3 format. It can also be set to
379 adjust the case of 8.3 format filenames.
381 There are several options that control the way mangling is performed,
382 and they are grouped here rather than listed separately. For the
383 defaults look at the output of the testparm program.
385 All of these options can be set separately for each service (or
386 globally, of course).
390 label(manglecaseoption)
391 bf("mangle case = yes/no") controls if names that have characters that
392 aren't of the "default" case are mangled. For example, if this is yes
393 then a name like tt("Mail") would be mangled. Default em(no).
395 label(casesensitiveoption)
396 bf("case sensitive = yes/no") controls whether filenames are case
397 sensitive. If they aren't then Samba must do a filename search and
398 match on passed names. Default em(no).
400 label(defaultcaseoption)
401 bf("default case = upper/lower") controls what the default case is for new
402 filenames. Default em(lower).
404 label(preservecaseoption)
405 bf("preserve case = yes/no") controls if new files are created with the
406 case that the client passes, or if they are forced to be the tt("default")
407 case. Default em(Yes).
409 label(shortpreservecaseoption)
411 bf("short preserve case = yes/no") controls if new files which conform
412 to 8.3 syntax, that is all in upper case and of suitable length, are
413 created upper case, or if they are forced to be the tt("default")
414 case. This option can be use with link(bf("preserve case =
415 yes"))(preservecaseoption) to permit long filenames to retain their
416 case, while short names are lowered. Default em(Yes).
418 By default, Samba 2.0 has the same semantics as a Windows NT
419 server, in that it is case insensitive but case preserving.
421 label(COMPLETELISTOFGLOBALPARAMETERS)
422 manpagesection(COMPLETE LIST OF GLOBAL PARAMETERS)
424 Here is a list of all global parameters. See the section of each
425 parameter for details. Note that some are synonyms.
429 it() link(bf(announce as))(announceas)
431 it() link(bf(announce version))(announceversion)
433 it() link(bf(auto services))(autoservices)
435 it() link(bf(bind interfaces only))(bindinterfacesonly)
437 it() link(bf(browse list))(browselist)
439 it() link(bf(change notify timeout))(changenotifytimeout)
441 it() link(bf(character set))(characterset)
443 it() link(bf(client code page))(clientcodepage)
445 it() link(bf(coding system))(codingsystem)
447 it() link(bf(config file))(configfile)
449 it() link(bf(deadtime))(deadtime)
451 it() link(bf(debug timestamp))(debugtimestamp)
453 it() link(bf(debuglevel))(debuglevel)
455 it() link(bf(default))(default)
457 it() link(bf(default service))(defaultservice)
459 it() link(bf(dfree command))(dfreecommand)
461 it() link(bf(dns proxy))(dns proxy)
463 it() link(bf(domain admin group))(domainadmingroup)
465 it() link(bf(domain admin users))(domainadminusers)
467 it() link(bf(domain controller))(domaincontroller)
469 it() link(bf(domain groups))(domaingroups)
471 it() link(bf(domain guest group))(domainguestgroup)
473 it() link(bf(domain guest users))(domainguestusers)
475 it() link(bf(domain logons))(domainlogons)
477 it() link(bf(domain master))(domainmaster)
479 it() link(bf(domain sid))(domainsid)
481 it() link(bf(encrypt passwords))(encryptpasswords)
483 it() link(bf(getwd cache))(getwdcache)
485 it() link(bf(homedir map))(homedirmap)
487 it() link(bf(hosts equiv))(hostsequiv)
489 it() link(bf(interfaces))(interfaces)
491 it() link(bf(keepalive))(keepalive)
493 it() link(bf(kernel oplocks))(kerneloplocks)
495 it() link(bf(ldap filter))(ldapfilter)
497 it() link(bf(ldap port))(ldapport)
499 it() link(bf(ldap root))(ldaproot)
501 it() link(bf(ldap root passwd))(ldaprootpasswd)
503 it() link(bf(ldap server))(ldapserver)
505 it() link(bf(ldap suffix))(ldapsuffix)
507 it() link(bf(lm announce))(lmannounce)
509 it() link(bf(lm interval))(lminterval)
511 it() link(bf(load printers))(loadprinters)
513 it() link(bf(local master))(localmaster)
515 it() link(bf(lock dir))(lockdir)
517 it() link(bf(lock directory))(lockdirectory)
519 it() link(bf(log file))(logfile)
521 it() link(bf(log level))(loglevel)
523 it() link(bf(logon drive))(logondrive)
525 it() link(bf(logon home))(logonhome)
527 it() link(bf(logon path))(logonpath)
529 it() link(bf(logon script))(logonscript)
531 it() link(bf(lpq cache time))(lpqcachetime)
533 it() link(bf(machine password timeout))(machinepasswordtimeout)
535 it() link(bf(mangled stack))(mangledstack)
537 it() link(bf(max disk size))(maxdisksize)
539 it() link(bf(max log size))(maxlogsize)
541 it() link(bf(max mux))(maxmux)
543 it() link(bf(max open files))(maxopenfiles)
545 it() link(bf(max packet))(maxpacket)
547 it() link(bf(max ttl))(maxttl)
549 it() link(bf(max wins ttl))(maxwinsttl)
551 it() link(bf(max xmit))(maxxmit)
553 it() link(bf(message command))(messagecommand)
555 it() link(bf(min wins ttl))(minwinsttl)
557 it() link(bf(name resolve order))(nameresolveorder)
559 it() link(bf(netbios aliases))(netbiosaliases)
561 it() link(bf(netbios name))(netbiosname)
563 it() link(bf(networkstation user login))(networkstationuserlogin)
565 it() link(bf(NIS homedir))(NIShomedir)
567 it() link(bf(nt pipe support))(ntpipesupport)
569 it() link(bf(nt smb support))(ntsmbsupport)
571 it() link(bf(null passwords))(nullpasswords)
573 it() link(bf(ole locking compatibility))(olelockingcompatibility)
575 it() link(bf(os level))(oslevel)
577 it() link(bf(packet size))(packetsize)
579 it() link(bf(panic action))(panicaction)
581 it() link(bf(passwd chat))(passwdchat)
583 it() link(bf(passwd chat debug))(passwdchatdebug)
585 it() link(bf(passwd program))(passwdprogram)
587 it() link(bf(password level))(passwordlevel)
589 it() link(bf(password server))(passwordserver)
591 it() link(bf(prefered master))(preferedmaster)
593 it() link(bf(preferred master))(preferredmaster)
595 it() link(bf(preload))(preload)
597 it() link(bf(printcap))(printcap)
599 it() link(bf(printcap name))(printcapname)
601 it() link(bf(printer driver file))(printerdriverfile)
603 it() link(bf(protocol))(protocol)
605 it() link(bf(read bmpx))(readbmpx)
607 it() link(bf(read prediction))(readprediction)
609 it() link(bf(read raw))(readraw)
611 it() link(bf(read size))(readsize)
613 it() link(bf(remote announce))(remoteannounce)
615 it() link(bf(remote browse sync))(remotebrowsesync)
617 it() link(bf(root))(root)
619 it() link(bf(root dir))(rootdir)
621 it() link(bf(root directory))(rootdirectory)
623 it() link(bf(security))(security)
625 it() link(bf(server string))(serverstring)
627 it() link(bf(shared mem size))(sharedmemsize)
629 it() link(bf(smb passwd file))(smbpasswdfile)
631 it() link(bf(smbrun))(smbrun)
633 it() link(bf(socket address))(socketaddress)
635 it() link(bf(socket options))(socketoptions)
637 it() link(bf(ssl))(ssl)
639 it() link(bf(ssl CA certDir))(sslCAcertDir)
641 it() link(bf(ssl CA certFile))(sslCAcertFile)
643 it() link(bf(ssl ciphers))(sslciphers)
645 it() link(bf(ssl client cert))(sslclientcert)
647 it() link(bf(ssl client key))(sslclientkey)
649 it() link(bf(ssl compatibility))(sslcompatibility)
651 it() link(bf(ssl hosts))(sslhosts)
653 it() link(bf(ssl hosts resign))(sslhostsresign)
655 it() link(bf(ssl require clientcert))(sslrequireclientcert)
657 it() link(bf(ssl require servercert))(sslrequireservercert)
659 it() link(bf(ssl server cert))(sslservercert)
661 it() link(bf(ssl server key))(sslserverkey)
663 it() link(bf(ssl version))(sslversion)
665 it() link(bf(stat cache))(statcache)
667 it() link(bf(stat cache size))(statcachesize)
669 it() link(bf(strip dot))(stripdot)
671 it() link(bf(syslog))(syslog)
673 it() link(bf(syslog only))(syslogonly)
675 it() link(bf(time offset))(timeoffset)
677 it() link(bf(time server))(timeserver)
679 it() link(bf(timestamp logs))(timestamplogs)
681 it() link(bf(unix password sync))(unixpasswordsync)
683 it() link(bf(unix realname))(unixrealname)
685 it() link(bf(update encrypted))(updateencrypted)
687 it() link(bf(use rhosts))(userhosts)
689 it() link(bf(username level))(usernamelevel)
691 it() link(bf(username map))(usernamemap)
693 it() link(bf(valid chars))(validchars)
695 it() link(bf(wins proxy))(winsproxy)
697 it() link(bf(wins server))(winsserver)
699 it() link(bf(wins support))(winssupport)
701 it() link(bf(workgroup))(workgroup)
703 it() link(bf(write raw))(writeraw)
707 label(COMPLETELISTOFSERVICEPARAMETERS)
708 manpagesection(COMPLETE LIST OF SERVICE PARAMETERS)
710 Here is a list of all service parameters. See the section of each
711 parameter for details. Note that some are synonyms.
715 it() link(bf(admin users))(adminusers)
717 it() link(bf(allow hosts))(allowhosts)
719 it() link(bf(alternate permissions))(alternatepermissions)
721 it() link(bf(available))(available)
723 it() link(bf(blocking locks))(blockinglocks)
725 it() link(bf(browsable))(browsable)
727 it() link(bf(browseable))(browseable)
729 it() link(bf(case sensitive))(casesensitive)
731 it() link(bf(casesignames))(casesignames)
733 it() link(bf(comment))(comment)
735 it() link(bf(copy))(copy)
737 it() link(bf(create mask))(createmask)
739 it() link(bf(create mode))(createmode)
741 it() link(bf(default case))(defaultcase)
743 it() link(bf(delete readonly))(deletereadonly)
745 it() link(bf(delete veto files))(deletevetofiles)
747 it() link(bf(deny hosts))(denyhosts)
749 it() link(bf(directory))(directory)
751 it() link(bf(directory mask))(directorymask)
753 it() link(bf(directory mode))(directorymode)
755 it() link(bf(dont descend))(dontdescend)
757 it() link(bf(dos filetime resolution))(dosfiletimeresolution)
759 it() link(bf(dos filetimes))(dosfiletimes)
761 it() link(bf(exec))(exec)
763 it() link(bf(fake directory create times))(fakedirectorycreatetimes)
765 it() link(bf(fake oplocks))(fakeoplocks)
767 it() link(bf(follow symlinks))(followsymlinks)
769 it() link(bf(force create mode))(forcecreatemode)
771 it() link(bf(force directory mode))(forcedirectorymode)
773 it() link(bf(force group))(forcegroup)
775 it() link(bf(force user))(forceuser)
777 it() link(bf(fstype))(fstype)
779 it() link(bf(group))(group)
781 it() link(bf(guest account))(guestaccount)
783 it() link(bf(guest ok))(guestok)
785 it() link(bf(guest only))(guestonly)
787 it() link(bf(hide dot files))(hidedotfiles)
789 it() link(bf(hide files))(hidefiles)
791 it() link(bf(hosts allow))(hostsallow)
793 it() link(bf(hosts deny))(hostsdeny)
795 it() link(bf(include))(include)
797 it() link(bf(invalid users))(invalidusers)
799 it() link(bf(locking))(locking)
801 it() link(bf(lppause command))(lppausecommand)
803 it() link(bf(lpq command))(lpqcommand)
805 it() link(bf(lpresume command))(lpresumecommand)
807 it() link(bf(lprm command))(lprmcommand)
809 it() link(bf(magic output))(magicoutput)
811 it() link(bf(magic script))(magicscript)
813 it() link(bf(mangle case))(manglecase)
815 it() link(bf(mangled map))(mangledmap)
817 it() link(bf(mangled names))(manglednames)
819 it() link(bf(mangling char))(manglingchar)
821 it() link(bf(map archive))(maparchive)
823 it() link(bf(map hidden))(maphidden)
825 it() link(bf(map system))(mapsystem)
827 it() link(bf(max connections))(maxconnections)
829 it() link(bf(min print space))(minprintspace)
831 it() link(bf(only guest))(onlyguest)
833 it() link(bf(only user))(onlyuser)
835 it() link(bf(oplocks))(oplocks)
837 it() link(bf(path))(path)
839 it() link(bf(postexec))(postexec)
841 it() link(bf(postscript))(postscript)
843 it() link(bf(preexec))(preexec)
845 it() link(bf(preserve case))(preservecase)
847 it() link(bf(print command))(printcommand)
849 it() link(bf(print ok))(printok)
851 it() link(bf(printable))(printable)
853 it() link(bf(printer))(printer)
855 it() link(bf(printer driver))(printerdriver)
857 it() link(bf(printer driver location))(printerdriverlocation)
859 it() link(bf(printer name))(printername)
861 it() link(bf(printing))(printing)
863 it() link(bf(public))(public)
865 it() link(bf(queuepause command))(queuepausecommand)
867 it() link(bf(queueresume command))(queueresumecommand)
869 it() link(bf(read list))(readlist)
871 it() link(bf(read only))(readonly)
873 it() link(bf(revalidate))(revalidate)
875 it() link(bf(root postexec))(rootpostexec)
877 it() link(bf(root preexec))(rootpreexec)
879 it() link(bf(set directory))(setdirectory)
881 it() link(bf(share modes))(sharemodes)
883 it() link(bf(short preserve case))(shortpreservecase)
885 it() link(bf(status))(status)
887 it() link(bf(strict locking))(strictlocking)
889 it() link(bf(strict sync))(strictsync)
891 it() link(bf(sync always))(syncalways)
893 it() link(bf(user))(user)
895 it() link(bf(username))(username)
897 it() link(bf(users))(users)
899 it() link(bf(valid users))(validusers)
901 it() link(bf(veto files))(vetofiles)
903 it() link(bf(veto oplock files))(vetooplockfiles)
905 it() link(bf(volume))(volume)
907 it() link(bf(wide links))(wide links)
909 it() link(bf(writable))(writable)
911 it() link(bf(write list))(write list)
913 it() link(bf(write ok))(write ok)
915 it() link(bf(writeable))(writeable)
919 label(EXPLANATIONOFEACHPARAMETER)
920 manpagesection(EXPLANATION OF EACH PARAMETER)
925 dit(bf(admin users (S)))
927 This is a list of users who will be granted administrative privileges
928 on the share. This means that they will do all file operations as the
931 You should use this option very carefully, as any user in this list
932 will be able to do anything they like on the share, irrespective of
942 dit(bf(allow hosts (S)))
944 A synonym for this parameter is link(bf('hosts allow'))(hostsallow)
946 This parameter is a comma, space, or tab delimited set of hosts which
947 are permitted to access a service.
949 If specified in the link(bf([global]))(global) section then it will
950 apply to all services, regardless of whether the individual service
951 has a different setting.
953 You can specify the hosts by name or IP number. For example, you could
954 restrict access to only the hosts on a Class C subnet with something
955 like tt("allow hosts = 150.203.5."). The full syntax of the list is
956 described in the man page bf(hosts_access (5)). Note that this man
957 page may not be present on your system, so a brief description will
960 em(NOTE:) IF you wish to allow the url(bf(smbpasswd
961 (8)))(smbpasswd.html.8) program to be run by local users to change
962 their Samba passwords using the local url(bf(smbd (8)))(smbd.8.html)
963 daemon, then you em(MUST) ensure that the localhost is listed in your
964 bf(allow hosts) list, as url(bf(smbpasswd (8)))(smbpasswd.html.8) runs
965 in client-server mode and is seen by the local
966 url(bf(smbd))(smbd.8.html) process as just another client.
968 You can also specify hosts by network/netmask pairs and by netgroup
969 names if your system supports netgroups. The em(EXCEPT) keyword can also
970 be used to limit a wildcard list. The following examples may provide
973 bf(Example 1): allow localhost and all IPs in 150.203.*.* except one
975 tt( hosts allow = localhost, 150.203. EXCEPT 150.203.6.66)
977 bf(Example 2): allow localhost and hosts that match the given network/netmask
979 tt( hosts allow = localhost, 150.203.15.0/255.255.255.0)
981 bf(Example 3): allow a localhost plus a couple of hosts
983 tt( hosts allow = localhost, lapland, arvidsjaur)
985 bf(Example 4): allow only hosts in NIS netgroup "foonet" or localhost, but
986 deny access from one particular host
988 tt( hosts allow = @foonet, localhost)
989 tt( hosts deny = pirate)
991 Note that access still requires suitable user-level passwords.
993 See utl(bf(testparm (1)))(testparm.1.html) for a way of testing your
994 host access to see if it does what you expect.
997 none (i.e., all hosts permitted access)
1000 allow hosts = 150.203.5. localhost myhost.mynet.edu.au
1002 label(alternatepermissions)
1003 dit(bf(alternate permissions (S)))
1005 This is a deprecated parameter. It no longer has any effect in Samba2.0.
1006 In previous versions of Samba it affected the way the DOS "read only"
1007 attribute was mapped for a file. In Samba2.0 a file is marked "read only"
1008 if the UNIX file does not have the 'w' bit set for the owner of the file,
1009 regardless if the owner of the file is the currently logged on user or not.
1012 dit(bf(announce as (G)))
1014 This specifies what type of server url(bf(nmbd))(nmbd.8.html) will
1015 announce itself as, to a network neighborhood browse list. By default
1016 this is set to Windows NT. The valid options are : "NT", "Win95" or
1017 "WfW" meaining Windows NT, Windows 95 and Windows for Workgroups
1018 respectively. Do not change this parameter unless you have a specific
1019 need to stop Samba appearing as an NT server as this may prevent Samba
1020 servers from participating as browser servers correctly.
1028 label(announceversion)
1029 dit(bf(announce version (G)))
1031 This specifies the major and minor version numbers that nmbd will use
1032 when announcing itself as a server. The default is 4.2. Do not change
1033 this parameter unless you have a specific need to set a Samba server
1034 to be a downlevel server.
1037 announce version = 4.2
1040 announce version = 2.0
1044 dit(bf(auto services (G)))
1046 This is a list of services that you want to be automatically added to
1047 the browse lists. This is most useful for homes and printers services
1048 that would otherwise not be visible.
1050 Note that if you just want all printers in your printcap file loaded
1051 then the link(bf("load printers"))(loadprinters) option is easier.
1057 auto services = fred lp colorlp
1060 dit(bf(available (S)))
1062 This parameter lets you em('turn off') a service. If tt('available = no'),
1063 then em(ALL) attempts to connect to the service will fail. Such failures
1072 label(bindinterfacesonly)
1073 dit(bf(bind interfaces only (G)))
1075 This global parameter allows the Samba admin to limit what interfaces
1076 on a machine will serve smb requests. If affects file service
1077 url(bf(smbd))(smbd.8.html) and name service url(bf(nmbd))(nmbd.8.html)
1078 in slightly different ways.
1080 For name service it causes url(bf(nmbd))(nmbd.8.html) to bind to ports
1081 137 and 138 on the interfaces listed in the
1082 link(bf('interfaces'))(interfaces) parameter. nmbd also binds to the
1083 'all addresses' interface (0.0.0.0) on ports 137 and 138 for the
1084 purposes of reading broadcast messages. If this option is not set then
1085 nmbd will service name requests on all of these sockets. If bf("bind
1086 interfaces only") is set then nmbd will check the source address of
1087 any packets coming in on the broadcast sockets and discard any that
1088 don't match the broadcast addresses of the interfaces in the
1089 link(bf('interfaces'))(interfaces) parameter list. As unicast packets
1090 are received on the other sockets it allows nmbd to refuse to serve
1091 names to machines that send packets that arrive through any interfaces
1092 not listed in the 'interfaces' list. IP Source address spoofing does
1093 defeat this simple check, however so it must not be used seriously as
1094 a security feature for nmbd.
1096 For file service it causes smbd to bind only to the interface list
1097 given in the link(bf('interfaces'))(interfaces) parameter. This
1098 restricts the networks that smbd will serve to packets coming in those
1099 interfaces. Note that you should not use this parameter for machines
1100 that are serving PPP or other intermittant or non-broadcast network
1101 interfaces as it will not cope with non-permanent interfaces.
1103 In addition, to change a users SMB password, the
1104 url(bf(smbpasswd))(smbpasswd.8.html) by default connects to the
1105 em("localhost" - 127.0.0.1) address as an SMB client to issue the
1106 password change request. If bf("bind interfaces only") is set then
1107 unless the network address em(127.0.0.1) is added to the
1108 link(bf('interfaces'))(interfaces) parameter list then
1109 url(bf(smbpasswd))(smbpasswd.8.html) will fail to connect in it's
1110 default mode. url(bf(smbpasswd))(smbpasswd.8.html) can be forced to
1111 use the primary IP interface of the local host by using its
1112 url(bf("-r remote machine"))(smbpasswd.8.html#minusr) parameter, with
1113 bf("remote machine") set to the IP name of the primary interface
1117 bind interfaces only = False
1120 bind interfaces only = True
1122 label(blockinglocks)
1123 dit(bf(blocking locks (S)))
1125 This parameter controls the behavior of url(bf(smbd))(smbd.8.html) when
1126 given a request by a client to obtain a byte range lock on a region
1127 of an open file, and the request has a time limit associated with it.
1129 If this parameter is set and the lock range requested cannot be
1130 immediately satisfied, Samba 2.0 will internally queue the lock
1131 request, and periodically attempt to obtain the lock until the
1132 timeout period expires.
1134 If this parameter is set to "False", then Samba 2.0 will behave
1135 as previous versions of Samba would and will fail the lock
1136 request immediately if the lock range cannot be obtained.
1138 This parameter can be set per share.
1141 blocking locks = True
1144 blocking locks = False
1147 dit(bf(broweable (S)))
1149 This controls whether this share is seen in the list of available
1150 shares in a net view and in the browse list.
1159 dit(bf(browse list(G)))
1161 This controls whether url(bf(smbd))(smbd.8.html) will serve a browse
1162 list to a client doing a NetServerEnum call. Normally set to true. You
1163 should never need to change this.
1171 Synonym for link(bf(browsable))(browsable).
1173 label(casesensitive)
1174 dit(bf(case sensitive (G)))
1176 See the discussion in the section link(bf(NAME MANGLING))(NAMEMANGLING).
1179 dit(bf(casesignames (G)))
1181 Synonym for link(bf("case sensitive"))(casesensitive).
1183 label(changenotifytimeout)
1184 dit(bf(change notify timeout (G)))
1186 One of the new NT SMB requests that Samba 2.0 supports is the
1187 "ChangeNotify" requests. This SMB allows a client to tell a server to
1188 em("watch") a particular directory for any changes and only reply to
1189 the SMB request when a change has occurred. Such constant scanning of
1190 a directory is expensive under UNIX, hence an
1191 url(bf(smbd))(smbd.8.html) daemon only performs such a scan on each
1192 requested directory once every bf(change notify timeout) seconds.
1194 bf(change notify timeout) is specified in units of seconds.
1197 change notify timeout = 60
1200 change notify timeout = 300
1202 Would change the scan time to every 5 minutes.
1205 dit(bf(character set (G)))
1207 This allows a smbd to map incoming filenames from a DOS Code page (see
1208 the link(bf(client code page))(clientcodepage) parameter) to several
1209 built in UNIX character sets. The built in code page translations are:
1213 it() bf(ISO8859-1) Western European UNIX character set. The parameter
1214 link(bf(client code page))(clientcodepage) em(MUST) be set to code
1215 page 850 if the bf(character set) parameter is set to iso8859-1
1216 in order for the conversion to the UNIX character set to be done
1219 it() bf(ISO8859-2) Eastern European UNIX character set. The parameter
1220 link(bf(client code page))(clientcodepage) em(MUST) be set to code
1221 page 852 if the bf(character set) parameter is set to ISO8859-2
1222 in order for the conversion to the UNIX character set to be done
1225 it() bf(ISO8859-5) Russian Cyrillic UNIX character set. The parameter
1226 link(bf(client code page))(clientcodepage) em(MUST) be set to code
1227 page 866 if the bf(character set) parameter is set to ISO8859-2
1228 in order for the conversion to the UNIX character set to be done
1231 it() bf(KOI8-R) Alternate mapping for Russian Cyrillic UNIX
1232 character set. The parameter link(bf(client code
1233 page))(clientcodepage) em(MUST) be set to code page 866 if the
1234 bf(character set) parameter is set to KOI8-R in order for the
1235 conversion to the UNIX character set to be done correctly.
1239 em(BUG). These MSDOS code page to UNIX character set mappings should
1240 be dynamic, like the loading of MS DOS code pages, not static.
1242 See also link(bf(client code page))(clientcodepage). Normally this
1243 parameter is not set, meaning no filename translation is done.
1249 character set = ISO8859-1
1251 label(clientcodepage)
1252 dit(bf(client code page (G)))
1254 This parameter specifies the DOS code page that the clients accessing
1255 Samba are using. To determine what code page a Windows or DOS client
1256 is using, open a DOS command prompt and type the command "chcp". This
1257 will output the code page. The default for USA MS-DOS, Windows 95, and
1258 Windows NT releases is code page 437. The default for western european
1259 releases of the above operating systems is code page 850.
1261 This parameter tells url(bf(smbd))(smbd.8.html) which of the
1262 tt(codepage.XXX) files to dynamically load on startup. These files,
1263 described more fully in the manual page url(bf(make_smbcodepage
1264 (1)))(make_smbcodepage.1.html), tell url(bf(smbd))(smbd.8.html) how
1265 to map lower to upper case characters to provide the case insensitivity
1266 of filenames that Windows clients expect.
1268 Samba currenly ships with the following code page files :
1272 it() bf(Code Page 437 - MS-DOS Latin US)
1274 it() bf(Code Page 737 - Windows '95 Greek)
1276 it() bf(Code Page 850 - MS-DOS Latin 1)
1278 it() bf(Code Page 852 - MS-DOS Latin 2)
1280 it() bf(Code Page 861 - MS-DOS Icelandic)
1282 it() bf(Code Page 866 - MS-DOS Cyrillic)
1284 it() bf(Code Page 932 - MS-DOS Japanese SJIS)
1286 it() bf(Code Page 936 - MS-DOS Simplified Chinese)
1288 it() bf(Code Page 949 - MS-DOS Korean Hangul)
1290 it() bf(Code Page 950 - MS-DOS Traditional Chinese)
1294 Thus this parameter may have any of the values 437, 737, 850, 852,
1295 861, 932, 936, 949, or 950. If you don't find the codepage you need,
1296 read the comments in one of the other codepage files and the
1297 url(bf(make_smbcodepage (1)))(make_smbcodepage.1.html) man page and
1298 write one. Please remember to donate it back to the Samba user
1301 This parameter co-operates with the link(bf("valid
1302 chars"))(validchars) parameter in determining what characters are
1303 valid in filenames and how capitalization is done. If you set both
1304 this parameter and the link(bf("valid chars"))(validchars) parameter
1305 the bf("client code page") parameter em(MUST) be set before the
1306 link(bf("valid chars"))(validchars) parameter in the bf(smb.conf)
1307 file. The link(bf("valid chars"))(validchars) string will then augment
1308 the character settings in the "client code page" parameter.
1310 If not set, bf("client code page") defaults to 850.
1312 See also : link(bf("valid chars"))(validchars)
1316 client code page = 850
1320 client code page = 936
1323 dit(bf(codingsystem (G)))
1325 This parameter is used to determine how incoming Shift-JIS Japanese
1326 characters are mapped from the incoming link(bf("client code
1327 page"))(clientcodepage) used by the client, into file names in the
1328 UNIX filesystem. Only useful if link(bf("client code
1329 page"))(clientcodepage) is set to 932 (Japanese Shift-JIS).
1335 it() bf(SJIS)) Shift-JIS. Does no conversion of the incoming filename.
1337 it() bf(JIS8, J8BB, J8BH, J8@B, J8@J, J8@H )) Convert from incoming
1338 Shift-JIS to eight bit JIS code with different shift-in, shift out
1341 it() bf(JIS7, J7BB, J7BH, J7@B, J7@J, J7@H )) Convert from incoming
1342 Shift-JIS to seven bit JIS code with different shift-in, shift out
1345 it() bf(JUNET, JUBB, JUBH, JU@B, JU@J, JU@H )) Convert from incoming
1346 Shift-JIS to JUNET code with different shift-in, shift out codes.
1348 it() bf(EUC) Convert an incoming Shift-JIS character to EUC code.
1350 it() bf(HEX) Convert an incoming Shift-JIS character to a 3 byte hex
1351 representation, ie. tt(:AB).
1353 it() bf(CAP) Convert an incoming Shift-JIS character to the 3 byte hex
1354 representation used by the Columbia Appletalk Program (CAP),
1355 ie. tt(:AB). This is used for compatibility between Samba and CAP.
1360 dit(bf(comment (S)))
1362 This is a text field that is seen next to a share when a client does a
1363 queries the server, either via the network neighborhood or via "net
1364 view" to list what shares are available.
1366 If you want to set the string that is displayed next to the machine
1367 name then see the server string command.
1375 comment = Fred's Files
1378 dit(bf(config file (G)))
1380 This allows you to override the config file to use, instead of the
1381 default (usually bf(smb.conf)). There is a chicken and egg problem
1382 here as this option is set in the config file!
1384 For this reason, if the name of the config file has changed when the
1385 parameters are loaded then it will reload them from the new config
1388 This option takes the usual substitutions, which can be very useful.
1390 If the config file doesn't exist then it won't be loaded (allowing you
1391 to special case the config files of just a few clients).
1395 tt( config file = /usr/local/samba/lib/smb.conf.%m)
1400 This parameter allows you to em('clone') service entries. The specified
1401 service is simply duplicated under the current service's name. Any
1402 parameters specified in the current section will override those in the
1403 section being copied.
1405 This feature lets you set up a 'template' service and create similar
1406 services easily. Note that the service being copied must occur earlier
1407 in the configuration file than the service doing the copying.
1416 dit(bf(create mask (S)))
1418 A synonym for this parameter is link(bf('create mode'))(createmode).
1420 When a file is created, the neccessary permissions are calculated
1421 according to the mapping from DOS modes to UNIX permissions, and the
1422 resulting UNIX mode is then bit-wise 'AND'ed with this parameter.
1423 This parameter may be thought of as a bit-wise MASK for the UNIX modes
1424 of a file. Any bit em(*not*) set here will be removed from the modes set
1425 on a file when it is created.
1427 The default value of this parameter removes the 'group' and 'other'
1428 write and execute bits from the UNIX modes.
1430 Following this Samba will bit-wise 'OR' the UNIX mode created from
1431 this parameter with the value of the "force create mode" parameter
1432 which is set to 000 by default.
1434 This parameter does not affect directory modes. See the parameter
1435 link(bf('directory mode'))(directorymode) for details.
1437 See also the link(bf("force create mode"))(forcecreatemode) parameter
1438 for forcing particular mode bits to be set on created files. See also
1439 the link(bf("directory mode"))(directorymode) parameter for masking
1440 mode bits on created directories.
1449 dit(bf(create mode (S)))
1451 This is a synonym for link(bf(create mask))(createmask).
1454 dit(bf(deadtime (G)))
1456 The value of the parameter (a decimal integer) represents the number
1457 of minutes of inactivity before a connection is considered dead, and
1458 it is disconnected. The deadtime only takes effect if the number of
1461 This is useful to stop a server's resources being exhausted by a large
1462 number of inactive connections.
1464 Most clients have an auto-reconnect feature when a connection is
1465 broken so in most cases this parameter should be transparent to users.
1467 Using this parameter with a timeout of a few minutes is recommended
1470 A deadtime of zero indicates that no auto-disconnection should be
1479 label(debug timestamp (G))
1481 Samba2.0 debug log messages are timestamped by default. If you
1482 are running at a high debug level these timestamps can be
1483 distracting. This boolean parameter allows them to be turned
1487 debug timestamp = Yes
1490 debug timestamp = No
1493 dit(bf(debug level (G)))
1495 The value of the parameter (an integer) allows the debug level
1496 (logging level) to be specified in the bf(smb.conf) file. This is to
1497 give greater flexibility in the configuration of the system.
1499 The default will be the debug level specified on the command line
1500 or level zero if none was specified.
1506 dit(bf(default (G)))
1508 A synonym for link(bf(default service))(defaultservice).
1511 dit(bf(default case (S)))
1513 See the section on link(bf("NAME MANGLING"))(NAMEMANGLING). Also note
1514 the link(bf("short preserve case"))(shortpreservecase) parameter.
1516 label(default service)
1517 dit(bf(default service (G)))
1519 This parameter specifies the name of a service which will be connected
1520 to if the service actually requested cannot be found. Note that the
1521 square brackets are em(NOT) given in the parameter value (see example
1524 There is no default value for this parameter. If this parameter is not
1525 given, attempting to connect to a nonexistent service results in an
1528 Typically the default service would be a public, read-only service.
1530 Also note that the apparent service name will be changed to equal that
1531 of the requested service, this is very useful as it allows you to use
1532 macros like link(bf(%S))(percentS) to make a wildcard service.
1534 Note also that any tt('_') characters in the name of the service used
1535 in the default service will get mapped to a tt('/'). This allows for
1542 default service = pub
1548 label(deletereadonly)
1549 dit(bf(delete readonly (S)))
1551 This parameter allows readonly files to be deleted. This is not
1552 normal DOS semantics, but is allowed by UNIX.
1554 This option may be useful for running applications such as rcs, where
1555 UNIX file ownership prevents changing file permissions, and DOS
1556 semantics prevent deletion of a read only file.
1559 delete readonly = No
1562 delete readonly = Yes
1564 label(deletevetofiles)
1565 dit(bf(delete veto files (S)))
1567 This option is used when Samba is attempting to delete a directory
1568 that contains one or more vetoed directories (see the link(bf('veto
1569 files'))(vetofiles) option). If this option is set to False (the
1570 default) then if a vetoed directory contains any non-vetoed files or
1571 directories then the directory delete will fail. This is usually what
1574 If this option is set to True, then Samba will attempt to recursively
1575 delete any files and directories within the vetoed directory. This can
1576 be useful for integration with file serving systems such as bf(NetAtalk),
1577 which create meta-files within directories you might normally veto
1578 DOS/Windows users from seeing (eg. tt(.AppleDouble))
1580 Setting tt('delete veto files = True') allows these directories to be
1581 transparently deleted when the parent directory is deleted (so long
1582 as the user has permissions to do so).
1584 See also the link(bf(veto files))(vetofiles) parameter.
1587 delete veto files = False
1590 delete veto files = True
1593 dit(bf(deny hosts (S)))
1595 The opposite of link(bf('allow hosts'))(allowhosts) - hosts listed
1596 here are em(NOT) permitted access to services unless the specific
1597 services have their own lists to override this one. Where the lists
1598 conflict, the link(bf('allow'))(allowhosts) list takes precedence.
1601 none (i.e., no hosts specifically excluded)
1604 deny hosts = 150.203.4. badhost.mynet.edu.au
1607 dit(bf(dfree command (G)))
1609 The dfree command setting should only be used on systems where a
1610 problem occurs with the internal disk space calculations. This has
1611 been known to happen with Ultrix, but may occur with other operating
1612 systems. The symptom that was seen was an error of "Abort Retry
1613 Ignore" at the end of each directory listing.
1615 This setting allows the replacement of the internal routines to
1616 calculate the total disk space and amount available with an external
1617 routine. The example below gives a possible script that might fulfill
1620 The external program will be passed a single parameter indicating a
1621 directory in the filesystem being queried. This will typically consist
1622 of the string tt("./"). The script should return two integers in
1623 ascii. The first should be the total disk space in blocks, and the
1624 second should be the number of available blocks. An optional third
1625 return value can give the block size in bytes. The default blocksize
1628 Note: Your script should em(NOT) be setuid or setgid and should be
1629 owned by (and writable only by) root!
1632 By default internal routines for determining the disk capacity
1633 and remaining space will be used.
1636 dfree command = /usr/local/samba/bin/dfree
1638 Where the script dfree (which must be made executable) could be:
1642 df $1 | tail -1 | awk '{print $2" "$4}'
1645 or perhaps (on Sys V based systems):
1649 /usr/bin/df -k $1 | tail -1 | awk '{print $3" "$5}'
1652 Note that you may have to replace the command names with full
1653 path names on some systems.
1656 dit(bf(directory (S)))
1658 Synonym for link(bf(path))(path).
1660 label(directorymask)
1661 dit(bf(directory mask (S)))
1663 This parameter is the octal modes which are used when converting DOS
1664 modes to UNIX modes when creating UNIX directories.
1666 When a directory is created, the neccessary permissions are calculated
1667 according to the mapping from DOS modes to UNIX permissions, and the
1668 resulting UNIX mode is then bit-wise 'AND'ed with this parameter.
1669 This parameter may be thought of as a bit-wise MASK for the UNIX modes
1670 of a directory. Any bit em(*not*) set here will be removed from the
1671 modes set on a directory when it is created.
1673 The default value of this parameter removes the 'group' and 'other'
1674 write bits from the UNIX mode, allowing only the user who owns the
1675 directory to modify it.
1677 Following this Samba will bit-wise 'OR' the UNIX mode created from
1678 this parameter with the value of the "force directory mode"
1679 parameter. This parameter is set to 000 by default (ie. no extra mode
1682 See the link(bf("force directory mode"))(forcedirectorymode) parameter
1683 to cause particular mode bits to always be set on created directories.
1685 See also the link(bf("create mode"))(createmode) parameter for masking
1686 mode bits on created files.
1689 directory mask = 0755
1692 directory mask = 0775
1694 label(directorymode)
1695 dit(bf(directory mode (S)))
1697 Synonym for link(bf(directory mask))(directorymask).
1700 dit(bf(dns proxy (G)))
1702 Specifies that link(bf(nmbd))(nmbd.8.html) when acting as a WINS
1703 server and finding that a NetBIOS name has not been registered, should
1704 treat the NetBIOS name word-for-word as a DNS name and do a lookup
1705 with the DNS server for that name on behalf of the name-querying
1708 Note that the maximum length for a NetBIOS name is 15 characters, so
1709 the DNS name (or DNS alias) can likewise only be 15 characters,
1712 link(bf(nmbd))(nmbd.8.html) spawns a second copy of itself to do the
1713 DNS name lookup requests, as doing a name lookup is a blocking action.
1715 See also the parameter link(bf(wins support))(winssupport).
1720 label(domainadmingroup)
1721 bf(domain admin group (G))
1723 This is an bf(EXPERIMENTAL) parameter that is part of the unfinished
1724 Samba NT Domain Controller Code. It may be removed in a later release.
1725 To work with the latest code builds that may have more support for
1726 Samba NT Domain Controller functionality please subscibe to the
1727 mailing list bf(Samba-ntdom) available by sending email to
1728 email(listproc@samba.anu.edu.au)
1730 label(domainadminusers)
1731 dit(bf(domain admin users)
1733 This is an bf(EXPERIMENTAL) parameter that is part of the unfinished
1734 Samba NT Domain Controller Code. It may be removed in a later release.
1735 To work with the latest code builds that may have more support for
1736 Samba NT Domain Controller functionality please subscibe to the
1737 mailing list bf(Samba-ntdom) available by sending email to
1738 email(listproc@samba.anu.edu.au)
1740 label(domain controller)
1741 dit(bf(domain controller (G)))
1743 This is a bf(DEPRECATED) parameter. It is currently not used within
1744 the Samba source and should be removed from all current smb.conf
1745 files. It is left behind for compatibility reasons.
1748 dit(bf(domain groups (G)))
1750 This is an bf(EXPERIMENTAL) parameter that is part of the unfinished
1751 Samba NT Domain Controller Code. It may be removed in a later release.
1752 To work with the latest code builds that may have more support for
1753 Samba NT Domain Controller functionality please subscibe to the
1754 mailing list bf(Samba-ntdom) available by sending email to
1755 email(listproc@samba.anu.edu.au)
1757 label(domainguestgroup)
1758 dit(bf(domain guest group (G)))
1760 This is an bf(EXPERIMENTAL) parameter that is part of the unfinished
1761 Samba NT Domain Controller Code. It may be removed in a later release.
1762 To work with the latest code builds that may have more support for
1763 Samba NT Domain Controller functionality please subscibe to the
1764 mailing list bf(Samba-ntdom) available by sending email to
1765 email(listproc@samba.anu.edu.au)
1767 label(domainguestusers)
1768 dit(bf(domain guest users (G)))
1770 This is an bf(EXPERIMENTAL) parameter that is part of the unfinished
1771 Samba NT Domain Controller Code. It may be removed in a later release.
1772 To work with the latest code builds that may have more support for
1773 Samba NT Domain Controller functionality please subscibe to the
1774 mailing list bf(Samba-ntdom) available by sending email to
1775 email(listproc@samba.anu.edu.au)
1778 dit(bf(domain logons (G)))
1780 If set to true, the Samba server will serve Windows 95/98 Domain
1781 logons for the link(bf(workgroup))(workgroup) it is in. For more
1782 details on setting up this feature see the file DOMAINS.txt in the
1783 Samba documentation directory tt(docs/) shipped with the source code.
1785 Note that Win95/98 Domain logons are em(NOT) the same as Windows
1786 NT Domain logons. NT Domain logons require a Primary Domain Controller
1787 (PDC) for the Domain. It is inteded that in a future release Samba
1788 will be able to provide this functionality for Windows NT clients
1795 dit(bf(domain master (G)))
1797 Tell link(bf(nmbd))(nmbd.8.html) to enable WAN-wide browse list
1798 collation.Setting this option causes link(bf(nmbd))(nmbd.8.html) to
1799 claim a special domain specific NetBIOS name that identifies it as a
1800 domain master browser for its given
1801 link(bf(workgroup))(workgroup). Local master browsers in the same
1802 link(bf(workgroup))(workgroup) on broadcast-isolated subnets will give
1803 this link(bf(nmbd))(nmbd.8.html) their local browse lists, and then
1804 ask link(bf(smbd))(smbd.8.html) for a complete copy of the browse list
1805 for the whole wide area network. Browser clients will then contact
1806 their local master browser, and will receive the domain-wide browse
1807 list, instead of just the list for their broadcast-isolated subnet.
1809 Note that Windows NT Primary Domain Controllers expect to be able to
1810 claim this link(bf(workgroup))(workgroup) specific special NetBIOS
1811 name that identifies them as domain master browsers for that
1812 link(bf(workgroup))(workgroup) by default (ie. there is no way to
1813 prevent a Windows NT PDC from attempting to do this). This means that
1814 if this parameter is set and link(bf(nmbd))(nmbd.8.html) claims the
1815 special name for a link(bf(workgroup))(workgroup) before a Windows NT
1816 PDC is able to do so then cross subnet browsing will behave strangely
1822 .SS dont descend (S)
1823 There are certain directories on some systems (eg., the /proc tree under
1824 Linux) that are either not of interest to clients or are infinitely deep
1825 (recursive). This parameter allows you to specify a comma-delimited list
1826 of directories that the server should always show as empty.
1828 Note that Samba can be very fussy about the exact format of the "dont
1829 descend" entries. For example you may need "./proc" instead of just
1830 "/proc". Experimentation is the best policy :-)
1833 none (i.e., all directories are OK to descend)
1836 dont descend = /proc,/dev
1838 .SS dos filetimes (S)
1839 Under DOS and Windows, if a user can write to a file they can change
1840 the timestamp on it. Under POSIX semantics, only the owner of the file
1841 or root may change the timestamp. By default, Samba runs with POSIX
1842 semantics and refuses to change the timestamp on a file if the user
1843 smbd is acting on behalf of is not the file owner. Setting this option
1844 to True allows DOS semantics and smbd will change the file timstamp as
1845 DOS requires. This is a correct implementation of a previous compile-time
1846 options (UTIME_WORKAROUND) which was broken and is now removed.
1849 dos filetimes = False
1852 dos filetimes = True
1854 .SS dos filetime resolution (S)
1855 Under the DOS and Windows FAT filesystem, the finest granulatity on
1856 time resolution is two seconds. Setting this parameter for a share
1857 causes Samba to round the reported time down to the nearest two
1858 second boundary when a query call that requires one second resolution
1861 This option is mainly used as a compatibility option for Visual C++
1862 when used against Samba shares. If oplocks are enabled on a share,
1863 Visual C++ uses two different time reading calls to check if a file
1864 has changed since it was last read. One of these calls uses a one-second
1865 granularity, the other uses a two second granularity. As the two second
1866 call rounds any odd second down, then if the file has a timestamp of an
1867 odd number of seconds then the two timestamps will not match and Visual
1868 C++ will keep reporting the file has changed. Setting this option causes
1869 the two timestamps to match, and Visual C++ is happy.
1872 dos filetime resolution = False
1875 dos filetime resolution = True
1877 .SS encrypt passwords (G)
1879 This boolean controls whether encrypted passwords will be negotiated
1880 with the client. Note that Windows NT 4.0 SP3 and above will by default
1881 expect encrypted passwords unless a registry entry is changed. To use
1882 encrypted passwords in Samba see the file docs/ENCRYPTION.txt.
1886 This is an alias for preexec
1888 .SS fake directory create times (S)
1889 NTFS and Windows VFAT file systems keep a create time for all files
1890 and directories. This is not the same as the ctime - status change
1891 time - that Unix keeps, so Samba by default reports the earliest
1892 of the various times Unix does keep. Setting this parameter for a
1893 share causes Samba to always report midnight 1-1-1980 as
1894 the create time for directories.
1896 This option is mainly used as a compatibility option for Visual C++
1897 when used against Samba shares. Visual C++ generated makefiles
1898 have the object directory as a dependency for each object file,
1899 and a make rule to create the directory. Also, when NMAKE
1900 compares timestamps it uses the creation time when examining
1901 a directory. Thus the object directory will be created if it does
1902 not exist, but once it does exist it will always have an earlier
1903 timestamp than the object files it contains.
1905 However, Unix time semantics mean that the create time reported
1906 by Samba will be updated whenever a file is created or deleted
1907 in the directory. NMAKE therefore finds all object files in the
1908 object directory bar the last one built are out of date compared
1909 to the directory and rebuilds them. Enabling this option ensures
1910 directories always predate their contents and an NMAKE build will
1911 proceed as expected.
1914 fake directory create times = False
1917 fake directory create times = True
1919 .SS fake oplocks (S)
1921 Oplocks are the way that SMB clients get permission from a server to
1922 locally cache file operations. If a server grants an oplock
1923 (opportunistic lock) then the client is free to assume that it is the
1924 only one accessing the file and it will aggressively cache file
1925 data. With some oplock types the client may even cache file open/close
1926 operations. This can give enormous performance benefits.
1928 When you set "fake oplocks = yes" Samba will always grant oplock
1929 requests no matter how many clients are using the file.
1931 By enabling this option on all read-only shares or shares that you know
1932 will only be accessed from one client at a time you will see a big
1933 performance improvement on many operations. If you enable this option
1934 on shares where multiple clients may be accessing the files read-write
1935 at the same time you can get data corruption. Use this option
1938 It is generally much better to use the real oplock support except for
1939 physically read-only media such as CDROMs.
1941 This option is disabled by default.
1943 .SS follow symlinks (S)
1945 This parameter allows the Samba administrator to stop smbd from
1946 following symbolic links in a particular share. Setting this
1947 parameter to "No" prevents any file or directory that is a
1948 symbolic link from being followed (the user will get an error).
1949 This option is very useful to stop users from adding a symbolic
1950 link to /etc/pasword in their home directory for instance.
1951 However it will slow filename lookups down slightly.
1953 This option is enabled (ie. smbd will follow symbolic links)
1956 .SS force create mode (S)
1957 This parameter specifies a set of UNIX mode bit permissions that
1958 will *always* be set on a file created by Samba. This is done
1959 by bitwise 'OR'ing these bits onto the mode bits of a file that
1960 is being created. The default for this parameter is (in octel)
1961 000. The modes in this parameter are bitwise 'OR'ed onto the
1962 file mode after the mask set in the "create mask" parameter
1965 See also the parameter "create mask" for details on masking mode
1966 bits on created files.
1969 force create mode = 000
1972 force create mode = 0755
1974 would force all created files to have read and execute permissions
1975 set for 'group' and 'other' as well as the read/write/execute bits
1978 .SS force directory mode (S)
1979 This parameter specifies a set of UNIX mode bit permissions that
1980 will *always* be set on a directory created by Samba. This is done
1981 by bitwise 'OR'ing these bits onto the mode bits of a directory that
1982 is being created. The default for this parameter is (in octel)
1983 0000 which will not add any extra permission bits to a created
1984 directory. This operation is done after the mode mask in the parameter
1985 "directory mask" is applied.
1987 See also the parameter "directory mask" for details on masking mode
1988 bits on created directories.
1991 force directory mode = 000
1994 force directory mode = 0755
1996 would force all created directories to have read and execute permissions
1997 set for 'group' and 'other' as well as the read/write/execute bits
2001 This specifies a group name that all connections to this service
2002 should be made as. This may be useful for sharing files.
2008 force group = agroup
2011 This specifies a user name that all connections to this service
2012 should be made as. This may be useful for sharing files. You should
2013 also use it carefully as using it incorrectly can cause security
2016 This user name only gets used once a connection is established. Thus
2017 clients still need to connect as a valid user and supply a valid
2018 password. Once connected, all file operations will be performed as the
2019 "forced user", not matter what username the client connected as.
2028 This is a tuning option. When this is enabled a cacheing algorithm will
2029 be used to reduce the time taken for getwd() calls. This can have a
2030 significant impact on performance, especially when widelinks is False.
2039 This is an alias for "force group" and is only kept for compatibility
2040 with old versions of Samba. It may be removed in future versions.
2042 .SS guest account (S)
2043 This is a username which will be used for access to services which are
2044 specified as 'guest ok' (see below). Whatever privileges this user has
2045 will be available to any client connecting to the guest
2046 service. Typically this user will exist in the password file, but will
2047 not have a valid login. If a username is specified in a given service,
2048 the specified username overrides this one.
2050 One some systems the account "nobody" may not be able to print. Use
2051 another account in this case. You should test this by trying to log in
2052 as your guest user (perhaps by using the "su \-" command) and trying to
2056 Note that as of version 1.9 of Samba this option may be set
2057 differently for each service.
2060 specified at compile time
2063 guest account = nobody
2068 If this parameter is 'yes' for a service, then only guest connections to the
2069 service are permitted. This parameter will have no affect if "guest ok" or
2070 "public" is not set for the service.
2072 See the section below on user/password validation for more information about
2080 .SS hide dot files (S)
2081 This is a boolean parameter that controls whether files starting with
2082 a dot appear as hidden files.
2085 hide dot files = yes
2092 This is a list of files or directories that are not visible but are
2093 accessible. The DOS 'hidden' attribute is applied to any files or
2094 directories that match.
2096 Each entry in the list must be separated by a "/", which allows spaces
2097 to be included in the entry. '*' and '?' can be used to specify multiple
2098 files or directories as in DOS wildcards.
2100 Each entry must be a unix path, not a DOS path and must not include the
2101 unix directory separator "/".
2103 Note that the case sensitivity option is applicable in hiding files.
2105 Setting this parameter will affect the performance of Samba, as
2106 it will be forced to check all files and directories for a match
2107 as they are scanned.
2109 See also "hide dot files", "veto files" and "case sensitive"
2112 No files or directories are hidden by this option (dot files are
2113 hidden by default because of the "hide dot files" option).
2116 hide files = /.*/DesktopFolderDB/TrashFor%m/resource.frk/
2118 The above example is based on files that the Macintosh client (DAVE)
2119 creates for internal use, and also still hides all files beginning with
2123 If "nis homedir" is true, this parameter specifies the NIS (or YP) map
2124 from which the server for the user's home directory should be extracted.
2125 At present, only the Sun auto.home map format is understood. The form of
2128 username server:/some/file/system
2130 and the program will extract the servername from before the first ':'.
2131 There should probably be a better parsing system that copes with different
2132 map formats and also Amd (another automounter) maps.
2134 NB: The -DNETGROUP option is required in the Makefile for option to work
2135 and on some architectures the line -lrpcsvc needs to be added to the
2136 LIBSM variable. This is required for Solaris 2, FreeBSD and HPUX.
2138 See also "nis homedir"
2141 homedir map = auto.home
2144 homedir map = amd.homedir
2153 If this global parameter is a non-null string, it specifies the name of
2154 a file to read for the names of hosts and users who will be allowed access
2155 without specifying a password.
2157 This is not be confused with
2159 which is about hosts access to services and is more useful for guest services.
2161 may be useful for NT clients which will not supply passwords to samba.
2163 NOTE: The use of hosts.equiv can be a major security hole. This is
2164 because you are trusting the PC to supply the correct username. It is
2165 very easy to get a PC to supply a false username. I recommend that the
2166 hosts.equiv option be only used if you really know what you are doing,
2167 or perhaps on a home network where you trust your wife and kids :-)
2170 No host equivalences
2173 hosts equiv = /etc/hosts.equiv
2177 This allows you to include one config file inside another. The file is
2178 included literally, as though typed in place.
2180 It takes the standard substitutions, except %u, %P and %S
2184 This option allows you to setup multiple network interfaces, so that
2185 Samba can properly handle browsing on all interfaces.
2187 The option takes a list of ip/netmask pairs. The netmask may either be
2188 a bitmask, or a bitlength.
2190 For example, the following line:
2192 interfaces = 192.168.2.10/24 192.168.3.10/24
2194 would configure two network interfaces with IP addresses 192.168.2.10
2195 and 192.168.3.10. The netmasks of both interfaces would be set to
2198 You could produce an equivalent result by using:
2200 interfaces = 192.168.2.10/255.255.255.0 192.168.3.10/255.255.255.0
2202 if you prefer that format.
2204 If this option is not set then Samba will attempt to find a primary
2205 interface, but won't attempt to configure more than one interface.
2207 .SS invalid users (S)
2208 This is a list of users that should not be allowed to login to this
2209 service. This is really a "paranoid" check to absolutely ensure an
2210 improper setting does not breach your security.
2212 A name starting with @ is interpreted as a yp netgroup first (if this
2213 has been compiled into Samba), and then as a UNIX group if the name
2214 was not found in the yp netgroup database.
2216 A name starting with + is interpreted only by looking in the UNIX
2217 group database. A name starting with & is interpreted only by looking
2218 in the yp netgroup database (this has no effect if Samba is compiled
2219 without netgroup support).
2221 The current servicename is substituted for %S. This is useful in the
2224 See also "valid users"
2230 invalid users = root fred admin @wheel
2233 The value of the parameter (an integer) represents the number of seconds
2234 between 'keepalive' packets. If this parameter is zero, no keepalive packets
2235 will be sent. Keepalive packets, if sent, allow the server to tell whether a
2236 client is still present and responding.
2238 Keepalives should, in general, not be needed if the socket being used
2239 has the SO_KEEPALIVE attribute set on it (see "socket
2240 options"). Basically you should only use this option if you strike
2251 This parameter determines if Samba will produce Lanman announce
2252 broadcasts that are needed by OS/2 clients in order for them to
2253 see the Samba server in their browse list. This parameter can
2254 have three values, true, false, or auto. The default is auto.
2255 If set to False Samba will never produce these broadcasts. If
2256 set to true Samba will produce Lanman announce broadcasts at
2257 a frequency set by the parameter 'lm interval'. If set to auto
2258 Samba will not send Lanman announce broadcasts by default but
2259 will listen for them. If it hears such a broadcast on the wire
2260 it will then start sending them at a frequency set by the parameter
2263 See also "lm interval".
2273 If Samba is set to produce Lanman announce broadcasts needed
2274 by OS/2 clients (see the "lm announce" parameter) this parameter
2275 defines the frequency in seconds with which they will be made.
2276 If this is set to zero then no Lanman announcements will be
2277 made despite the setting of the "lm announce" parameter.
2279 See also "lm announce".
2287 .SS load printers (G)
2288 A boolean variable that controls whether all printers in the printcap
2289 will be loaded for browsing by default.
2297 .SS local master (G)
2298 This option allows the nmbd to become a local master browser on a
2299 subnet. If set to False then nmbd will not attempt to become a local
2300 master browser on a subnet and will also lose in all browsing elections.
2301 By default this value is set to true. Setting this value to true doesn't
2302 mean that Samba will become the local master browser on a subnet, just
2303 that the nmbd will participate in elections for local master browser.
2308 .SS lock directory (G)
2309 This option specifies the directory where lock files will be placed.
2310 The lock files are used to implement the "max connections" option.
2313 lock directory = /tmp/samba
2316 lock directory = /usr/local/samba/var/locks
2319 This controls whether or not locking will be performed by the server in
2320 response to lock requests from the client.
2322 If "locking = no", all lock and unlock requests will appear to succeed and
2323 all lock queries will indicate that the queried lock is clear.
2325 If "locking = yes", real locking will be performed by the server.
2327 This option may be particularly useful for read-only filesystems which
2328 do not need locking (such as cdrom drives).
2330 Be careful about disabling locking either globally or in a specific
2331 service, as lack of locking may result in data corruption.
2341 This options allows you to override the name of the Samba log file
2342 (also known as the debug file).
2344 This option takes the standard substitutions, allowing you to have
2345 separate log files for each user or machine.
2348 log file = /usr/local/samba/var/log.%m
2355 This parameter specifies the local path to which the home directory
2356 will be connected (see "logon home") and is only used by NT Workstations.
2363 This parameter specifies the home directory location when a Win95 or
2364 NT Workstation logs into a Samba PDC. It allows you to do "NET USE
2365 H: /HOME" from a command prompt, for example.
2368 This option takes the standard substitutions, allowing you to have
2369 separate logon scripts for each user or machine.
2372 logon home = "\\\\remote_smb_server\\%U"
2375 logon home = "\\\\%N\\%U"
2379 This parameter specifies the home directory where roaming profiles
2380 (USER.DAT / USER.MAN files for Windows 95) are stored.
2382 This option takes the standard substitutions, allowing you to have
2383 separate logon scripts for each user or machine. It also specifies
2384 the directory from which the "desktop", "start menu", "nethood" and
2385 "programs" folders, and their contents, are loaded and displayed
2386 on your Windows 95 client.
2388 The share and the path must be readable by the user for the preferences
2389 and directories to be loaded onto the Windows 95 client. The share
2390 must be writeable when the logs in for the first time, in order that
2391 the Windows 95 client can create the user.dat and other directories.
2393 Thereafter, the directories and any of contents can, if required,
2394 be made read-only. It is not adviseable that the USER.DAT file be made
2395 read-only - rename it to USER.MAN to achieve the desired effect
2396 (a MANdatory profile).
2398 Windows clients can sometimes maintain a connection to the [homes]
2399 share, even though there is no user logged in. Therefore, it is
2400 vital that the logon path does not include a reference to the
2401 homes share (i.e \\\\%N\\HOMES\profile_path will cause problems).
2404 This option takes the standard substitutions, allowing you to have
2405 separate logon scripts for each user or machine.
2408 logon path = \\\\%N\\%U\\profile
2411 logon path = \\\\PROFILESERVER\\HOME_DIR\\%U\\PROFILE
2413 .SS logon script (G)
2415 This parameter specifies the batch file (.bat) or NT command file (.cmd)
2416 to be downloaded and run on a machine when a user successfully logs in.
2417 The file must contain the DOS style cr/lf line endings. Using a DOS-style
2418 editor to create the file is recommended.
2420 The script must be a relative path to the [netlogon] service. If the
2421 [netlogon] service specifies a path of /usr/local/samba/netlogon, and
2422 logon script = STARTUP.BAT, then file that will be downloaded is:
2424 .B /usr/local/samba/netlogon/STARTUP.BAT
2426 The contents of the batch file is entirely your choice. A suggested
2427 command would be to add NET TIME \\\\SERVER /SET /YES, to force every
2428 machine to synchronise clocks with the same time server. Another use
2429 would be to add NET USE U: \\\\SERVER\\UTILS for commonly used utilities,
2430 or NET USE Q: \\\\SERVER\\ISO9001_QA.
2432 Note that it is particularly important not to allow write access to
2433 the [netlogon] share, or to grant users write permission on the
2434 batch files in a secure environment, as this would allow the batch
2435 files to be arbitrarily modified.
2438 This option takes the standard substitutions, allowing you to have
2439 separate logon scripts for each user or machine.
2442 logon script = scripts\\%U.bat
2444 .SS lppause command (S)
2445 This parameter specifies the command to be executed on the server host in
2446 order to stop printing or spooling a specific print job.
2448 This command should be a program or script which takes a printer name and
2449 job number to pause the print job. Currently I don't know of any print
2450 spooler system that can do this with a simple option, except for the PPR
2451 system from Trinity College (ppr\-dist.trincoll.edu/pub/ppr). One way
2452 of implementing this is by using job priorities, where jobs having a too
2453 low priority won't be sent to the printer. See also the
2457 If a %p is given then the printername is put in its place. A %j is
2458 replaced with the job number (an integer).
2459 On HPUX (see printing=hpux), if the -p%p option is added to the lpq
2460 command, the job will show up with the correct status, i.e. if the job
2461 priority is lower than the set fence priority it will have the PAUSED
2462 status, whereas if the priority is equal or higher it will have the
2463 SPOOLED or PRINTING status.
2465 Note that it is good practice to include the absolute path in the lppause
2466 command as the PATH may not be available to the server.
2469 Currently no default value is given to this string
2471 .B Example for HPUX:
2472 lppause command = /usr/bin/lpalt %p-%j -p0
2474 .SS lpq cache time (G)
2476 This controls how long lpq info will be cached for to prevent the lpq
2477 command being called too often. A separate cache is kept for each
2478 variation of the lpq command used by the system, so if you use
2479 different lpq commands for different users then they won't share cache
2482 The cache files are stored in /tmp/lpq.xxxx where xxxx is a hash
2483 of the lpq command in use.
2485 The default is 10 seconds, meaning that the cached results of a
2486 previous identical lpq command will be used if the cached data is less
2487 than 10 seconds old. A large value may be advisable if your lpq
2488 command is very slow.
2490 A value of 0 will disable cacheing completely.
2499 This parameter specifies the command to be executed on the server host in
2500 order to obtain "lpq"-style printer status information.
2502 This command should be a program or script which takes a printer name
2503 as its only parameter and outputs printer status information.
2505 Currently six styles of printer status information are supported; BSD,
2506 SYSV, AIX, HPUX, QNX, LPRNG and PLP. This covers most UNIX systems. You
2507 control which type is expected using the "printing =" option.
2509 Some clients (notably Windows for Workgroups) may not correctly send the
2510 connection number for the printer they are requesting status information
2511 about. To get around this, the server reports on the first printer service
2512 connected to by the client. This only happens if the connection number sent
2515 If a %p is given then the printername is put in its place. Otherwise
2516 it is placed at the end of the command.
2518 Note that it is good practice to include the absolute path in the lpq
2519 command as the PATH may not be available to the server.
2522 depends on the setting of "printing ="
2525 lpq command = /usr/bin/lpq %p
2527 .SS lpresume command (S)
2528 This parameter specifies the command to be executed on the server host in
2529 order to restart or continue printing or spooling a specific print job.
2531 This command should be a program or script which takes a printer name and
2532 job number to resume the print job. See also the lppause command.
2534 If a %p is given then the printername is put in its place. A %j is
2535 replaced with the job number (an integer).
2537 Note that it is good practice to include the absolute path in the lpresume
2538 command as the PATH may not be available to the server.
2541 Currently no default value is given to this string
2543 .B Example for HPUX:
2544 lpresume command = /usr/bin/lpalt %p-%j -p2
2546 .SS lprm command (S)
2547 This parameter specifies the command to be executed on the server host in
2548 order to delete a print job.
2550 This command should be a program or script which takes a printer name
2551 and job number, and deletes the print job.
2553 Currently seven styles of printer control are supported; BSD, SYSV, AIX
2554 HPUX, QNX, LPRNG and PLP. This covers most UNIX systems. You control
2555 which type is expected using the "printing =" option.
2557 If a %p is given then the printername is put in its place. A %j is
2558 replaced with the job number (an integer).
2560 Note that it is good practice to include the absolute path in the lprm
2561 command as the PATH may not be available to the server.
2564 depends on the setting of "printing ="
2567 lprm command = /usr/bin/lprm -P%p %j
2570 lprm command = /usr/bin/cancel %p-%j
2572 .SS magic output (S)
2573 This parameter specifies the name of a file which will contain output
2574 created by a magic script (see
2578 Warning: If two clients use the same magic script in the same directory the
2579 output file content is undefined.
2581 magic output = <magic script name>.out
2584 magic output = myfile.txt
2585 .SS magic script (S)
2586 This parameter specifies the name of a file which, if opened, will be
2587 executed by the server when the file is closed. This allows a UNIX script
2588 to be sent to the Samba host and executed on behalf of the connected user.
2590 Scripts executed in this way will be deleted upon completion, permissions
2593 If the script generates output, output will be sent to the file specified by
2596 parameter (see above).
2598 Note that some shells are unable to interpret scripts containing
2599 carriage-return-linefeed instead of linefeed as the end-of-line
2600 marker. Magic scripts must be executable "as is" on the host, which
2601 for some hosts and some shells will require filtering at the DOS end.
2603 Magic scripts are EXPERIMENTAL and should NOT be relied upon.
2606 None. Magic scripts disabled.
2609 magic script = user.csh
2613 See the section on "NAME MANGLING"
2616 This is for those who want to directly map UNIX file names which are
2617 not representable on DOS. The mangling of names is not always what is
2618 needed. In particular you may have documents with file extensions
2619 that differ between DOS and UNIX. For example, under UNIX it is common
2620 to use .html for HTML files, whereas under DOS .htm is more commonly
2623 So to map 'html' to 'htm' you put:
2625 mangled map = (*.html *.htm)
2627 One very useful case is to remove the annoying ;1 off the ends of
2628 filenames on some CDROMS (only visible under some UNIXes). To do this
2629 use a map of (*;1 *)
2635 mangled map = (*;1 *)
2637 .SS mangled names (S)
2638 This controls whether non-DOS names under UNIX should be mapped to
2639 DOS-compatible names ("mangled") and made visible, or whether non-DOS names
2640 should simply be ignored.
2642 See the section on "NAME MANGLING" for details on how to control the
2645 If mangling is used then the mangling algorithm is as follows:
2647 - the first (up to) five alphanumeric characters before the rightmost dot of
2648 the filename are preserved, forced to upper case, and appear as the first (up
2649 to) five characters of the mangled name.
2651 - a tilde ("~") is appended to the first part of the mangled name, followed
2652 by a two-character unique sequence, based on the original root name
2653 (i.e., the original filename minus its final extension). The final
2654 extension is included in the hash calculation only if it contains any upper
2655 case characters or is longer than three characters.
2657 Note that the character to use may be specified using the "mangling
2658 char" option, if you don't like ~.
2660 - the first three alphanumeric characters of the final extension are preserved,
2661 forced to upper case and appear as the extension of the mangled name. The
2662 final extension is defined as that part of the original filename after the
2663 rightmost dot. If there are no dots in the filename, the mangled name will
2664 have no extension (except in the case of hidden files - see below).
2666 - files whose UNIX name begins with a dot will be presented as DOS hidden
2667 files. The mangled name will be created as for other filenames, but with the
2668 leading dot removed and "___" as its extension regardless of actual original
2669 extension (that's three underscores).
2672 The two-digit hash value consists of upper case alphanumeric characters.
2674 This algorithm can cause name collisions only if files in a directory share
2675 the same first five alphanumeric characters. The probability of such a clash
2678 The name mangling (if enabled) allows a file to be copied between UNIX
2679 directories from DOS while retaining the long UNIX filename. UNIX files can
2680 be renamed to a new extension from DOS and will retain the same basename.
2681 Mangled names do not change between sessions.
2688 .SS mangling char (S)
2689 This controls what character is used as the "magic" character in name
2690 mangling. The default is a ~ but this may interfere with some
2691 software. Use this option to set it to whatever you prefer.
2699 .SS mangled stack (G)
2700 This parameter controls the number of mangled names that should be cached in
2703 This stack is a list of recently mangled base names (extensions are only
2704 maintained if they are longer than 3 characters or contains upper case
2707 The larger this value, the more likely it is that mangled names can be
2708 successfully converted to correct long UNIX names. However, large stack
2709 sizes will slow most directory access. Smaller stacks save memory in the
2710 server (each stack element costs 256 bytes).
2712 It is not possible to absolutely guarantee correct long file names, so
2713 be prepared for some surprises!
2722 This controls whether the DOS archive attribute should be mapped to the
2723 UNIX owner execute bit. The DOS archive bit is set when a file has been modified
2724 since its last backup. One motivation for this option it to keep Samba/your
2725 PC from making any file it touches from becoming executable under UNIX.
2726 This can be quite annoying for shared source code, documents, etc...
2728 Note that this requires the 'create mask' to be set such that owner
2729 execute bit is not masked out (ie. it must include 100). See the
2730 parameter "create mask" for details.
2739 This controls whether DOS style hidden files should be mapped to the
2740 UNIX world execute bit.
2742 Note that this requires the 'create mask' to be set such that the world
2743 execute bit is not masked out (ie. it must include 001).
2744 See the parameter "create mask" for details.
2752 This controls whether DOS style system files should be mapped to the
2753 UNIX group execute bit.
2755 Note that this requires the 'create mask' to be set such that the group
2756 execute bit is not masked out (ie. it must include 010). See the parameter
2757 "create mask" for details.
2764 .SS max connections (S)
2765 This option allows the number of simultaneous connections to a
2766 service to be limited. If "max connections" is greater than 0 then
2767 connections will be refused if this number of connections to the
2768 service are already open. A value of zero mean an unlimited number of
2769 connections may be made.
2771 Record lock files are used to implement this feature. The lock files
2772 will be stored in the directory specified by the "lock directory" option.
2778 max connections = 10
2780 .SS max disk size (G)
2781 This option allows you to put an upper limit on the apparent size of
2782 disks. If you set this option to 100 then all shares will appear to be
2783 not larger than 100 MB in size.
2785 Note that this option does not limit the amount of data you can put on
2786 the disk. In the above case you could still store much more than 100
2787 MB on the disk, but if a client ever asks for the amount of free disk
2788 space or the total disk size then the result will be bounded by the
2789 amount specified in "max disk size".
2791 This option is primarily useful to work around bugs in some pieces of
2792 software that can't handle very large disks, particularly disks over
2795 A "max disk size" of 0 means no limit.
2801 max disk size = 1000
2803 .SS max log size (G)
2805 This option (an integer in kilobytes) specifies the max size the log
2806 file should grow to. Samba periodically checks the size and if it is
2807 exceeded it will rename the file, adding a .old extension.
2809 A size of 0 means no limit.
2819 This option controls the maximum number of outstanding simultaneous SMB
2820 operations that samba tells the client it will allow. You should never need
2821 to set this parameter.
2828 A synonym for this parameter is 'packet size'.
2832 This option tells nmbd what the default 'time to live' of NetBIOS
2833 names should be (in seconds) when nmbd is requesting a name using
2834 either a broadcast or from a WINS server. You should never need to
2835 change this parameter.
2840 .SS max wins ttl (G)
2842 This option tells nmbd when acting as a WINS server (wins support = true)
2843 what the maximum 'time to live' of NetBIOS names that nmbd will grant will
2844 be (in seconds). You should never need to change this parameter.
2845 The default is 3 days (259200 seconds).
2848 max wins ttl = 259200
2852 This option controls the maximum packet size that will be negotiated
2853 by Samba. The default is 65535, which is the maximum. In some cases
2854 you may find you get better performance with a smaller value. A value
2855 below 2048 is likely to cause problems.
2863 .SS message command (G)
2865 This specifies what command to run when the server receives a WinPopup
2868 This would normally be a command that would deliver the message
2869 somehow. How this is to be done is up to your imagination.
2873 message command = csh -c 'xedit %s;rm %s' &
2875 This delivers the message using xedit, then removes it
2876 afterwards. NOTE THAT IT IS VERY IMPORTANT THAT THIS COMMAND RETURN
2877 IMMEDIATELY. That's why I have the & on the end. If it doesn't return
2878 immediately then your PCs may freeze when sending messages (they
2879 should recover after 30secs, hopefully).
2881 All messages are delivered as the global guest user. The command takes
2882 the standard substitutions, although %u won't work (%U may be better
2885 Apart from the standard substitutions, some additional ones apply. In
2888 %s = the filename containing the message
2890 %t = the destination that the message was sent to (probably the server
2893 %f = who the message is from
2895 You could make this command send mail, or whatever else takes your
2896 fancy. Please let me know of any really interesting ideas you have.
2898 Here's a way of sending the messages as mail to root:
2900 message command = /bin/mail -s 'message from %f on %m' root < %s; rm %s
2902 If you don't have a message command then the message won't be
2903 delivered and Samba will tell the sender there was an
2904 error. Unfortunately WfWg totally ignores the error code and carries
2905 on regardless, saying that the message was delivered.
2907 If you want to silently delete it then try "message command = rm %s".
2909 For the really adventurous, try something like this:
2911 message command = csh -c 'csh < %s |& /usr/local/samba/bin/smbclient \e
2914 this would execute the command as a script on the server, then give
2915 them the result in a WinPopup message. Note that this could cause a
2916 loop if you send a message from the server using smbclient! You better
2917 wrap the above in a script that checks for this :-)
2923 message command = csh -c 'xedit %s;rm %s' &
2925 .SS min print space (S)
2927 This sets the minimum amount of free disk space that must be available
2928 before a user will be able to spool a print job. It is specified in
2929 kilobytes. The default is 0, which means no limit.
2935 min print space = 2000
2937 .SS min wins ttl (G)
2939 This option tells nmbd when acting as a WINS server (wins support = true)
2940 what the minimum 'time to live' of NetBIOS names that nmbd will grant will
2941 be (in seconds). You should never need to change this parameter.
2942 The default is 6 hours (21600 seconds).
2945 min wins ttl = 21600
2947 .SS name resolve order (G)
2949 This option is used by the programs smbd, nmbd and smbclient to determine
2950 what naming services and in what order to resolve host names to IP addresses.
2951 This option is most useful in smbclient. The option takes a space separated
2952 string of different name resolution options. These are "lmhosts", "host",
2953 "wins" and "bcast". They cause names to be resolved as follows :
2955 lmhosts : Lookup an IP address in the Samba lmhosts file.
2956 host : Do a standard host name to IP address resolution, using the
2957 system /etc/hosts, NIS, or DNS lookups. This method of name
2958 resolution is operating system depended (for instance on Solaris
2959 this may be controlled by the /etc/nsswitch.conf file).
2960 wins : Query a name with the IP address listed in the "wins server ="
2961 parameter. If no WINS server has been specified this method will
2963 bcast : Do a broadcast on each of the known local interfaces listed in
2964 the "interfaces =" parameter. This is the least reliable of the
2965 name resolution methods as it depends on the target host being
2966 on a locally connected subnet.
2968 The default order is lmhosts, host, wins, bcast and these name resolution
2969 methods will be attempted in this order.
2971 This option was first introduced in Samba 1.9.18p4.
2974 name resolve order = lmhosts host wins bcast
2977 name resolve order = lmhosts bcast host
2979 This will cause the local lmhosts file to be examined first, followed
2980 by a broadcast attempt, followed by a normal system hostname lookup.
2982 .SS netbios aliases (G)
2984 This is a list of names that nmbd will advertise as additional
2985 names by which the Samba server is known. This allows one machine
2986 to appear in browse lists under multiple names. If a machine is
2987 acting as a browse server or logon server none of these names
2988 will be advertised as either browse server or logon servers, only
2989 the primary name of the machine will be advertised with these
2992 See also 'netbios name'.
2995 netbios aliases = TEST TEST1 TEST2
2997 .SS netbios name (G)
2999 This sets the NetBIOS name by which a Samba server is known. By
3000 default it is the same as the first component of the host's DNS name.
3001 If a machine is a browse server or logon server this name (or the
3002 first component of the hosts DNS name) will be the name that these
3003 services are advertised under.
3005 See also 'netbios aliases'.
3008 netbios name = MYNAME
3011 Get the home share server from a NIS (or YP) map. For unix systems that
3012 use an automounter, the user's home directory will often be mounted on
3013 a workstation on demand from a remote server. When the Samba logon server
3014 is not the actual home directory server, two network hops are required
3015 to access the home directory and this can be very slow especially with
3016 writing via Samba to an NFS mounted directory. This option allows samba
3017 to return the home share as being on a different server to the logon
3018 server and as long as a samba daemon is running on the home directory
3019 server, it will be mounted on the Samba client directly from the directory
3020 server. When Samba is returning the home share to the client, it will
3021 consult the NIS (or YP) map specified in "homedir map" and return the
3022 server listed there.
3030 .SS networkstation user login (G)
3031 This global parameter (new for 1.9.18p3) affects server level security.
3032 With this set (recommended) samba will do a full NetWkstaUserLogon to
3033 confirm that the client really should have login rights. This can cause
3034 problems with machines in trust relationships in which case you can
3035 disable it here, but be warned, we have heard that some NT machines
3036 will then allow anyone in with any password! Make sure you test it.
3038 In Samba 1.9.18p5 this parameter is of limited use, as smbd now
3039 explicitly tests for this NT bug and will refuse to use a password
3040 server that has the problem. The parameter now defaults to off,
3041 and it should not be neccessary to set this parameter to on. It will
3042 be removed in a future Samba release.
3045 networkstation user login = no
3048 networkstation user login = yes
3050 .SS null passwords (G)
3051 Allow or disallow access to accounts that have null passwords.
3057 null passwords = yes
3059 .SS ole locking compatibility (G)
3061 This parameter allows an administrator to turn off the byte range
3062 lock manipulation that is done within Samba to give compatibility
3063 for OLE applications. Windows OLE applications use byte range locking
3064 as a form of inter-process communication, by locking ranges of bytes
3065 around the 2^32 region of a file range. This can cause certain UNIX
3066 lock managers to crash or otherwise cause problems. Setting this
3067 parameter to "no" means you trust your UNIX lock manager to handle
3068 such cases correctly.
3071 ole locking compatibility = yes
3074 ole locking compatibility = no
3078 A synonym for this command is 'guest only'.
3081 This is a boolean option that controls whether connections with
3082 usernames not in the user= list will be allowed. By default this
3083 option is disabled so a client can supply a username to be used by
3086 Note that this also means Samba won't try to deduce usernames from the
3087 service name. This can be annoying for the [homes] section. To get
3088 around this you could use "user = %S" which means your "user" list
3089 will be just the service name, which for home directories is the name
3099 This boolean option tells smbd whether to issue oplocks (opportunistic
3100 locks) to file open requests on this share. The oplock code was introduced in
3101 Samba 1.9.18 and can dramatically (approx 30% or more) improve the speed
3102 of access to files on Samba servers. It allows the clients to agressively
3103 cache files locally and you may want to disable this option for unreliable
3104 network environments (it is turned on by default in Windows NT Servers).
3105 For more information see the file Speed.txt in the Samba docs/ directory.
3107 Oplocks may be selectively turned off on certain files on a per share basis.
3108 See the 'veto oplock files' parameter.
3118 This integer value controls what level Samba advertises itself as for
3119 browse elections. See BROWSING.txt for details.
3122 The maximum transmit packet size during a raw read. This option is no
3123 longer implemented as of version 1.7.00, and is kept only so old
3124 configuration files do not become invalid.
3127 This string controls the "chat" conversation that takes places
3128 between smbd and the local password changing program to change the
3129 users password. The string describes a sequence of response-receive
3130 pairs that smbd uses to determine what to send to the passwd program
3131 and what to expect back. If the expected output is not received then
3132 the password is not changed.
3134 This chat sequence is often quite site specific, depending on what
3135 local methods are used for password control (such as NIS+ etc).
3137 The string can contain the macros %o and %n which are substituted for
3138 the old and new passwords respectively. It can also contain the
3139 standard macros \en \er \et and \es to give line-feed, carriage-return,
3142 The string can also contain a * which matches any sequence of
3145 Double quotes can be used to collect strings with spaces in them into
3148 If the send string in any part of the chat sequence is a fullstop "."
3149 then no string is sent. Similarly, is the expect string is a fullstop
3150 then no string is expected.
3152 Note that if the 'unix password sync' parameter is set to true,
3153 then this sequence is called *AS ROOT* when the SMB password in the
3154 smbpasswd file is being changed, without access to the old password
3155 cleartext. In this case the old password cleartext is set to ""
3158 See also 'unix password sync' and 'passwd chat debug'
3161 passwd chat = "*Enter OLD password*" %o\en "*Enter NEW password*" %n\en \e
3162 "*Reenter NEW password*" %n\en "*Password changed*"
3166 passwd chat = *old*password* %o\en *new*password* %n\en *new*password* %n\en *changed*
3168 .SS passwd chat debug (G)
3170 This boolean specifies if the passwd chat script parameter is run
3171 in 'debug' mode. In this mode the strings passed to and received
3172 from the passwd chat are printed in the smbd log with a debug level
3173 of 100. This is a dangerous option as it will allow plaintext passwords
3174 to be seen in the smbd log. It is available to help Samba admins
3175 debug their passwd chat scripts and should be turned off after
3176 this has been done. This parameter is off by default.
3179 passwd chat debug = True
3182 passwd chat debug = False
3184 .SS passwd program (G)
3185 The name of a program that can be used to set user passwords.
3187 This is only available if you have enabled remote password changing at
3188 compile time (see the comments in the Makefile for details). Any occurrences
3189 of %u will be replaced with the user name. The user name is checked
3190 for existance before calling the password changing program.
3192 Also note that many passwd programs insist in "reasonable" passwords,
3193 such as a minimum length, or the inclusion of mixed case chars and
3194 digits. This can pose a problem as some clients (such as Windows for
3195 Workgroups) uppercase the password before sending it.
3197 Note that if the 'unix password sync' parameter is set to true,
3198 then this sequence is called *AS ROOT* when the SMB password in the
3199 smbpasswd file is being changed. If the 'unix passwd sync' parameter
3200 is set this parameter MUST USE ABSOLUTE PATHS for ALL programs called,
3201 and must be examined for security implications. Note that by default
3202 'unix password sync' is set to False.
3204 See also 'unix password sync'
3207 passwd program = /bin/passwd
3210 passwd program = /sbin/passwd %u
3212 .SS password level (G)
3213 Some client/server combinations have difficulty with mixed-case passwords.
3214 One offending client is Windows for Workgroups, which for some reason forces
3215 passwords to upper case when using the LANMAN1 protocol, but leaves them alone
3216 when using COREPLUS!
3218 This parameter defines the maximum number of characters that may be upper case
3221 For example, say the password given was "FRED". If
3223 is set to 1 (one), the following combinations would be tried if "FRED" failed:
3224 "Fred", "fred", "fRed", "frEd", "freD". If
3225 .B password level was set to 2 (two), the following combinations would also be
3226 tried: "FRed", "FrEd", "FreD", "fREd", "fReD", "frED". And so on.
3228 The higher value this parameter is set to the more likely it is that a mixed
3229 case password will be matched against a single case password. However, you
3230 should be aware that use of this parameter reduces security and increases the
3231 time taken to process a new connection.
3233 A value of zero will cause only two attempts to be made - the password as is
3234 and the password in all-lower case.
3236 If you find the connections are taking too long with this option then
3237 you probably have a slow crypt() routine. Samba now comes with a fast
3238 "ufc crypt" that you can select in the Makefile. You should also make
3239 sure the PASSWORD_LENGTH option is correct for your system in local.h
3240 and includes.h. On most systems only the first 8 chars of a password
3241 are significant so PASSWORD_LENGTH should be 8, but on some longer
3242 passwords are significant. The includes.h file tries to select the
3243 right length for your system.
3251 .SS password server (G)
3253 By specifying the name of another SMB server (such as a WinNT box)
3254 with this option, and using "security = server" you can get Samba to
3255 do all its username/password validation via a remote server.
3257 This options sets the name of the password server to use. It must be a
3258 netbios name, so if the machine's netbios name is different from its
3259 internet name then you may have to add its netbios name to
3262 Note that with Samba 1.9.18p4 and above the name of the password
3263 server is looked up using the parameter "name resolve order=" and
3264 so may resolved by any method and order described in that parameter.
3266 The password server much be a machine capable of using the "LM1.2X002"
3267 or the "LM NT 0.12" protocol, and it must be in user level security
3270 NOTE: Using a password server means your UNIX box (running Samba) is
3271 only as secure as your password server. DO NOT CHOOSE A PASSWORD
3272 SERVER THAT YOU DON'T COMPLETELY TRUST.
3274 Never point a Samba server at itself for password serving. This will
3275 cause a loop and could lock up your Samba server!
3277 The name of the password server takes the standard substitutions, but
3278 probably the only useful one is %m, which means the Samba server will
3279 use the incoming client as the password server. If you use this then
3280 you better trust your clients, and you better restrict them with hosts
3283 If you list several hosts in the "password server" option then smbd
3284 will try each in turn till it finds one that responds. This is useful
3285 in case your primary server goes down.
3287 If you are using a WindowsNT server as your password server then you
3288 will have to ensure that your users are able to login from the Samba
3289 server, as the network logon will appear to come from there rather
3290 than from the users workstation.
3293 A synonym for this parameter is 'directory'.
3295 This parameter specifies a directory to which the user of the service is to
3296 be given access. In the case of printable services, this is where print data
3297 will spool prior to being submitted to the host for printing.
3299 For a printable service offering guest access, the service should be readonly
3300 and the path should be world-writable and have the sticky bit set. This is not
3301 mandatory of course, but you probably won't get the results you expect if you
3304 Any occurrences of %u in the path will be replaced with the username
3305 that the client is connecting as. Any occurrences of %m will be
3306 replaced by the name of the machine they are connecting from. These
3307 replacements are very useful for setting up pseudo home directories
3310 Note that this path will be based on 'root dir' if one was specified.
3319 This option specifies a command to be run whenever the service is
3320 disconnected. It takes the usual substitutions. The command may be run
3321 as the root on some systems.
3323 An interesting example may be do unmount server resources:
3325 postexec = /etc/umount /cdrom
3330 none (no command executed)
3333 postexec = echo \e"%u disconnected from %S from %m (%I)\e" >> /tmp/log
3336 This parameter forces a printer to interpret the print files as
3337 postscript. This is done by adding a %! to the start of print output.
3339 This is most useful when you have lots of PCs that persist in putting
3340 a control-D at the start of print jobs, which then confuses your
3351 This option specifies a command to be run whenever the service is
3352 connected to. It takes the usual substitutions.
3354 An interesting example is to send the users a welcome message every
3355 time they log in. Maybe a message of the day? Here is an example:
3357 preexec = csh -c 'echo \e"Welcome to %S!\e" | \e
3358 /usr/local/samba/bin/smbclient -M %m -I %I' &
3360 Of course, this could get annoying after a while :-)
3365 none (no command executed)
3368 preexec = echo \e"%u connected to %S from %m (%I)\e" >> /tmp/log
3370 .SS preferred master (G)
3371 This boolean parameter controls if Samba is a preferred master browser
3373 If this is set to true, on startup, samba will force an election,
3374 and it will have a slight advantage in winning the election.
3375 It is recommended that this parameter is used in conjunction
3376 with domain master = yes, so that samba can guarantee becoming
3379 Use this option with caution, because if there are several hosts
3380 (whether samba servers, Windows 95 or NT) that are preferred master
3381 browsers on the same subnet, they will each periodically and continuously
3382 attempt to become the local master browser. This will result in
3383 unnecessary broadcast traffic and reduced browsing capabilities.
3389 preferred master = no
3392 This is an alias for "auto services"
3394 .SS preserve case (S)
3396 This controls if new filenames are created with the case that the
3397 client passes, or if they are forced to be the "default" case.
3402 See the section on "NAME MANGLING" for a fuller discussion.
3404 .SS print command (S)
3405 After a print job has finished spooling to a service, this command will be
3406 used via a system() call to process the spool file. Typically the command
3407 specified will submit the spool file to the host's printing subsystem, but
3408 there is no requirement that this be the case. The server will not remove the
3409 spool file, so whatever command you specify should remove the spool file when
3410 it has been processed, otherwise you will need to manually remove old spool
3413 The print command is simply a text string. It will be used verbatim,
3414 with two exceptions: All occurrences of "%s" will be replaced by the
3415 appropriate spool file name, and all occurrences of "%p" will be
3416 replaced by the appropriate printer name. The spool file name is
3417 generated automatically by the server, the printer name is discussed
3420 The full path name will be used for the filename if %s is not preceded
3421 by a /. If you don't like this (it can stuff up some lpq output) then
3422 use %f instead. Any occurrences of %f get replaced by the spool
3423 filename without the full path at the front.
3425 The print command MUST contain at least one occurrence of "%s" or %f -
3426 the "%p" is optional. At the time a job is submitted, if no printer
3427 name is supplied the "%p" will be silently removed from the printer
3430 If specified in the [global] section, the print command given will be used
3431 for any printable service that does not have its own print command specified.
3433 If there is neither a specified print command for a printable service nor a
3434 global print command, spool files will be created but not processed and (most
3435 importantly) not removed.
3437 Note that printing may fail on some UNIXes from the "nobody"
3438 account. If this happens then create an alternative guest account that
3439 can print and set the "guest account" in the [global] section.
3441 You can form quite complex print commands by realising that they are
3442 just passed to a shell. For example the following will log a print
3443 job, print the file, then remove it. Note that ; is the usual
3444 separator for command in shell scripts.
3446 print command = echo Printing %s >> /tmp/print.log; lpr -P %p %s; rm %s
3448 You may have to vary this command considerably depending on how you
3449 normally print files on your system.
3452 print command = lpr -r -P %p %s
3455 print command = /usr/local/samba/bin/myprintscript %p %s
3460 A synonym for this parameter is 'print ok'.
3462 If this parameter is 'yes', then clients may open, write to and submit spool
3463 files on the directory specified for the service.
3465 Note that a printable service will ALWAYS allow writing to the service path
3466 (user privileges permitting) via the spooling of print data. The 'read only'
3467 parameter controls only non-printing access to the resource.
3475 .SS printcap name (G)
3476 This parameter may be used to override the compiled-in default printcap
3477 name used by the server (usually /etc/printcap). See the discussion of the
3478 [printers] section above for reasons why you might want to do this.
3480 On SystemV systems that use lpstat to list available printers you
3481 can use "printcap name = lpstat" to automatically obtain lists of
3482 available printers. This is the default for systems that define
3483 SYSV at compile time in Samba (this includes most SystemV based
3484 systems). If "printcap name" is set to lpstat on these systems then
3485 Samba will launch "lpstat -v" and attempt to parse the output to
3486 obtain a printer list.
3488 A minimal printcap file would look something like this:
3500 where the | separates aliases of a printer. The fact that the second
3501 alias has a space in it gives a hint to Samba that it's a comment.
3503 NOTE: Under AIX the default printcap name is "/etc/qconfig". Samba
3504 will assume the file is in AIX "qconfig" format if the string
3505 "/qconfig" appears in the printcap filename.
3508 printcap name = /etc/printcap
3511 printcap name = /etc/myprintcap
3514 A synonym for this parameter is 'printer name'.
3516 This parameter specifies the name of the printer to which print jobs spooled
3517 through a printable service will be sent.
3519 If specified in the [global] section, the printer name given will be used
3520 for any printable service that does not have its own printer name specified.
3523 none (but may be 'lp' on many systems)
3526 printer name = laserwriter
3528 .SS printer driver (S)
3529 This option allows you to control the string that clients receive when
3530 they ask the server for the printer driver associated with a
3531 printer. If you are using Windows95 or WindowsNT then you can use this
3532 to automate the setup of printers on your system.
3534 You need to set this parameter to the exact string (case sensitive)
3535 that describes the appropriate printer driver for your system.
3536 If you don't know the exact string to use then you should first try
3537 with no "printer driver" option set and the client will give you a
3538 list of printer drivers. The appropriate strings are shown in a
3539 scrollbox after you have chosen the printer manufacturer.
3542 printer driver = HP LaserJet 4L
3544 .SS printer name (S)
3548 .SS printer driver file (G)
3549 This parameter tells Samba where the printer driver definition file,
3550 used when serving drivers to Windows 95 clients, is to be found. If
3551 this is not set, the default is :
3553 SAMBA_INSTALL_DIRECTORY/lib/printers.def
3555 This file is created from Windows 95 'msprint.def' files found on the
3556 Windows 95 client system. For more details on setting up serving of
3557 printer drivers to Windows 95 clients, see the documentation file
3558 docs/PRINTER_DRIVER.txt.
3561 None (set in compile).
3564 printer driver file = /usr/local/samba/printers/drivers.def
3567 .B printer driver location
3569 .SS printer driver location (S)
3570 This parameter tells clients of a particular printer share where
3571 to find the printer driver files for the automatic installation
3572 of drivers for Windows 95 machines. If Samba is set up to serve
3573 printer drivers to Windows 95 machines, this should be set to
3575 \e\eMACHINE\ePRINTER$
3577 Where MACHINE is the NetBIOS name of your Samba server, and PRINTER$
3578 is a share you set up for serving printer driver files. For more
3579 details on setting this up see the documentation file
3580 docs/PRINTER_DRIVER.txt.
3586 printer driver location = \e\eMACHINE\ePRINTER$
3589 .B printer driver file
3593 This parameters controls how printer status information is interpreted
3594 on your system, and also affects the default values for the "print
3595 command", "lpq command" and "lprm command".
3597 Currently six printing styles are supported. They are "printing =
3598 bsd", "printing = sysv", "printing = hpux", "printing = aix",
3599 "printing = qnx" and "printing = plp".
3601 To see what the defaults are for the other print commands when using
3602 these three options use the "testparm" program.
3604 As of version 1.9.18 of Samba this option can be set on a per printer basis
3607 The value of the parameter (a string) is the highest protocol level that will
3608 be supported by the server.
3610 Possible values are CORE, COREPLUS, LANMAN1, LANMAN2 and NT1. The relative
3611 merits of each are discussed in the README file.
3613 Normally this option should not be set as the automatic negotiation
3614 phase in the SMB protocol takes care of choosing the appropriate protocol.
3623 A synonym for this parameter is 'guest ok'.
3625 If this parameter is 'yes' for a service, then no password is required
3626 to connect to the service. Privileges will be those of the guest
3629 See the section below on user/password validation for more information about
3638 .SS queuepause command (S)
3639 This parameter specifies the command to be executed on the server host in
3640 order to pause the printerqueue.
3642 This command should be a program or script which takes a printer name
3643 as its only parameter and stops the printerqueue, such that no longer
3644 jobs are submitted to the printer.
3646 This command is not supported by Windows for Workgroups, but can be
3647 issued from the Printer's window under Windows 95 & NT.
3649 If a %p is given then the printername is put in its place. Otherwise
3650 it is placed at the end of the command.
3652 Note that it is good practice to include the absolute path in the
3653 command as the PATH may not be available to the server.
3656 depends on the setting of "printing ="
3659 queuepause command = disable %p
3661 .SS queueresume command (S)
3662 This parameter specifies the command to be executed on the server host in
3663 order to resume the printerqueue. It is the command to undo the behaviour
3664 that is caused by the previous parameter (queuepause command).
3666 This command should be a program or script which takes a printer name
3667 as its only parameter and resumes the printerqueue, such that queued
3668 jobs are resubmitted to the printer.
3670 This command is not supported by Windows for Workgroups, but can be
3671 issued from the Printer's window under Windows 95 & NT.
3673 If a %p is given then the printername is put in its place. Otherwise
3674 it is placed at the end of the command.
3676 Note that it is good practice to include the absolute path in the
3677 command as the PATH may not be available to the server.
3680 depends on the setting of "printing ="
3683 queuepause command = enable %p
3686 This is a list of users that are given read-only access to a
3687 service. If the connecting user is in this list then they will
3688 not be given write access, no matter what the "read only" option
3689 is set to. The list can include group names using the @group syntax.
3691 See also the "write list" option
3697 read list = mary, @students
3704 Note that this is an inverted synonym for writable and write ok.
3705 .SS read prediction (G)
3706 This options enables or disables the read prediction code used to
3707 speed up reads from the server. When enabled the server will try to
3708 pre-read data from the last accessed file that was opened read-only
3709 while waiting for packets.
3712 read prediction = False
3715 read prediction = True
3717 This parameter controls whether or not the server will support raw reads when
3718 transferring data to clients.
3720 If enabled, raw reads allow reads of 65535 bytes in one packet. This
3721 typically provides a major performance benefit.
3723 However, some clients either negotiate the allowable block size incorrectly
3724 or are incapable of supporting larger block sizes, and for these clients you
3725 may need to disable raw reads.
3727 In general this parameter should be viewed as a system tuning tool and left
3728 severely alone. See also
3738 The option "read size" affects the overlap of disk reads/writes with
3739 network reads/writes. If the amount of data being transferred in
3740 several of the SMB commands (currently SMBwrite, SMBwriteX and
3741 SMBreadbraw) is larger than this value then the server begins writing
3742 the data before it has received the whole packet from the network, or
3743 in the case of SMBreadbraw, it begins writing to the network before
3744 all the data has been read from disk.
3746 This overlapping works best when the speeds of disk and network access
3747 are similar, having very little effect when the speed of one is much
3748 greater than the other.
3750 The default value is 2048, but very little experimentation has been
3751 done yet to determine the optimal value, and it is likely that the best
3752 value will vary greatly between systems anyway. A value over 65536 is
3753 pointless and will cause you to allocate memory unnecessarily.
3761 .SS remote announce (G)
3763 This option allows you to setup nmbd to periodically announce itself
3764 to arbitrary IP addresses with an arbitrary workgroup name.
3766 This is useful if you want your Samba server to appear in a remote
3767 workgroup for which the normal browse propagation rules don't
3768 work. The remote workgroup can be anywhere that you can send IP
3773 remote announce = 192.168.2.255/SERVERS 192.168.4.255/STAFF
3775 the above line would cause nmbd to announce itself to the two given IP
3776 addresses using the given workgroup names. If you leave out the
3777 workgroup name then the one given in the "workgroup" option is used
3780 The IP addresses you choose would normally be the broadcast addresses
3781 of the remote networks, but can also be the IP addresses of known
3782 browse masters if your network config is that stable.
3784 This option replaces similar functionality from the nmbd lmhosts file.
3786 .SS remote browse sync (G)
3788 This option allows you to setup nmbd to periodically request synchronisation
3789 of browse lists with the master browser of a samba server that is on a remote
3790 segment. This option will allow you to gain browse lists for multiple
3791 workgroups across routed networks. This is done in a manner that does not work
3792 with any non-samba servers.
3794 This is useful if you want your Samba server and all local clients
3795 to appear in a remote workgroup for which the normal browse propagation
3796 rules don't work. The remote workgroup can be anywhere that you can send IP
3801 remote browse sync = 192.168.2.255 192.168.4.255
3803 the above line would cause nmbd to request the master browser on the
3804 specified subnets or addresses to synchronise their browse lists with
3807 The IP addresses you choose would normally be the broadcast addresses
3808 of the remote networks, but can also be the IP addresses of known
3809 browse masters if your network config is that stable. If a machine IP
3810 address is given Samba makes NO attempt to validate that the remote
3811 machine is available, is listening, nor that it is in fact the browse
3812 master on it's segment.
3817 This option controls whether Samba will allow a previously validated
3818 username/password pair to be used to attach to a share. Thus if you
3819 connect to \e\eserver\eshare1 then to \e\eserver\eshare2 it won't
3820 automatically allow the client to request connection to the second
3821 share as the same username as the first without a password.
3823 Note that this option only works with security=share and will
3824 be ignored if this is not the case.
3826 If "revalidate" is True then the client will be denied automatic
3827 access as the same username.
3841 .SS root directory (G)
3842 Synonyms for this parameter are 'root dir' and 'root'.
3844 The server will chroot() to this directory on startup. This is not
3845 strictly necessary for secure operation. Even without it the server
3846 will deny access to files not in one of the service entries. It may
3847 also check for, and deny access to, soft links to other parts of the
3848 filesystem, or attempts to use .. in file names to access other
3849 directories (depending on the setting of the "wide links" parameter).
3851 Adding a "root dir" entry other than "/" adds an extra level of security,
3852 but at a price. It absolutely ensures that no access is given to files not
3853 in the sub-tree specified in the "root dir" option, *including* some files
3854 needed for complete operation of the server. To maintain full operability
3855 of the server you will need to mirror some system files into the "root dir"
3856 tree. In particular you will need to mirror /etc/passwd (or a subset of it),
3857 and any binaries or configuration files needed for printing (if required).
3858 The set of files that must be mirr