1 mailto(samba-bugs@samba.org)
3 manpage(smb.conf htmlcommand((5)))(5)(23 Oct 1998)(Samba)(SAMBA)
6 manpagename(smb.conf)(The configuration file for the Samba suite)
11 bf(smb.conf) The bf(smb.conf) file is a configuration file for the
12 Samba suite. bf(smb.conf) contains runtime configuration information
13 for the Samba programs. The bf(smb.conf) file is designed to be
14 configured and administered by the url(bf(swat (8)))(swat.8.html)
15 program. The complete description of the file format and possible
16 parameters held within are here for reference purposes.
19 manpagesection(FILE FORMAT)
21 The file consists of sections and parameters. A section begins with
22 the name of the section in square brackets and continues until the
23 next section begins. Sections contain parameters of the form
27 The file is line-based - that is, each newline-terminated line
28 represents either a comment, a section name or a parameter.
30 Section and parameter names are not case sensitive.
32 Only the first equals sign in a parameter is significant. Whitespace
33 before or after the first equals sign is discarded. Leading, trailing
34 and internal whitespace in section and parameter names is
35 irrelevant. Leading and trailing whitespace in a parameter value is
36 discarded. Internal whitespace within a parameter value is retained
39 Any line beginning with a semicolon (';') or a hash ('#') character is
40 ignored, as are lines containing only whitespace.
42 Any line ending in a tt('\') is "continued" on the next line in the
43 customary UNIX fashion.
45 The values following the equals sign in parameters are all either a
46 string (no quotes needed) or a boolean, which may be given as yes/no,
47 0/1 or true/false. Case is not significant in boolean values, but is
48 preserved in string values. Some items such as create modes are
51 label(SECTIONDESCRIPTIONS)
52 manpagesection(SECTION DESCRIPTIONS)
54 Each section in the configuration file (except for the
55 link(bf([global]))(global) section) describes a shared resource (known
56 as a em("share")). The section name is the name of the shared resource
57 and the parameters within the section define the shares attributes.
59 There are three special sections, link(bf([global]))(global),
60 link(bf([homes]))(homes) and link(bf([printers]))(printers), which are
61 described under link(bf('special sections'))(SPECIALSECTIONS). The
62 following notes apply to ordinary section descriptions.
64 A share consists of a directory to which access is being given plus
65 a description of the access rights which are granted to the user of
66 the service. Some housekeeping options are also specifiable.
68 Sections are either filespace services (used by the client as an
69 extension of their native file systems) or printable services (used by
70 the client to access print services on the host running the server).
72 Sections may be designated link(bf(guest))(guestok) services, in which
73 case no password is required to access them. A specified UNIX
74 link(bf(guest account))(guestaccount) is used to define access
75 privileges in this case.
77 Sections other than guest services will require a password to access
78 them. The client provides the username. As older clients only provide
79 passwords and not usernames, you may specify a list of usernames to
80 check against the password using the link(bf("user="))(user) option in
81 the share definition. For modern clients such as Windows 95/98 and
82 Windows NT, this should not be necessary.
84 Note that the access rights granted by the server are masked by the
85 access rights granted to the specified or guest UNIX user by the host
86 system. The server does not grant more access than the host system
89 The following sample section defines a file space share. The user has
90 write access to the path tt(/home/bar). The share is accessed via
101 The following sample section defines a printable share. The share
102 is readonly, but printable. That is, the only write access permitted
103 is via calls to open, write to and close a spool file. The
104 link(bf('guest ok'))(guestok) parameter means access will be permitted
105 as the default guest user (specified elsewhere):
109 path = /usr/spool/public
115 label(SPECIALSECTIONS)
116 manpagesection(SPECIAL SECTIONS)
121 dit(bf(The [global] section))
123 Parameters in this section apply to the server as a whole, or are
124 defaults for sections which do not specifically define certain
125 items. See the notes under link(bf('PARAMETERS'))(PARAMETERS) for more
129 dit(bf(The [homes] section))
131 If a section called tt('homes') is included in the configuration file,
132 services connecting clients to their home directories can be created
133 on the fly by the server.
135 When the connection request is made, the existing sections are
136 scanned. If a match is found, it is used. If no match is found, the
137 requested section name is treated as a user name and looked up in the
138 local password file. If the name exists and the correct password has
139 been given, a share is created by cloning the [homes] section.
141 Some modifications are then made to the newly created share:
145 it() The share name is changed from tt('homes') to the located
148 it() If no path was given, the path is set to the user's home
153 If you decide to use a link(bf(path=))(path) line in your [homes]
154 section then you may find it useful to use the link(bf(%S))(percentS)
157 tt(path=/data/pchome/%S)
159 would be useful if you have different home directories for your PCs
160 than for UNIX access.
162 This is a fast and simple way to give a large number of clients access
163 to their home directories with a minimum of fuss.
165 A similar process occurs if the requested section name is tt("homes"),
166 except that the share name is not changed to that of the requesting
167 user. This method of using the [homes] section works well if different
168 users share a client PC.
170 The [homes] section can specify all the parameters a normal service
171 section can specify, though some make more sense than others. The
172 following is a typical and suitable [homes] section:
179 An important point is that if guest access is specified in the [homes]
180 section, all home directories will be visible to all clients
181 bf(without a password). In the very unlikely event that this is
182 actually desirable, it would be wise to also specify link(bf(read only
185 Note that the link(bf(browseable))(browseable) flag for auto home
186 directories will be inherited from the global browseable flag, not the
187 [homes] browseable flag. This is useful as it means setting
188 browseable=no in the [homes] section will hide the [homes] share but
189 make any auto home directories visible.
192 dit(bf(The [printers] section))
194 This section works like link(bf([homes]))(homes), but for printers.
196 If a [printers] section occurs in the configuration file, users are
197 able to connect to any printer specified in the local host's printcap
200 When a connection request is made, the existing sections are
201 scanned. If a match is found, it is used. If no match is found, but a
202 link(bf([homes]))(homes) section exists, it is used as described
203 above. Otherwise, the requested section name is treated as a printer
204 name and the appropriate printcap file is scanned to see if the
205 requested section name is a valid printer share name. If a match is
206 found, a new printer share is created by cloning the [printers]
209 A few modifications are then made to the newly created share:
213 it() The share name is set to the located printer name
215 it() If no printer name was given, the printer name is set to the
218 it() If the share does not permit guest access and no username was
219 given, the username is set to the located printer name.
223 Note that the [printers] service MUST be printable - if you specify
224 otherwise, the server will refuse to load the configuration file.
226 Typically the path specified would be that of a world-writeable spool
227 directory with the sticky bit set on it. A typical [printers] entry
228 would look like this:
232 path = /usr/spool/public
238 All aliases given for a printer in the printcap file are legitimate
239 printer names as far as the server is concerned. If your printing
240 subsystem doesn't work like that, you will have to set up a
241 pseudo-printcap. This is a file consisting of one or more lines like
244 verb( alias|alias|alias|alias... )
246 Each alias should be an acceptable printer name for your printing
247 subsystem. In the link(bf([global]))(global) section, specify the new
248 file as your printcap. The server will then only recognize names
249 found in your pseudo-printcap, which of course can contain whatever
250 aliases you like. The same technique could be used simply to limit
251 access to a subset of your local printers.
253 An alias, by the way, is defined as any component of the first entry
254 of a printcap record. Records are separated by newlines, components
255 (if there are more than one) are separated by vertical bar symbols
258 NOTE: On SYSV systems which use lpstat to determine what printers are
259 defined on the system you may be able to use link(bf("printcap name =
260 lpstat"))(printcapname) to automatically obtain a list of
261 printers. See the link(bf("printcap name"))(printcapname) option for
267 manpagesection(PARAMETERS)
269 Parameters define the specific attributes of sections.
271 Some parameters are specific to the link(bf([global]))(global) section
272 (e.g., link(bf(security))(security)). Some parameters are usable in
273 all sections (e.g., link(bf(create mode))(createmode)). All others are
274 permissible only in normal sections. For the purposes of the following
275 descriptions the link(bf([homes]))(homes) and
276 link(bf([printers]))(printers) sections will be considered normal.
277 The letter tt('G') in parentheses indicates that a parameter is
278 specific to the link(bf([global]))(global) section. The letter tt('S')
279 indicates that a parameter can be specified in a service specific
280 section. Note that all tt('S') parameters can also be specified in the
281 link(bf([global]))(global) section - in which case they will define
282 the default behavior for all services.
284 Parameters are arranged here in alphabetical order - this may not
285 create best bedfellows, but at least you can find them! Where there
286 are synonyms, the preferred synonym is described, others refer to the
289 label(VARIABLESUBSTITUTIONS)
290 manpagesection(VARIABLE SUBSTITUTIONS)
292 Many of the strings that are settable in the config file can take
293 substitutions. For example the option link(bf(tt("path =
294 /tmp/%u")))(path) would be interpreted as tt("path = /tmp/john") if
295 the user connected with the username john.
297 These substitutions are mostly noted in the descriptions below, but
298 there are some general substitutions which apply whenever they might
299 be relevant. These are:
304 it() bf(%S) = the name of the current service, if any.
307 it() bf(%P) = the root directory of the current service, if any.
310 it() bf(%u) = user name of the current service, if any.
313 it() bf(%g) = primary group name of link(bf(%u))(percentu).
316 it() bf(%U) = session user name (the user name that
317 the client wanted, not necessarily the same as the one they got).
320 it() bf(%G) = primary group name of link(bf(%U))(percentU).
323 it() bf(%H) = the home directory of the user given by link(bf(%u))(percentu).
326 it() bf(%v) = the Samba version.
329 it() bf(%h) = the internet hostname that Samba is running on.
332 it() bf(%m) = the NetBIOS name of the client machine (very useful).
335 it() bf(%L) = the NetBIOS name of the server. This allows you to change your
336 config based on what the client calls you. Your server can have a "dual
340 it() bf(%M) = the internet name of the client machine.
343 it() bf(%N) = the name of your NIS home directory server. This is
344 obtained from your NIS auto.map entry. If you have not compiled Samba
345 with the bf(--with-automount) option then this value will be the same
346 as link(bf(%L))(percentL).
349 it() bf(%p) = the path of the service's home directory, obtained from your NIS
350 auto.map entry. The NIS auto.map entry is split up as "%N:%p".
353 it() bf(%R) = the selected protocol level after protocol
354 negotiation. It can be one of CORE, COREPLUS, LANMAN1, LANMAN2 or NT1.
357 it() bf(%d) = The process id of the current server process.
360 it() bf(%a) = the architecture of the remote
361 machine. Only some are recognized, and those may not be 100%
362 reliable. It currently recognizes Samba, WfWg, WinNT and
363 Win95. Anything else will be known as "UNKNOWN". If it gets it wrong
364 then sending a level 3 log to email(samba-bugs@samba.org)
365 should allow it to be fixed.
368 it() bf(%I) = The IP address of the client machine.
371 it() bf(%T) = the current date and time.
375 There are some quite creative things that can be done with these
376 substitutions and other smb.conf options.
379 manpagesection(NAME MANGLING)
381 Samba supports em("name mangling") so that DOS and Windows clients can
382 use files that don't conform to the 8.3 format. It can also be set to
383 adjust the case of 8.3 format filenames.
385 There are several options that control the way mangling is performed,
386 and they are grouped here rather than listed separately. For the
387 defaults look at the output of the testparm program.
389 All of these options can be set separately for each service (or
390 globally, of course).
394 label(manglecaseoption)
395 bf("mangle case = yes/no") controls if names that have characters that
396 aren't of the "default" case are mangled. For example, if this is yes
397 then a name like tt("Mail") would be mangled. Default em(no).
399 label(casesensitiveoption)
400 bf("case sensitive = yes/no") controls whether filenames are case
401 sensitive. If they aren't then Samba must do a filename search and
402 match on passed names. Default em(no).
404 label(defaultcaseoption)
405 bf("default case = upper/lower") controls what the default case is for new
406 filenames. Default em(lower).
408 label(preservecaseoption)
409 bf("preserve case = yes/no") controls if new files are created with the
410 case that the client passes, or if they are forced to be the tt("default")
411 case. Default em(Yes).
413 label(shortpreservecaseoption)
415 bf("short preserve case = yes/no") controls if new files which conform
416 to 8.3 syntax, that is all in upper case and of suitable length, are
417 created upper case, or if they are forced to be the tt("default")
418 case. This option can be use with link(bf("preserve case =
419 yes"))(preservecaseoption) to permit long filenames to retain their
420 case, while short names are lowered. Default em(Yes).
422 By default, Samba 2.0 has the same semantics as a Windows NT
423 server, in that it is case insensitive but case preserving.
425 label(NOTEABOUTUSERNAMEPASSWORDVALIDATION)
426 manpagesection(NOTE ABOUT USERNAME/PASSWORD VALIDATION)
428 There are a number of ways in which a user can connect to a
429 service. The server follows the following steps in determining if it
430 will allow a connection to a specified service. If all the steps fail
431 then the connection request is rejected. If one of the steps pass then
432 the following steps are not checked.
434 If the service is marked link(bf("guest only = yes"))(guestonly) then
435 steps 1 to 5 are skipped.
439 eit() Step 1: If the client has passed a username/password pair and
440 that username/password pair is validated by the UNIX system's password
441 programs then the connection is made as that username. Note that this
442 includes the tt(\\server\service%username) method of passing a
445 eit() Step 2: If the client has previously registered a username with
446 the system and now supplies a correct password for that username then
447 the connection is allowed.
449 eit() Step 3: The client's netbios name and any previously used user
450 names are checked against the supplied password, if they match then
451 the connection is allowed as the corresponding user.
453 eit() Step 4: If the client has previously validated a
454 username/password pair with the server and the client has passed the
455 validation token then that username is used. This step is skipped if
456 link(bf("revalidate = yes"))(revalidate) for this service.
458 eit() Step 5: If a link(bf("user = "))(user) field is given in the
459 smb.conf file for the service and the client has supplied a password,
460 and that password matches (according to the UNIX system's password
461 checking) with one of the usernames from the link(bf(user=))(user)
462 field then the connection is made as the username in the
463 link(bf("user="))(user) line. If one of the username in the
464 link(bf(user=))(user) list begins with a tt('@') then that name
465 expands to a list of names in the group of the same name.
467 eit() Step 6: If the service is a guest service then a connection is
468 made as the username given in the link(bf("guest account
469 ="))(guestaccount) for the service, irrespective of the supplied
474 label(COMPLETELISTOFGLOBALPARAMETERS)
475 manpagesection(COMPLETE LIST OF GLOBAL PARAMETERS)
477 Here is a list of all global parameters. See the section of each
478 parameter for details. Note that some are synonyms.
482 it() link(bf(announce as))(announceas)
484 it() link(bf(announce version))(announceversion)
486 it() link(bf(auto services))(autoservices)
488 it() link(bf(bind interfaces only))(bindinterfacesonly)
490 it() link(bf(browse list))(browselist)
492 it() link(bf(change notify timeout))(changenotifytimeout)
494 it() link(bf(character set))(characterset)
496 it() link(bf(client code page))(clientcodepage)
498 it() link(bf(coding system))(codingsystem)
500 it() link(bf(config file))(configfile)
502 it() link(bf(deadtime))(deadtime)
504 it() link(bf(debug timestamp))(debugtimestamp)
506 it() link(bf(debuglevel))(debuglevel)
508 it() link(bf(default))(default)
510 it() link(bf(default service))(defaultservice)
512 it() link(bf(dfree command))(dfreecommand)
514 it() link(bf(dns proxy))(dnsproxy)
516 it() link(bf(domain admin group))(domainadmingroup)
518 it() link(bf(domain admin users))(domainadminusers)
520 it() link(bf(domain controller))(domaincontroller)
522 it() link(bf(domain groups))(domaingroups)
524 it() link(bf(domain guest group))(domainguestgroup)
526 it() link(bf(domain guest users))(domainguestusers)
528 it() link(bf(domain logons))(domainlogons)
530 it() link(bf(domain master))(domainmaster)
532 it() link(bf(encrypt passwords))(encryptpasswords)
534 it() link(bf(getwd cache))(getwdcache)
536 it() link(bf(homedir map))(homedirmap)
538 it() link(bf(hosts equiv))(hostsequiv)
540 it() link(bf(interfaces))(interfaces)
542 it() link(bf(keepalive))(keepalive)
544 it() link(bf(kernel oplocks))(kerneloplocks)
546 it() link(bf(ldap filter))(ldapfilter)
548 it() link(bf(ldap port))(ldapport)
550 it() link(bf(ldap root))(ldaproot)
552 it() link(bf(ldap root passwd))(ldaprootpasswd)
554 it() link(bf(ldap server))(ldapserver)
556 it() link(bf(ldap suffix))(ldapsuffix)
558 it() link(bf(lm announce))(lmannounce)
560 it() link(bf(lm interval))(lminterval)
562 it() link(bf(load printers))(loadprinters)
564 it() link(bf(local master))(localmaster)
566 it() link(bf(lock dir))(lockdir)
568 it() link(bf(lock directory))(lockdirectory)
570 it() link(bf(log file))(logfile)
572 it() link(bf(log level))(loglevel)
574 it() link(bf(logon drive))(logondrive)
576 it() link(bf(logon home))(logonhome)
578 it() link(bf(logon path))(logonpath)
580 it() link(bf(logon script))(logonscript)
582 it() link(bf(lpq cache time))(lpqcachetime)
584 it() link(bf(machine password timeout))(machinepasswordtimeout)
586 it() link(bf(mangled stack))(mangledstack)
588 it() link(bf(max disk size))(maxdisksize)
590 it() link(bf(max log size))(maxlogsize)
592 it() link(bf(max mux))(maxmux)
594 it() link(bf(max open files))(maxopenfiles)
596 it() link(bf(max packet))(maxpacket)
598 it() link(bf(max ttl))(maxttl)
600 it() link(bf(max wins ttl))(maxwinsttl)
602 it() link(bf(max xmit))(maxxmit)
604 it() link(bf(message command))(messagecommand)
606 it() link(bf(min wins ttl))(minwinsttl)
608 it() link(bf(name resolve order))(nameresolveorder)
610 it() link(bf(netbios aliases))(netbiosaliases)
612 it() link(bf(netbios name))(netbiosname)
614 it() link(bf(nis homedir))(nishomedir)
616 it() link(bf(nt pipe support))(ntpipesupport)
618 it() link(bf(nt smb support))(ntsmbsupport)
620 it() link(bf(null passwords))(nullpasswords)
622 it() link(bf(ole locking compatibility))(olelockingcompatibility)
624 it() link(bf(os level))(oslevel)
626 it() link(bf(packet size))(packetsize)
628 it() link(bf(panic action))(panicaction)
630 it() link(bf(passwd chat))(passwdchat)
632 it() link(bf(passwd chat debug))(passwdchatdebug)
634 it() link(bf(passwd program))(passwdprogram)
636 it() link(bf(password level))(passwordlevel)
638 it() link(bf(password server))(passwordserver)
640 it() link(bf(prefered master))(preferedmaster)
642 it() link(bf(preferred master))(preferredmaster)
644 it() link(bf(preload))(preload)
646 it() link(bf(printcap))(printcap)
648 it() link(bf(printcap name))(printcapname)
650 it() link(bf(printer driver file))(printerdriverfile)
652 it() link(bf(protocol))(protocol)
654 it() link(bf(read bmpx))(readbmpx)
656 it() link(bf(read prediction))(readprediction)
658 it() link(bf(read raw))(readraw)
660 it() link(bf(read size))(readsize)
662 it() link(bf(remote announce))(remoteannounce)
664 it() link(bf(remote browse sync))(remotebrowsesync)
666 it() link(bf(root))(root)
668 it() link(bf(root dir))(rootdir)
670 it() link(bf(root directory))(rootdirectory)
672 it() link(bf(security))(security)
674 it() link(bf(server string))(serverstring)
676 it() link(bf(shared mem size))(sharedmemsize)
678 it() link(bf(smb passwd file))(smbpasswdfile)
680 it() link(bf(smbrun))(smbrun)
682 it() link(bf(socket address))(socketaddress)
684 it() link(bf(socket options))(socketoptions)
686 it() link(bf(ssl))(ssl)
688 it() link(bf(ssl CA certDir))(sslCAcertDir)
690 it() link(bf(ssl CA certFile))(sslCAcertFile)
692 it() link(bf(ssl ciphers))(sslciphers)
694 it() link(bf(ssl client cert))(sslclientcert)
696 it() link(bf(ssl client key))(sslclientkey)
698 it() link(bf(ssl compatibility))(sslcompatibility)
700 it() link(bf(ssl hosts))(sslhosts)
702 it() link(bf(ssl hosts resign))(sslhostsresign)
704 it() link(bf(ssl require clientcert))(sslrequireclientcert)
706 it() link(bf(ssl require servercert))(sslrequireservercert)
708 it() link(bf(ssl server cert))(sslservercert)
710 it() link(bf(ssl server key))(sslserverkey)
712 it() link(bf(ssl version))(sslversion)
714 it() link(bf(stat cache))(statcache)
716 it() link(bf(stat cache size))(statcachesize)
718 it() link(bf(strip dot))(stripdot)
720 it() link(bf(syslog))(syslog)
722 it() link(bf(syslog only))(syslogonly)
724 it() link(bf(time offset))(timeoffset)
726 it() link(bf(time server))(timeserver)
728 it() link(bf(timestamp logs))(timestamplogs)
730 it() link(bf(unix password sync))(unixpasswordsync)
732 it() link(bf(unix realname))(unixrealname)
734 it() link(bf(update encrypted))(updateencrypted)
736 it() link(bf(use rhosts))(userhosts)
738 it() link(bf(username level))(usernamelevel)
740 it() link(bf(username map))(usernamemap)
742 it() link(bf(valid chars))(validchars)
744 it() link(bf(wins proxy))(winsproxy)
746 it() link(bf(wins server))(winsserver)
748 it() link(bf(wins support))(winssupport)
750 it() link(bf(workgroup))(workgroup)
752 it() link(bf(write raw))(writeraw)
756 label(COMPLETELISTOFSERVICEPARAMETERS)
757 manpagesection(COMPLETE LIST OF SERVICE PARAMETERS)
759 Here is a list of all service parameters. See the section of each
760 parameter for details. Note that some are synonyms.
764 it() link(bf(admin users))(adminusers)
766 it() link(bf(allow hosts))(allowhosts)
768 it() link(bf(alternate permissions))(alternatepermissions)
770 it() link(bf(available))(available)
772 it() link(bf(blocking locks))(blockinglocks)
774 it() link(bf(browsable))(browsable)
776 it() link(bf(browseable))(browseable)
778 it() link(bf(case sensitive))(casesensitive)
780 it() link(bf(casesignames))(casesignames)
782 it() link(bf(comment))(comment)
784 it() link(bf(copy))(copy)
786 it() link(bf(create mask))(createmask)
788 it() link(bf(create mode))(createmode)
790 it() link(bf(default case))(defaultcase)
792 it() link(bf(delete readonly))(deletereadonly)
794 it() link(bf(delete veto files))(deletevetofiles)
796 it() link(bf(deny hosts))(denyhosts)
798 it() link(bf(directory))(directory)
800 it() link(bf(directory mask))(directorymask)
802 it() link(bf(directory mode))(directorymode)
804 it() link(bf(dont descend))(dontdescend)
806 it() link(bf(dos filetime resolution))(dosfiletimeresolution)
808 it() link(bf(dos filetimes))(dosfiletimes)
810 it() link(bf(exec))(exec)
812 it() link(bf(fake directory create times))(fakedirectorycreatetimes)
814 it() link(bf(fake oplocks))(fakeoplocks)
816 it() link(bf(follow symlinks))(followsymlinks)
818 it() link(bf(force create mode))(forcecreatemode)
820 it() link(bf(force directory mode))(forcedirectorymode)
822 it() link(bf(force group))(forcegroup)
824 it() link(bf(force user))(forceuser)
826 it() link(bf(fstype))(fstype)
828 it() link(bf(group))(group)
830 it() link(bf(guest account))(guestaccount)
832 it() link(bf(guest ok))(guestok)
834 it() link(bf(guest only))(guestonly)
836 it() link(bf(hide dot files))(hidedotfiles)
838 it() link(bf(hide files))(hidefiles)
840 it() link(bf(hosts allow))(hostsallow)
842 it() link(bf(hosts deny))(hostsdeny)
844 it() link(bf(include))(include)
846 it() link(bf(invalid users))(invalidusers)
848 it() link(bf(locking))(locking)
850 it() link(bf(lppause command))(lppausecommand)
852 it() link(bf(lpq command))(lpqcommand)
854 it() link(bf(lpresume command))(lpresumecommand)
856 it() link(bf(lprm command))(lprmcommand)
858 it() link(bf(magic output))(magicoutput)
860 it() link(bf(magic script))(magicscript)
862 it() link(bf(mangle case))(manglecase)
864 it() link(bf(mangled map))(mangledmap)
866 it() link(bf(mangled names))(manglednames)
868 it() link(bf(mangling char))(manglingchar)
870 it() link(bf(map archive))(maparchive)
872 it() link(bf(map hidden))(maphidden)
874 it() link(bf(map system))(mapsystem)
876 it() link(bf(map to guest))(maptoguest)
878 it() link(bf(max connections))(maxconnections)
880 it() link(bf(min print space))(minprintspace)
882 it() link(bf(only guest))(onlyguest)
884 it() link(bf(only user))(onlyuser)
886 it() link(bf(oplocks))(oplocks)
888 it() link(bf(path))(path)
890 it() link(bf(postexec))(postexec)
892 it() link(bf(postscript))(postscript)
894 it() link(bf(preexec))(preexec)
896 it() link(bf(preserve case))(preservecase)
898 it() link(bf(print command))(printcommand)
900 it() link(bf(print ok))(printok)
902 it() link(bf(printable))(printable)
904 it() link(bf(printer))(printer)
906 it() link(bf(printer driver))(printerdriver)
908 it() link(bf(printer driver location))(printerdriverlocation)
910 it() link(bf(printer name))(printername)
912 it() link(bf(printing))(printing)
914 it() link(bf(public))(public)
916 it() link(bf(queuepause command))(queuepausecommand)
918 it() link(bf(queueresume command))(queueresumecommand)
920 it() link(bf(read list))(readlist)
922 it() link(bf(read only))(readonly)
924 it() link(bf(revalidate))(revalidate)
926 it() link(bf(root postexec))(rootpostexec)
928 it() link(bf(root preexec))(rootpreexec)
930 it() link(bf(set directory))(setdirectory)
932 it() link(bf(share modes))(sharemodes)
934 it() link(bf(short preserve case))(shortpreservecase)
936 it() link(bf(status))(status)
938 it() link(bf(strict locking))(strictlocking)
940 it() link(bf(strict sync))(strictsync)
942 it() link(bf(sync always))(syncalways)
944 it() link(bf(user))(user)
946 it() link(bf(username))(username)
948 it() link(bf(users))(users)
950 it() link(bf(valid users))(validusers)
952 it() link(bf(veto files))(vetofiles)
954 it() link(bf(veto oplock files))(vetooplockfiles)
956 it() link(bf(volume))(volume)
958 it() link(bf(wide links))(widelinks)
960 it() link(bf(writable))(writable)
962 it() link(bf(write list))(writelist)
964 it() link(bf(write ok))(writeok)
966 it() link(bf(writeable))(writeable)
970 label(EXPLANATIONOFEACHPARAMETER)
971 manpagesection(EXPLANATION OF EACH PARAMETER)
976 dit(bf(admin users (S)))
978 This is a list of users who will be granted administrative privileges
979 on the share. This means that they will do all file operations as the
982 You should use this option very carefully, as any user in this list
983 will be able to do anything they like on the share, irrespective of
990 tt( admin users = jason)
993 dit(bf(allow hosts (S)))
995 A synonym for this parameter is link(bf('hosts allow'))(hostsallow)
997 This parameter is a comma, space, or tab delimited set of hosts which
998 are permitted to access a service.
1000 If specified in the link(bf([global]))(global) section then it will
1001 apply to all services, regardless of whether the individual service
1002 has a different setting.
1004 You can specify the hosts by name or IP number. For example, you could
1005 restrict access to only the hosts on a Class C subnet with something
1006 like tt("allow hosts = 150.203.5."). The full syntax of the list is
1007 described in the man page bf(hosts_access (5)). Note that this man
1008 page may not be present on your system, so a brief description will
1011 em(NOTE:) IF you wish to allow the url(bf(smbpasswd
1012 (8)))(smbpasswd.html.8) program to be run by local users to change
1013 their Samba passwords using the local url(bf(smbd (8)))(smbd.8.html)
1014 daemon, then you em(MUST) ensure that the localhost is listed in your
1015 bf(allow hosts) list, as url(bf(smbpasswd (8)))(smbpasswd.html.8) runs
1016 in client-server mode and is seen by the local
1017 url(bf(smbd))(smbd.8.html) process as just another client.
1019 You can also specify hosts by network/netmask pairs and by netgroup
1020 names if your system supports netgroups. The em(EXCEPT) keyword can also
1021 be used to limit a wildcard list. The following examples may provide
1024 bf(Example 1): allow localhost and all IPs in 150.203.*.* except one
1026 tt( hosts allow = localhost, 150.203. EXCEPT 150.203.6.66)
1028 bf(Example 2): allow localhost and hosts that match the given network/netmask
1030 tt( hosts allow = localhost, 150.203.15.0/255.255.255.0)
1032 bf(Example 3): allow a localhost plus a couple of hosts
1034 tt( hosts allow = localhost, lapland, arvidsjaur)
1036 bf(Example 4): allow only hosts in NIS netgroup "foonet" or localhost, but
1037 deny access from one particular host
1039 tt( hosts allow = @foonet, localhost)
1040 tt( hosts deny = pirate)
1042 Note that access still requires suitable user-level passwords.
1044 See url(bf(testparm (1)))(testparm.1.html) for a way of testing your
1045 host access to see if it does what you expect.
1048 tt( none (i.e., all hosts permitted access))
1051 tt( allow hosts = 150.203.5. localhost myhost.mynet.edu.au)
1053 label(alternatepermissions)
1054 dit(bf(alternate permissions (S)))
1056 This is a deprecated parameter. It no longer has any effect in Samba2.0.
1057 In previous versions of Samba it affected the way the DOS "read only"
1058 attribute was mapped for a file. In Samba2.0 a file is marked "read only"
1059 if the UNIX file does not have the 'w' bit set for the owner of the file,
1060 regardless if the owner of the file is the currently logged on user or not.
1063 dit(bf(announce as (G)))
1065 This specifies what type of server url(bf(nmbd))(nmbd.8.html) will
1066 announce itself as, to a network neighborhood browse list. By default
1067 this is set to Windows NT. The valid options are : "NT", "Win95" or
1068 "WfW" meaning Windows NT, Windows 95 and Windows for Workgroups
1069 respectively. Do not change this parameter unless you have a specific
1070 need to stop Samba appearing as an NT server as this may prevent Samba
1071 servers from participating as browser servers correctly.
1074 tt( announce as = NT)
1077 tt( announce as = Win95)
1079 label(announceversion)
1080 dit(bf(announce version (G)))
1082 This specifies the major and minor version numbers that nmbd will use
1083 when announcing itself as a server. The default is 4.2. Do not change
1084 this parameter unless you have a specific need to set a Samba server
1085 to be a downlevel server.
1088 tt( announce version = 4.2)
1091 tt( announce version = 2.0)
1095 dit(bf(auto services (G)))
1097 This is a list of services that you want to be automatically added to
1098 the browse lists. This is most useful for homes and printers services
1099 that would otherwise not be visible.
1101 Note that if you just want all printers in your printcap file loaded
1102 then the link(bf("load printers"))(loadprinters) option is easier.
1105 tt( no auto services)
1108 tt( auto services = fred lp colorlp)
1111 dit(bf(available (S)))
1113 This parameter lets you em('turn off') a service. If tt('available = no'),
1114 then em(ALL) attempts to connect to the service will fail. Such failures
1118 tt( available = yes)
1123 label(bindinterfacesonly)
1124 dit(bf(bind interfaces only (G)))
1126 This global parameter allows the Samba admin to limit what interfaces
1127 on a machine will serve smb requests. If affects file service
1128 url(bf(smbd))(smbd.8.html) and name service url(bf(nmbd))(nmbd.8.html)
1129 in slightly different ways.
1131 For name service it causes url(bf(nmbd))(nmbd.8.html) to bind to ports
1132 137 and 138 on the interfaces listed in the
1133 link(bf('interfaces'))(interfaces)
1134 parameter. url(bf(nmbd))(nmbd.8.html) also binds to the 'all
1135 addresses' interface (0.0.0.0) on ports 137 and 138 for the purposes
1136 of reading broadcast messages. If this option is not set then
1137 url(bf(nmbd))(nmbd.8.html) will service name requests on all of these
1138 sockets. If bf("bind interfaces only") is set then
1139 url(bf(nmbd))(nmbd.8.html) will check the source address of any
1140 packets coming in on the broadcast sockets and discard any that don't
1141 match the broadcast addresses of the interfaces in the
1142 link(bf('interfaces'))(interfaces) parameter list. As unicast packets
1143 are received on the other sockets it allows url(bf(nmbd))(nmbd.8.html)
1144 to refuse to serve names to machines that send packets that arrive
1145 through any interfaces not listed in the
1146 link(bf("interfaces"))(interfaces) list. IP Source address spoofing
1147 does defeat this simple check, however so it must not be used
1148 seriously as a security feature for url(bf(nmbd))(nmbd.8.html).
1150 For file service it causes url(bf(smbd))(smbd.8.html) to bind only to
1151 the interface list given in the link(bf('interfaces'))(interfaces)
1152 parameter. This restricts the networks that url(bf(smbd))(smbd.8.html)
1153 will serve to packets coming in those interfaces. Note that you
1154 should not use this parameter for machines that are serving PPP or
1155 other intermittent or non-broadcast network interfaces as it will not
1156 cope with non-permanent interfaces.
1158 In addition, to change a users SMB password, the
1159 url(bf(smbpasswd))(smbpasswd.8.html) by default connects to the
1160 em("localhost" - 127.0.0.1) address as an SMB client to issue the
1161 password change request. If bf("bind interfaces only") is set then
1162 unless the network address em(127.0.0.1) is added to the
1163 link(bf('interfaces'))(interfaces) parameter list then
1164 url(bf(smbpasswd))(smbpasswd.8.html) will fail to connect in it's
1165 default mode. url(bf(smbpasswd))(smbpasswd.8.html) can be forced to
1166 use the primary IP interface of the local host by using its
1167 url(bf("-r remote machine"))(smbpasswd.8.html#minusr) parameter, with
1168 bf("remote machine") set to the IP name of the primary interface
1172 tt( bind interfaces only = False)
1175 tt( bind interfaces only = True)
1177 label(blockinglocks)
1178 dit(bf(blocking locks (S)))
1180 This parameter controls the behavior of url(bf(smbd))(smbd.8.html) when
1181 given a request by a client to obtain a byte range lock on a region
1182 of an open file, and the request has a time limit associated with it.
1184 If this parameter is set and the lock range requested cannot be
1185 immediately satisfied, Samba 2.0 will internally queue the lock
1186 request, and periodically attempt to obtain the lock until the
1187 timeout period expires.
1189 If this parameter is set to "False", then Samba 2.0 will behave
1190 as previous versions of Samba would and will fail the lock
1191 request immediately if the lock range cannot be obtained.
1193 This parameter can be set per share.
1196 tt( blocking locks = True)
1199 tt( blocking locks = False)
1202 dit(bf(browseable (S)))
1204 Synonym for link(bf(browseable))(browseable).
1207 dit(bf(browse list(G)))
1209 This controls whether url(bf(smbd))(smbd.8.html) will serve a browse
1210 list to a client doing a NetServerEnum call. Normally set to true. You
1211 should never need to change this.
1214 tt( browse list = Yes)
1219 This controls whether this share is seen in the list of available
1220 shares in a net view and in the browse list.
1223 tt( browseable = Yes)
1226 tt( browseable = No)
1228 label(casesensitive)
1229 dit(bf(case sensitive (G)))
1231 See the discussion in the section link(bf(NAME MANGLING))(NAMEMANGLING).
1234 dit(bf(casesignames (G)))
1236 Synonym for link(bf("case sensitive"))(casesensitive).
1238 label(changenotifytimeout)
1239 dit(bf(change notify timeout (G)))
1241 One of the new NT SMB requests that Samba 2.0 supports is the
1242 "ChangeNotify" requests. This SMB allows a client to tell a server to
1243 em("watch") a particular directory for any changes and only reply to
1244 the SMB request when a change has occurred. Such constant scanning of
1245 a directory is expensive under UNIX, hence an
1246 url(bf(smbd))(smbd.8.html) daemon only performs such a scan on each
1247 requested directory once every bf(change notify timeout) seconds.
1249 bf(change notify timeout) is specified in units of seconds.
1252 tt( change notify timeout = 60)
1255 tt( change notify timeout = 300)
1257 Would change the scan time to every 5 minutes.
1260 dit(bf(character set (G)))
1262 This allows a smbd to map incoming filenames from a DOS Code page (see
1263 the link(bf(client code page))(clientcodepage) parameter) to several
1264 built in UNIX character sets. The built in code page translations are:
1268 it() bf(ISO8859-1) Western European UNIX character set. The parameter
1269 link(bf(client code page))(clientcodepage) em(MUST) be set to code
1270 page 850 if the bf(character set) parameter is set to iso8859-1
1271 in order for the conversion to the UNIX character set to be done
1274 it() bf(ISO8859-2) Eastern European UNIX character set. The parameter
1275 link(bf(client code page))(clientcodepage) em(MUST) be set to code
1276 page 852 if the bf(character set) parameter is set to ISO8859-2
1277 in order for the conversion to the UNIX character set to be done
1280 it() bf(ISO8859-5) Russian Cyrillic UNIX character set. The parameter
1281 link(bf(client code page))(clientcodepage) em(MUST) be set to code
1282 page 866 if the bf(character set) parameter is set to ISO8859-2
1283 in order for the conversion to the UNIX character set to be done
1286 it() bf(KOI8-R) Alternate mapping for Russian Cyrillic UNIX
1287 character set. The parameter link(bf(client code
1288 page))(clientcodepage) em(MUST) be set to code page 866 if the
1289 bf(character set) parameter is set to KOI8-R in order for the
1290 conversion to the UNIX character set to be done correctly.
1294 em(BUG). These MSDOS code page to UNIX character set mappings should
1295 be dynamic, like the loading of MS DOS code pages, not static.
1297 See also link(bf(client code page))(clientcodepage). Normally this
1298 parameter is not set, meaning no filename translation is done.
1301 tt( character set = <empty string>)
1304 tt( character set = ISO8859-1)
1306 label(clientcodepage)
1307 dit(bf(client code page (G)))
1309 This parameter specifies the DOS code page that the clients accessing
1310 Samba are using. To determine what code page a Windows or DOS client
1311 is using, open a DOS command prompt and type the command "chcp". This
1312 will output the code page. The default for USA MS-DOS, Windows 95, and
1313 Windows NT releases is code page 437. The default for western european
1314 releases of the above operating systems is code page 850.
1316 This parameter tells url(bf(smbd))(smbd.8.html) which of the
1317 tt(codepage.XXX) files to dynamically load on startup. These files,
1318 described more fully in the manual page url(bf(make_smbcodepage
1319 (1)))(make_smbcodepage.1.html), tell url(bf(smbd))(smbd.8.html) how
1320 to map lower to upper case characters to provide the case insensitivity
1321 of filenames that Windows clients expect.
1323 Samba currently ships with the following code page files :
1327 it() bf(Code Page 437 - MS-DOS Latin US)
1329 it() bf(Code Page 737 - Windows '95 Greek)
1331 it() bf(Code Page 850 - MS-DOS Latin 1)
1333 it() bf(Code Page 852 - MS-DOS Latin 2)
1335 it() bf(Code Page 861 - MS-DOS Icelandic)
1337 it() bf(Code Page 866 - MS-DOS Cyrillic)
1339 it() bf(Code Page 932 - MS-DOS Japanese SJIS)
1341 it() bf(Code Page 936 - MS-DOS Simplified Chinese)
1343 it() bf(Code Page 949 - MS-DOS Korean Hangul)
1345 it() bf(Code Page 950 - MS-DOS Traditional Chinese)
1349 Thus this parameter may have any of the values 437, 737, 850, 852,
1350 861, 932, 936, 949, or 950. If you don't find the codepage you need,
1351 read the comments in one of the other codepage files and the
1352 url(bf(make_smbcodepage (1)))(make_smbcodepage.1.html) man page and
1353 write one. Please remember to donate it back to the Samba user
1356 This parameter co-operates with the link(bf("valid
1357 chars"))(validchars) parameter in determining what characters are
1358 valid in filenames and how capitalization is done. If you set both
1359 this parameter and the link(bf("valid chars"))(validchars) parameter
1360 the bf("client code page") parameter em(MUST) be set before the
1361 link(bf("valid chars"))(validchars) parameter in the bf(smb.conf)
1362 file. The link(bf("valid chars"))(validchars) string will then augment
1363 the character settings in the "client code page" parameter.
1365 If not set, bf("client code page") defaults to 850.
1367 See also : link(bf("valid chars"))(validchars)
1370 tt( client code page = 850)
1373 tt( client code page = 936)
1376 dit(bf(codingsystem (G)))
1378 This parameter is used to determine how incoming Shift-JIS Japanese
1379 characters are mapped from the incoming link(bf("client code
1380 page"))(clientcodepage) used by the client, into file names in the
1381 UNIX filesystem. Only useful if link(bf("client code
1382 page"))(clientcodepage) is set to 932 (Japanese Shift-JIS).
1388 it() bf(SJIS) Shift-JIS. Does no conversion of the incoming filename.
1390 it() bf(JIS8, J8BB, J8BH, J8@B, J8@J, J8@H ) Convert from incoming
1391 Shift-JIS to eight bit JIS code with different shift-in, shift out
1394 it() bf(JIS7, J7BB, J7BH, J7@B, J7@J, J7@H ) Convert from incoming
1395 Shift-JIS to seven bit JIS code with different shift-in, shift out
1398 it() bf(JUNET, JUBB, JUBH, JU@B, JU@J, JU@H ) Convert from incoming
1399 Shift-JIS to JUNET code with different shift-in, shift out codes.
1401 it() bf(EUC) Convert an incoming Shift-JIS character to EUC code.
1403 it() bf(HEX) Convert an incoming Shift-JIS character to a 3 byte hex
1404 representation, i.e. tt(:AB).
1406 it() bf(CAP) Convert an incoming Shift-JIS character to the 3 byte hex
1407 representation used by the Columbia AppleTalk Program (CAP),
1408 i.e. tt(:AB). This is used for compatibility between Samba and CAP.
1413 dit(bf(comment (S)))
1415 This is a text field that is seen next to a share when a client does a
1416 queries the server, either via the network neighborhood or via "net
1417 view" to list what shares are available.
1419 If you want to set the string that is displayed next to the machine
1420 name then see the server string command.
1423 tt( No comment string)
1426 tt( comment = Fred's Files)
1429 dit(bf(config file (G)))
1431 This allows you to override the config file to use, instead of the
1432 default (usually bf(smb.conf)). There is a chicken and egg problem
1433 here as this option is set in the config file!
1435 For this reason, if the name of the config file has changed when the
1436 parameters are loaded then it will reload them from the new config
1439 This option takes the usual substitutions, which can be very useful.
1441 If the config file doesn't exist then it won't be loaded (allowing you
1442 to special case the config files of just a few clients).
1445 tt( config file = /usr/local/samba/lib/smb.conf.%m)
1450 This parameter allows you to em('clone') service entries. The specified
1451 service is simply duplicated under the current service's name. Any
1452 parameters specified in the current section will override those in the
1453 section being copied.
1455 This feature lets you set up a 'template' service and create similar
1456 services easily. Note that the service being copied must occur earlier
1457 in the configuration file than the service doing the copying.
1463 tt( copy = otherservice)
1466 dit(bf(create mask (S)))
1468 A synonym for this parameter is link(bf('create mode'))(createmode).
1470 When a file is created, the necessary permissions are calculated
1471 according to the mapping from DOS modes to UNIX permissions, and the
1472 resulting UNIX mode is then bit-wise 'AND'ed with this parameter.
1473 This parameter may be thought of as a bit-wise MASK for the UNIX modes
1474 of a file. Any bit em(*not*) set here will be removed from the modes set
1475 on a file when it is created.
1477 The default value of this parameter removes the 'group' and 'other'
1478 write and execute bits from the UNIX modes.
1480 Following this Samba will bit-wise 'OR' the UNIX mode created from
1481 this parameter with the value of the "force create mode" parameter
1482 which is set to 000 by default.
1484 This parameter does not affect directory modes. See the parameter
1485 link(bf('directory mode'))(directorymode) for details.
1487 See also the link(bf("force create mode"))(forcecreatemode) parameter
1488 for forcing particular mode bits to be set on created files. See also
1489 the link(bf("directory mode"))(directorymode) parameter for masking
1490 mode bits on created directories.
1493 tt( create mask = 0744)
1496 tt( create mask = 0775)
1499 dit(bf(create mode (S)))
1501 This is a synonym for link(bf(create mask))(createmask).
1504 dit(bf(deadtime (G)))
1506 The value of the parameter (a decimal integer) represents the number
1507 of minutes of inactivity before a connection is considered dead, and
1508 it is disconnected. The deadtime only takes effect if the number of
1511 This is useful to stop a server's resources being exhausted by a large
1512 number of inactive connections.
1514 Most clients have an auto-reconnect feature when a connection is
1515 broken so in most cases this parameter should be transparent to users.
1517 Using this parameter with a timeout of a few minutes is recommended
1520 A deadtime of zero indicates that no auto-disconnection should be
1529 label(debugtimestamp)
1530 dit(bf(debug timestamp (G)))
1532 Samba2.0 debug log messages are timestamped by default. If you are
1533 running at a high link(bf("debug level"))(debuglevel) these timestamps
1534 can be distracting. This boolean parameter allows them to be turned
1538 tt( debug timestamp = Yes)
1541 tt( debug timestamp = No)
1544 dit(bf(debug level (G)))
1546 The value of the parameter (an integer) allows the debug level
1547 (logging level) to be specified in the bf(smb.conf) file. This is to
1548 give greater flexibility in the configuration of the system.
1550 The default will be the debug level specified on the command line
1551 or level zero if none was specified.
1554 tt( debug level = 3)
1557 dit(bf(default (G)))
1559 A synonym for link(bf(default service))(defaultservice).
1562 dit(bf(default case (S)))
1564 See the section on link(bf("NAME MANGLING"))(NAMEMANGLING). Also note
1565 the link(bf("short preserve case"))(shortpreservecase) parameter.
1567 label(default service)
1568 dit(bf(default service (G)))
1570 This parameter specifies the name of a service which will be connected
1571 to if the service actually requested cannot be found. Note that the
1572 square brackets are em(NOT) given in the parameter value (see example
1575 There is no default value for this parameter. If this parameter is not
1576 given, attempting to connect to a nonexistent service results in an
1579 Typically the default service would be a link(bf(guest ok))(guestok),
1580 link(bf(read-only))(readonly) service.
1582 Also note that the apparent service name will be changed to equal that
1583 of the requested service, this is very useful as it allows you to use
1584 macros like link(bf(%S))(percentS) to make a wildcard service.
1586 Note also that any tt('_') characters in the name of the service used
1587 in the default service will get mapped to a tt('/'). This allows for
1593 default service = pub
1599 label(deletereadonly)
1600 dit(bf(delete readonly (S)))
1602 This parameter allows readonly files to be deleted. This is not
1603 normal DOS semantics, but is allowed by UNIX.
1605 This option may be useful for running applications such as rcs, where
1606 UNIX file ownership prevents changing file permissions, and DOS
1607 semantics prevent deletion of a read only file.
1610 tt( delete readonly = No)
1613 tt( delete readonly = Yes)
1615 label(deletevetofiles)
1616 dit(bf(delete veto files (S)))
1618 This option is used when Samba is attempting to delete a directory
1619 that contains one or more vetoed directories (see the link(bf('veto
1620 files'))(vetofiles) option). If this option is set to False (the
1621 default) then if a vetoed directory contains any non-vetoed files or
1622 directories then the directory delete will fail. This is usually what
1625 If this option is set to True, then Samba will attempt to recursively
1626 delete any files and directories within the vetoed directory. This can
1627 be useful for integration with file serving systems such as bf(NetAtalk),
1628 which create meta-files within directories you might normally veto
1629 DOS/Windows users from seeing (e.g. tt(.AppleDouble))
1631 Setting tt('delete veto files = True') allows these directories to be
1632 transparently deleted when the parent directory is deleted (so long
1633 as the user has permissions to do so).
1635 See also the link(bf(veto files))(vetofiles) parameter.
1638 tt( delete veto files = False)
1641 tt( delete veto files = True)
1644 dit(bf(deny hosts (S)))
1646 The opposite of link(bf('allow hosts'))(allowhosts) - hosts listed
1647 here are em(NOT) permitted access to services unless the specific
1648 services have their own lists to override this one. Where the lists
1649 conflict, the link(bf('allow'))(allowhosts) list takes precedence.
1652 tt( none (i.e., no hosts specifically excluded))
1655 tt( deny hosts = 150.203.4. badhost.mynet.edu.au)
1658 dit(bf(dfree command (G)))
1660 The dfree command setting should only be used on systems where a
1661 problem occurs with the internal disk space calculations. This has
1662 been known to happen with Ultrix, but may occur with other operating
1663 systems. The symptom that was seen was an error of "Abort Retry
1664 Ignore" at the end of each directory listing.
1666 This setting allows the replacement of the internal routines to
1667 calculate the total disk space and amount available with an external
1668 routine. The example below gives a possible script that might fulfill
1671 The external program will be passed a single parameter indicating a
1672 directory in the filesystem being queried. This will typically consist
1673 of the string tt("./"). The script should return two integers in
1674 ascii. The first should be the total disk space in blocks, and the
1675 second should be the number of available blocks. An optional third
1676 return value can give the block size in bytes. The default blocksize
1679 Note: Your script should em(NOT) be setuid or setgid and should be
1680 owned by (and writeable only by) root!
1683 tt( By default internal routines for determining the disk capacity
1684 and remaining space will be used.)
1687 tt( dfree command = /usr/local/samba/bin/dfree)
1689 Where the script dfree (which must be made executable) could be:
1693 df $1 | tail -1 | awk '{print $2" "$4}'
1696 or perhaps (on Sys V based systems):
1700 /usr/bin/df -k $1 | tail -1 | awk '{print $3" "$5}'
1703 Note that you may have to replace the command names with full
1704 path names on some systems.
1707 dit(bf(directory (S)))
1709 Synonym for link(bf(path))(path).
1711 label(directorymask)
1712 dit(bf(directory mask (S)))
1714 This parameter is the octal modes which are used when converting DOS
1715 modes to UNIX modes when creating UNIX directories.
1717 When a directory is created, the necessary permissions are calculated
1718 according to the mapping from DOS modes to UNIX permissions, and the
1719 resulting UNIX mode is then bit-wise 'AND'ed with this parameter.
1720 This parameter may be thought of as a bit-wise MASK for the UNIX modes
1721 of a directory. Any bit em(*not*) set here will be removed from the
1722 modes set on a directory when it is created.
1724 The default value of this parameter removes the 'group' and 'other'
1725 write bits from the UNIX mode, allowing only the user who owns the
1726 directory to modify it.
1728 Following this Samba will bit-wise 'OR' the UNIX mode created from
1729 this parameter with the value of the "force directory mode"
1730 parameter. This parameter is set to 000 by default (i.e. no extra mode
1733 See the link(bf("force directory mode"))(forcedirectorymode) parameter
1734 to cause particular mode bits to always be set on created directories.
1736 See also the link(bf("create mode"))(createmode) parameter for masking
1737 mode bits on created files.
1740 tt( directory mask = 0755)
1743 tt( directory mask = 0775)
1745 label(directorymode)
1746 dit(bf(directory mode (S)))
1748 Synonym for link(bf(directory mask))(directorymask).
1751 dit(bf(dns proxy (G)))
1753 Specifies that url(bf(nmbd))(nmbd.8.html) when acting as a WINS
1754 server and finding that a NetBIOS name has not been registered, should
1755 treat the NetBIOS name word-for-word as a DNS name and do a lookup
1756 with the DNS server for that name on behalf of the name-querying
1759 Note that the maximum length for a NetBIOS name is 15 characters, so
1760 the DNS name (or DNS alias) can likewise only be 15 characters,
1763 url(bf(nmbd))(nmbd.8.html) spawns a second copy of itself to do the
1764 DNS name lookup requests, as doing a name lookup is a blocking action.
1766 See also the parameter link(bf(wins support))(winssupport).
1769 tt( dns proxy = yes)
1771 label(domainadmingroup)
1772 bf(domain admin group (G))
1774 This is an bf(EXPERIMENTAL) parameter that is part of the unfinished
1775 Samba NT Domain Controller Code. It may be removed in a later release.
1776 To work with the latest code builds that may have more support for
1777 Samba NT Domain Controller functionality please subscribe to the
1778 mailing list bf(Samba-ntdom) available by sending email to
1779 email(listproc@samba.org)
1781 label(domainadminusers)
1782 dit(bf(domain admin users (G)))
1784 This is an bf(EXPERIMENTAL) parameter that is part of the unfinished
1785 Samba NT Domain Controller Code. It may be removed in a later release.
1786 To work with the latest code builds that may have more support for
1787 Samba NT Domain Controller functionality please subscribe to the
1788 mailing list bf(Samba-ntdom) available by sending email to
1789 email(listproc@samba.org)
1791 label(domain controller)
1792 dit(bf(domain controller (G)))
1794 This is a bf(DEPRECATED) parameter. It is currently not used within
1795 the Samba source and should be removed from all current smb.conf
1796 files. It is left behind for compatibility reasons.
1799 dit(bf(domain groups (G)))
1801 This is an bf(EXPERIMENTAL) parameter that is part of the unfinished
1802 Samba NT Domain Controller Code. It may be removed in a later release.
1803 To work with the latest code builds that may have more support for
1804 Samba NT Domain Controller functionality please subscribe to the
1805 mailing list bf(Samba-ntdom) available by sending email to
1806 email(listproc@samba.org)
1808 label(domainguestgroup)
1809 dit(bf(domain guest group (G)))
1811 This is an bf(EXPERIMENTAL) parameter that is part of the unfinished
1812 Samba NT Domain Controller Code. It may be removed in a later release.
1813 To work with the latest code builds that may have more support for
1814 Samba NT Domain Controller functionality please subscribe to the
1815 mailing list bf(Samba-ntdom) available by sending email to
1816 email(listproc@samba.org)
1818 label(domainguestusers)
1819 dit(bf(domain guest users (G)))
1821 This is an bf(EXPERIMENTAL) parameter that is part of the unfinished
1822 Samba NT Domain Controller Code. It may be removed in a later release.
1823 To work with the latest code builds that may have more support for
1824 Samba NT Domain Controller functionality please subscribe to the
1825 mailing list bf(Samba-ntdom) available by sending email to
1826 email(listproc@samba.org)
1829 dit(bf(domain logons (G)))
1831 If set to true, the Samba server will serve Windows 95/98 Domain
1832 logons for the link(bf(workgroup))(workgroup) it is in. For more
1833 details on setting up this feature see the file DOMAINS.txt in the
1834 Samba documentation directory tt(docs/) shipped with the source code.
1836 Note that Win95/98 Domain logons are em(NOT) the same as Windows
1837 NT Domain logons. NT Domain logons require a Primary Domain Controller
1838 (PDC) for the Domain. It is intended that in a future release Samba
1839 will be able to provide this functionality for Windows NT clients
1843 tt( domain logons = no)
1846 dit(bf(domain master (G)))
1848 Tell url(bf(nmbd))(nmbd.8.html) to enable WAN-wide browse list
1849 collation. Setting this option causes url(bf(nmbd))(nmbd.8.html) to
1850 claim a special domain specific NetBIOS name that identifies it as a
1851 domain master browser for its given
1852 link(bf(workgroup))(workgroup). Local master browsers in the same
1853 link(bf(workgroup))(workgroup) on broadcast-isolated subnets will give
1854 this url(bf(nmbd))(nmbd.8.html) their local browse lists, and then
1855 ask url(bf(smbd))(smbd.8.html) for a complete copy of the browse list
1856 for the whole wide area network. Browser clients will then contact
1857 their local master browser, and will receive the domain-wide browse
1858 list, instead of just the list for their broadcast-isolated subnet.
1860 Note that Windows NT Primary Domain Controllers expect to be able to
1861 claim this link(bf(workgroup))(workgroup) specific special NetBIOS
1862 name that identifies them as domain master browsers for that
1863 link(bf(workgroup))(workgroup) by default (i.e. there is no way to
1864 prevent a Windows NT PDC from attempting to do this). This means that
1865 if this parameter is set and url(bf(nmbd))(nmbd.8.html) claims the
1866 special name for a link(bf(workgroup))(workgroup) before a Windows NT
1867 PDC is able to do so then cross subnet browsing will behave strangely
1871 tt( domain master = no)
1874 dit(bf(dont descend (S)))
1876 There are certain directories on some systems (e.g., the tt(/proc) tree
1877 under Linux) that are either not of interest to clients or are
1878 infinitely deep (recursive). This parameter allows you to specify a
1879 comma-delimited list of directories that the server should always show
1882 Note that Samba can be very fussy about the exact format of the "dont
1883 descend" entries. For example you may need tt("./proc") instead of
1884 just tt("/proc"). Experimentation is the best policy :-)
1887 tt( none (i.e., all directories are OK to descend))
1890 tt( dont descend = /proc,/dev)
1892 label(dosfiletimeresolution)
1893 dit(bf(dos filetime resolution (S)))
1895 Under the DOS and Windows FAT filesystem, the finest granularity on
1896 time resolution is two seconds. Setting this parameter for a share
1897 causes Samba to round the reported time down to the nearest two second
1898 boundary when a query call that requires one second resolution is made
1899 to url(bf(smbd))(smbd.8.html).
1901 This option is mainly used as a compatibility option for Visual C++
1902 when used against Samba shares. If oplocks are enabled on a share,
1903 Visual C++ uses two different time reading calls to check if a file
1904 has changed since it was last read. One of these calls uses a
1905 one-second granularity, the other uses a two second granularity. As
1906 the two second call rounds any odd second down, then if the file has a
1907 timestamp of an odd number of seconds then the two timestamps will not
1908 match and Visual C++ will keep reporting the file has changed. Setting
1909 this option causes the two timestamps to match, and Visual C++ is
1913 tt( dos filetime resolution = False)
1916 tt( dos filetime resolution = True)
1918 label(dos filetimes)
1919 dit(bf(dos filetimes (S)))
1921 Under DOS and Windows, if a user can write to a file they can change
1922 the timestamp on it. Under POSIX semantics, only the owner of the file
1923 or root may change the timestamp. By default, Samba runs with POSIX
1924 semantics and refuses to change the timestamp on a file if the user
1925 smbd is acting on behalf of is not the file owner. Setting this option
1926 to True allows DOS semantics and smbd will change the file timestamp as
1930 tt( dos filetimes = False)
1933 tt( dos filetimes = True)
1935 label(encryptpasswords)
1936 dit(bf(encrypt passwords (G)))
1938 This boolean controls whether encrypted passwords will be negotiated
1939 with the client. Note that Windows NT 4.0 SP3 and above and also
1940 Windows 98 will by default expect encrypted passwords unless a
1941 registry entry is changed. To use encrypted passwords in Samba see the
1942 file ENCRYPTION.txt in the Samba documentation directory tt(docs/)
1943 shipped with the source code.
1945 In order for encrypted passwords to work correctly
1946 url(bf(smbd))(smbd.8.html) must either have access to a local
1947 url(bf(smbpasswd (5)))(smbpasswd.5.html) file (see the
1948 url(bf(smbpasswd (8)))(smbpasswd.8.html) program for information on
1949 how to set up and maintain this file), or set the
1950 link(bf(security=))(security) parameter to either
1951 link(bf("server"))(securityequalserver) or
1952 link(bf("domain"))(securityequaldomain) which causes
1953 url(bf(smbd))(smbd.8.html) to authenticate against another server.
1958 This is a synonym for link(bf(preexec))(preexec).
1960 label(fake directory create times)
1961 dit(bf(fake directory create times (S)))
1963 NTFS and Windows VFAT file systems keep a create time for all files
1964 and directories. This is not the same as the ctime - status change
1965 time - that Unix keeps, so Samba by default reports the earliest of
1966 the various times Unix does keep. Setting this parameter for a share
1967 causes Samba to always report midnight 1-1-1980 as the create time for
1970 This option is mainly used as a compatibility option for Visual C++
1971 when used against Samba shares. Visual C++ generated makefiles have
1972 the object directory as a dependency for each object file, and a make
1973 rule to create the directory. Also, when NMAKE compares timestamps it
1974 uses the creation time when examining a directory. Thus the object
1975 directory will be created if it does not exist, but once it does exist
1976 it will always have an earlier timestamp than the object files it
1979 However, Unix time semantics mean that the create time reported by
1980 Samba will be updated whenever a file is created or deleted in the
1981 directory. NMAKE therefore finds all object files in the object
1982 directory bar the last one built are out of date compared to the
1983 directory and rebuilds them. Enabling this option ensures directories
1984 always predate their contents and an NMAKE build will proceed as
1988 tt( fake directory create times = False)
1991 tt( fake directory create times = True)
1994 dit(bf(fake oplocks (S)))
1996 Oplocks are the way that SMB clients get permission from a server to
1997 locally cache file operations. If a server grants an oplock
1998 (opportunistic lock) then the client is free to assume that it is the
1999 only one accessing the file and it will aggressively cache file
2000 data. With some oplock types the client may even cache file open/close
2001 operations. This can give enormous performance benefits.
2003 When you set tt("fake oplocks = yes") url(bf(smbd))(smbd.8.html) will
2004 always grant oplock requests no matter how many clients are using the
2007 It is generally much better to use the real link(bf(oplocks))(oplocks)
2008 support rather than this parameter.
2010 If you enable this option on all read-only shares or shares that you
2011 know will only be accessed from one client at a time such as
2012 physically read-only media like CDROMs, you will see a big performance
2013 improvement on many operations. If you enable this option on shares
2014 where multiple clients may be accessing the files read-write at the
2015 same time you can get data corruption. Use this option carefully!
2017 This option is disabled by default.
2019 label(followsymlinks)
2020 dit(bf(follow symlinks (S)))
2022 This parameter allows the Samba administrator to stop
2023 url(bf(smbd))(smbd.8.html) from following symbolic links in a
2024 particular share. Setting this parameter to em("No") prevents any file
2025 or directory that is a symbolic link from being followed (the user
2026 will get an error). This option is very useful to stop users from
2027 adding a symbolic link to tt(/etc/passwd) in their home directory for
2028 instance. However it will slow filename lookups down slightly.
2030 This option is enabled (i.e. url(bf(smbd))(smbd.8.html) will follow
2031 symbolic links) by default.
2033 label(forcecreatemode)
2034 dit(bf(force create mode (S)))
2036 This parameter specifies a set of UNIX mode bit permissions that will
2037 em(*always*) be set on a file created by Samba. This is done by
2038 bitwise 'OR'ing these bits onto the mode bits of a file that is being
2039 created. The default for this parameter is (in octal) 000. The modes
2040 in this parameter are bitwise 'OR'ed onto the file mode after the mask
2041 set in the link(bf("create mask"))(createmask) parameter is applied.
2043 See also the parameter link(bf("create mask"))(createmask) for details
2044 on masking mode bits on created files.
2047 tt( force create mode = 000)
2050 tt( force create mode = 0755)
2052 would force all created files to have read and execute permissions set
2053 for 'group' and 'other' as well as the read/write/execute bits set for
2056 label(forcedirectorymode)
2057 dit(bf(force directory mode (S)))
2059 This parameter specifies a set of UNIX mode bit permissions that will
2060 em(*always*) be set on a directory created by Samba. This is done by
2061 bitwise 'OR'ing these bits onto the mode bits of a directory that is
2062 being created. The default for this parameter is (in octal) 0000 which
2063 will not add any extra permission bits to a created directory. This
2064 operation is done after the mode mask in the parameter
2065 link(bf("directory mask"))(directorymask) is applied.
2067 See also the parameter link(bf("directory mask"))(directorymask) for
2068 details on masking mode bits on created directories.
2071 tt( force directory mode = 000)
2074 tt( force directory mode = 0755)
2076 would force all created directories to have read and execute
2077 permissions set for 'group' and 'other' as well as the
2078 read/write/execute bits set for the 'user'.
2081 dit(bf(force group (S)))
2083 This specifies a UNIX group name that will be assigned as the default
2084 primary group for all users connecting to this service. This is useful
2085 for sharing files by ensuring that all access to files on service will
2086 use the named group for their permissions checking. Thus, by assigning
2087 permissions for this group to the files and directories within this
2088 service the Samba administrator can restrict or allow sharing of these
2092 tt( no forced group)
2095 tt( force group = agroup)
2098 dit(bf(force user (S)))
2100 This specifies a UNIX user name that will be assigned as the default
2101 user for all users connecting to this service. This is useful for
2102 sharing files. You should also use it carefully as using it
2103 incorrectly can cause security problems.
2105 This user name only gets used once a connection is established. Thus
2106 clients still need to connect as a valid user and supply a valid
2107 password. Once connected, all file operations will be performed as the
2108 tt("forced user"), no matter what username the client connected as.
2110 This can be very useful.
2116 tt( force user = auser)
2121 This parameter allows the administrator to configure the string that
2122 specifies the type of filesystem a share is using that is reported by
2123 url(bf(smbd))(smbd.8.html) when a client queries the filesystem type
2124 for a share. The default type is bf("NTFS") for compatibility with
2125 Windows NT but this can be changed to other strings such as "Samba" or
2135 dit(bf(getwd cache (G)))
2137 This is a tuning option. When this is enabled a caching algorithm
2138 will be used to reduce the time taken for getwd() calls. This can have
2139 a significant impact on performance, especially when the
2140 link(bf(widelinks))(widelinks) parameter is set to False.
2143 tt( getwd cache = No)
2146 tt( getwd cache = Yes)
2151 Synonym for link(bf("force group"))(forcegroup).
2154 dit(bf(guest account (S)))
2156 This is a username which will be used for access to services which are
2157 specified as link(bf('guest ok'))(guestok) (see below). Whatever
2158 privileges this user has will be available to any client connecting to
2159 the guest service. Typically this user will exist in the password
2160 file, but will not have a valid login. The user account bf("ftp") is
2161 often a good choice for this parameter. If a username is specified in
2162 a given service, the specified username overrides this one.
2164 One some systems the default guest account "nobody" may not be able to
2165 print. Use another account in this case. You should test this by
2166 trying to log in as your guest user (perhaps by using the tt("su -")
2167 command) and trying to print using the system print command such as
2168 bf(lpr (1)) or bf(lp (1)).
2171 tt( specified at compile time, usually "nobody")
2174 tt( guest account = ftp)
2177 dit(bf(guest ok (S)))
2179 If this parameter is em('yes') for a service, then no password is
2180 required to connect to the service. Privileges will be those of the
2181 link(bf(guest account))(guestaccount).
2183 See the section below on link(bf(security))(security) for more
2184 information about this option.
2193 dit(bf(guest only (S)))
2195 If this parameter is em('yes') for a service, then only guest
2196 connections to the service are permitted. This parameter will have no
2197 affect if link(bf("guest ok"))(guestok) or link(bf("public"))(public)
2198 is not set for the service.
2200 See the section below on link(bf(security))(security) for more
2201 information about this option.
2204 tt( guest only = no)
2207 tt( guest only = yes)
2210 dit(bf(hide dot files (S)))
2212 This is a boolean parameter that controls whether files starting with
2213 a dot appear as hidden files.
2216 tt( hide dot files = yes)
2219 tt( hide dot files = no)
2223 dit(bf(hide files(S)))
2225 This is a list of files or directories that are not visible but are
2226 accessible. The DOS 'hidden' attribute is applied to any files or
2227 directories that match.
2229 Each entry in the list must be separated by a tt('/'), which allows
2230 spaces to be included in the entry. tt('*') and tt('?') can be used
2231 to specify multiple files or directories as in DOS wildcards.
2233 Each entry must be a Unix path, not a DOS path and must not include the
2234 Unix directory separator tt('/').
2236 Note that the case sensitivity option is applicable in hiding files.
2238 Setting this parameter will affect the performance of Samba, as it
2239 will be forced to check all files and directories for a match as they
2242 See also link(bf("hide dot files"))(hidedotfiles), link(bf("veto
2243 files"))(vetofiles) and link(bf("case sensitive"))(casesensitive).
2247 No files or directories are hidden by this option (dot files are
2248 hidden by default because of the "hide dot files" option).
2252 tt( hide files = /.*/DesktopFolderDB/TrashFor%m/resource.frk/)
2254 The above example is based on files that the Macintosh SMB client
2255 (DAVE) available from url(bf(Thursby))(www.thursby.com) creates for
2256 internal use, and also still hides all files beginning with a dot.
2259 dit(bf(homedir map (G)))
2261 If link(bf("nis homedir"))(nishomedir) is true, and
2262 url(bf(smbd))(smbd.8.html) is also acting as a Win95/98 link(bf(logon
2263 server))(domainlogons) then this parameter specifies the NIS (or YP)
2264 map from which the server for the user's home directory should be
2265 extracted. At present, only the Sun auto.home map format is
2266 understood. The form of the map is:
2268 tt(username server:/some/file/system)
2270 and the program will extract the servername from before the first
2271 tt(':'). There should probably be a better parsing system that copes
2272 with different map formats and also Amd (another automounter) maps.
2274 NB: A working NIS is required on the system for this option to work.
2276 See also link(bf("nis homedir"))(nishomedir), link(bf(domain
2277 logons))(domainlogons).
2280 tt( homedir map = auto.home)
2283 tt( homedir map = amd.homedir)
2286 dit(bf(hosts allow (S)))
2288 Synonym for link(bf(allow hosts))(allowhosts).
2291 dit(bf(hosts deny (S)))
2293 Synonym for link(bf(denyhosts))(denyhosts).
2296 dit(bf(hosts equiv (G)))
2298 If this global parameter is a non-null string, it specifies the name
2299 of a file to read for the names of hosts and users who will be allowed
2300 access without specifying a password.
2302 This is not be confused with link(bf(allow hosts))(allowhosts) which
2303 is about hosts access to services and is more useful for guest
2304 services. bf(hosts equiv) may be useful for NT clients which will not
2305 supply passwords to samba.
2307 NOTE: The use of bf(hosts equiv) can be a major security hole. This is
2308 because you are trusting the PC to supply the correct username. It is
2309 very easy to get a PC to supply a false username. I recommend that the
2310 bf(hosts equiv) option be only used if you really know what you are
2311 doing, or perhaps on a home network where you trust your spouse and
2312 kids. And only if you em(really) trust them :-).
2315 tt( No host equivalences)
2318 tt( hosts equiv = /etc/hosts.equiv)
2321 dit(bf(include (G)))
2323 This allows you to include one config file inside another. The file
2324 is included literally, as though typed in place.
2326 It takes the standard substitutions, except link(bf(%u))(percentu),
2327 link(bf(%P))(percentP) and link(bf(%S))(percentS).
2330 dit(bf(interfaces (G)))
2332 This option allows you to setup multiple network interfaces, so that
2333 Samba can properly handle browsing on all interfaces.
2335 The option takes a list of ip/netmask pairs. The netmask may either be
2336 a bitmask, or a bitlength.
2338 For example, the following line:
2340 tt(interfaces = 192.168.2.10/24 192.168.3.10/24)
2342 would configure two network interfaces with IP addresses 192.168.2.10
2343 and 192.168.3.10. The netmasks of both interfaces would be set to
2346 You could produce an equivalent result by using:
2348 tt(interfaces = 192.168.2.10/255.255.255.0 192.168.3.10/255.255.255.0)
2350 if you prefer that format.
2352 If this option is not set then Samba will attempt to find a primary
2353 interface, but won't attempt to configure more than one interface.
2355 See also link(bf("bind interfaces only"))(bindinterfacesonly).
2358 dit(bf(invalid users (S)))
2360 This is a list of users that should not be allowed to login to this
2361 service. This is really a em("paranoid") check to absolutely ensure an
2362 improper setting does not breach your security.
2364 A name starting with a tt('@') is interpreted as an NIS netgroup first
2365 (if your system supports NIS), and then as a UNIX group if the name
2366 was not found in the NIS netgroup database.
2368 A name starting with tt('+') is interpreted only by looking in the
2369 UNIX group database. A name starting with tt('&') is interpreted only
2370 by looking in the NIS netgroup database (this requires NIS to be
2371 working on your system). The characters tt('+') and tt('&') may be
2372 used at the start of the name in either order so the value
2373 tt("+&group") means check the UNIX group database, followed by the NIS
2374 netgroup database, and the value tt("&+group") means check the NIS
2375 netgroup database, followed by the UNIX group database (the same as
2376 the tt('@') prefix).
2378 The current servicename is substituted for
2379 link(bf(%S))(percentS). This is useful in the link(bf([homes]))(homes)
2382 See also link(bf("valid users"))(validusers).
2385 tt( No invalid users)
2388 tt( invalid users = root fred admin @wheel)
2391 dit(bf(keepalive (G)))
2393 The value of the parameter (an integer) represents the number of
2394 seconds between bf('keepalive') packets. If this parameter is zero, no
2395 keepalive packets will be sent. Keepalive packets, if sent, allow the
2396 server to tell whether a client is still present and responding.
2398 Keepalives should, in general, not be needed if the socket being used
2399 has the SO_KEEPALIVE attribute set on it (see link(bf("socket
2400 options"))(socketoptions)). Basically you should only use this option
2401 if you strike difficulties.
2407 tt( keep alive = 60)
2409 label(kerneloplocks)
2410 dit(bf(kernel oplocks (G)))
2412 For UNIXs that support kernel based link(bf(oplocks))(oplocks)
2413 (currently only IRIX but hopefully also Linux and FreeBSD soon) this
2414 parameter allows the use of them to be turned on or off.
2416 Kernel oplocks support allows Samba link(bf(oplocks))(oplocks) to be
2417 broken whenever a local UNIX process or NFS operation accesses a file
2418 that url(bf(smbd))(smbd.8.html) has oplocked. This allows complete
2419 data consistency between SMB/CIFS, NFS and local file access (and is a
2420 em(very) cool feature :-).
2422 This parameter defaults to em("On") on systems that have the support,
2423 and em("off") on systems that don't. You should never need to touch
2427 dit(bf(ldap filter (G)))
2429 This parameter is part of the em(EXPERIMENTAL) Samba support for a
2430 password database stored on an LDAP server back-end. These options
2431 are only available if your version of Samba was configured with
2432 the bf(--with-ldap) option.
2434 This parameter specifies an LDAP search filter used to search for a
2435 user name in the LDAP database. It must contain the string
2436 link(bf(%u))(percentU) which will be replaced with the user being
2443 dit(bf(ldap port (G)))
2445 This parameter is part of the em(EXPERIMENTAL) Samba support for a
2446 password database stored on an LDAP server back-end. These options
2447 are only available if your version of Samba was configured with
2448 the bf(--with-ldap) option.
2450 This parameter specifies the TCP port number to use to contact
2454 tt( ldap port = 389.)
2457 dit(bf(ldap root (G)))
2459 This parameter is part of the em(EXPERIMENTAL) Samba support for a
2460 password database stored on an LDAP server back-end. These options
2461 are only available if your version of Samba was configured with
2462 the bf(--with-ldap) option.
2464 This parameter specifies the entity to bind to the LDAP server
2465 as (essentially the LDAP username) in order to be able to perform
2466 queries and modifications on the LDAP database.
2468 See also link(bf(ldap root passwd))(ldaprootpasswd).
2471 tt( empty string (no user defined))
2473 label(ldaprootpasswd)
2474 dit(bf(ldap root passwd (G)))
2476 This parameter is part of the em(EXPERIMENTAL) Samba support for a
2477 password database stored on an LDAP server back-end. These options
2478 are only available if your version of Samba was configured with
2479 the bf(--with-ldap) option.
2481 This parameter specifies the password for the entity to bind to the
2482 LDAP server as (the password for this LDAP username) in order to be
2483 able to perform queries and modifications on the LDAP database.
2485 em(BUGS:) This parameter should em(NOT) be a readable parameter
2486 in the bf(smb.conf) file and will be removed once a correct
2487 storage place is found.
2489 See also link(bf(ldap root))(ldaproot).
2495 dit(bf(ldap server (G)))
2497 This parameter is part of the em(EXPERIMENTAL) Samba support for a
2498 password database stored on an LDAP server back-end. These options
2499 are only available if your version of Samba was configured with
2500 the bf(--with-ldap) option.
2502 This parameter specifies the DNS name of the LDAP server to use
2503 for SMB/CIFS authentication purposes.
2506 tt( ldap server = localhost)
2509 dit(bf(ldap suffix (G)))
2511 This parameter is part of the em(EXPERIMENTAL) Samba support for a
2512 password database stored on an LDAP server back-end. These options
2513 are only available if your version of Samba was configured with
2514 the bf(--with-ldap) option.
2516 This parameter specifies the tt("dn") or LDAP em("distinguished name")
2517 that tells url(bf(smbd))(smbd.8.html) to start from when searching
2518 for an entry in the LDAP password database.
2524 dit(bf(lm announce (G)))
2526 This parameter determines if url(bf(nmbd))(nmbd.8.html) will produce
2527 Lanman announce broadcasts that are needed by bf(OS/2) clients in order
2528 for them to see the Samba server in their browse list. This parameter
2529 can have three values, tt("true"), tt("false"), or tt("auto"). The
2530 default is tt("auto"). If set to tt("false") Samba will never produce
2531 these broadcasts. If set to tt("true") Samba will produce Lanman
2532 announce broadcasts at a frequency set by the parameter link(bf("lm
2533 interval"))(lminterval). If set to tt("auto") Samba will not send Lanman
2534 announce broadcasts by default but will listen for them. If it hears
2535 such a broadcast on the wire it will then start sending them at a
2536 frequency set by the parameter link(bf("lm interval"))(lminterval).
2538 See also link(bf("lm interval"))(lminterval).
2541 tt( lm announce = auto)
2544 tt( lm announce = true)
2547 dit(bf(lm interval (G)))
2549 If Samba is set to produce Lanman announce broadcasts needed by
2550 bf(OS/2) clients (see the link(bf("lm announce"))(lmannounce)
2551 parameter) then this parameter defines the frequency in seconds with
2552 which they will be made. If this is set to zero then no Lanman
2553 announcements will be made despite the setting of the link(bf("lm
2554 announce"))(lmannounce) parameter.
2556 See also link(bf("lm announce"))(lmannounce).
2559 tt( lm interval = 60)
2562 tt( lm interval = 120)
2565 dit(bf(load printers (G)))
2567 A boolean variable that controls whether all printers in the printcap
2568 will be loaded for browsing by default. See the
2569 link(bf("printers"))(printers) section for more details.
2572 tt( load printers = yes)
2575 tt( load printers = no)
2578 dit(bf(local master (G)))
2580 This option allows url(bf(nmbd))(nmbd.8.html) to try and become a
2581 local master browser on a subnet. If set to False then
2582 url(bf(nmbd))(nmbd.8.html) will not attempt to become a local master
2583 browser on a subnet and will also lose in all browsing elections. By
2584 default this value is set to true. Setting this value to true doesn't
2585 mean that Samba will em(become) the local master browser on a subnet,
2586 just that url(bf(nmbd))(nmbd.8.html) will em(participate) in
2587 elections for local master browser.
2589 Setting this value to False will cause url(bf(nmbd))(nmbd.8.html)
2590 em(never) to become a local master browser.
2593 tt( local master = yes)
2596 dit(bf(lock dir (G)))
2598 Synonym for link(bf("lock directory"))(lockdirectory).
2600 label(lockdirectory)
2601 dit(bf(lock directory (G)))
2603 This option specifies the directory where lock files will be placed.
2604 The lock files are used to implement the link(bf("max
2605 connections"))(maxconnections) option.
2608 tt( lock directory = /tmp/samba)
2611 tt( lock directory = /usr/local/samba/var/locks)
2614 dit(bf(locking (S)))
2616 This controls whether or not locking will be performed by the server
2617 in response to lock requests from the client.
2619 If tt("locking = no"), all lock and unlock requests will appear to
2620 succeed and all lock queries will indicate that the queried lock is
2623 If tt("locking = yes"), real locking will be performed by the server.
2625 This option em(may) be useful for read-only filesystems which em(may)
2626 not need locking (such as cdrom drives), although setting this
2627 parameter of tt("no") is not really recommended even in this case.
2629 Be careful about disabling locking either globally or in a specific
2630 service, as lack of locking may result in data corruption. You should
2631 never need to set this parameter.
2640 dit(bf(log file (G)))
2642 This options allows you to override the name of the Samba log file
2643 (also known as the debug file).
2645 This option takes the standard substitutions, allowing you to have
2646 separate log files for each user or machine.
2649 tt( log file = /usr/local/samba/var/log.%m)
2652 dit(bf(log level (G)))
2654 Synonym for link(bf("debug level"))(debuglevel).
2657 dit(bf(logon drive (G)))
2659 This parameter specifies the local path to which the home directory
2660 will be connected (see link(bf("logon home"))(logonhome)) and is only
2661 used by NT Workstations.
2663 Note that this option is only useful if Samba is set up as a
2664 link(bf(logon server))(domainlogons).
2667 tt( logon drive = h:)
2670 dit(bf(logon home (G)))
2672 This parameter specifies the home directory location when a Win95/98 or
2673 NT Workstation logs into a Samba PDC. It allows you to do
2675 tt("NET USE H: /HOME")
2677 from a command prompt, for example.
2679 This option takes the standard substitutions, allowing you to have
2680 separate logon scripts for each user or machine.
2682 Note that this option is only useful if Samba is set up as a
2683 link(bf(logon server))(domainlogons).
2686 tt( logon home = "\\remote_smb_server\%U")
2689 tt( logon home = "\\%N\%U")
2692 dit(bf(logon path (G)))
2694 This parameter specifies the home directory where roaming profiles
2695 (USER.DAT / USER.MAN files for Windows 95/98) are stored.
2697 This option takes the standard substitutions, allowing you to have
2698 separate logon scripts for each user or machine. It also specifies
2699 the directory from which the tt("desktop"), tt("start menu"),
2700 tt("network neighborhood") and tt("programs") folders, and their
2701 contents, are loaded and displayed on your Windows 95/98 client.
2703 The share and the path must be readable by the user for the
2704 preferences and directories to be loaded onto the Windows 95/98
2705 client. The share must be writeable when the logs in for the first
2706 time, in order that the Windows 95/98 client can create the user.dat
2707 and other directories.
2709 Thereafter, the directories and any of the contents can, if required, be
2710 made read-only. It is not advisable that the USER.DAT file be made
2711 read-only - rename it to USER.MAN to achieve the desired effect (a
2712 em(MAN)datory profile).
2714 Windows clients can sometimes maintain a connection to the [homes]
2715 share, even though there is no user logged in. Therefore, it is vital
2716 that the logon path does not include a reference to the homes share
2717 (i.e. setting this parameter to tt(\\%N\HOMES\profile_path) will cause
2720 This option takes the standard substitutions, allowing you to have
2721 separate logon scripts for each user or machine.
2723 Note that this option is only useful if Samba is set up as a
2724 link(bf(logon server))(domainlogons).
2727 tt( logon path = \\%N\%U\profile)
2730 tt( logon path = \\PROFILESERVER\HOME_DIR\%U\PROFILE)
2733 dit(bf(logon script (G)))
2735 This parameter specifies the batch file (.bat) or NT command file
2736 (.cmd) to be downloaded and run on a machine when a user successfully
2737 logs in. The file must contain the DOS style cr/lf line endings.
2738 Using a DOS-style editor to create the file is recommended.
2740 The script must be a relative path to the tt([netlogon]) service. If
2741 the tt([netlogon]) service specifies a link(bf(path))(path) of
2742 /usr/local/samba/netlogon, and logon script = STARTUP.BAT, then the
2743 file that will be downloaded is:
2745 tt(/usr/local/samba/netlogon/STARTUP.BAT)
2747 The contents of the batch file is entirely your choice. A suggested
2748 command would be to add tt(NET TIME \\SERVER /SET /YES), to force every
2749 machine to synchronize clocks with the same time server. Another use
2750 would be to add tt(NET USE U: \\SERVER\UTILS) for commonly used
2751 utilities, or tt(NET USE Q: \\SERVER\ISO9001_QA) for example.
2753 Note that it is particularly important not to allow write access to
2754 the tt([netlogon]) share, or to grant users write permission on the
2755 batch files in a secure environment, as this would allow the batch
2756 files to be arbitrarily modified and security to be breached.
2758 This option takes the standard substitutions, allowing you to have
2759 separate logon scripts for each user or machine.
2761 Note that this option is only useful if Samba is set up as a
2762 link(bf(logon server))(domainlogons).
2765 tt( logon script = scripts\%U.bat)
2767 label(lppausecommand)
2768 dit(bf(lppause command (S)))
2770 This parameter specifies the command to be executed on the server host
2771 in order to stop printing or spooling a specific print job.
2773 This command should be a program or script which takes a printer name
2774 and job number to pause the print job. One way of implementing this is
2775 by using job priorities, where jobs having a too low priority won't be
2776 sent to the printer.
2778 If a tt("%p") is given then the printername is put in its place. A
2779 tt("%j") is replaced with the job number (an integer). On HPUX (see
2780 link(bf(printing=hpux))(printing)), if the tt("-p%p") option is added
2781 to the lpq command, the job will show up with the correct status,
2782 i.e. if the job priority is lower than the set fence priority it will
2783 have the PAUSED status, whereas if the priority is equal or higher it
2784 will have the SPOOLED or PRINTING status.
2786 Note that it is good practice to include the absolute path in the
2787 lppause command as the PATH may not be available to the server.
2789 See also the link(bf("printing"))(printing) parameter.
2792 Currently no default value is given to this string, unless the
2793 value of the link(bf("printing"))(printing) parameter is tt(SYSV), in
2794 which case the default is :
2796 tt( lp -i %p-%j -H hold)
2798 or if the value of the link(bf("printing"))(printing) parameter is tt(softq),
2799 then the default is:
2801 tt( qstat -s -j%j -h)
2803 bf(Example for HPUX:)
2804 lppause command = /usr/bin/lpalt %p-%j -p0
2807 dit(bf(lpq cache time (G)))
2809 This controls how long lpq info will be cached for to prevent the
2810 bf(lpq) command being called too often. A separate cache is kept for
2811 each variation of the bf(lpq) command used by the system, so if you
2812 use different bf(lpq) commands for different users then they won't
2813 share cache information.
2815 The cache files are stored in tt(/tmp/lpq.xxxx) where xxxx is a hash of
2816 the bf(lpq) command in use.
2818 The default is 10 seconds, meaning that the cached results of a
2819 previous identical bf(lpq) command will be used if the cached data is
2820 less than 10 seconds old. A large value may be advisable if your
2821 bf(lpq) command is very slow.
2823 A value of 0 will disable caching completely.
2825 See also the link(bf("printing"))(printing) parameter.
2828 tt( lpq cache time = 10)
2831 tt( lpq cache time = 30)
2834 dit(bf(lpq command (S)))
2836 This parameter specifies the command to be executed on the server host
2837 in order to obtain tt("lpq")-style printer status information.
2839 This command should be a program or script which takes a printer name
2840 as its only parameter and outputs printer status information.
2842 Currently eight styles of printer status information are supported;
2843 BSD, AIX, LPRNG, PLP, SYSV, HPUX, QNX and SOFTQ. This covers most UNIX
2844 systems. You control which type is expected using the
2845 link(bf("printing ="))(printing) option.
2847 Some clients (notably Windows for Workgroups) may not correctly send
2848 the connection number for the printer they are requesting status
2849 information about. To get around this, the server reports on the first
2850 printer service connected to by the client. This only happens if the
2851 connection number sent is invalid.
2853 If a tt(%p) is given then the printername is put in its place. Otherwise
2854 it is placed at the end of the command.
2856 Note that it is good practice to include the absolute path in the bf(lpq
2857 command) as the PATH may not be available to the server.
2859 See also the link(bf("printing"))(printing) parameter.
2862 tt( depends on the setting of printing =)
2865 tt( lpq command = /usr/bin/lpq %p)
2867 label(lpresumecommand)
2868 dit(bf(lpresume command (S)))
2870 This parameter specifies the command to be executed on the server host
2871 in order to restart or continue printing or spooling a specific print
2874 This command should be a program or script which takes a printer name
2875 and job number to resume the print job. See also the link(bf("lppause
2876 command"))(lppausecommand) parameter.
2878 If a tt(%p) is given then the printername is put in its place. A
2879 tt(%j) is replaced with the job number (an integer).
2881 Note that it is good practice to include the absolute path in the bf(lpresume
2882 command) as the PATH may not be available to the server.
2884 See also the link(bf("printing"))(printing) parameter.
2888 Currently no default value is given to this string, unless the
2889 value of the link(bf("printing"))(printing) parameter is tt(SYSV), in
2890 which case the default is :
2892 tt( lp -i %p-%j -H resume)
2894 or if the value of the link(bf("printing"))(printing) parameter is tt(softq),
2895 then the default is:
2897 tt( qstat -s -j%j -r)
2899 bf(Example for HPUX:)
2900 tt( lpresume command = /usr/bin/lpalt %p-%j -p2)
2903 dit(bf(lprm command (S)))
2905 This parameter specifies the command to be executed on the server host
2906 in order to delete a print job.
2908 This command should be a program or script which takes a printer name
2909 and job number, and deletes the print job.
2911 If a tt(%p) is given then the printername is put in its place. A
2912 tt(%j) is replaced with the job number (an integer).
2914 Note that it is good practice to include the absolute path in the
2915 bf(lprm command) as the PATH may not be available to the server.
2917 See also the link(bf("printing"))(printing) parameter.
2920 tt( depends on the setting of "printing =")
2923 tt( lprm command = /usr/bin/lprm -P%p %j)
2926 tt( lprm command = /usr/bin/cancel %p-%j)
2928 label(machinepasswordtimeout)
2929 dit(bf(machine password timeout (G)))
2931 If a Samba server is a member of an Windows NT Domain (see the
2932 link(bf("security=domain"))(securityequaldomain)) parameter) then
2933 periodically a running url(bf(smbd))(smbd.8.html) process will try and
2934 change the bf(MACHINE ACCOUNT PASWORD) stored in the file called
2935 tt(<Domain>.<Machine>.mac) where tt(<Domain>) is the name of the
2936 Domain we are a member of and tt(<Machine>) is the primary
2937 link(bf("NetBIOS name"))(netbiosname) of the machine
2938 url(bf(smbd))(smbd.8.html) is running on. This parameter specifies how
2939 often this password will be changed, in seconds. The default is one
2940 week (expressed in seconds), the same as a Windows NT Domain member
2943 See also url(bf(smbpasswd (8)))(smbpasswd.8.html), and the
2944 link(bf("security=domain"))(securityequaldomain)) parameter.
2947 tt( machine password timeout = 604800)
2950 dit(bf(magic output (S)))
2952 This parameter specifies the name of a file which will contain output
2953 created by a magic script (see the link(bf("magic
2954 script"))(magicscript) parameter below).
2956 Warning: If two clients use the same link(bf("magic
2957 script"))(magicscript) in the same directory the output file content
2961 tt( magic output = <magic script name>.out)
2964 tt( magic output = myfile.txt)
2967 dit(bf(magic script (S)))
2969 This parameter specifies the name of a file which, if opened, will be
2970 executed by the server when the file is closed. This allows a UNIX
2971 script to be sent to the Samba host and executed on behalf of the
2974 Scripts executed in this way will be deleted upon completion,
2975 permissions permitting.
2977 If the script generates output, output will be sent to the file
2978 specified by the link(bf("magic output"))(magicoutput) parameter (see
2981 Note that some shells are unable to interpret scripts containing
2982 carriage-return-linefeed instead of linefeed as the end-of-line
2983 marker. Magic scripts must be executable em("as is") on the host,
2984 which for some hosts and some shells will require filtering at the DOS
2987 Magic scripts are em(EXPERIMENTAL) and should em(NOT) be relied upon.
2990 tt( None. Magic scripts disabled.)
2993 tt( magic script = user.csh)
2996 dit(bf(mangle case (S)))
2998 See the section on link(bf("NAME MANGLING"))(NAMEMANGLING).
3001 dit(bf(mangled map (S)))
3003 This is for those who want to directly map UNIX file names which can
3004 not be represented on Windows/DOS. The mangling of names is not always
3005 what is needed. In particular you may have documents with file
3006 extensions that differ between DOS and UNIX. For example, under UNIX
3007 it is common to use tt(".html") for HTML files, whereas under
3008 Windows/DOS tt(".htm") is more commonly used.
3010 So to map tt("html") to tt("htm") you would use:
3012 tt( mangled map = (*.html *.htm))
3014 One very useful case is to remove the annoying tt(";1") off the ends
3015 of filenames on some CDROMS (only visible under some UNIXs). To do
3016 this use a map of (*;1 *).
3022 tt( mangled map = (*;1 *))
3025 dit(bf(mangled names (S)))
3027 This controls whether non-DOS names under UNIX should be mapped to
3028 DOS-compatible names ("mangled") and made visible, or whether non-DOS
3029 names should simply be ignored.
3031 See the section on link(bf("NAME MANGLING"))(NAMEMANGLING) for details
3032 on how to control the mangling process.
3034 If mangling is used then the mangling algorithm is as follows:
3038 it() The first (up to) five alphanumeric characters before the
3039 rightmost dot of the filename are preserved, forced to upper case, and
3040 appear as the first (up to) five characters of the mangled name.
3042 it() A tilde tt("~") is appended to the first part of the mangled
3043 name, followed by a two-character unique sequence, based on the
3044 original root name (i.e., the original filename minus its final
3045 extension). The final extension is included in the hash calculation
3046 only if it contains any upper case characters or is longer than three
3049 Note that the character to use may be specified using the
3050 link(bf("mangling char"))(manglingchar) option, if you don't like
3053 it() The first three alphanumeric characters of the final extension
3054 are preserved, forced to upper case and appear as the extension of the
3055 mangled name. The final extension is defined as that part of the
3056 original filename after the rightmost dot. If there are no dots in the
3057 filename, the mangled name will have no extension (except in the case
3058 of link(bf("hidden files"))(hidefiles) - see below).
3060 it() Files whose UNIX name begins with a dot will be presented as DOS
3061 hidden files. The mangled name will be created as for other filenames,
3062 but with the leading dot removed and tt("___") as its extension regardless
3063 of actual original extension (that's three underscores).
3067 The two-digit hash value consists of upper case alphanumeric
3070 This algorithm can cause name collisions only if files in a directory
3071 share the same first five alphanumeric characters. The probability of
3072 such a clash is 1/1300.
3074 The name mangling (if enabled) allows a file to be copied between UNIX
3075 directories from Windows/DOS while retaining the long UNIX
3076 filename. UNIX files can be renamed to a new extension from
3077 Windows/DOS and will retain the same basename. Mangled names do not
3078 change between sessions.
3081 tt( mangled names = yes)
3084 tt( mangled names = no)
3087 dit(bf(mangling char (S)))
3089 This controls what character is used as the em("magic") character in
3090 link(bf(name mangling))(manglednames). The default is a tt('~') but
3091 this may interfere with some software. Use this option to set it to
3092 whatever you prefer.
3095 tt( mangling char = ~)
3098 tt( mangling char = ^)
3101 dit(bf(mangled stack (G)))
3103 This parameter controls the number of mangled names that should be
3104 cached in the Samba server url(bf(smbd))(smbd.8.html).
3106 This stack is a list of recently mangled base names (extensions are
3107 only maintained if they are longer than 3 characters or contains upper
3110 The larger this value, the more likely it is that mangled names can be
3111 successfully converted to correct long UNIX names. However, large
3112 stack sizes will slow most directory access. Smaller stacks save
3113 memory in the server (each stack element costs 256 bytes).
3115 It is not possible to absolutely guarantee correct long file names, so
3116 be prepared for some surprises!
3119 tt( mangled stack = 50)
3122 tt( mangled stack = 100)
3125 dit(bf(map archive (S)))
3127 This controls whether the DOS archive attribute should be mapped to
3128 the UNIX owner execute bit. The DOS archive bit is set when a file
3129 has been modified since its last backup. One motivation for this
3130 option it to keep Samba/your PC from making any file it touches from
3131 becoming executable under UNIX. This can be quite annoying for shared
3132 source code, documents, etc...
3134 Note that this requires the link(bf("create mask"))(createmask)
3135 parameter to be set such that owner execute bit is not masked out
3136 (i.e. it must include 100). See the parameter link(bf("create
3137 mask"))(createmask) for details.
3140 tt( map archive = yes)
3143 tt( map archive = no)
3146 dit(bf(map hidden (S)))
3148 This controls whether DOS style hidden files should be mapped to the
3149 UNIX world execute bit.
3151 Note that this requires the link(bf("create mask"))(createmask) to be
3152 set such that the world execute bit is not masked out (i.e. it must
3153 include 001). See the parameter link(bf("create mask"))(createmask)
3157 tt( map hidden = no)
3160 tt( map hidden = yes)
3163 dit(bf(map system (S)))
3165 This controls whether DOS style system files should be mapped to the
3166 UNIX group execute bit.
3168 Note that this requires the link(bf("create mask"))(createmask) to be
3169 set such that the group execute bit is not masked out (i.e. it must
3170 include 010). See the parameter link(bf("create mask"))(createmask)
3174 tt( map system = no)
3177 tt( map system = yes)
3180 dit(bf(map to guest (G)))
3182 This parameter is only useful in link(bf(security))(security) modes
3183 other than link(bf("security=share"))(securityequalshare) - i.e. user,
3186 This parameter can take three different values, which tell
3187 url(bf(smbd))(smbd.8.html) what to do with user login requests that
3188 don't match a valid UNIX user in some way.
3190 The three settings are :
3194 it() bf("Never") - Means user login requests with an invalid password
3195 are rejected. This is the default.
3197 it() bf("Bad User") - Means user logins with an invalid password are
3198 rejected, unless the username does not exist, in which case it is
3199 treated as a guest login and mapped into the link(bf("guest
3200 account"))(guestaccount).
3202 it() bf("Bad Password") - Means user logins with an invalid
3203 password are treated as a guest login and mapped into the
3204 link(bf("guest account"))(guestaccount). Note that this can
3205 cause problems as it means that any user incorrectly typing their
3206 password will be silently logged on a bf("guest") - and
3207 will not know the reason they cannot access files they think
3208 they should - there will have been no message given to them
3209 that they got their password wrong. Helpdesk services will
3210 em(*hate*) you if you set the bf("map to guest") parameter
3215 Note that this parameter is needed to set up bf("Guest") share
3216 services when using link(bf(security))(security) modes other than
3217 share. This is because in these modes the name of the resource being
3218 requested is em(*not*) sent to the server until after the server has
3219 successfully authenticated the client so the server cannot make
3220 authentication decisions at the correct time (connection to the
3221 share) for bf("Guest") shares.
3223 For people familiar with the older Samba releases, this parameter
3224 maps to the old compile-time setting of the GUEST_SESSSETUP value
3228 tt( map to guest = Never)
3230 tt( map to guest = Bad User)
3232 label(maxconnections)
3233 dit(bf(max connections (S)))
3235 This option allows the number of simultaneous connections to a service
3236 to be limited. If bf("max connections") is greater than 0 then
3237 connections will be refused if this number of connections to the
3238 service are already open. A value of zero mean an unlimited number of
3239 connections may be made.
3241 Record lock files are used to implement this feature. The lock files
3242 will be stored in the directory specified by the link(bf("lock
3243 directory"))(lockdirectory) option.
3246 tt( max connections = 0)
3249 tt( max connections = 10)
3252 dit(bf(max disk size (G)))
3254 This option allows you to put an upper limit on the apparent size of
3255 disks. If you set this option to 100 then all shares will appear to be
3256 not larger than 100 MB in size.
3258 Note that this option does not limit the amount of data you can put on
3259 the disk. In the above case you could still store much more than 100
3260 MB on the disk, but if a client ever asks for the amount of free disk
3261 space or the total disk size then the result will be bounded by the
3262 amount specified in bf("max disk size").
3264 This option is primarily useful to work around bugs in some pieces of
3265 software that can't handle very large disks, particularly disks over
3268 A bf("max disk size") of 0 means no limit.
3271 tt( max disk size = 0)
3274 tt( max disk size = 1000)
3277 dit(bf(max log size (G)))
3279 This option (an integer in kilobytes) specifies the max size the log
3280 file should grow to. Samba periodically checks the size and if it is
3281 exceeded it will rename the file, adding a tt(".old") extension.
3283 A size of 0 means no limit.
3286 tt( max log size = 5000)
3289 tt( max log size = 1000)
3292 dit(bf(max mux (G)))
3294 This option controls the maximum number of outstanding simultaneous
3295 SMB operations that samba tells the client it will allow. You should
3296 never need to set this parameter.
3302 dit(bf(maxopenfiles (G)))
3304 This parameter limits the maximum number of open files that one
3305 url(bf(smbd))(smbd.8.html) file serving process may have open for
3306 a client at any one time. The default for this parameter is set
3307 very high (10,000) as Samba uses only one bit per unopened file.
3309 The limit of the number of open files is usually set by the
3310 UNIX per-process file descriptor limit rather than this parameter
3311 so you should never need to touch this parameter.
3314 tt( max open files = 10000)
3317 dit(bf(max packet (G)))
3319 Synonym for label(bf("packet size"))(packetsize).
3322 dit(bf(max ttl (G)))
3324 This option tells url(bf(nmbd))(nmbd.8.html) what the default 'time
3325 to live' of NetBIOS names should be (in seconds) when
3326 url(bf(nmbd))(nmbd.8.html) is requesting a name using either a
3327 broadcast packet or from a WINS server. You should never need to
3328 change this parameter. The default is 3 days.
3331 tt( max ttl = 259200)
3334 dit(bf(max wins ttl (G)))
3336 This option tells url(bf(nmbd))(nmbd.8.html) when acting as a WINS
3337 server link(bf((wins support =true)))(winssupport) what the maximum
3338 'time to live' of NetBIOS names that url(bf(nmbd))(nmbd.8.html) will
3339 grant will be (in seconds). You should never need to change this
3340 parameter. The default is 6 days (518400 seconds).
3342 See also the link(bf("min wins ttl"))(minwinsttl) parameter.
3345 tt( max wins ttl = 518400)
3348 dit(bf(max xmit (G)))
3350 This option controls the maximum packet size that will be negotiated
3351 by Samba. The default is 65535, which is the maximum. In some cases
3352 you may find you get better performance with a smaller value. A value
3353 below 2048 is likely to cause problems.
3356 tt( max xmit = 65535)
3359 tt( max xmit = 8192)
3361 label(messagecommand)
3362 dit(bf(message command (G)))
3364 This specifies what command to run when the server receives a WinPopup
3367 This would normally be a command that would deliver the message
3368 somehow. How this is to be done is up to your imagination.
3372 tt( message command = csh -c 'xedit %s;rm %s' &)
3374 This delivers the message using bf(xedit), then removes it
3375 afterwards. em(NOTE THAT IT IS VERY IMPORTANT THAT THIS COMMAND RETURN
3376 IMMEDIATELY). That's why I have the tt('&') on the end. If it doesn't
3377 return immediately then your PCs may freeze when sending messages
3378 (they should recover after 30secs, hopefully).
3380 All messages are delivered as the global guest user. The command takes
3381 the standard substitutions, although link(bf(%u))(percentu) won't work
3382 (link(bf(%U))(percentU) may be better in this case).
3384 Apart from the standard substitutions, some additional ones apply. In
3389 it() tt("%s") = the filename containing the message.
3391 it() tt("%t") = the destination that the message was sent to (probably the server
3394 it() tt("%f") = who the message is from.
3398 You could make this command send mail, or whatever else takes your
3399 fancy. Please let us know of any really interesting ideas you have.
3401 Here's a way of sending the messages as mail to root:
3403 tt(message command = /bin/mail -s 'message from %f on %m' root < %s; rm %s)
3405 If you don't have a message command then the message won't be
3406 delivered and Samba will tell the sender there was an
3407 error. Unfortunately WfWg totally ignores the error code and carries
3408 on regardless, saying that the message was delivered.
3410 If you want to silently delete it then try:
3412 tt("message command = rm %s").
3414 For the really adventurous, try something like this:
3416 tt(message command = csh -c 'csh < %s |& /usr/local/samba/bin/smbclient -M %m; rm %s' &)
3418 this would execute the command as a script on the server, then give
3419 them the result in a WinPopup message. Note that this could cause a
3420 loop if you send a message from the server using smbclient! You better
3421 wrap the above in a script that checks for this :-)
3424 tt( no message command)
3427 tt( message command = csh -c 'xedit %s;rm %s' &)
3429 label(minprintspace)
3430 dit(bf(min print space (S)))
3432 This sets the minimum amount of free disk space that must be available
3433 before a user will be able to spool a print job. It is specified in
3434 kilobytes. The default is 0, which means a user can always spool a print
3437 See also the link(bf(printing))(printing) parameter.
3440 tt( min print space = 0)
3443 tt( min print space = 2000)
3446 dit(bf(min wins ttl (G)))
3448 This option tells url(bf(nmbd))(nmbd.8.html) when acting as a WINS
3449 server link(bf((wins support = true)))(winssupport) what the minimum
3450 'time to live' of NetBIOS names that url(bf(nmbd))(nmbd.8.html) will
3451 grant will be (in seconds). You should never need to change this
3452 parameter. The default is 6 hours (21600 seconds).
3455 tt( min wins ttl = 21600)
3458 label(nameresolveorder)
3459 dit(bf(name resolve order (G)))
3461 This option is used by the programs in the Samba suite to determine
3462 what naming services and in what order to resolve host names to IP
3463 addresses. The option takes a space separated string of different name
3466 The options are :"lmhosts", "host", "wins" and "bcast". They cause
3467 names to be resolved as follows :
3471 it() bf(lmhosts) : Lookup an IP address in the Samba lmhosts file.
3473 it() bf(host) : Do a standard host name to IP address resolution,
3474 using the system /etc/hosts, NIS, or DNS lookups. This method of name
3475 resolution is operating system depended for instance on IRIX or
3476 Solaris this may be controlled by the em(/etc/nsswitch.conf) file).
3478 it() bf(wins) : Query a name with the IP address listed in the
3479 link(bf(wins server))(winsserver) parameter. If no WINS server has
3480 been specified this method will be ignored.
3482 it() bf(bcast) : Do a broadcast on each of the known local interfaces
3483 listed in the link(bf(interfaces))(interfaces) parameter. This is the
3484 least reliable of the name resolution methods as it depends on the
3485 target host being on a locally connected subnet.
3490 tt( name resolve order = lmhosts host wins bcast)
3493 tt( name resolve order = lmhosts bcast host)
3495 This will cause the local lmhosts file to be examined first, followed
3496 by a broadcast attempt, followed by a normal system hostname lookup.
3498 label(netbiosaliases)
3499 dit(bf(netbios aliases (G)))
3501 This is a list of NetBIOS names that url(bf(nmbd))(nmbd.8.html) will
3502 advertise as additional names by which the Samba server is known. This
3503 allows one machine to appear in browse lists under multiple names. If
3504 a machine is acting as a link(bf(browse server))(localmaster) or
3505 link(bf(logon server))(domainlogons) none of these names will be
3506 advertised as either browse server or logon servers, only the primary
3507 name of the machine will be advertised with these capabilities.
3509 See also link(bf("netbios name"))(netbiosname).
3512 tt( empty string (no additional names))
3515 tt( netbios aliases = TEST TEST1 TEST2)
3518 dit(bf(netbios name (G)))
3520 This sets the NetBIOS name by which a Samba server is known. By
3521 default it is the same as the first component of the host's DNS name.
3522 If a machine is a link(bf(browse server))(localmaster) or
3523 link(bf(logon server))(domainlogons) this name (or the first component
3524 of the hosts DNS name) will be the name that these services are
3527 See also link(bf("netbios aliases"))(netbiosaliases).
3530 tt( Machine DNS name.)
3533 tt( netbios name = MYNAME)
3536 dit(bf(nis homedir (G)))
3538 Get the home share server from a NIS map. For UNIX systems that use an
3539 automounter, the user's home directory will often be mounted on a
3540 workstation on demand from a remote server.
3542 When the Samba logon server is not the actual home directory server,
3543 but is mounting the home directories via NFS then two network hops
3544 would be required to access the users home directory if the logon
3545 server told the client to use itself as the SMB server for home
3546 directories (one over SMB and one over NFS). This can be very
3549 This option allows Samba to return the home share as being on a
3550 different server to the logon server and as long as a Samba daemon is
3551 running on the home directory server, it will be mounted on the Samba
3552 client directly from the directory server. When Samba is returning the
3553 home share to the client, it will consult the NIS map specified in
3554 link(bf("homedir map"))(homedirmap) and return the server listed
3557 Note that for this option to work there must be a working NIS
3558 system and the Samba server with this option must also be a
3559 link(bf(logon server))(domainlogons).
3562 tt( nis homedir = false)
3565 tt( nis homedir = true)
3567 label(ntpipesupport)
3568 dit(bf(nt pipe support (G)))
3570 This boolean parameter controls whether url(bf(smbd))(smbd.8.html)
3571 will allow Windows NT clients to connect to the NT SMB specific
3572 tt(IPC$) pipes. This is a developer debugging option and can be left
3576 tt( nt pipe support = yes)
3579 dit(bf(nt smb support (G)))
3581 This boolean parameter controls whether url(bf(smbd))(smbd.8.html)
3582 will negotiate NT specific SMB support with Windows NT
3583 clients. Although this is a developer debugging option and should be
3584 left alone, benchmarking has discovered that Windows NT clients give
3585 faster performance with this option set to tt("no"). This is still
3586 being investigated. If this option is set to tt("no") then Samba
3587 offers exactly the same SMB calls that versions prior to Samba2.0
3588 offered. This information may be of use if any users are having
3589 problems with NT SMB support.
3592 tt( nt support = yes)
3594 label(nullpasswords)
3595 dit(bf(null passwords (G)))
3597 Allow or disallow client access to accounts that have null passwords.
3599 See also url(bf(smbpasswd (5)))(smbpasswd.5.html).
3602 tt( null passwords = no)
3605 tt( null passwords = yes)
3607 label(olelockingcompatibility)
3608 dit(bf(ole locking compatibility (G)))
3610 This parameter allows an administrator to turn off the byte range lock
3611 manipulation that is done within Samba to give compatibility for OLE
3612 applications. Windows OLE applications use byte range locking as a
3613 form of inter-process communication, by locking ranges of bytes around
3614 the 2^32 region of a file range. This can cause certain UNIX lock
3615 managers to crash or otherwise cause problems. Setting this parameter
3616 to tt("no") means you trust your UNIX lock manager to handle such cases
3620 tt( ole locking compatibility = yes)
3623 tt( ole locking compatibility = no)
3626 dit(bf(only guest (S)))
3628 A synonym for link(bf("guest only"))(guestonly).
3631 dit(bf(only user (S)))
3633 This is a boolean option that controls whether connections with
3634 usernames not in the link(bf(user=))(user) list will be allowed. By
3635 default this option is disabled so a client can supply a username to
3636 be used by the server.
3638 Note that this also means Samba won't try to deduce usernames from the
3639 service name. This can be annoying for the link(bf([homes]))(homes)
3640 section. To get around this you could use "link(bf(user))(user) =
3641 link(bf(%S))(percentS)" which means your link(bf("user"))(user) list
3642 will be just the service name, which for home directories is the name
3645 See also the link(bf(user))(user) parameter.
3648 tt( only user = False)
3651 tt( only user = True)
3654 dit(bf(oplocks (S)))
3656 This boolean option tells smbd whether to issue oplocks (opportunistic
3657 locks) to file open requests on this share. The oplock code can
3658 dramatically (approx. 30% or more) improve the speed of access to files
3659 on Samba servers. It allows the clients to aggressively cache files
3660 locally and you may want to disable this option for unreliable network
3661 environments (it is turned on by default in Windows NT Servers). For
3662 more information see the file Speed.txt in the Samba docs/ directory.
3664 Oplocks may be selectively turned off on certain files on a per share basis.
3665 See the 'veto oplock files' parameter. On some systems oplocks are recognized
3666 by the underlying operating system. This allows data synchronization between
3667 all access to oplocked files, whether it be via Samba or NFS or a local
3668 UNIX process. See the link(bf(kernel oplocks))(kerneloplocks) parameter
3675 tt( oplocks = False)
3678 dit(bf(os level (G)))
3680 This integer value controls what level Samba advertises itself as for
3681 browse elections. The value of this parameter determines whether
3682 url(bf(nmbd))(nmbd.8.html) has a chance of becoming a local master
3683 browser for the link(bf(WORKGROUP))(workgroup) in the local broadcast
3684 area. The default is zero, which means url(bf(nmbd))(nmbd.8.html) will
3685 lose elections to Windows machines. See BROWSING.txt in the Samba
3686 docs/ directory for details.
3692 tt( os level = 65 ; This will win against any NT Server)
3695 dit(bf(packet size (G)))
3697 This is a deprecated parameter that how no effect on the current
3698 Samba code. It is left in the parameter list to prevent breaking
3699 old bf(smb.conf) files.
3702 dit(bf(panic action (G)))
3704 This is a Samba developer option that allows a system command to be
3705 called when either url(bf(smbd))(smbd.8.html) or
3706 url(bf(nmbd))(nmbd.8.html) crashes. This is usually used to draw
3707 attention to the fact that a problem occurred.
3710 tt( panic action = <empty string>)
3713 dit(bf(passwd chat (G)))
3715 This string controls the em("chat") conversation that takes places
3716 between url(bf(smbd))(smbd.8.html) and the local password changing
3717 program to change the users password. The string describes a sequence
3718 of response-receive pairs that url(bf(smbd))(smbd.8.html) uses to
3719 determine what to send to the link(bf(passwd))(passwdprogram) program
3720 and what to expect back. If the expected output is not received then
3721 the password is not changed.
3723 This chat sequence is often quite site specific, depending on what
3724 local methods are used for password control (such as NIS etc).
3726 The string can contain the macros tt("%o") and tt("%n") which are
3727 substituted for the old and new passwords respectively. It can also
3728 contain the standard macros tt("\n"), tt("\r"), tt("\t") and tt("\s")
3729 to give line-feed, carriage-return, tab and space.
3731 The string can also contain a tt('*') which matches any sequence of
3734 Double quotes can be used to collect strings with spaces in them into
3737 If the send string in any part of the chat sequence is a fullstop
3738 tt(".") then no string is sent. Similarly, is the expect string is a
3739 fullstop then no string is expected.
3741 Note that if the link(bf("unix password sync"))(unixpasswordsync)
3742 parameter is set to true, then this sequence is called em(*AS ROOT*)
3743 when the SMB password in the smbpasswd file is being changed, without
3744 access to the old password cleartext. In this case the old password
3745 cleartext is set to tt("") (the empty string).
3747 See also link(bf("unix password sync"))(unixpasswordsync),
3748 link(bf("passwd program"))(passwdprogram) and link(bf("passwd chat
3749 debug"))(passwdchatdebug).
3752 verb( passwd chat = "*Enter OLD password*" %o\n "*Enter NEW password*" %n\n \
3753 "*Reenter NEW password*" %n\n "*Password changed*"
3757 verb( passwd chat = *old*password* %o\n *new*password* %n\n *new*password* %n\n *changed*)
3759 label(passwdchatdebug)
3760 dit(bf(passwd chat debug (G)))
3762 This boolean specifies if the passwd chat script parameter is run in
3763 tt("debug") mode. In this mode the strings passed to and received from
3764 the passwd chat are printed in the url(bf(smbd))(smbd.8.html) log with
3765 a link(bf("debug level"))(debuglevel) of 100. This is a dangerous
3766 option as it will allow plaintext passwords to be seen in the
3767 url(bf(smbd))(smbd.8.html) log. It is available to help Samba admins
3768 debug their link(bf("passwd chat"))(passwdchat) scripts when calling
3769 the link(bf("passwd program"))(passwdprogram) and should be turned off
3770 after this has been done. This parameter is off by default.
3772 See also link(bf("passwd chat"))(passwdchat"), link(bf("passwd
3773 program"))(passwdprogram).
3776 tt( passwd chat debug = True)
3779 tt( passwd chat debug = False)
3781 label(passwdprogram)
3782 dit(bf(passwd program (G)))
3784 The name of a program that can be used to set UNIX user passwords.
3785 Any occurrences of link(bf(%u))(percentu) will be replaced with the
3786 user name. The user name is checked for existence before calling the
3787 password changing program.
3789 Also note that many passwd programs insist in em("reasonable")
3790 passwords, such as a minimum length, or the inclusion of mixed case
3791 chars and digits. This can pose a problem as some clients (such as
3792 Windows for Workgroups) uppercase the password before sending it.
3794 em(Note) that if the link(bf("unix password sync"))(unixpasswordsync)
3795 parameter is set to tt("True") then this program is called em(*AS
3796 ROOT*) before the SMB password in the
3797 url(bf(smbpasswd))(smbpasswd.5.html) file is changed. If this UNIX
3798 password change fails, then url(bf(smbd))(smbd.8.html) will fail to
3799 change the SMB password also (this is by design).
3801 If the link(bf("unix password sync"))(unixpasswordsync) parameter is
3802 set this parameter em(MUST USE ABSOLUTE PATHS) for em(ALL) programs
3803 called, and must be examined for security implications. Note that by
3804 default link(bf("unix password sync"))(unixpasswordsync) is set to
3807 See also link(bf("unix password sync"))(unixpasswordsync).
3810 tt( passwd program = /bin/passwd)
3813 tt( passwd program = /sbin/passwd %u)
3815 label(passwordlevel)
3816 dit(bf(password level (G)))
3818 Some client/server combinations have difficulty with mixed-case
3819 passwords. One offending client is Windows for Workgroups, which for
3820 some reason forces passwords to upper case when using the LANMAN1
3821 protocol, but leaves them alone when using COREPLUS!
3823 This parameter defines the maximum number of characters that may be
3824 upper case in passwords.
3826 For example, say the password given was tt("FRED"). If bf(password
3827 level) is set to 1, the following combinations would be tried if
3830 tt("Fred"), tt("fred"), tt("fRed"), tt("frEd"), tt("freD")
3832 If bf(password level) was set to 2, the following combinations would
3835 tt("FRed"), tt("FrEd"), tt("FreD"), tt("fREd"), tt("fReD"),
3840 The higher value this parameter is set to the more likely it is that a
3841 mixed case password will be matched against a single case
3842 password. However, you should be aware that use of this parameter
3843 reduces security and increases the time taken to process a new
3846 A value of zero will cause only two attempts to be made - the password
3847 as is and the password in all-lower case.
3850 tt( password level = 0)
3853 tt( password level = 4)
3855 label(passwordserver)
3856 dit(bf(password server (G)))
3858 By specifying the name of another SMB server (such as a WinNT box)
3859 with this option, and using link(bf("security = domain"))(security) or
3860 link(bf("security = server"))(security) you can get Samba to do all
3861 its username/password validation via a remote server.
3863 This options sets the name of the password server to use. It must be a
3864 NetBIOS name, so if the machine's NetBIOS name is different from its
3865 internet name then you may have to add its NetBIOS name to the lmhosts
3866 file which is stored in the same directory as the bf(smb.conf) file.
3868 The name of the password server is looked up using the parameter
3869 link(bf("name resolve order="))(nameresolveorder) and so may resolved
3870 by any method and order described in that parameter.
3872 The password server much be a machine capable of using the "LM1.2X002"
3873 or the "LM NT 0.12" protocol, and it must be in user level security
3876 NOTE: Using a password server means your UNIX box (running Samba) is
3877 only as secure as your password server. em(DO NOT CHOOSE A PASSWORD
3878 SERVER THAT YOU DON'T COMPLETELY TRUST).
3880 Never point a Samba server at itself for password serving. This will
3881 cause a loop and could lock up your Samba server!
3883 The name of the password server takes the standard substitutions, but
3884 probably the only useful one is link(bf(%m))(percentm), which means
3885 the Samba server will use the incoming client as the password
3886 server. If you use this then you better trust your clients, and you
3887 better restrict them with hosts allow!
3889 If the link(bf("security"))(security) parameter is set to
3890 bf("domain"), then the list of machines in this option must be a list
3891 of Primary or Backup Domain controllers for the
3892 link(bf(Domain))(workgroup), as the Samba server is cryptographicly
3893 in that domain, and will use cryptographicly authenticated RPC calls
3894 to authenticate the user logging on. The advantage of using
3895 link(bf("security=domain"))(securityequaldomain) is that if you list
3896 several hosts in the bf("password server") option then
3897 url(bf(smbd))(smbd.8.html) will try each in turn till it finds one
3898 that responds. This is useful in case your primary server goes down.
3900 If the link(bf("security"))(security) parameter is set to
3901 link(bf("server"))(securityequalserver), then there are different
3902 restrictions that link(bf("security=domain"))(securityequaldomain)
3903 doesn't suffer from:
3907 it() You may list several password servers in the bf("password server")
3908 parameter, however if an url(bf(smbd))(smbd.8.html) makes a connection
3909 to a password server, and then the password server fails, no more
3910 users will be able to be authenticated from this
3911 url(bf(smbd))(smbd.8.html). This is a restriction of the SMB/CIFS
3912 protocol when in link(bf("security=server"))(securityequalserver) mode
3913 and cannot be fixed in Samba.
3915 it() If you are using a Windows NT server as your password server then
3916 you will have to ensure that your users are able to login from the
3917 Samba server, as when in
3918 link(bf("security=server"))(securityequalserver) mode the network
3919 logon will appear to come from there rather than from the users
3924 See also the link(bf("security"))(security) parameter.
3927 tt( password server = <empty string>)
3930 tt( password server = NT-PDC, NT-BDC1, NT-BDC2)
3935 This parameter specifies a directory to which the user of the service
3936 is to be given access. In the case of printable services, this is
3937 where print data will spool prior to being submitted to the host for
3940 For a printable service offering guest access, the service should be
3941 readonly and the path should be world-writeable and have the sticky bit
3942 set. This is not mandatory of course, but you probably won't get the
3943 results you expect if you do otherwise.
3945 Any occurrences of link(bf(%u))(percentu) in the path will be replaced
3946 with the UNIX username that the client is using on this
3947 connection. Any occurrences of link(bf(%m))(percentm) will be replaced
3948 by the NetBIOS name of the machine they are connecting from. These
3949 replacements are very useful for setting up pseudo home directories
3952 Note that this path will be based on link(bf("root dir"))(rootdir) if
3959 tt( path = /home/fred)
3962 dit(bf(postexec (S)))
3964 This option specifies a command to be run whenever the service is
3965 disconnected. It takes the usual substitutions. The command may be run
3966 as the root on some systems.
3968 An interesting example may be do unmount server resources:
3970 tt(postexec = /etc/umount /cdrom)
3972 See also link(bf(preexec))(preexec).
3975 tt( none (no command executed))
3978 tt( postexec = echo "%u disconnected from %S from %m (%I)" >> /tmp/log)
3981 dit(bf(postscript (S)))
3983 This parameter forces a printer to interpret the print files as
3984 postscript. This is done by adding a tt(%!) to the start of print output.
3986 This is most useful when you have lots of PCs that persist in putting
3987 a control-D at the start of print jobs, which then confuses your
3991 tt( postscript = False)
3994 tt( postscript = True)
3997 dit(bf(preexec (S)))
3999 This option specifies a command to be run whenever the service is
4000 connected to. It takes the usual substitutions.
4002 An interesting example is to send the users a welcome message every
4003 time they log in. Maybe a message of the day? Here is an example:
4006 preexec = csh -c 'echo \"Welcome to %S!\" | \
4007 /usr/local/samba/bin/smbclient -M %m -I %I' &
4010 Of course, this could get annoying after a while :-)
4012 See also link(bf(postexec))(postexec).
4015 tt( none (no command executed))
4018 tt( preexec = echo \"%u connected to %S from %m (%I)\" >> /tmp/log)
4020 label(preferredmaster)
4021 dit(bf(preferred master (G)))
4023 This boolean parameter controls if url(bf(nmbd))(nmbd.8.html) is a
4024 preferred master browser for its workgroup.
4026 If this is set to true, on startup, url(bf(nmbd))(nmbd.8.html) will
4027 force an election, and it will have a slight advantage in winning the
4028 election. It is recommended that this parameter is used in
4029 conjunction with link(bf("domain master = yes"))(domainmaster), so
4030 that url(bf(nmbd))(nmbd.8.html) can guarantee becoming a domain
4033 Use this option with caution, because if there are several hosts
4034 (whether Samba servers, Windows 95 or NT) that are preferred master
4035 browsers on the same subnet, they will each periodically and
4036 continuously attempt to become the local master browser. This will
4037 result in unnecessary broadcast traffic and reduced browsing
4040 See also link(bf(os level))(oslevel).
4043 tt( preferred master = no)
4046 tt( preferred master = yes)
4048 label(preferedmaster)
4049 dit(bf(prefered master (G)))
4051 Synonym for link(bf("preferred master"))(preferredmaster) for people
4052 who cannot spell :-).
4056 Synonym for link(bf("auto services"))(autoservices).
4059 dit(bf(preserve case (S)))
4061 This controls if new filenames are created with the case that the
4062 client passes, or if they are forced to be the tt("default") case.
4065 tt( preserve case = yes)
4067 See the section on link(bf("NAME MANGLING"))(NAMEMANGLING) for a
4071 dit(bf(print command (S)))
4073 After a print job has finished spooling to a service, this command
4074 will be used via a tt(system()) call to process the spool
4075 file. Typically the command specified will submit the spool file to
4076 the host's printing subsystem, but there is no requirement that this
4077 be the case. The server will not remove the spool file, so whatever
4078 command you specify should remove the spool file when it has been
4079 processed, otherwise you will need to manually remove old spool files.
4081 The print command is simply a text string. It will be used verbatim,
4082 with two exceptions: All occurrences of tt("%s") will be replaced by
4083 the appropriate spool file name, and all occurrences of tt("%p") will
4084 be replaced by the appropriate printer name. The spool file name is
4085 generated automatically by the server, the printer name is discussed
4088 The full path name will be used for the filename if tt("%s") is not
4089 preceded by a tt('/'). If you don't like this (it can stuff up some
4090 lpq output) then use tt("%f") instead. Any occurrences of tt("%f") get
4091 replaced by the spool filename without the full path at the front.
4093 The print command em(MUST) contain at least one occurrence of tt("%s")
4094 or tt("%f") - the tt("%p") is optional. At the time a job is
4095 submitted, if no printer name is supplied the tt("%p") will be
4096 silently removed from the printer command.
4098 If specified in the link(bf("[global]"))(global) section, the print
4099 command given will be used for any printable service that does not
4100 have its own print command specified.
4102 If there is neither a specified print command for a printable service
4103 nor a global print command, spool files will be created but not
4104 processed and (most importantly) not removed.
4106 Note that printing may fail on some UNIXs from the tt("nobody")
4107 account. If this happens then create an alternative guest account that
4108 can print and set the link(bf("guest account"))(guestaccount) in the
4109 link(bf("[global]"))(global) section.
4111 You can form quite complex print commands by realizing that they are
4112 just passed to a shell. For example the following will log a print
4113 job, print the file, then remove it. Note that tt(';') is the usual
4114 separator for command in shell scripts.
4116 tt(print command = echo Printing %s >> /tmp/print.log; lpr -P %p %s; rm %s)
4118 You may have to vary this command considerably depending on how you
4119 normally print files on your system. The default for the parameter
4120 varies depending on the setting of the link(bf("printing="))(printing)
4124 For link(bf("printing="))(printing) BSD, AIX, QNX, LPRNG or PLP :
4125 tt( print command = lpr -r -P%p %s)
4127 For link(bf("printing="))(printing) SYS or HPUX :
4128 tt( print command = lp -c -d%p %s; rm %s)
4130 For link(bf("printing="))(printing) SOFTQ :
4131 tt( print command = lp -d%p -s %s; rm %s)
4134 tt( print command = /usr/local/samba/bin/myprintscript %p %s)
4137 dit(bf(print ok (S)))
4139 Synonym for link(bf(printable))(printable).
4142 dit(bf(printable (S)))
4144 If this parameter is tt("yes"), then clients may open, write to and
4145 submit spool files on the directory specified for the service.
4147 Note that a printable service will ALWAYS allow writing to the service
4148 path (user privileges permitting) via the spooling of print data. The
4149 link(bf("read only"))(readonly) parameter controls only non-printing
4150 access to the resource.
4156 tt( printable = yes)
4159 dit(bf(printcap (G)))
4161 Synonym for link(bf(printcapname))(printcapname).
4164 dit(bf(printcap name (G)))
4166 This parameter may be used to override the compiled-in default
4167 printcap name used by the server (usually /etc/printcap). See the
4168 discussion of the link(bf([printers]))(printers) section above for
4169 reasons why you might want to do this.
4171 On System V systems that use bf(lpstat) to list available printers you
4172 can use tt("printcap name = lpstat") to automatically obtain lists of
4173 available printers. This is the default for systems that define SYSV
4174 at configure time in Samba (this includes most System V based
4175 systems). If bf("printcap name") is set to bf(lpstat) on these systems
4176 then Samba will launch tt("lpstat -v") and attempt to parse the output
4177 to obtain a printer list.
4179 A minimal printcap file would look something like this:
4189 where the tt('|') separates aliases of a printer. The fact that the
4190 second alias has a space in it gives a hint to Samba that it's a
4193 em(NOTE): Under AIX the default printcap name is
4194 tt("/etc/qconfig"). Samba will assume the file is in AIX tt("qconfig")
4195 format if the string tt("/qconfig") appears in the printcap filename.
4198 tt( printcap name = /etc/printcap)
4201 tt( printcap name = /etc/myprintcap)
4204 dit(bf(printer (S)))
4206 This parameter specifies the name of the printer to which print jobs
4207 spooled through a printable service will be sent.
4209 If specified in the link(bf([global]))(global) section, the printer
4210 name given will be used for any printable service that does not have
4211 its own printer name specified.
4214 none (but may be tt("lp") on many systems)
4217 printer name = laserwriter
4219 label(printerdriver)
4220 dit(bf(printer driver (S)))
4222 This option allows you to control the string that clients receive when
4223 they ask the server for the printer driver associated with a
4224 printer. If you are using Windows95 or WindowsNT then you can use this
4225 to automate the setup of printers on your system.
4227 You need to set this parameter to the exact string (case sensitive)
4228 that describes the appropriate printer driver for your system. If you
4229 don't know the exact string to use then you should first try with no
4230 bf("printer driver") option set and the client will give you a list of
4231 printer drivers. The appropriate strings are shown in a scrollbox
4232 after you have chosen the printer manufacturer.
4234 See also link(bf("printer driver file"))(printerdriverfile).
4237 printer driver = HP LaserJet 4L
4239 label(printerdriverfile)
4240 dit(bf(printer driver file (G)))
4242 This parameter tells Samba where the printer driver definition file,
4243 used when serving drivers to Windows 95 clients, is to be found. If
4244 this is not set, the default is :
4246 tt(SAMBA_INSTALL_DIRECTORY/lib/printers.def)
4248 This file is created from Windows 95 tt("msprint.def") files found on
4249 the Windows 95 client system. For more details on setting up serving
4250 of printer drivers to Windows 95 clients, see the documentation file
4251 in the docs/ directory, PRINTER_DRIVER.txt.
4254 tt( None (set in compile).)
4257 tt( printer driver file = /usr/local/samba/printers/drivers.def)
4259 See also link(bf("printer driver location"))(printerdriverlocation).
4261 label(printerdriverlocation)
4262 dit(bf(printer driver location (S)))
4264 This parameter tells clients of a particular printer share where to
4265 find the printer driver files for the automatic installation of
4266 drivers for Windows 95 machines. If Samba is set up to serve printer
4267 drivers to Windows 95 machines, this should be set to
4269 tt(\\MACHINE\aPRINTER$)
4271 Where MACHINE is the NetBIOS name of your Samba server, and PRINTER$
4272 is a share you set up for serving printer driver files. For more
4273 details on setting this up see the documentation file in the docs/
4274 directory, PRINTER_DRIVER.txt.
4280 tt( printer driver location = \\MACHINE\PRINTER$)
4282 See also link(bf("printer driver file"))(printerdriverfile).
4285 dit(bf(printer name (S)))
4287 Synonym for link(bf(printer))(printer).
4290 dit(bf(printing (S)))
4292 This parameters controls how printer status information is interpreted
4293 on your system, and also affects the default values for the
4294 link(bf("print command"))(printcommand), link(bf("lpq
4295 command"))(lpqcommand) link(bf("lppause command"))(lppausecommand),
4296 link(bf("lpresume command"))(lpresumecommand), and link(bf("lprm
4297 command"))(lprmcommand).
4299 Currently eight printing styles are supported. They are
4300 bf("printing=BSD"), bf("printing=AIX"), bf("printing=LPRNG"),
4302 bf("printing=SYSV"),bf("printing="HPUX"),bf("printing=QNX") and
4303 bf("printing=SOFTQ").
4305 To see what the defaults are for the other print commands when using
4306 these three options use the url(bf("testparm"))(testparm) program.
4308 This option can be set on a per printer basis
4310 See also the discussion in the link(bf([printers]))(printers) section.
4313 dit(bf(protocol (G)))
4315 The value of the parameter (a string) is the highest protocol level
4316 that will be supported by the server.
4318 Possible values are :
4322 it() CORE: Earliest version. No concept of user names.
4324 it() COREPLUS: Slight improvements on CORE for efficiency.
4326 it() LANMAN1: First em("modern") version of the protocol. Long
4329 it() LANMAN2: Updates to Lanman1 protocol.
4331 it() NT1: Current up to date version of the protocol. Used by Windows
4336 Normally this option should not be set as the automatic negotiation
4337 phase in the SMB protocol takes care of choosing the appropriate
4344 tt( protocol = LANMAN1)
4349 Synonym for link(bf("guest ok"))(guestok).
4351 label(queuepausecommand)
4352 dit(bf(queuepause command (S)))
4354 This parameter specifies the command to be executed on the server host
4355 in order to pause the printerqueue.
4357 This command should be a program or script which takes a printer name
4358 as its only parameter and stops the printerqueue, such that no longer
4359 jobs are submitted to the printer.
4361 This command is not supported by Windows for Workgroups, but can be
4362 issued from the Printer's window under Windows 95 & NT.
4364 If a tt("%p") is given then the printername is put in its
4365 place. Otherwise it is placed at the end of the command.
4367 Note that it is good practice to include the absolute path in the
4368 command as the PATH may not be available to the server.
4371 tt( depends on the setting of "printing =")
4374 tt( queuepause command = disable %p)
4376 label(queueresumecommand)
4377 dit(bf(queueresume command (S)))
4379 This parameter specifies the command to be executed on the server host
4380 in order to resume the printerqueue. It is the command to undo the
4381 behavior that is caused by the previous parameter
4382 (link(bf("queuepause command))(queuepausecommand)).
4384 This command should be a program or script which takes a printer name
4385 as its only parameter and resumes the printerqueue, such that queued
4386 jobs are resubmitted to the printer.
4388 This command is not supported by Windows for Workgroups, but can be
4389 issued from the Printer's window under Windows 95 & NT.
4391 If a tt("%p") is given then the printername is put in its
4392 place. Otherwise it is placed at the end of the command.
4394 Note that it is good practice to include the absolute path in the
4395 command as the PATH may not be available to the server.
4398 tt( depends on the setting of "printing =")
4401 tt( queuepause command = enable %p)
4404 dit(bf(read bmpx (G)))
4406 This boolean parameter controls whether url(bf(smbd))(smbd.8.html)
4407 will support the "Read Block Multiplex" SMB. This is now rarely used
4408 and defaults to off. You should never need to set this parameter.
4414 dit(bf(read list (S)))
4416 This is a list of users that are given read-only access to a
4417 service. If the connecting user is in this list then they will not be
4418 given write access, no matter what the link(bf("read only"))(readonly)
4419 option is set to. The list can include group names using the syntax
4420 described in the link(bf("invalid users"))(invalidusers) parameter.
4422 See also the link(bf("write list"))(writelist) parameter and
4423 the link(bf("invalid users"))(invalidusers) parameter.
4426 tt( read list = <empty string>)
4429 tt( read list = mary, @students)
4432 dit(bf(read only (S)))
4434 Note that this is an inverted synonym for
4435 link(bf("writeable"))(writeable) and link(bf("write ok"))(writeok).
4437 See also link(bf("writeable"))(writeable) and link(bf("write
4440 label(readprediction)
4441 dit(bf(read prediction (G)))
4443 em(NOTE): This code is currently disabled in Samba2.0 and
4444 may be removed at a later date. Hence this parameter has
4447 This options enables or disables the read prediction code used to
4448 speed up reads from the server. When enabled the server will try to
4449 pre-read data from the last accessed file that was opened read-only
4450 while waiting for packets.
4453 tt( read prediction = False)
4456 dit(bf(read raw (G)))
4458 This parameter controls whether or not the server will support the raw
4459 read SMB requests when transferring data to clients.
4461 If enabled, raw reads allow reads of 65535 bytes in one packet. This
4462 typically provides a major performance benefit.
4464 However, some clients either negotiate the allowable block size
4465 incorrectly or are incapable of supporting larger block sizes, and for
4466 these clients you may need to disable raw reads.
4468 In general this parameter should be viewed as a system tuning tool and left
4469 severely alone. See also link(bf("write raw"))(writeraw).
4475 dit(bf(read size (G)))
4477 The option bf("read size") affects the overlap of disk reads/writes
4478 with network reads/writes. If the amount of data being transferred in
4479 several of the SMB commands (currently SMBwrite, SMBwriteX and
4480 SMBreadbraw) is larger than this value then the server begins writing
4481 the data before it has received the whole packet from the network, or
4482 in the case of SMBreadbraw, it begins writing to the network before
4483 all the data has been read from disk.
4485 This overlapping works best when the speeds of disk and network access
4486 are similar, having very little effect when the speed of one is much
4487 greater than the other.
4489 The default value is 2048, but very little experimentation has been
4490 done yet to determine the optimal value, and it is likely that the
4491 best value will vary greatly between systems anyway. A value over
4492 65536 is pointless and will cause you to allocate memory
4496 tt( read size = 2048)
4499 tt( read size = 8192)
4501 label(remoteannounce)
4502 dit(bf(remote announce (G)))
4504 This option allows you to setup url(bf(nmbd))(nmbd.8.html) to
4505 periodically announce itself to arbitrary IP addresses with an
4506 arbitrary workgroup name.
4508 This is useful if you want your Samba server to appear in a remote
4509 workgroup for which the normal browse propagation rules don't
4510 work. The remote workgroup can be anywhere that you can send IP
4515 tt( remote announce = 192.168.2.255/SERVERS 192.168.4.255/STAFF)
4517 the above line would cause nmbd to announce itself to the two given IP
4518 addresses using the given workgroup names. If you leave out the
4519 workgroup name then the one given in the
4520 link(bf("workgroup"))(workgroup) parameter is used instead.
4522 The IP addresses you choose would normally be the broadcast addresses
4523 of the remote networks, but can also be the IP addresses of known
4524 browse masters if your network config is that stable.
4526 See the documentation file BROWSING.txt in the docs/ directory.
4529 tt( remote announce = <empty string>)
4532 tt( remote announce = 192.168.2.255/SERVERS 192.168.4.255/STAFF)
4534 label(remotebrowsesync)
4535 dit(bf(remote browse sync (G)))
4537 This option allows you to setup url(bf(nmbd))(nmbd.8.html) to
4538 periodically request synchronization of browse lists with the master
4539 browser of a samba server that is on a remote segment. This option
4540 will allow you to gain browse lists for multiple workgroups across
4541 routed networks. This is done in a manner that does not work with any
4544 This is useful if you want your Samba server and all local clients to
4545 appear in a remote workgroup for which the normal browse propagation
4546 rules don't work. The remote workgroup can be anywhere that you can
4551 tt( remote browse sync = 192.168.2.255 192.168.4.255)
4553 the above line would cause url(bf(nmbd))(nmbd.8.html) to request the
4554 master browser on the specified subnets or addresses to synchronize
4555 their browse lists with the local server.
4557 The IP addresses you choose would normally be the broadcast addresses
4558 of the remote networks, but can also be the IP addresses of known
4559 browse masters if your network config is that stable. If a machine IP
4560 address is given Samba makes NO attempt to validate that the remote
4561 machine is available, is listening, nor that it is in fact the browse
4562 master on it's segment.
4565 tt( remote browse sync = <empty string>)
4568 tt( remote browse sync = 192.168.2.255 192.168.4.255)
4571 dit(bf(revalidate (S)))
4573 Note that this option only works with
4574 link(bf("security=share"))(securityequalshare) and will be ignored if
4575 this is not the case.
4577 This option controls whether Samba will allow a previously validated
4578 username/password pair to be used to attach to a share. Thus if you
4579 connect to tt(\\server\share1) then to tt(\\server\share2) it won't
4580 automatically allow the client to request connection to the second
4581 share as the same username as the first without a password.
4583 If bf("revalidate") is tt("True") then the client will be denied
4584 automatic access as the same username.
4587 tt( revalidate = False)
4590 tt( revalidate = True)
4595 Synonym for link(bf("root directory"))(rootdirectory).
4598 dit(bf(root dir (G)))
4600 Synonym for link(bf("root directory"))(rootdirectory).
4602 label(rootdirectory)
4603 dit(bf(root directory (G)))
4605 The server will tt("chroot()") (i.e. Change it's root directory) to
4606 this directory on startup. This is not strictly necessary for secure
4607 operation. Even without it the server will deny access to files not in
4608 one of the service entries. It may also check for, and deny access to,
4609 soft links to other parts of the filesystem, or attempts to use
4610 tt("..") in file names to access other directories (depending on the
4611 setting of the link(bf("wide links"))(widelinks) parameter).
4613 Adding a bf("root directory") entry other than tt("/") adds an extra
4614 level of security, but at a price. It absolutely ensures that no
4615 access is given to files not in the sub-tree specified in the bf("root
4616 directory") option, em(*including*) some files needed for complete
4617 operation of the server. To maintain full operability of the server
4618 you will need to mirror some system files into the bf("root
4619 directory") tree. In particular you will need to mirror /etc/passwd
4620 (or a subset of it), and any binaries or configuration files needed
4621 for printing (if required). The set of files that must be mirrored is
4622 operating system dependent.
4625 tt( root directory = /)
4628 tt( root directory = /homes/smb)
4631 dit(bf(root postexec (S)))
4633 This is the same as the link(bf("postexec"))(postexec) parameter
4634 except that the command is run as root. This is useful for unmounting
4635 filesystems (such as cdroms) after a connection is closed.
4637 See also link(bf("postexec"))(postexec).
4640 dit(bf(root preexec (S)))
4642 This is the same as the link(bf("preexec"))(preexec) parameter except
4643 that the command is run as root. This is useful for mounting
4644 filesystems (such as cdroms) before a connection is finalized.
4646 See also link(bf("preexec"))(preexec).
4649 dit(bf(security (G)))
4651 This option affects how clients respond to Samba and is one of the most
4652 important settings in the bf(smb.conf) file.
4654 The option sets the tt("security mode bit") in replies to protocol
4655 negotiations with url(bf(smbd))(smbd.8.html) to turn share level
4656 security on or off. Clients decide based on this bit whether (and how)
4657 to transfer user and password information to the server.
4659 The default is link("security=user")(securityequaluser), as this is
4660 the most common setting needed when talking to Windows 98 and Windows
4663 The alternatives are link(bf("security = share"))(securityequalshare),
4664 link(bf("security = server"))(securityequalserver) or
4665 link(bf("security=domain"))(securityequaldomain).
4667 em(*****NOTE THAT THIS DEFAULT IS DIFFERENT IN SAMBA2.0 THAN FOR
4668 PREVIOUS VERSIONS OF SAMBA *******).
4670 In previous versions of Samba the default was
4671 link(bf("security=share"))(securityequalshare) mainly because that was
4672 the only option at one stage.
4674 There is a bug in WfWg that has relevance to this setting. When in
4675 user or server level security a WfWg client will totally ignore the
4676 password you type in the "connect drive" dialog box. This makes it
4677 very difficult (if not impossible) to connect to a Samba service as
4678 anyone except the user that you are logged into WfWg as.
4680 If your PCs use usernames that are the same as their usernames on the
4681 UNIX machine then you will want to use bf("security = user"). If you
4682 mostly use usernames that don't exist on the UNIX box then use
4683 bf("security = share").
4685 You should also use link(bf(security=share))(securityequalshare) if
4686 you want to mainly setup shares without a password (guest
4687 shares). This is commonly used for a shared printer server. It is more
4688 difficult to setup guest shares with
4689 link(bf(security=user))(securityequaluser), see the link(bf("map to
4690 guest"))(maptoguest)parameter for details.
4692 It is possible to use url(bf(smbd))(smbd.8.html) in a em("hybrid
4693 mode") where it is offers both user and share level security under
4694 different link(bf(NetBIOS aliases))(netbiosaliases). See the
4695 link(bf(NetBIOS aliases))(netbiosaliases) and the
4696 link(bf(include))(include) parameters for more information.
4698 The different settings will now be explained.
4702 label(securityequalshare)
4703 dit(bf("security=share")) When clients connect to a share level
4704 security server then need not log onto the server with a valid
4705 username and password before attempting to connect to a shared
4706 resource (although modern clients such as Windows 95/98 and Windows NT
4707 will send a logon request with a username but no password when talking
4708 to a bf(security=share) server). Instead, the clients send
4709 authentication information (passwords) on a per-share basis, at the
4710 time they attempt to connect to that share.
4712 Note that url(bf(smbd))(smbd.8.html) em(*ALWAYS*) uses a valid UNIX
4713 user to act on behalf of the client, even in bf("security=share")
4716 As clients are not required to send a username to the server
4717 in share level security, url(bf(smbd))(smbd.8.html) uses several
4718 techniques to determine the correct UNIX user to use on behalf
4721 A list of possible UNIX usernames to match with the given
4722 client password is constructed using the following methods :
4726 it() If the link(bf("guest only"))(guestonly) parameter is set, then
4727 all the other stages are missed and only the link(bf("guest
4728 account"))(guestaccount) username is checked.
4730 it() Is a username is sent with the share connection request, then
4731 this username (after mapping - see link(bf("username
4732 map"))(usernamemap)), is added as a potential username.
4734 it() If the client did a previous em("logon") request (the
4735 SessionSetup SMB call) then the username sent in this SMB
4736 will be added as a potential username.
4738 it() The name of the service the client requested is added
4739 as a potential username.
4741 it() The NetBIOS name of the client is added to the list as a
4744 it() Any users on the link(bf("user"))(user) list are added
4745 as potential usernames.
4749 If the link(bf("guest only"))(guestonly) parameter is not set, then
4750 this list is then tried with the supplied password. The first user for
4751 whom the password matches will be used as the UNIX user.
4753 If the link(bf("guest only"))(guestonly) parameter is set, or no
4754 username can be determined then if the share is marked as available to
4755 the link(bf("guest account"))(guestaccount), then this guest user will
4756 be used, otherwise access is denied.
4758 Note that it can be em(*very*) confusing in share-level security as to
4759 which UNIX username will eventually be used in granting access.
4761 See also the section link(bf("NOTE ABOUT USERNAME/PASSWORD
4762 VALIDATION"))(NOTEABOUTUSERNAMEPASSWORDVALIDATION).
4764 label(securityequaluser)
4765 dit(bf("security=user"))
4767 This is the default security setting in Samba2.0. With user-level
4768 security a client must first tt("log-on") with a valid username and
4769 password (which can be mapped using the link(bf("username
4770 map"))(usernamemap) parameter). Encrypted passwords (see the
4771 link(bf("encrypted passwords"))(encryptpasswords) parameter) can also
4772 be used in this security mode. Parameters such as
4773 link(bf("user"))(user) and link(bf("guest only"))(guestonly), if set
4774 are then applied and may change the UNIX user to use on this
4775 connection, but only after the user has been successfully
4778 em(Note) that the name of the resource being requested is
4779 em(*not*) sent to the server until after the server has successfully
4780 authenticated the client. This is why guest shares don't work in user
4781 level security without allowing the server to automatically map unknown
4782 users into the link(bf("guest account"))(guestaccount). See the
4783 link(bf("map to guest"))(maptoguest) parameter for details on
4786 See also the section link(bf("NOTE ABOUT USERNAME/PASSWORD
4787 VALIDATION"))(NOTEABOUTUSERNAMEPASSWORDVALIDATION).
4789 label(securityequalserver)
4790 dit(bf("security=server"))
4792 In this mode Samba will try to validate the username/password by
4793 passing it to another SMB server, such as an NT box. If this fails it
4794 will revert to bf("security = user"), but note that if encrypted
4795 passwords have been negotiated then Samba cannot revert back to
4796 checking the UNIX password file, it must have a valid smbpasswd file
4797 to check users against. See the documentation file in the docs/
4798 directory ENCRYPTION.txt for details on how to set this up.
4800 em(Note) that from the clients point of view bf("security=server") is
4801 the same as link(bf("security=user"))(securityequaluser). It only
4802 affects how the server deals with the authentication, it does not in
4803 any way affect what the client sees.
4805 em(Note) that the name of the resource being requested is
4806 em(*not*) sent to the server until after the server has successfully
4807 authenticated the client. This is why guest shares don't work in server
4808 level security without allowing the server to automatically map unknown
4809 users into the link(bf("guest account"))(guestaccount). See the
4810 link(bf("map to guest"))(maptoguest) parameter for details on
4813 See also the section link(bf("NOTE ABOUT USERNAME/PASSWORD
4814 VALIDATION"))(NOTEABOUTUSERNAMEPASSWORDVALIDATION).
4816 See also the link(bf("password server"))(passwordserver) parameter.
4817 and the link(bf("encrypted passwords"))(encryptpasswords) parameter.
4819 label(securityequaldomain)
4820 dit(bf("security=domain"))
4822 This mode will only work correctly if
4823 url(bf(smbpasswd))(smbpasswd.8.html) has been used to add this machine
4824 into a Windows NT Domain. It expects the link(bf("encrypted
4825 passwords"))(encryptpasswords) parameter to be set to tt("true"). In
4826 this mode Samba will try to validate the username/password by passing
4827 it to a Windows NT Primary or Backup Domain Controller, in exactly the
4828 same way that a Windows NT Server would do.
4830 em(Note) that a valid UNIX user must still exist as well as the
4831 account on the Domain Controller to allow Samba to have a valid
4832 UNIX account to map file access to.
4834 em(Note) that from the clients point of view bf("security=domain") is
4835 the same as link(bf("security=user"))(securityequaluser). It only
4836 affects how the server deals with the authentication, it does not in
4837 any way affect what the client sees.
4839 em(Note) that the name of the resource being requested is
4840 em(*not*) sent to the server until after the server has successfully
4841 authenticated the client. This is why guest shares don't work in domain
4842 level security without allowing the server to automatically map unknown
4843 users into the link(bf("guest account"))(guestaccount). See the
4844 link(bf("map to guest"))(maptoguest) parameter for details on
4847 e,(BUG:) There is currently a bug in the implementation of
4848 bf("security=domain) with respect to multi-byte character
4849 set usernames. The communication with a Domain Controller
4850 must be done in UNICODE and Samba currently does not widen
4851 multi-byte user names to UNICODE correctly, thus a multi-byte
4852 username will not be recognized correctly at the Domain Controller.
4853 This issue will be addressed in a future release.
4855 See also the section link(bf("NOTE ABOUT USERNAME/PASSWORD
4856 VALIDATION"))(NOTEABOUTUSERNAMEPASSWORDVALIDATION).
4858 See also the link(bf("password server"))(passwordserver) parameter.
4859 and the link(bf("encrypted passwords"))(encryptpasswords) parameter.
4864 tt( security = USER)
4867 tt( security = DOMAIN)
4870 dit(bf(server string (G)))
4872 This controls what string will show up in the printer comment box in
4873 print manager and next to the IPC connection in tt("net view"). It can be
4874 any string that you wish to show to your users.
4876 It also sets what will appear in browse lists next to the machine
4879 A tt("%v") will be replaced with the Samba version number.
4881 A tt("%h") will be replaced with the hostname.
4884 tt( server string = Samba %v)
4887 tt( server string = University of GNUs Samba Server)
4890 dit(bf(set directory (S)))
4892 If tt("set directory = no"), then users of the service may not use the
4893 setdir command to change directory.
4895 The setdir command is only implemented in the Digital Pathworks
4896 client. See the Pathworks documentation for details.
4899 tt( set directory = no)
4902 tt( set directory = yes)
4905 dit(bf(share modes (S)))
4907 This enables or disables the honoring of the tt("share modes") during a
4908 file open. These modes are used by clients to gain exclusive read or
4909 write access to a file.
4911 These open modes are not directly supported by UNIX, so they are
4912 simulated using shared memory, or lock files if your UNIX doesn't
4913 support shared memory (almost all do).
4915 The share modes that are enabled by this option are DENY_DOS,
4916 DENY_ALL, DENY_READ, DENY_WRITE, DENY_NONE and DENY_FCB.
4918 This option gives full share compatibility and enabled by default.
4920 You should em(*NEVER*) turn this parameter off as many Windows
4921 applications will break if you do so.
4924 tt( share modes = yes)
4926 label(sharedmemsize)
4927 dit(bf(shared mem size (G)))
4929 It specifies the size of the shared memory (in bytes) to use between
4930 url(bf(smbd))(smbd.8.html) processes. This parameter defaults to one
4931 megabyte of shared memory. It is possible that if you have a large
4932 server with many files open simultaneously that you may need to
4933 increase this parameter. Signs that this parameter is set too low are
4934 users reporting strange problems trying to save files (locking errors)
4935 and error messages in the smbd log looking like tt("ERROR
4936 smb_shm_alloc : alloc of XX bytes failed").
4939 tt( shared mem size = 1048576)
4942 tt( shared mem size = 5242880 ; Set to 5mb for a large number of files.)
4944 label(shortpreservecase)
4945 dit(bf(short preserve case (G)))
4947 This boolean parameter controls if new files which conform to 8.3
4948 syntax, that is all in upper case and of suitable length, are created
4949 upper case, or if they are forced to be the tt("default") case. This
4950 option can be use with link(bf("preserve case
4951 =yes"))(preservecaseoption) to permit long filenames to retain their
4952 case, while short names are lowered. Default em(Yes).
4954 See the section on link(bf(NAME MANGLING))(NAMEMANGLING).
4957 tt( short preserve case = yes)
4959 label(smbpasswdfile)
4960 dit(bf(smb passwd file (G)))
4962 This option sets the path to the encrypted smbpasswd file. By default
4963 the path to the smbpasswd file is compiled into Samba.
4966 tt( smb passwd file= <compiled default>)
4969 tt( smb passwd file = /usr/samba/private/smbpasswd)
4974 This sets the full path to the bf(smbrun) binary. This defaults to the
4975 value in the Makefile.
4977 You must get this path right for many services to work correctly.
4979 You should not need to change this parameter so long as Samba
4980 is installed correctly.
4983 tt( smbrun=<compiled default>)
4986 tt( smbrun = /usr/local/samba/bin/smbrun)
4988 label(socketaddress)
4989 dit(bf(socket address (G)))
4991 This option allows you to control what address Samba will listen for
4992 connections on. This is used to support multiple virtual interfaces on
4993 the one server, each with a different configuration.
4995 By default samba will accept connections on any address.
4998 tt( socket address = 192.168.2.20)
5000 label(socketoptions)
5001 dit(bf(socket options (G)))
5003 This option allows you to set socket options to be used when talking
5006 Socket options are controls on the networking layer of the operating
5007 systems which allow the connection to be tuned.
5009 This option will typically be used to tune your Samba server for
5010 optimal performance for your local network. There is no way that Samba
5011 can know what the optimal parameters are for your net, so you must
5012 experiment and choose them yourself. We strongly suggest you read the
5013 appropriate documentation for your operating system first (perhaps
5014 bf("man setsockopt") will help).
5016 You may find that on some systems Samba will say "Unknown socket
5017 option" when you supply an option. This means you either incorrectly
5018 typed it or you need to add an include file to includes.h for your OS.
5019 If the latter is the case please send the patch to
5020 email(samba-bugs@samba.org).
5022 Any of the supported socket options may be combined in any way you
5023 like, as long as your OS allows it.
5025 This is the list of socket options currently settable using this
5040 it() IPTOS_THROUGHPUT
5052 Those marked with a tt(*) take an integer argument. The others can
5053 optionally take a 1 or 0 argument to enable or disable the option, by
5054 default they will be enabled if you don't specify 1 or 0.
5056 To specify an argument use the syntax SOME_OPTION=VALUE for example
5057 tt(SO_SNDBUF=8192). Note that you must not have any spaces before or after
5060 If you are on a local network then a sensible option might be
5062 tt(socket options = IPTOS_LOWDELAY)
5064 If you have a local network then you could try:
5066 tt(socket options = IPTOS_LOWDELAY TCP_NODELAY)
5068 If you are on a wide area network then perhaps try setting
5071 Note that several of the options may cause your Samba server to fail
5072 completely. Use these options with caution!
5075 tt( socket options = TCP_NODELAY)
5078 tt( socket options = IPTOS_LOWDELAY)
5083 This variable is part of SSL-enabled Samba. This is only available if
5084 the SSL libraries have been compiled on your system and the configure
5085 option tt("--with-ssl") was given at configure time.
5087 em(Note) that for export control reasons this code is em(**NOT**)
5088 enabled by default in any current binary version of Samba.
5090 This variable enables or disables the entire SSL mode. If it is set to
5091 "no", the SSL enabled samba behaves exactly like the non-SSL samba. If
5092 set to "yes", it depends on the variables link(bf("ssl
5093 hosts"))(sslhosts) and link(bf("ssl hosts resign"))(sslhostsresign)
5094 whether an SSL connection will be required.
5102 dit(bf(ssl CA certDir (G)))
5104 This variable is part of SSL-enabled Samba. This is only available if
5105 the SSL libraries have been compiled on your system and the configure
5106 option tt("--with-ssl") was given at configure time.
5108 em(Note) that for export control reasons this code is em(**NOT**)
5109 enabled by default in any current binary version of Samba.
5111 This variable defines where to look up the Certification
5112 Authorities. The given directory should contain one file for each CA
5113 that samba will trust. The file name must be the hash value over the
5114 "Distinguished Name" of the CA. How this directory is set up is
5115 explained later in this document. All files within the directory that
5116 don't fit into this naming scheme are ignored. You don't need this
5117 variable if you don't verify client certificates.
5120 tt( ssl CA certDir = /usr/local/ssl/certs)
5122 label(sslCAcertFile)
5123 dit(bf(ssl CA certFile (G)))
5125 This variable is part of SSL-enabled Samba. This is only available if
5126 the SSL libraries have been compiled on your system and the configure
5127 option tt("--with-ssl") was given at configure time.
5129 em(Note) that for export control reasons this code is em(**NOT**)
5130 enabled by default in any current binary version of Samba.
5132 This variable is a second way to define the trusted CAs. The
5133 certificates of the trusted CAs are collected in one big file and this
5134 variable points to the file. You will probably only use one of the two
5135 ways to define your CAs. The first choice is preferable if you have
5136 many CAs or want to be flexible, the second is preferable if you only
5137 have one CA and want to keep things simple (you won't need to create
5138 the hashed file names). You don't need this variable if you don't
5139 verify client certificates.
5142 tt( ssl CA certFile = /usr/local/ssl/certs/trustedCAs.pem)
5145 dit(bf(ssl ciphers (G)))
5147 This variable is part of SSL-enabled Samba. This is only available if
5148 the SSL libraries have been compiled on your system and the configure
5149 option tt("--with-ssl") was given at configure time.
5151 em(Note) that for export control reasons this code is em(**NOT**)
5152 enabled by default in any current binary version of Samba.
5154 This variable defines the ciphers that should be offered during SSL
5155 negotiation. You should not set this variable unless you know what you
5158 label(sslclientcert)
5159 dit(bf(ssl client cert (G)))
5161 This variable is part of SSL-enabled Samba. This is only available if
5162 the SSL libraries have been compiled on your system and the configure
5163 option tt("--with-ssl") was given at configure time.
5165 em(Note) that for export control reasons this code is em(**NOT**)
5166 enabled by default in any current binary version of Samba.
5168 The certificate in this file is used by
5169 url(bf(smbclient))(smbclient.1.html) if it exists. It's needed if the
5170 server requires a client certificate.
5173 tt( ssl client cert = /usr/local/ssl/certs/smbclient.pem)
5176 dit(bf(ssl client key (G)))
5178 This variable is part of SSL-enabled Samba. This is only available if
5179 the SSL libraries have been compiled on your system and the configure
5180 option tt("--with-ssl") was given at configure time.
5182 em(Note) that for export control reasons this code is em(**NOT**)
5183 enabled by default in any current binary version of Samba.
5185 This is the private key for url(bf(smbclient))(smbclient.1.html). It's
5186 only needed if the client should have a certificate.
5189 tt( ssl client key = /usr/local/ssl/private/smbclient.pem)
5191 label(sslcompatibility)
5192 dit(bf(ssl compatibility (G)))
5194 This variable is part of SSL-enabled Samba. This is only available if
5195 the SSL libraries have been compiled on your system and the configure
5196 option tt("--with-ssl") was given at configure time.
5198 em(Note) that for export control reasons this code is em(**NOT**)
5199 enabled by default in any current binary version of Samba.
5201 This variable defines whether SSLeay should be configured for bug
5202 compatibility with other SSL implementations. This is probably not
5203 desirable because currently no clients with SSL implementations other
5207 tt( ssl compatibility = no)
5210 dit(bf(ssl hosts (G)))
5212 See link(bf("ssl hosts resign"))(sslhostsresign).
5214 label(sslhostsresign)
5215 dit(bf(ssl hosts resign (G)))
5217 This variable is part of SSL-enabled Samba. This is only available if
5218 the SSL libraries have been compiled on your system and the configure
5219 option tt("--with-ssl") was given at configure time.
5221 em(Note) that for export control reasons this code is em(**NOT**)
5222 enabled by default in any current binary version of Samba.
5224 These two variables define whether samba will go into SSL mode or
5225 not. If none of them is defined, samba will allow only SSL
5226 connections. If the link(bf("ssl hosts"))(sslhosts) variable lists
5227 hosts (by IP-address, IP-address range, net group or name), only these
5228 hosts will be forced into SSL mode. If the bf("ssl hosts resign")
5229 variable lists hosts, only these hosts will NOT be forced into SSL
5230 mode. The syntax for these two variables is the same as for the
5231 link(bf("hosts allow"))(hostsallow) and link(bf("hosts
5232 deny"))(hostsdeny) pair of variables, only that the subject of the
5233 decision is different: It's not the access right but whether SSL is
5234 used or not. See the link(bf("allow hosts"))(allowhosts) parameter for
5235 details. The example below requires SSL connections from all hosts
5236 outside the local net (which is 192.168.*.*).
5239 tt( ssl hosts = <empty string>)
5240 tt( ssl hosts resign = <empty string>)
5243 tt( ssl hosts resign = 192.168.)
5245 label(sslrequireclientcert)
5246 dit(bf(ssl require clientcert (G)))
5248 This variable is part of SSL-enabled Samba. This is only available if
5249 the SSL libraries have been compiled on your system and the configure
5250 option tt("--with-ssl") was given at configure time.
5252 em(Note) that for export control reasons this code is em(**NOT**)
5253 enabled by default in any current binary version of Samba.
5255 If this variable is set to tt("yes"), the server will not tolerate
5256 connections from clients that don't have a valid certificate. The
5257 directory/file given in link(bf("ssl CA certDir"))(sslCAcertDir) and
5258 link(bf("ssl CA certFile"))(sslCAcertFile) will be used to look up the
5259 CAs that issued the client's certificate. If the certificate can't be
5260 verified positively, the connection will be terminated. If this
5261 variable is set to tt("no"), clients don't need certificates. Contrary
5262 to web applications you really em(*should*) require client
5263 certificates. In the web environment the client's data is sensitive
5264 (credit card numbers) and the server must prove to be trustworthy. In
5265 a file server environment the server's data will be sensitive and the
5266 clients must prove to be trustworthy.
5269 tt( ssl require clientcert = no)
5271 label(sslrequireservercert)
5272 dit(bf(ssl require servercert (G)))
5274 This variable is part of SSL-enabled Samba. This is only available if
5275 the SSL libraries have been compiled on your system and the configure
5276 option tt("--with-ssl") was given at configure time.
5278 em(Note) that for export control reasons this code is em(**NOT**)
5279 enabled by default in any current binary version of Samba.
5281 If this variable is set to tt("yes"), the
5282 url(bf(smbclient))(smbclient.1.html) will request a certificate from
5283 the server. Same as link(bf("ssl require
5284 clientcert"))(sslrequireclientcert) for the server.
5287 tt( ssl require servercert = no)
5289 label(sslservercert)
5290 dit(bf(ssl server cert (G)))
5292 This variable is part of SSL-enabled Samba. This is only available if
5293 the SSL libraries have been compiled on your system and the configure
5294 option tt("--with-ssl") was given at configure time.
5296 em(Note) that for export control reasons this code is em(**NOT**)
5297 enabled by default in any current binary version of Samba.
5299 This is the file containing the server's certificate. The server _must_
5300 have a certificate. The file may also contain the server's private key.
5301 See later for how certificates and private keys are created.
5304 tt( ssl server cert = <empty string>)
5307 dit(bf(ssl server key (G)))
5309 This variable is part of SSL-enabled Samba. This is only available if
5310 the SSL libraries have been compiled on your system and the configure
5311 option tt("--with-ssl") was given at configure time.
5313 em(Note) that for export control reasons this code is em(**NOT**)
5314 enabled by default in any current binary version of Samba.
5316 This file contains the private key of the server. If this variable is
5317 not defined, the key is looked up in the certificate file (it may be
5318 appended to the certificate). The server em(*must*) have a private key
5319 and the certificate em(*must*) match this private key.
5322 tt( ssl server key = <empty string>)
5325 dit(bf(ssl version (G)))
5327 This variable is part of SSL-enabled Samba. This is only available if
5328 the SSL libraries have been compiled on your system and the configure
5329 option tt("--with-ssl") was given at configure time.
5331 em(Note) that for export control reasons this code is em(**NOT**)
5332 enabled by default in any current binary version of Samba.
5334 This enumeration variable defines the versions of the SSL protocol
5335 that will be used. tt("ssl2or3") allows dynamic negotiation of SSL v2
5336 or v3, tt("ssl2") results in SSL v2, tt("ssl3") results in SSL v3 and
5337 "tls1" results in TLS v1. TLS (Transport Layer Security) is the
5338 (proposed?) new standard for SSL.
5341 tt( ssl version = "ssl2or3")
5344 dit(bf(stat cache (G)))
5346 This parameter determines if url(bf(smbd))(smbd.8.html) will use a
5347 cache in order to speed up case insensitive name mappings. You should
5348 never need to change this parameter.
5351 tt( stat cache = yes)
5353 label(statcachesize)
5354 dit(bf(stat cache size (G)))
5356 This parameter determines the number of entries in the link(bf(stat
5357 cache))(statcache). You should never need to change this parameter.
5360 tt( stat cache size = 50)
5365 This enables or disables logging of connections to a status file that
5366 url(bf(smbstatus))(smbstatus.1.html) can read.
5368 With this disabled url(bf(smbstatus))(smbstatus.1.html) won't be able
5369 to tell you what connections are active. You should never need to
5370 change this parameter.
5375 label(strictlocking)
5376 dit(bf(strict locking (S)))
5378 This is a boolean that controls the handling of file locking in the
5379 server. When this is set to tt("yes") the server will check every read and
5380 write access for file locks, and deny access if locks exist. This can
5381 be slow on some systems.
5383 When strict locking is tt("no") the server does file lock checks only
5384 when the client explicitly asks for them.
5386 Well behaved clients always ask for lock checks when it is important,
5387 so in the vast majority of cases bf("strict locking = no") is
5391 tt( strict locking = no)
5394 tt( strict locking = yes)
5397 dit(bf(strict sync (S)))
5399 Many Windows applications (including the Windows 98 explorer shell)
5400 seem to confuse flushing buffer contents to disk with doing a sync to
5401 disk. Under UNIX, a sync call forces the process to be suspended until
5402 the kernel has ensured that all outstanding data in kernel disk
5403 buffers has been safely stored onto stable storage. This is very slow
5404 and should only be done rarely. Setting this parameter to "no" (the
5405 default) means that smbd ignores the Windows applications requests for
5406 a sync call. There is only a possibility of losing data if the
5407 operating system itself that Samba is running on crashes, so there is
5408 little danger in this default setting. In addition, this fixes many
5409 performance problems that people have reported with the new Windows98
5410 explorer shell file copies.
5412 See also the link(bf("sync always"))(syncalways) parameter.
5415 tt( strict sync = no)
5418 tt( strict sync = yes)
5421 dit(bf(strip dot (G)))
5423 This is a boolean that controls whether to strip trailing dots off
5424 UNIX filenames. This helps with some CDROMs that have filenames ending
5431 tt( strip dot = yes)
5434 dit(bf(sync always (S)))
5436 This is a boolean parameter that controls whether writes will always
5437 be written to stable storage before the write call returns. If this is
5438 false then the server will be guided by the client's request in each
5439 write call (clients can set a bit indicating that a particular write
5440 should be synchronous). If this is true then every write will be
5441 followed by a fsync() call to ensure the data is written to disk.
5442 Note that the link(bf("strict sync"))(strictsync) parameter must be
5443 set to tt("yes") in order for this parameter to have any affect.
5445 See also the link(bf("strict sync"))(strictsync) parameter.
5448 tt( sync always = no)
5451 tt( sync always = yes)
5456 This parameter maps how Samba debug messages are logged onto the
5457 system syslog logging levels. Samba debug level zero maps onto syslog
5458 LOG_ERR, debug level one maps onto LOG_WARNING, debug level two maps
5459 to LOG_NOTICE, debug level three maps onto LOG_INFO. The parameter
5460 sets the threshold for doing the mapping, all Samba debug messages
5461 above this threshold are mapped to syslog LOG_DEBUG messages.
5467 dit(bf(syslog only (G)))
5469 If this parameter is set then Samba debug messages are logged into the
5470 system syslog only, and not to the debug log files.
5473 tt( syslog only = no)
5476 dit(bf(time offset (G)))
5478 This parameter is a setting in minutes to add to the normal GMT to
5479 local time conversion. This is useful if you are serving a lot of PCs
5480 that have incorrect daylight saving time handling.
5483 tt( time offset = 0)
5486 tt( time offset = 60)
5490 dit(bf(time server (G)))
5492 This parameter determines if url(bf(nmbd))(nmbd.8.html) advertises
5493 itself as a time server to Windows clients. The default is False.
5496 tt( time server = False)
5499 tt( time server = True)
5501 label(timestamplogs)
5502 dit(bf(timestamp logs (G)))
5504 Samba2.0 will a timestamps to all log entries by default. This
5505 can be distracting if you are attempting to debug a problem. This
5506 parameter allows the timestamping to be turned off.
5509 tt( timestamp logs = True)
5512 tt( timestamp logs = False)
5514 label(unixpasswordsync)
5515 dit(bf(unix password sync (G)))
5517 This boolean parameter controls whether Samba attempts to synchronize
5518 the UNIX password with the SMB password when the encrypted SMB
5519 password in the smbpasswd file is changed. If this is set to true the
5520 program specified in the link(bf("passwd program"))(passwdprogram)
5521 parameter is called em(*AS ROOT*) - to allow the new UNIX password to be
5522 set without access to the old UNIX password (as the SMB password has
5523 change code has no access to the old password cleartext, only the
5524 new). By default this is set to tt("false").
5526 See also link(bf("passwd program"))(passwdprogram), link(bf("passwd
5527 chat"))(passwdchat).
5530 tt( unix password sync = False)
5533 tt( unix password sync = True)
5536 dit(bf(unix realname (G)))
5538 This boolean parameter when set causes samba to supply the real name
5539 field from the unix password file to the client. This is useful for
5540 setting up mail clients and WWW browsers on systems used by more than
5544 tt( unix realname = no)
5547 tt( unix realname = yes)
5549 label(updateencrypted)
5550 dit(bf(update encrypted (G)))
5552 This boolean parameter allows a user logging on with a plaintext
5553 password to have their encrypted (hashed) password in the smbpasswd
5554 file to be updated automatically as they log on. This option allows a
5555 site to migrate from plaintext password authentication (users
5556 authenticate with plaintext password over the wire, and are checked
5557 against a UNIX account database) to encrypted password authentication
5558 (the SMB challenge/response authentication mechanism) without forcing
5559 all users to re-enter their passwords via smbpasswd at the time the
5560 change is made. This is a convenience option to allow the change over
5561 to encrypted passwords to be made over a longer period. Once all users
5562 have encrypted representations of their passwords in the smbpasswd
5563 file this parameter should be set to tt("off").
5565 In order for this parameter to work correctly the link(bf("encrypt
5566 passwords"))(encryptpasswords) parameter must be set to tt("no") when
5567 this parameter is set to tt("yes").
5569 Note that even when this parameter is set a user authenticating to
5570 smbd must still enter a valid password in order to connect correctly,
5571 and to update their hashed (smbpasswd) passwords.
5574 tt( update encrypted = no)
5577 tt( update encrypted = yes)
5580 dit(bf(use rhosts (G)))
5582 If this global parameter is a true, it specifies that the UNIX users
5583 tt(".rhosts") file in their home directory will be read to find the
5584 names of hosts and users who will be allowed access without specifying
5587 NOTE: The use of bf(use rhosts) can be a major security hole. This is
5588 because you are trusting the PC to supply the correct username. It is
5589 very easy to get a PC to supply a false username. I recommend that the
5590 bf(use rhosts) option be only used if you really know what you are
5594 tt( use rhosts = no)
5597 tt( use rhosts = yes)
5602 Synonym for link(bf("username"))(username).
5607 Synonym for link(bf("username"))(username).
5610 dit(bf(username (S)))
5612 Multiple users may be specified in a comma-delimited list, in which
5613 case the supplied password will be tested against each username in
5614 turn (left to right).
5616 The bf(username=) line is needed only when the PC is unable to supply
5617 its own username. This is the case for the COREPLUS protocol or where
5618 your users have different WfWg usernames to UNIX usernames. In both
5619 these cases you may also be better using the tt(\\server\share%user)
5622 The bf(username=) line is not a great solution in many cases as it
5623 means Samba will try to validate the supplied password against each of
5624 the usernames in the username= line in turn. This is slow and a bad
5625 idea for lots of users in case of duplicate passwords. You may get
5626 timeouts or security breaches using this parameter unwisely.
5628 Samba relies on the underlying UNIX security. This parameter does not
5629 restrict who can login, it just offers hints to the Samba server as to
5630 what usernames might correspond to the supplied password. Users can
5631 login as whoever they please and they will be able to do no more
5632 damage than if they started a telnet session. The daemon runs as the
5633 user that they log in as, so they cannot do anything that user cannot
5636 To restrict a service to a particular set of users you can use the
5637 link(bf("valid users="))(validusers) parameter.
5639 If any of the usernames begin with a tt('@') then the name will be
5640 looked up first in the yp netgroups list (if Samba is compiled with
5641 netgroup support), followed by a lookup in the UNIX groups database
5642 and will expand to a list of all users in the group of that name.
5644 If any of the usernames begin with a tt('+') then the name will be
5645 looked up only in the UNIX groups database and will expand to a list
5646 of all users in the group of that name.
5648 If any of the usernames begin with a tt('&') then the name will be
5649 looked up only in the yp netgroups database (if Samba is compiled with
5650 netgroup support) and will expand to a list of all users in the
5651 netgroup group of that name.
5653 Note that searching though a groups database can take quite some time,
5654 and some clients may time out during the search.
5656 See the section link(bf("NOTE ABOUT USERNAME/PASSWORD
5657 VALIDATION"))(NOTEABOUTUSERNAMEPASSWORDVALIDATION) for more
5658 information on how this parameter determines access to the services.
5661 tt( The guest account if a guest service, else the name of the service.)
5666 username = fred, mary, jack, jane, @users, @pcgroup
5669 label(usernamelevel)
5670 dit(bf(username level (G)))
5672 This option helps Samba to try and 'guess' at the real UNIX username,
5673 as many DOS clients send an all-uppercase username. By default Samba
5674 tries all lowercase, followed by the username with the first letter
5675 capitalized, and fails if the username is not found on the UNIX
5678 If this parameter is set to non-zero the behavior changes. This
5679 parameter is a number that specifies the number of uppercase
5680 combinations to try whilst trying to determine the UNIX user name. The
5681 higher the number the more combinations will be tried, but the slower
5682 the discovery of usernames will be. Use this parameter when you have
5683 strange usernames on your UNIX machine, such as tt("AstrangeUser").
5686 tt( username level = 0)
5689 tt( username level = 5)
5692 dit(bf(username map (G)))
5694 This option allows you to specify a file containing a mapping of
5695 usernames from the clients to the server. This can be used for several
5696 purposes. The most common is to map usernames that users use on DOS or
5697 Windows machines to those that the UNIX box uses. The other is to map
5698 multiple users to a single username so that they can more easily share
5701 The map file is parsed line by line. Each line should contain a single
5702 UNIX username on the left then a tt('=') followed by a list of
5703 usernames on the right. The list of usernames on the right may contain
5704 names of the form @group in which case they will match any UNIX
5705 username in that group. The special client name tt('*') is a wildcard
5706 and matches any name. Each line of the map file may be up to 1023
5709 The file is processed on each line by taking the supplied username and
5710 comparing it with each username on the right hand side of the tt('=')
5711 signs. If the supplied name matches any of the names on the right hand
5712 side then it is replaced with the name on the left. Processing then
5713 continues with the next line.
5715 If any line begins with a tt('#') or a tt(';') then it is ignored
5717 If any line begins with an tt('!') then the processing will stop after
5718 that line if a mapping was done by the line. Otherwise mapping
5719 continues with every line being processed. Using tt('!') is most
5720 useful when you have a wildcard mapping line later in the file.
5722 For example to map from the name tt("admin") or tt("administrator") to
5723 the UNIX name tt("root") you would use:
5726 tt( root = admin administrator)
5728 Or to map anyone in the UNIX group tt("system") to the UNIX name
5729 tt("sys") you would use:
5733 You can have as many mappings as you like in a username map file.
5735 If your system supports the NIS NETGROUP option then the netgroup
5736 database is checked before the tt(/etc/group) database for matching
5739 You can map Windows usernames that have spaces in them by using double
5740 quotes around the name. For example:
5742 tt( tridge = "Andrew Tridgell")
5744 would map the windows username tt("Andrew Tridgell") to the unix
5747 The following example would map mary and fred to the unix user sys,
5748 and map the rest to guest. Note the use of the tt('!') to tell Samba
5749 to stop processing if it gets a match on that line.
5756 Note that the remapping is applied to all occurrences of
5757 usernames. Thus if you connect to tt("\\server\fred") and tt("fred")
5758 is remapped to tt("mary") then you will actually be connecting to
5759 tt("\\server\mary") and will need to supply a password suitable for
5760 tt("mary") not tt("fred"). The only exception to this is the username
5761 passed to the link(bf("password server"))(passwordserver) (if you have
5762 one). The password server will receive whatever username the client
5763 supplies without modification.
5765 Also note that no reverse mapping is done. The main effect this has is
5766 with printing. Users who have been mapped may have trouble deleting
5767 print jobs as PrintManager under WfWg will think they don't own the
5771 tt( no username map)
5774 tt( username map = /usr/local/samba/lib/users.map)
5777 dit(bf(valid chars (S)))
5779 The option allows you to specify additional characters that should be
5780 considered valid by the server in filenames. This is particularly
5781 useful for national character sets, such as adding u-umlaut or a-ring.
5783 The option takes a list of characters in either integer or character
5784 form with spaces between them. If you give two characters with a colon
5785 between them then it will be taken as an lowercase:uppercase pair.
5787 If you have an editor capable of entering the characters into the
5788 config file then it is probably easiest to use this method. Otherwise
5789 you can specify the characters in octal, decimal or hexadecimal form
5790 using the usual C notation.
5792 For example to add the single character tt('Z') to the charset (which
5793 is a pointless thing to do as it's already there) you could do one of
5799 valid chars = 0132:0172
5802 The last two examples above actually add two characters, and alter the
5803 uppercase and lowercase mappings appropriately.
5805 Note that you MUST specify this parameter after the link(bf("client
5806 code page"))(clientcodepage) parameter if you have both set. If
5807 link(bf("client code page"))(clientcodepage) is set after the
5808 bf("valid chars") parameter the bf("valid chars") settings will be
5811 See also the link(bf("client code page"))(clientcodepage) parameter.
5815 Samba defaults to using a reasonable set of valid characters
5820 tt( valid chars = 0345:0305 0366:0326 0344:0304)
5822 The above example allows filenames to have the Swedish characters in
5825 NOTE: It is actually quite difficult to correctly produce a bf("valid
5826 chars") line for a particular system. To automate the process
5827 email(tino@augsburg.net) has written a package called bf("validchars")
5828 which will automatically produce a complete bf("valid chars") line for
5829 a given client system. Look in the examples/validchars/ subdirectory
5830 of your Samba source code distribution for this package.
5833 dit(bf(valid users (S)))
5835 This is a list of users that should be allowed to login to this
5836 service. Names starting with tt('@'), tt('+') and tt('&') are
5837 interpreted using the same rules as described in the link(bf("invalid
5838 users"))(invalidusers) parameter.
5840 If this is empty (the default) then any user can login. If a username
5841 is in both this list and the link(bf("invalid users"))(invalidusers)
5842 list then access is denied for that user.
5844 The current servicename is substituted for
5845 link(bf("%S"))(percentS). This is useful in the
5846 link(bf([homes]))(homes) section.
5848 See also link(bf("invalid users"))(invalidusers).
5851 tt( No valid users list. (anyone can login))
5854 tt( valid users = greg, @pcusers)
5857 dit(bf(veto files(S)))
5859 This is a list of files and directories that are neither visible nor
5860 accessible. Each entry in the list must be separated by a tt('/'),
5861 which allows spaces to be included in the entry. tt('*') and tt('?')
5862 can be used to specify multiple files or directories as in DOS
5865 Each entry must be a unix path, not a DOS path and must em(*not*) include the
5866 unix directory separator tt('/').
5868 Note that the link(bf("case sensitive"))(casesensitive) option is
5869 applicable in vetoing files.
5871 One feature of the veto files parameter that it is important to be
5872 aware of, is that if a directory contains nothing but files that match
5873 the veto files parameter (which means that Windows/DOS clients cannot
5874 ever see them) is deleted, the veto files within that directory *are
5875 automatically deleted* along with it, if the user has UNIX permissions
5878 Setting this parameter will affect the performance of Samba, as it
5879 will be forced to check all files and directories for a match as they
5882 See also link(bf("hide files"))(hidefiles) and link(bf("case
5883 sensitive"))(casesensitive).
5886 tt( No files or directories are vetoed.)
5894 Veto any files containing the word Security,
5895 any ending in .tmp, and any directory containing the
5898 veto files = /*Security*/*.tmp/*root*/
5904 Veto the Apple specific files that a NetAtalk server
5907 veto files = /.AppleDouble/.bin/.AppleDesktop/Network Trash Folder/
5910 label(vetooplockfiles)
5911 dit(bf(veto oplock files (S)))
5913 This parameter is only valid when the link(bf("oplocks"))(oplocks)
5914 parameter is turned on for a share. It allows the Samba administrator
5915 to selectively turn off the granting of oplocks on selected files that
5916 match a wildcarded list, similar to the wildcarded list used in the
5917 link(bf("veto files"))(vetofiles) parameter.
5920 tt( No files are vetoed for oplock grants.)
5924 You might want to do this on files that you know will be heavily
5925 contended for by clients. A good example of this is in the NetBench
5926 SMB benchmark program, which causes heavy client contention for files
5927 ending in tt(".SEM"). To cause Samba not to grant oplocks on these
5928 files you would use the line (either in the link(bf([global]))(global)
5929 section or in the section for the particular NetBench share :
5931 tt( veto oplock files = /*.SEM/)
5936 This allows you to override the volume label returned for a
5937 share. Useful for CDROMs with installation programs that insist on a
5938 particular volume label.
5940 The default is the name of the share.
5943 dit(bf(wide links (S)))
5945 This parameter controls whether or not links in the UNIX file system
5946 may be followed by the server. Links that point to areas within the
5947 directory tree exported by the server are always allowed; this
5948 parameter controls access only to areas that are outside the directory
5949 tree being exported.
5952 tt( wide links = yes)
5955 tt( wide links = no)
5958 dit(bf(wins proxy (G)))
5960 This is a boolean that controls if url(bf(nmbd))(nmbd.8.html) will
5961 respond to broadcast name queries on behalf of other hosts. You may
5962 need to set this to tt("yes") for some older clients.
5965 tt( wins proxy = no)
5968 dit(bf(wins server (G)))
5970 This specifies the DNS name (or IP address) of the WINS server that
5971 url(bf(nmbd))(nmbd.8.html) should register with. If you have a WINS
5972 server on your network then you should set this to the WINS servers
5975 You should point this at your WINS server if you have a
5976 multi-subnetted network.
5978 em(NOTE). You need to set up Samba to point to a WINS server if you
5979 have multiple subnets and wish cross-subnet browsing to work correctly.
5981 See the documentation file BROWSING.txt in the docs/ directory of your
5982 Samba source distribution.
5988 tt( wins server = 192.9.200.1)
5991 dit(bf(wins support (G)))
5993 This boolean controls if the url(bf(nmbd))(nmbd.8.html) process in
5994 Samba will act as a WINS server. You should not set this to true
5995 unless you have a multi-subnetted network and you wish a particular
5996 url(bf(nmbd))(nmbd.8.html) to be your WINS server. Note that you
5997 should em(*NEVER*) set this to true on more than one machine in your
6001 tt( wins support = no)
6004 dit(bf(workgroup (G)))
6006 This controls what workgroup your server will appear to be in when
6007 queried by clients. Note that this parameter also controls the Domain
6008 name used with the link(bf("security=domain"))(securityequaldomain)
6012 tt( set at compile time to WORKGROUP)
6018 dit(bf(writable (S)))
6020 Synonym for link(bf("writeable"))(writeable) for people who can't spell :-).
6023 dit(bf(write list (S)))
6025 This is a list of users that are given read-write access to a
6026 service. If the connecting user is in this list then they will be
6027 given write access, no matter what the link(bf("read only"))(readonly)
6028 option is set to. The list can include group names using the @group
6031 Note that if a user is in both the read list and the write list then
6032 they will be given write access.
6034 See also the link(bf("read list"))(readlist) option.
6037 tt( write list = <empty string>)
6040 tt( write list = admin, root, @staff)
6043 dit(bf(write ok (S)))
6045 Synonym for link(bf(writeable))(writeable).
6048 dit(bf(write raw (G)))
6050 This parameter controls whether or not the server will support raw
6051 writes SMB's when transferring data from clients. You should never
6052 need to change this parameter.
6055 tt( write raw = yes)
6060 An inverted synonym is link(bf("read only"))(readonly).
6062 If this parameter is tt("no"), then users of a service may not create
6063 or modify files in the service's directory.
6065 Note that a printable service link(bf(("printable = yes")))(printable)
6066 will em(*ALWAYS*) allow writing to the directory (user privileges
6067 permitting), but only via spooling operations.
6080 manpagesection(WARNINGS)
6082 Although the configuration file permits service names to contain
6083 spaces, your client software may not. Spaces will be ignored in
6084 comparisons anyway, so it shouldn't be a problem - but be aware of the
6087 On a similar note, many clients - especially DOS clients - limit
6088 service names to eight characters. url(bf(Smbd))(smbd.8.html) has no
6089 such limitation, but attempts to connect from such clients will fail
6090 if they truncate the service names. For this reason you should
6091 probably keep your service names down to eight characters in length.
6093 Use of the link(bf([homes]))(homes) and link(bf([printers]))(printers)
6094 special sections make life for an administrator easy, but the various
6095 combinations of default attributes can be tricky. Take extreme care
6096 when designing these sections. In particular, ensure that the
6097 permissions on spool directories are correct.
6100 manpagesection(VERSION)
6102 This man page is correct for version 2.0 of the Samba suite.
6105 manpagesection(SEE ALSO)
6107 url(bf(smbd (8)))(smbd.8.html), url(bf(smbclient (1)))(smbclient.1.html),
6108 url(bf(nmbd (8)))(nmbd.8.html), url(bf(testparm (1)))(testparm.1.html),
6109 url(bf(testprns (1)))(testprns.1.html), url(bf(Samba))(samba.7.html),
6110 url(bf(nmblookup (1)))(nmblookup.1.html), url(bf(smbpasswd (5)))(smbpasswd.5.html),
6111 url(bf(smbpasswd (8)))(smbpasswd.8.html).
6116 The original Samba software and related utilities were created by
6117 Andrew Tridgell email(samba-bugs@samba.org). Samba is now developed
6118 by the Samba Team as an Open Source project similar to the way the
6119 Linux kernel is developed.
6121 The original Samba man pages were written by Karl Auer. The man page
6122 sources were converted to YODL format (another excellent piece of Open
6123 Source software, available at
6124 url(bf(ftp://ftp.icce.rug.nl/pub/unix/))(ftp://ftp.icce.rug.nl/pub/unix/))
6125 and updated for the Samba2.0 release by Jeremy Allison.
6126 email(samba-bugs@samba.org).
6128 See url(bf(samba (7)))(samba.7.html) to find out how to get a full
6129 list of contributors and details on how to submit bug reports,