Наши партнеры








Книги по Linux (с отзывами читателей)

Библиотека сайта rus-linux.net

Appendix B. Samba Configuration Option Quick Reference

The first section of this appendix lists each option that can be used in a Samba configuration file, which is usually named smb.conf. Most configuration files contain a global section of options that apply to all services (shares) and a separate section for various individual shares. If an option applies only to the global section, [global] appears to the right of its name in the following reference section.

Except where noted, when specifying elements of a list, the elements can be separated by spaces, tabs, commas, semicolons, escaped newlines, or escaped carriage returns.

Following this reference section is a glossary of value types, and a list of variables Samba recognizes.

abort shutdown script = command[global]

Allowable values: command

Default: NULL

Specifies a command that stops the shutdown procedure started by shutdown script. The command will be run with the UID of the connected user. New in Samba 3.0.

add printer command = command[global]

Allowable values: command

Default: NULL

Specifies a command that creates a new printer on the system hosting the Samba server. This command runs as root when the Windows NT/2000/XP Add Printer Wizard is run. The command will be passed a printer name, share name, port name, driver name, Windows NT/2000/XP driver location, and Windows 95/98/Me driver location, in that order. It will need to add the printer to the system and a share definition for the printer to smb.conf. See also add printer wizard, printing, and show add printer wizard.

add machine script = command[global]

Allowable values: command

Default: NULL

Specifies a command that adds a computer to the Samba server's domain. New in Samba 3.0.

add share command = command[global]

Allowable values: command

Default: NULL

Specifies a command that creates a new share on the Samba server. This command runs as root when a share is created using the Windows NT/2000/XP Server Manager. The client user must be logged on as the root user. The command will be passed the name of the Samba configuration file, the name of the share to be created, the full pathname of a directory on the Samba server (which must already exist), and a string to use as a comment for the share, in that order. The command must add a share definition for the share to smb.conf. See also add printer command, for adding a print share.

add user script = command[global]

Allowable values: command

Default: NULL

Specifies a command that creates a new user on the system hosting the Samba server. This command runs as root when access to a Samba share is attempted by a Windows user who does not have an account on the hosting system, but does have an account maintained by a primary domain controller on a different system. The command should accept the name of the user as a single argument that matches the behavior of typical adduser commands. Samba honors the %u value (username) as the argument to the command. Requires security = server or security = domain. See also delete user script.

admin users = user list

Allowable values: user list

Default: NULL

Specifies users who will be granted root permissions on the share by Samba.

ads server = value[global]

Allowable values: DNS hostname or IP address

Default: NONE

Specifies the Active Directory server, used by Samba 3.0 for authenticating clients. Requires security = ads. New in Samba 3.0.

algorithmic rid base = number[global]

Allowable values: positive integer

Default: 1000

Specifies the base value that Samba uses when calculating Windows domain security identifier equivalents to Unix UIDs. See also non unix account range. New in Samba 3.0.

allow hosts = host list

Allowable values: list of hosts or networks

Default: NULL

Specifies systems that can connect to the share or shares. If NULL, any system can access the share unless there is a hosts deny option. Synonym for hosts allow.

allow trusted domains = boolean[global]

Allowable values: YES, NO

Default: YES

Allows access to users who lack accounts on the Samba server but have accounts in another, trusted domain. Requires security = server or security = domain.

announce as = value[global]

Allowable values: NT, Win95, Wf W

Default: NT

Has Samba announce itself as something other than an NT server. Discouraged because it interferes with serving browse lists.

announce version = value[global]

Allowable values: two numbers separated by a dot character

Default: 4.5

Instructs Samba to announce itself as a different version SMB server. Discouraged.

auth methods = list[global]

Allowable values: guest, sam, ntdomain

Default: NONE

Specifies what methods Samba tries in turn to authenticate users. New in Samba 3.0.

auto services = service list[global]

Allowable values: service list

Default: NULL

Specifies a list of shares that always appear in browse lists. Also called preload.

available = boolean

Allowable values: YES, NO

Default: YES

If set to NO, denies access to a share. The share appears in the browse list, but attempts to access it will fail.

bind interfaces only = boolean[global]

Allowable values: YES, NO

Default: NO

If set to YES, shares and browsing are provided only on interfaces in an interfaces list (see interfaces). If you set this option to YES, be sure to add 127.0.0.1 to the interfaces list to allow smbpasswd to connect to the local system to change passwords. This is a convenience option; it does not improve security.

block size = number

Allowable values: integer

Default: 1024

Sets the size of disk blocks as reported by smbd to the client. Obsolete starting with Samba 3.0.

blocking locks = boolean

Allowable values: YES, NO

Default: YES

If YES, honors byte range lock requests with time limits. Samba will queue the requests and retry them until the time period expires.

browsable = boolean

Allowable values: YES, NO

Default: YES

Allows a share to be announced in browse lists. Also called browseable.

browse list = boolean[global]

Allowable values: YES, NO

Default: YES

If YES, serves the browse list to other systems on the network. Avoid changing.

browseable = boolean

Allowable values: YES, NO

Default: YES

Synonym for browsable.

case sensitive = boolean[global]

Allowable values: YES, NO

Default: NO

If YES, uses the exact case the client supplied when trying to resolve a filename. If NO, matches either upper- or lowercase name. Avoid changing. Also called casesignames.

casesignames = boolean[global]

Allowable values: YES, NO

Default: NO

Synonym for case sensitive.

change notify timeout = number[global]

Allowable values: positive number

Default: 60

Sets the number of seconds between checks when a client asks for notification of changes in a directory. Avoid lowering.

change share command = command[global]

Allowable values: command

Default: NULL

Specifies a command that modifies a share definition on the Samba server. This command runs as root when a share is created using the Windows NT/2000/XP Server Manager. The client user must be logged on as the root user. The command is passed the name of the Samba configuration file, the name of the share to be modified, the full pathname of a directory on the Samba server (which must already exist), and a string to use as a comment for the share, in that order. The command modifies the share definition for the share in smb.conf. See also add share command and delete share command.

character set = name

Allowable values: ISO8859-1, ISO8859-2, ISO8859-5, KOI8-R

Default: NULL

If set, translates from DOS code pages to the Western European (ISO8859-1), Eastern European (ISO8859-2), Russian Cyrillic (ISO8859-5), or Alternate Russian (KOI8-R) character set. The client code page option must be set to 850. Obsolete starting with Samba 3.0.

client code page = name

Allowable values: see Table 11-4 in Chapter 11

Default: 850 (MS-DOS Latin 1)

Sets the DOS code page explicitly, overriding any previous valid chars settings. Examples of values are 850 for Western European, 437 for the U.S. standard, and 932 for Japanese Shift-JIS. Obsolete starting with Samba 3.0.

code page directory = directory[global]

Allowable values: full directory name

Default: /usr/local/samba/lib/codepages

Specifies the directory that stores code pages. Obsolete starting with Samba 3.0.

coding system = value[global]

Allowable values: euc, cap, hex, hexN, sjis, j8bb, j8bj, jis8, j8bh, j8@b, j8@j,j8@h, j7bb, j7bj, jis7, j7bh, j7@b, j7@j, j7@h, jubb, jubj, junet, jubh, ju@b, ju@j, ju@h

Default: NULL

Sets the coding system used, notably for Kanji. This is employed for filenames and should correspond to the code page in use. The client code page option must be set to 932 ( Japanese Shift-JIS). Obsolete starting with Samba 3.0.

comment = string

Allowable values: string

Default: NULL

Sets the comment corresponding to a share. The comment appears in places such as a net view listing or through the Network Neighborhood. See also the server string configuration option.

force directory security mode = value

Allowable values: octal value from 0 to 0777

Default