Search the Catalog
Using Samba

Using Samba

Robert Eckstein, David Collier-Brown, Peter Kelly
1st Edition November 1999
1-56592-449-5, Order Number: 4495
416 pages, $34.95

Previous: 8.5 Recently Added Options Chapter 8
Additional Samba Information
Next: 8.7 Backups with smbtar
 

8.6 Miscellaneous Options

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

deadtime

numerical (number of minutes)

Specifies the number of minutes of inactivity before a connection should be terminated.

0

Global

dfree command

string (command)

Used to provide a command that returns disk free space in a format recognized by Samba.

None

Global

fstype

NTFS, FAT, or Samba

Sets the filesystem type reported by the server to the client.

NTFS

Global

keep alive

seconds

Sets the number of seconds between checks for an inoperative client.

0 (none)

Global

max disk size

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.

0 (infinity)

Global

max mux

numerical

Sets the maximum number of simultaneous SMB operations that clients may make.

50

Global

max open files

numerical

Limits number of open files to be below Unix limits.

10,000

Global

max xmit

numerical

Specifies the maximum packet size that Samba will send.

65,535

Global

nt pipe support

boolean

Turns off an experimental NT feature, for benchmarking or in case of an error.

yes

Global

nt smb support

boolean

Turns off an experimental NT feature, for benchmarking or in case of an error.

yes

Global

ole locking compatib-ility

boolean

Remaps out-of-range lock requests used on Windows to fit in allowable range on Unix. Turning it off causes Unix lock errors.

yes

Global

panic action

command

Program to run if Samba server fails; for debugging.

None

Global

set directory

boolean

If yes, allows VMS clients to issue set dir commands.

no

Global

smbrun

string (fully-qualified command)

Sets the command Samba uses as a wrapper for shell commands.

None

Global

status

boolean

If yes, allows Samba to monitor status for smbstatus command.

yes

Global

strict sync

boolean

If no, ignores Windows applications requests to perform a sync-to-disk.

no

Global

sync always

boolean

If yes, forces all client writes to be committed to disk before returning from the call.

no

Global

strip dot

boolean

If yes, strips trailing dots from Unix filenames.

no

Global

8.6.1 deadtime

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.

8.6.2 dfree command

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}'

8.6.3 fstype

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.


Table 8.11: Filesystem Types

Variable

Definition

NTFS

Microsoft Windows NT filesystem

FAT

DOS FAT filesystem

Samba

Samba filesystem

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

8.6.4 keep alive

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

8.6.5 max disk size

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

8.6.6 max mux

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

8.6.7 max open files

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

8.6.8 max xmit

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

The section Section B.2.2.6, The TCP receive window in Appendix B," in Appendix B, Samba Performance Tuning," shows some uses for this option.

8.6.9 nt pipe support

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

8.6.10 nt smb support

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

8.6.11 ole locking compatibility

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

8.6.12 panic action

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!'

8.6.13 set directory

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

8.6.14 smbrun

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

8.6.15 status

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

8.6.16 strict sync

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

8.6.17 sync always

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

8.6.18 strip dot

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.


Previous: 8.5 Recently Added Options Next: 8.7 Backups with smbtar
8.5 Recently Added Options Book Index 8.7 Backups with smbtar

Back to: Using Samba


O'Reilly Home | O'Reilly Bookstores | How to Order | O'Reilly Contacts
International | About O'Reilly | Affiliated Companies

© 1999, O'Reilly & Associates, Inc.