## Using Samba

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

Buy the hardcopy

Table of Contents

| Chapter 8 Additional Samba Information |

> ## 8.5 Recently Added Options

> Samba has several options that appeared around the time of Samba 2.0, but either were not entirely supported or were in the process of being developed. With Samba 2.0.7, several more were introduced. We will give you a brief overview of their workings in this section. These options are shown in Table 8.9.

> Table 8.9: Recently Added Options
> Option | Parameters | Function | Default | Scope
> --- | --- | --- | --- | ---
> `change notify timeout` | numerical (number of seconds) | Sets the interval between checks when a client asks to wait for a change in a specified directory. | `60` | Global
> `machine password timeout` | numerical (number of seconds) | Sets the renewal interval for NT domain machine passwords. | `604,800` (1 week) | Global
> `stat cache` | boolean | If `yes`, Samba will cache recent name mappings. | `yes` | Global
> `stat cache size` | numerical | Sets the size of the stat cache. | `50` | Global
> `utmp` | boolean | Turns on logging of Samba users in the utmp file. Requires --with-utmp. | `no` | Share
> `utmp dir` | string (pathname) | Sets the directory where Samba expects to find the utmp/utmpx file. | `None` | Share
> `inherit permissions` | boolean | Sets the permissions of newly created directories to the same as their parent. | `no` | Share
> `write cache size` | numerical (bytes) | Sets the size of a write cache (buffer) used for oplocked files. | `0` | Share
> `source environment` | string (pathname) | Sets a file to read environment variable from. | `None` | Global
> `min password length` | numerical (number of characters) | Sets the minimum length of a new password which Samba will try to update the password file with . | `5` | Global
> `netbios scope` | string | Sets the NetBIOS scope. | `None` | Global

> ### 8.5.1 change notify timeout

> The `change` `notify` `timeout` global option emulates a Windows NT SMB feature called change notification. This allows a client to request that a Windows NT server periodically monitor a specific directory on a share for any changes. If any changes occur, the server will notify the client.

> As of version 2.0, Samba will perform this function for its clients. However, performing these checks too often can slow the server down considerably. This option sets the time period that Samba should wait between such checks. The default is one minute (60 seconds); however, you can use this option to specify an alternate time that Samba should wait between performing checks:

>     [global]
>     	change notify timeout = 30

> ### 8.5.2 machine password timeout

> The `machine` `password` `timeout` global option sets a retention period for NT domain machine passwords. The default is currently set to the same time period that Windows NT 4.0 uses: 604,800 seconds (one week). Samba will periodically attempt to change the machine account password, which is a password used specifically by another server to report changes to it. This option specifies the number of seconds that Samba should wait before attempting to change that password. The following example changes it to a single day, by specifying the following:

>     [global]
>     	machine password timeout = 86400

> ### 8.5.3 stat cache

> The `stat` `cache` global option turns on caching of recent case-insensitive name mappings. The default is `yes`. The Samba team recommends that you never change this parameter.

> ### 8.5.4 stat cache size

> The `stat` `cache` `size` global option sets the size of the cache entries to be used for the `stat` `cache` option. The default here is 50. Again, the Samba team recommends that you never change this parameter.

> ===

> ### 8.5.5 utmp

> If you specified `--with-utmp` when configuring, this option will turn on utmp logging of users: they will appear in the utmp file and you will be able to see if they are on with last(1). It defaults to `no`.

> ### 8.5.6 utmp dir

> If `utmp` is set, the utmp dir option will change the directory Samba looks in for the utmp files. If it is not set, the default system location will be used.

> ### 8.5.7 inherit permissions

> This option causes new files and directories to be created with the same permissions as the directory they're in. For example, subdirectories will inherit setgid bits from their parents. This option will override the `create mask, directory mask, force create mode` and `force directory mode` options, but not the `map archive, map hidden` and `map system` options. It will never set the `setuid` bit. This option defaults to off.

> ### 8.5.8 write cache size

> The `write cache size` share option sets the size of a cache used by Samba while writing oplocked files. The files will be written in cachesize blocks, so you can tune Samba's write size to the optimum size for your filesystem or RAID disk array.

> The caching applies to the first 10 files opened with oplocks if set, and defaults to zero (off) initially.

> As with all caching schemes, data that hasn't been written will be lost if the system crashes.

> ### 8.5.9 source environment

> This options specifies a file of environment variables that Samba will read on startup. The variables set in this files can then be used in smb.conf files as $%name. For example, HOME=/home/sofia in the environment file could be used in a smb.conf file as "path = "$HOME"

> If the pathname begins with a "|" (pipe) symbol, Samba will attempt to run it and read its standard output.

> ### 8.5.10 min password length

> This option sets the minimum length, in characters, of a plain text password that Samba will accept when performing UNIX password changing. This is used to tell Samba about system-defined minimums, so it can return an appropriate error to the client.

> ### 8.5.11 netbios scope

> This sets the NetBIOS scope that Samba will operate under: Samba will not communicate with any machine with a different scope. This should not be set unless every machine on your LAN also sets this value. It was a predecessor to workgroups, and the Samba team recommends against using it.

8.4 WinPopup Messages |  | 8.6 Miscellaneous Options

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

© 1999, O'Reilly & Associates, Inc.