Many Samba options are present to deal with operating system issues on either Unix or Windows. The options shown in Table 8.10 deal specifically with some of these known problems. We usually don’t change these and we recommend the same to you.
Table 8-10. Miscellaneous Options
Option |
Parameters |
Function |
Default |
Scope |
---|---|---|---|---|
|
Specifies the number of minutes of inactivity before a connection should be terminated. |
|
Global | |
|
string (command) |
Used to provide a command that returns disk free space in a format recognized by Samba. |
None |
Global |
|
|
Sets the filesystem type reported by the server to the client. |
|
Global |
|
seconds |
Sets the number of seconds between checks for an inoperative client. |
(none) |
Global |
|
numerical (size in MB) |
Sets the largest disk size to return to a client, some of which have limits. Does not affect actual operations on the disk. |
(infinity) |
Global |
|
numerical |
Sets the maximum number of simultaneous SMB operations that clients may make. |
|
Global |
|
numerical |
Limits number of open files to be below Unix limits. |
|
Global |
|
numerical |
Specifies the maximum packet size that Samba will send. |
|
Global |
|
boolean |
Turns off an experimental NT feature, for benchmarking or in case of an error. |
|
Global |
|
boolean |
Turns off an experimental NT feature, for benchmarking or in case of an error. |
|
Global |
|
boolean |
Remaps out-of-range lock requests used on Windows to fit in allowable range on Unix. Turning it off causes Unix lock errors. |
|
Global |
|
command |
Program to run if Samba server fails; for debugging. |
None |
Global |
|
boolean |
If |
|
Global |
|
string (fully-qualified command) |
Sets the command Samba uses as a wrapper for shell commands. |
None |
Global |
|
boolean |
If |
|
Global |
|
boolean |
If |
|
Global |
|
boolean |
If |
|
Global |
|
boolean |
|
Global |
This global option sets the number of minutes that Samba will wait for an inactive client before closing its session with the Samba server. A client is considered inactive when it has no open files and there is no data being sent from it. The default value for this option is 0, which means that Samba never closes any connections no matter how long they have been inactive. You can override it as follows:
[global] deadtime = 10
This tells Samba to terminate any inactive client sessions after 10 minutes. For most networks, setting this option as such will work because reconnections from the client are generally performed transparently to the user.
This global option is used on systems that incorrectly determine the free space left on the disk. So far, the only confirmed system that needs this option set is Ultrix. There is no default value for this option, which means that Samba already knows how to compute the free disk space on its own and the results are considered reliable. You can override it as follows:
[global] dfree command = /usr/local/bin/dfree
This option should point to a script that should return the total disk space in a block, and the number of available blocks. The Samba documentation recommends the following as a usable script:
#!/bin/sh df $1 | tail -1 | awk '{print $2" "$4}'
On System V machines, the following will work:
#!/bin/sh /usr/bin/df $1 | tail -1 | awk '{print $3" "$5}'
This share-level option sets the type of filesystem that Samba reports when queried by the client. There are three strings that can be used as a value to this configuration option, as listed in Table 8.11.
The default value for this option is NTFS
, which represents a Windows NT filesystem. There probably isn’t a need to specify any other type of filesystem. However, if you need to, you can override it per share as follows:
[data] fstype = FAT
This global option specifies the number of seconds that Samba waits between sending NetBIOS keep-alive packets. These packets are used to ping a client to detect whether it is still alive and on the network. The default value for this option is 0
, which means that Samba will not send any such packets at all. You can override it as follows:
[global] keep alive = 10
This global option specifies an illusory limit, in megabytes, for each of the shares that Samba is using. You would typically set this option to prevent clients with older operating systems from incorrectly processing large disk spaces, such as those over one gigabyte.
The default value for this option is 0
, which means there is no upper limit at all. You can override it as follows:
[global] max disk size = 1000
This global option specifies the maximum number of concurrent SMB operations that Samba allows. The default value for this option is 50
. You can override it as follows:
[global] max mux = 100
This global option specifies the maximum number of open files that Samba should allow at any given time for all processes. This value must be equal to or less than the amount allowed by the operating system, which varies from system to system. The default value for this option is 10,000
. You can override it as follows:
[global] max open files = 8000
This global option sets the maximum size of packets that Samba exchanges with a client. In some cases, setting a smaller maximum packet size can increase performance, especially with Windows for Workgroups. The default value for this option is 65535
. You can override it as follows:
[global] max xmit = 4096
Section 2.2.2.6 in Appendix B,” shows some uses for this option.
This global option is used by developers to allow or disallow Windows NT clients the ability to make connections to the NT SMB-specific IPC$ pipes. As a user, you should never need to override the default:
[global] nt pipe support = yes
This global option is used by developers to negotiate NT-specific SMB options with Windows NT clients. The Samba team has discovered that slightly better performance comes from setting this value to no
. However, as a user, you should probably not override the default:
[global] nt smb support = yes
This global option turns off Samba’s internal byte-range locking manipulation in files, which gives compatibility with Object Linking and Embedding (OLE) applications that use high byte-range locks as a method of interprocess communication. The default value for this option is yes
. If you trust your Unix locking mechanisms, you can override it as follows:
[global] ole locking compatibility = no
This global option specifies a command to execute in the event that Samba itself encounters a fatal error when loading or running. There is no default value for this option. You can specify an action as follows:
[global] panic action = /bin/csh -c 'xedit < "Samba has shutdown unexpectedly!'
This boolean share-level option allows Digital Pathworks clients to use the setdir
command to change directories on the server. If you are not using the Digital Pathworks client, you should not need to alter this option. The default value for this option is no
. You can override it per share as follows:
[data] set directory = yes
This option sets the location of the smbrun executable, which Samba uses as a wrapper to run shell commands. The default value for this option is automatically configured by Samba when it is compiled. If you did not install Samba to the standard directory, you can specify where the binary is as follows:
[global] smbrun = /usr/local/bin/smbrun
This global option indicates whether Samba should log all
active connections to a status file. This file is used only by the smbstatus command. If you have no intentions of using this command, you can set this option to no
, which can result in a small increase of speed on the server. The default value for this option is yes
. You can override it as follows:
[global] status = no
This share-level option determines whether Samba honors all requests to perform a disk sync when requested to do so by a client. Many clients request a disk sync when they are really just trying to flush data to their own open files. As a result, this can substantially slow a Samba server down. The default value for this option is no
. You can override it as follows:
[data] strict sync = yes
This share-level option decides whether every write to disk should be followed by a disk synchronization before the write call returns control to the client. Even if the value of this option is no
, clients can request a disk synchronization; see the strict
sync
option above. The default value for this option is no
. You can override it per share as follows:
[data] sync always = yes
This global option determines whether to remove the
trailing dot from Unix filenames that are formatted with a dot at the end. The default value for this option is no
. You can override it per share as follows:
[global] strip dot = yes
This option is now considered obsolete; the user should use the mangled
map
option insead.
Get Using Samba now with the O’Reilly learning platform.
O’Reilly members experience books, live events, courses curated by job role, and more from O’Reilly and nearly 200 top publishers.