~ubuntu-branches/ubuntu/gutsy/samba/gutsy-updates

« back to all changes in this revision

Viewing changes to docs/manpages/smb.conf.5

  • Committer: Bazaar Package Importer
  • Author(s): Andrew Mitchell
  • Date: 2006-11-28 20:14:37 UTC
  • mfrom: (0.10.1 upstream)
  • Revision ID: james.westby@ubuntu.com-20061128201437-a6x4lzlhempazocp
Tags: 3.0.23d-1ubuntu1
* Merge from debian unstable.
* Drop python2.4-samba, replace with python-samba. Added Conflicts/Replaces
  on python2.4-samba
* Drop track-connection-dos.patch, ubuntu-winbind-panic.patch, 
  ubuntu-fix-ldap.patch, ubuntu-setlocale.patch, ubuntu-setlocale-fixes.patch
* Remaining Ubuntu changes:
  - Revert Debian's installation of mount.cifs and umount.cifs as suid
  - Comment out the default [homes] shares and add more verbose comments to
    explain what they do and how they work (closes: launchpad.net/27608)
  - Add a "valid users = %S" stanza to the commented-out [homes] section, to
    show users how to restrict access to \\server\username to only username.
  - Change the (commented-out) "printer admin" example to use "@lpadmin"
    instead of "@ntadmin", since the lpadmin group is used for spool admin.
  - Alter the panic-action script to encourage users to report their
    bugs in Ubuntu packages to Ubuntu, rather than reporting to Debian.
    Modify text to more closely match the Debian script
  - Munge our init script to deal with the fact that our implementation
    (or lack thereof) of log_daemon_msg and log_progress_msg differs
    from Debian's implementation of the same (Ubuntu #19691)
  - Kept ubuntu-auxsrc.patch: some auxilliary sources (undocumented in 
    previous changelogs)
  - Set default workgroup to MSHOME

Show diffs side-by-side

added added

removed removed

Lines of Context:
18
18
.IP "\\$1" \\$2
19
19
..
20
20
.TH "SMB.CONF" 5 "" "" ""
21
 
.SH NAME
22
 
smb.conf \- The configuration file for the Samba suite
 
21
.SH "NAME"
 
22
smb.conf - The configuration file for the Samba suite
23
23
.SH "SYNOPSIS"
24
 
 
25
24
.PP
26
 
The \fIsmb\&.conf\fR file is a configuration file for the Samba suite\&. \fIsmb\&.conf\fR contains runtime configuration information for the Samba programs\&. The\fIsmb\&.conf\fR file is designed to be configured and administered by the\fBswat\fR(8) program\&. The complete description of the file format and possible parameters held within are here for reference purposes\&.
27
 
 
 
25
The
 
26
\fIsmb.conf\fR
 
27
file is a configuration file for the Samba suite.
 
28
\fIsmb.conf\fR
 
29
contains runtime configuration information for the Samba programs. The
 
30
\fIsmb.conf\fR
 
31
file is designed to be configured and administered by the
 
32
\fBswat\fR(8)
 
33
program. The complete description of the file format and possible parameters held within are here for reference purposes.
28
34
.SH "FILE FORMAT"
29
 
 
30
35
.PP
31
 
The file consists of sections and parameters\&. A section begins with the name of the section in square brackets and continues until the next section begins\&. Sections contain parameters of the form: 
 
36
The file consists of sections and parameters. A section begins with the name of the section in square brackets and continues until the next section begins. Sections contain parameters of the form:
 
37
 
 
38
.sp
32
39
.nf
33
40
 
34
41
\fIname\fR = \fIvalue \fR
35
42
.fi
36
 
 
37
 
 
38
 
.PP
39
 
The file is line\-based \- that is, each newline\-terminated line represents either a comment, a section name or a parameter\&.
40
 
 
41
 
.PP
42
 
Section and parameter names are not case sensitive\&.
43
 
 
44
 
.PP
45
 
Only the first equals sign in a parameter is significant\&. Whitespace before or after the first equals sign is discarded\&. Leading, trailing and internal whitespace in section and parameter names is irrelevant\&. Leading and trailing whitespace in a parameter value is discarded\&. Internal whitespace within a parameter value is retained verbatim\&.
46
 
 
47
 
.PP
48
 
Any line beginning with a semicolon (``;'') or a hash (``#'') character is ignored, as are lines containing only whitespace\&.
49
 
 
50
 
.PP
51
 
Any line ending in a ``\\'' is continued on the next line in the customary UNIX fashion\&.
52
 
 
53
 
.PP
54
 
The values following the equals sign in parameters are all either a string (no quotes needed) or a boolean, which may be given as yes/no, 0/1 or true/false\&. Case is not significant in boolean values, but is preserved in string values\&. Some items such as create masks are numeric\&.
55
 
 
 
43
 
 
44
.PP
 
45
The file is line-based - that is, each newline-terminated line represents either a comment, a section name or a parameter.
 
46
.PP
 
47
Section and parameter names are not case sensitive.
 
48
.PP
 
49
Only the first equals sign in a parameter is significant. Whitespace before or after the first equals sign is discarded. Leading, trailing and internal whitespace in section and parameter names is irrelevant. Leading and trailing whitespace in a parameter value is discarded. Internal whitespace within a parameter value is retained verbatim.
 
50
.PP
 
51
Any line beginning with a semicolon (“;”) or a hash (“#”) character is ignored, as are lines containing only whitespace.
 
52
.PP
 
53
Any line ending in a
 
54
“\”
 
55
is continued on the next line in the customary UNIX fashion.
 
56
.PP
 
57
The values following the equals sign in parameters are all either a string (no quotes needed) or a boolean, which may be given as yes/no, 0/1 or true/false. Case is not significant in boolean values, but is preserved in string values. Some items such as create masks are numeric.
56
58
.SH "SECTION DESCRIPTIONS"
57
 
 
58
 
.PP
59
 
Each section in the configuration file (except for the [global] section) describes a shared resource (known as a ``share'')\&. The section name is the name of the shared resource and the parameters within the section define the shares attributes\&.
60
 
 
61
 
.PP
62
 
There are three special sections, [global], [homes] and [printers], which are described under\fBspecial sections\fR\&. The following notes apply to ordinary section descriptions\&.
63
 
 
64
 
.PP
65
 
A share consists of a directory to which access is being given plus a description of the access rights which are granted to the user of the service\&. Some housekeeping options are also specifiable\&.
66
 
 
67
 
.PP
68
 
Sections are either file share services (used by the client as an extension of their native file systems) or printable services (used by the client to access print services on the host running the server)\&.
69
 
 
70
 
.PP
71
 
Sections may be designated \fBguest\fR services, in which case no password is required to access them\&. A specified UNIX \fBguest account\fR is used to define access privileges in this case\&.
72
 
 
73
 
.PP
74
 
Sections other than guest services will require a password to access them\&. The client provides the username\&. As older clients only provide passwords and not usernames, you may specify a list of usernames to check against the password using the user = option in the share definition\&. For modern clients such as Windows 95/98/ME/NT/2000, this should not be necessary\&.
75
 
 
76
 
.PP
77
 
The access rights granted by the server are masked by the access rights granted to the specified or guest UNIX user by the host system\&. The server does not grant more access than the host system grants\&.
78
 
 
79
 
.PP
80
 
The following sample section defines a file space share\&. The user has write access to the path \fI/home/bar\fR\&. The share is accessed via the share name foo: 
 
59
.PP
 
60
Each section in the configuration file (except for the [global] section) describes a shared resource (known as a
 
61
“share”). The section name is the name of the shared resource and the parameters within the section define the shares attributes.
 
62
.PP
 
63
There are three special sections, [global], [homes] and [printers], which are described under
 
64
\fBspecial sections\fR. The following notes apply to ordinary section descriptions.
 
65
.PP
 
66
A share consists of a directory to which access is being given plus a description of the access rights which are granted to the user of the service. Some housekeeping options are also specifiable.
 
67
.PP
 
68
Sections are either file share services (used by the client as an extension of their native file systems) or printable services (used by the client to access print services on the host running the server).
 
69
.PP
 
70
Sections may be designated
 
71
\fBguest\fR
 
72
services, in which case no password is required to access them. A specified UNIX
 
73
\fBguest account\fR
 
74
is used to define access privileges in this case.
 
75
.PP
 
76
Sections other than guest services will require a password to access them. The client provides the username. As older clients only provide passwords and not usernames, you may specify a list of usernames to check against the password using the
 
77
user =
 
78
option in the share definition. For modern clients such as Windows 95/98/ME/NT/2000, this should not be necessary.
 
79
.PP
 
80
The access rights granted by the server are masked by the access rights granted to the specified or guest UNIX user by the host system. The server does not grant more access than the host system grants.
 
81
.PP
 
82
The following sample section defines a file space share. The user has write access to the path
 
83
\fI/home/bar\fR. The share is accessed via the share name
 
84
foo:
 
85
 
 
86
.sp
81
87
.nf
82
88
 
83
89
        \fI[foo]\fR
84
90
        path = /home/bar
85
91
        read only = no
86
92
.fi
87
 
 
88
93
 
89
94
.PP
90
 
The following sample section defines a printable share\&. The share is read\-only, but printable\&. That is, the only write access permitted is via calls to open, write to and close a spool file\&. The \fBguest ok\fR parameter means access will be permitted as the default guest user (specified elsewhere): 
 
95
The following sample section defines a printable share. The share is read-only, but printable. That is, the only write access permitted is via calls to open, write to and close a spool file. The
 
96
\fBguest ok\fR
 
97
parameter means access will be permitted as the default guest user (specified elsewhere):
 
98
 
 
99
.sp
91
100
.nf
92
101
 
93
102
        \fI[aprinter]\fR
96
105
        printable = yes
97
106
        guest ok = yes
98
107
.fi
99
 
 
100
108
 
101
109
.SH "SPECIAL SECTIONS"
102
 
 
103
110
.SS "The [global] section"
104
 
 
105
111
.PP
106
 
Parameters in this section apply to the server as a whole, or are defaults for sections that do not specifically define certain items\&. See the notes under PARAMETERS for more information\&.
107
 
 
 
112
Parameters in this section apply to the server as a whole, or are defaults for sections that do not specifically define certain items. See the notes under PARAMETERS for more information.
 
113
.\" end of SS subsection "The [global] section"
108
114
.SS "The [homes] section"
109
 
 
110
 
.PP
111
 
If a section called [homes] is included in the configuration file, services connecting clients to their home directories can be created on the fly by the server\&.
112
 
 
113
 
.PP
114
 
When the connection request is made, the existing sections are scanned\&. If a match is found, it is used\&. If no match is found, the requested section name is treated as a username and looked up in the local password file\&. If the name exists and the correct password has been given, a share is created by cloning the [homes] section\&.
115
 
 
 
115
.PP
 
116
If a section called [homes] is included in the configuration file, services connecting clients to their home directories can be created on the fly by the server.
 
117
.PP
 
118
When the connection request is made, the existing sections are scanned. If a match is found, it is used. If no match is found, the requested section name is treated as a username and looked up in the local password file. If the name exists and the correct password has been given, a share is created by cloning the [homes] section.
116
119
.PP
117
120
Some modifications are then made to the newly created share:
118
 
 
119
 
.TP 3
120
 
\(bu
121
 
The share name is changed from homes to the located username\&.
122
 
.TP
123
 
\(bu
124
 
If no path was given, the path is set to the user's home directory\&.
125
 
.LP
126
 
 
 
121
.TP 3n
 
122
•
 
123
The share name is changed from homes to the located username.
 
124
.TP 3n
 
125
•
 
126
If no path was given, the path is set to the user's home directory.
 
127
.sp
 
128
.RE
127
129
.PP
128
 
If you decide to use a \fBpath =\fR line in your [homes] section, it may be useful to use the %S macro\&. For example: 
 
130
If you decide to use a
 
131
\fBpath =\fR
 
132
line in your [homes] section, it may be useful to use the %S macro. For example:
 
133
 
 
134
.sp
129
135
.nf
130
136
 
131
137
\fBpath = /data/pchome/%S\fR
132
138
.fi
133
 
 is useful if you have different home directories for your PCs than for UNIX access\&.
134
 
 
135
 
.PP
136
 
This is a fast and simple way to give a large number of clients access to their home directories with a minimum of fuss\&.
137
 
 
138
 
.PP
139
 
A similar process occurs if the requested section name is ``homes'', except that the share name is not changed to that of the requesting user\&. This method of using the [homes] section works well if different users share a client PC\&.
140
 
 
141
 
.PP
142
 
The [homes] section can specify all the parameters a normal service section can specify, though some make more sense than others\&. The following is a typical and suitable [homes] section: 
 
139
is useful if you have different home directories for your PCs than for UNIX access.
 
140
.PP
 
141
This is a fast and simple way to give a large number of clients access to their home directories with a minimum of fuss.
 
142
.PP
 
143
A similar process occurs if the requested section name is
 
144
“homes”, except that the share name is not changed to that of the requesting user. This method of using the [homes] section works well if different users share a client PC.
 
145
.PP
 
146
The [homes] section can specify all the parameters a normal service section can specify, though some make more sense than others. The following is a typical and suitable [homes] section:
 
147
 
 
148
.sp
143
149
.nf
144
150
 
145
151
\fI[homes]\fR
146
152
read only = no
147
153
.fi
148
 
 
149
 
 
150
 
.PP
151
 
An important point is that if guest access is specified in the [homes] section, all home directories will be visible to all clients \fBwithout a password\fR\&. In the very unlikely event that this is actually desirable, it is wise to also specify \fBread only access\fR\&.
152
 
 
153
 
.PP
154
 
The \fBbrowseable\fR flag for auto home directories will be inherited from the global browseable flag, not the [homes] browseable flag\&. This is useful as it means setting \fBbrowseable = no\fR in the [homes] section will hide the [homes] share but make any auto home directories visible\&.
155
 
 
 
154
 
 
155
.PP
 
156
An important point is that if guest access is specified in the [homes] section, all home directories will be visible to all clients
 
157
\fBwithout a password\fR. In the very unlikely event that this is actually desirable, it is wise to also specify
 
158
\fBread only access\fR.
 
159
.PP
 
160
The
 
161
\fBbrowseable\fR
 
162
flag for auto home directories will be inherited from the global browseable flag, not the [homes] browseable flag. This is useful as it means setting
 
163
\fBbrowseable = no\fR
 
164
in the [homes] section will hide the [homes] share but make any auto home directories visible.
 
165
.\" end of SS subsection "The [homes] section"
156
166
.SS "The [printers] section"
157
 
 
158
 
.PP
159
 
This section works like [homes], but for printers\&.
160
 
 
161
 
.PP
162
 
If a [printers] section occurs in the configuration file, users are able to connect to any printer specified in the local host's printcap file\&.
163
 
 
164
 
.PP
165
 
When a connection request is made, the existing sections are scanned\&. If a match is found, it is used\&. If no match is found, but a [homes] section exists, it is used as described above\&. Otherwise, the requested section name is treated as a printer name and the appropriate printcap file is scanned to see if the requested section name is a valid printer share name\&. If a match is found, a new printer share is created by cloning the [printers] section\&.
166
 
 
 
167
.PP
 
168
This section works like [homes], but for printers.
 
169
.PP
 
170
If a [printers] section occurs in the configuration file, users are able to connect to any printer specified in the local host's printcap file.
 
171
.PP
 
172
When a connection request is made, the existing sections are scanned. If a match is found, it is used. If no match is found, but a [homes] section exists, it is used as described above. Otherwise, the requested section name is treated as a printer name and the appropriate printcap file is scanned to see if the requested section name is a valid printer share name. If a match is found, a new printer share is created by cloning the [printers] section.
167
173
.PP
168
174
A few modifications are then made to the newly created share:
169
 
 
170
 
.TP 3
171
 
\(bu
 
175
.TP 3n
 
176
•
172
177
The share name is set to the located printer name
173
 
.TP
174
 
\(bu
 
178
.TP 3n
 
179
•
175
180
If no printer name was given, the printer name is set to the located printer name
176
 
.TP
177
 
\(bu
178
 
If the share does not permit guest access and no username was given, the username is set to the located printer name\&.
179
 
.LP
180
 
 
181
 
.PP
182
 
The [printers] service MUST be printable \- if you specify otherwise, the server will refuse to load the configuration file\&.
183
 
 
184
 
.PP
185
 
Typically the path specified is that of a world\-writeable spool directory with the sticky bit set on it\&. A typical [printers] entry looks like this: 
 
181
.TP 3n
 
182
•
 
183
If the share does not permit guest access and no username was given, the username is set to the located printer name.
 
184
.sp
 
185
.RE
 
186
.PP
 
187
The [printers] service MUST be printable - if you specify otherwise, the server will refuse to load the configuration file.
 
188
.PP
 
189
Typically the path specified is that of a world-writeable spool directory with the sticky bit set on it. A typical [printers] entry looks like this:
 
190
 
 
191
.sp
186
192
.nf
187
193
 
188
194
\fI[printers]\fR
190
196
guest ok = yes
191
197
printable = yes
192
198
.fi
193
 
 
194
 
 
195
 
.PP
196
 
All aliases given for a printer in the printcap file are legitimate printer names as far as the server is concerned\&. If your printing subsystem doesn't work like that, you will have to set up a pseudo\-printcap\&. This is a file consisting of one or more lines like this: 
197
 
.nf
198
 
 
199
 
alias|alias|alias|alias\&.\&.\&.    
200
 
.fi
201
 
 
202
 
 
203
 
.PP
204
 
Each alias should be an acceptable printer name for your printing subsystem\&. In the [global] section, specify the new file as your printcap\&. The server will only recognize names found in your pseudo\-printcap, which of course can contain whatever aliases you like\&. The same technique could be used simply to limit access to a subset of your local printers\&.
205
 
 
206
 
.PP
207
 
An alias, by the way, is defined as any component of the first entry of a printcap record\&. Records are separated by newlines, components (if there are more than one) are separated by vertical bar symbols (|)\&.
208
 
 
209
 
.RS
210
 
.Sh "Note"
211
 
 
212
 
.PP
213
 
On SYSV systems which use lpstat to determine what printers are defined on the system you may be able to useprintcap name = lpstat to automatically obtain a list of printers\&. See theprintcap name option for more details\&.
214
 
 
215
 
.RE
216
 
 
 
199
 
 
200
.PP
 
201
All aliases given for a printer in the printcap file are legitimate printer names as far as the server is concerned. If your printing subsystem doesn't work like that, you will have to set up a pseudo-printcap. This is a file consisting of one or more lines like this:
 
202
 
 
203
.sp
 
204
.nf
 
205
 
 
206
alias|alias|alias|alias...    
 
207
.fi
 
208
 
 
209
.PP
 
210
Each alias should be an acceptable printer name for your printing subsystem. In the [global] section, specify the new file as your printcap. The server will only recognize names found in your pseudo-printcap, which of course can contain whatever aliases you like. The same technique could be used simply to limit access to a subset of your local printers.
 
211
.PP
 
212
An alias, by the way, is defined as any component of the first entry of a printcap record. Records are separated by newlines, components (if there are more than one) are separated by vertical bar symbols (|).
 
213
.sp
 
214
.it 1 an-trap
 
215
.nr an-no-space-flag 1
 
216
.nr an-break-flag 1
 
217
.br
 
218
\fBNote\fR
 
219
.PP
 
220
On SYSV systems which use lpstat to determine what printers are defined on the system you may be able to use
 
221
printcap name = lpstat
 
222
to automatically obtain a list of printers. See the
 
223
printcap name
 
224
option for more details.
 
225
.\" end of SS subsection "The [printers] section"
 
226
.SH "USERSHARES"
 
227
.PP
 
228
Starting with Samba version 3.0.23 the capability for non-root users to add, modify, and delete their own share definitions has been added. This capability is called
 
229
\fBusershares\fR
 
230
and is controlled by a set of parameters in the
 
231
 
 
232
section of the smb.conf. The relevant parameters are :
 
233
.TP 3n
 
234
usershare allow guests
 
235
Controls if usershares can permit guest access.
 
236
.TP 3n
 
237
usershare max shares
 
238
Maximum number of user defined shares allowed.
 
239
.TP 3n
 
240
usershare owner only
 
241
If set only directories owned by the sharing user can be shared.
 
242
.TP 3n
 
243
usershare path
 
244
Points to the directory containing the user defined share definitions. The filesystem permissions on this directory control who can create user defined shares.
 
245
.TP 3n
 
246
usershare prefix allow list
 
247
Comma-separated list of abolute pathnames restricting what directories can be shared. Only directories below the pathnames in this list are permitted.
 
248
.TP 3n
 
249
usershare prefix deny list
 
250
Comma-separated list of abolute pathnames restricting what directories can be shared. Directories below the pathnames in this list are prohibited.
 
251
.TP 3n
 
252
usershare template share
 
253
Names a pre-existing share used as a template for creating new usershares. All other share parameters not specified in the user defined share definition are copied from this named share.
 
254
.PP
 
255
To allow members of the UNIX group
 
256
foo
 
257
to create user defined shares, create the directory to contain the share definitions as follows:
 
258
.PP
 
259
Become root:
 
260
.nf
 
261
 
 
262
mkdir /usr/local/samba/lib/usershares
 
263
chgrp foo /usr/local/samba/lib/usershares
 
264
chmod 1770 /usr/local/samba/lib/usershares
 
265
.fi
 
266
.PP
 
267
Then add the parameters
 
268
 
 
269
.sp
 
270
.nf
 
271
 
 
272
        usershare path = /usr/local/samba/lib/usershares
 
273
        usershare max shares = 10 # (or the desired number of shares)
 
274
.fi
 
275
to the global section of your
 
276
\fIsmb.conf\fR. Members of the group foo may then manipulate the user defined shares using the following commands.
 
277
.TP 3n
 
278
net usershare add sharename path [comment] [acl] [guest_ok=[y|n]]
 
279
To create or modify (overwrite) a user defined share.
 
280
.TP 3n
 
281
net usershare delete sharename
 
282
To delete a user defined share.
 
283
.TP 3n
 
284
net usershare list wildcard-sharename
 
285
To list user defined shares.
 
286
.TP 3n
 
287
net usershare info wildcard-sharename
 
288
To print information about user defined shares.
217
289
.SH "PARAMETERS"
218
 
 
219
 
.PP
220
 
Parameters define the specific attributes of sections\&.
221
 
 
222
 
.PP
223
 
Some parameters are specific to the [global] section (e\&.g\&., \fBsecurity\fR)\&. Some parameters are usable in all sections (e\&.g\&., \fBcreate mask\fR)\&. All others are permissible only in normal sections\&. For the purposes of the following descriptions the [homes] and [printers] sections will be considered normal\&. The letter \fBG\fR in parentheses indicates that a parameter is specific to the [global] section\&. The letter \fBS\fR indicates that a parameter can be specified in a service specific section\&. All \fBS\fR parameters can also be specified in the [global] section \- in which case they will define the default behavior for all services\&.
224
 
 
225
 
.PP
226
 
Parameters are arranged here in alphabetical order \- this may not create best bedfellows, but at least you can find them! Where there are synonyms, the preferred synonym is described, others refer to the preferred synonym\&.
227
 
 
 
290
.PP
 
291
Parameters define the specific attributes of sections.
 
292
.PP
 
293
Some parameters are specific to the [global] section (e.g.,
 
294
\fBsecurity\fR). Some parameters are usable in all sections (e.g.,
 
295
\fBcreate mask\fR). All others are permissible only in normal sections. For the purposes of the following descriptions the [homes] and [printers] sections will be considered normal. The letter
 
296
\fBG\fR
 
297
in parentheses indicates that a parameter is specific to the [global] section. The letter
 
298
\fBS\fR
 
299
indicates that a parameter can be specified in a service specific section. All
 
300
\fBS\fR
 
301
parameters can also be specified in the [global] section - in which case they will define the default behavior for all services.
 
302
.PP
 
303
Parameters are arranged here in alphabetical order - this may not create best bedfellows, but at least you can find them! Where there are synonyms, the preferred synonym is described, others refer to the preferred synonym.
228
304
.SH "VARIABLE SUBSTITUTIONS"
229
 
 
230
 
.PP
231
 
Many of the strings that are settable in the config file can take substitutions\&. For example the option``path = /tmp/%u'' is interpreted as ``path = /tmp/john'' if the user connected with the username john\&.
232
 
 
233
 
.PP
234
 
These substitutions are mostly noted in the descriptions below, but there are some general substitutions which apply whenever they might be relevant\&. These are:
235
 
 
236
 
.TP
 
305
.PP
 
306
Many of the strings that are settable in the config file can take substitutions. For example the option
 
307
“path = /tmp/%u”
 
308
is interpreted as
 
309
“path = /tmp/john”
 
310
if the user connected with the username john.
 
311
.PP
 
312
These substitutions are mostly noted in the descriptions below, but there are some general substitutions which apply whenever they might be relevant. These are:
 
313
.TP 3n
237
314
%U
238
 
session username (the username that the client wanted, not necessarily the same as the one they got)\&.
239
 
 
240
 
.TP
 
315
session username (the username that the client wanted, not necessarily the same as the one they got).
 
316
.TP 3n
241
317
%G
242
 
primary group name of %U\&.
243
 
 
244
 
.TP
 
318
primary group name of %U.
 
319
.TP 3n
245
320
%h
246
 
the Internet hostname that Samba is running on\&.
247
 
 
248
 
.TP
 
321
the Internet hostname that Samba is running on.
 
322
.TP 3n
249
323
%m
250
 
the NetBIOS name of the client machine (very useful)\&.
251
 
 
252
 
This parameter is not available when Samba listens on port 445, as clients no longer send this information\&. If you use this macro in an include statement on a domain that has a Samba domain controller be sure to set in the [global] section \fIsmb ports = 139\fR\&. This will cause Samba to not listen on port 445 and will permit include functionality to function as it did with Samba 2\&.x\&.
253
 
 
254
 
.TP
 
324
the NetBIOS name of the client machine (very useful).
 
325
.sp
 
326
This parameter is not available when Samba listens on port 445, as clients no longer send this information. If you use this macro in an include statement on a domain that has a Samba domain controller be sure to set in the [global] section
 
327
\fIsmb ports = 139\fR. This will cause Samba to not listen on port 445 and will permit include functionality to function as it did with Samba 2.x.
 
328
.TP 3n
255
329
%L
256
 
the NetBIOS name of the server\&. This allows you to change your config based on what the client calls you\&. Your server can have a ``dual personality''\&.
257
 
 
258
 
.TP
 
330
the NetBIOS name of the server. This allows you to change your config based on what the client calls you. Your server can have a
 
331
“dual personality”.
 
332
.TP 3n
259
333
%M
260
 
the Internet name of the client machine\&.
261
 
 
262
 
.TP
 
334
the Internet name of the client machine.
 
335
.TP 3n
263
336
%R
264
 
the selected protocol level after protocol negotiation\&. It can be one of CORE, COREPLUS, LANMAN1, LANMAN2 or NT1\&.
265
 
 
266
 
.TP
 
337
the selected protocol level after protocol negotiation. It can be one of CORE, COREPLUS, LANMAN1, LANMAN2 or NT1.
 
338
.TP 3n
267
339
%d
268
 
the process id of the current server process\&.
269
 
 
270
 
.TP
 
340
the process id of the current server process.
 
341
.TP 3n
271
342
%a
272
 
the architecture of the remote machine\&. It currently recognizes Samba (\fBSamba\fR), the Linux CIFS file system (\fBCIFSFS\fR), OS/2, (\fBOS2\fR), Windows for Workgroups (\fBWfWg\fR), Windows 9x/ME (\fBWin95\fR), Windows NT (\fBWinNT\fR), Windows 2000 (\fBWin2K\fR), Windows XP (\fBWinXP\fR), and Windows 2003 (\fBWin2K3\fR)\&. Anything else will be known as\fBUNKNOWN\fR\&.
273
 
 
274
 
.TP
 
343
the architecture of the remote machine. It currently recognizes Samba (\fBSamba\fR), the Linux CIFS file system (\fBCIFSFS\fR), OS/2, (\fBOS2\fR), Windows for Workgroups (\fBWfWg\fR), Windows 9x/ME (\fBWin95\fR), Windows NT (\fBWinNT\fR), Windows 2000 (\fBWin2K\fR), Windows XP (\fBWinXP\fR), and Windows 2003 (\fBWin2K3\fR). Anything else will be known as
 
344
\fBUNKNOWN\fR.
 
345
.TP 3n
275
346
%I
276
 
the IP address of the client machine\&.
277
 
 
278
 
.TP
 
347
the IP address of the client machine.
 
348
.TP 3n
279
349
%i
280
 
the local IP address to which a client connected\&.
281
 
 
282
 
.TP
 
350
the local IP address to which a client connected.
 
351
.TP 3n
283
352
%T
284
 
the current date and time\&.
285
 
 
286
 
.TP
 
353
the current date and time.
 
354
.TP 3n
287
355
%D
288
 
name of the domain or workgroup of the current user\&.
289
 
 
290
 
.TP
 
356
name of the domain or workgroup of the current user.
 
357
.TP 3n
291
358
%w
292
 
the winbind separator\&.
293
 
 
294
 
.TP
 
359
the winbind separator.
 
360
.TP 3n
295
361
%$(\fIenvvar\fR)
296
 
the value of the environment variable\fIenvar\fR\&.
297
 
 
 
362
the value of the environment variable
 
363
\fIenvar\fR.
298
364
.PP
299
365
The following substitutes apply only to some configuration options (only those that are used when a connection has been established):
300
 
 
301
 
.TP
 
366
.TP 3n
302
367
%S
303
 
the name of the current service, if any\&.
304
 
 
305
 
.TP
 
368
the name of the current service, if any.
 
369
.TP 3n
306
370
%P
307
 
the root directory of the current service, if any\&.
308
 
 
309
 
.TP
 
371
the root directory of the current service, if any.
 
372
.TP 3n
310
373
%u
311
 
username of the current service, if any\&.
312
 
 
313
 
.TP
 
374
username of the current service, if any.
 
375
.TP 3n
314
376
%g
315
 
primary group name of %u\&.
316
 
 
317
 
.TP
 
377
primary group name of %u.
 
378
.TP 3n
318
379
%H
319
 
the home directory of the user given by %u\&.
320
 
 
321
 
.TP
 
380
the home directory of the user given by %u.
 
381
.TP 3n
322
382
%N
323
 
the name of your NIS home directory server\&. This is obtained from your NIS auto\&.map entry\&. If you have not compiled Samba with the \fB\-\-with\-automount\fR option, this value will be the same as %L\&.
324
 
 
325
 
.TP
 
383
the name of your NIS home directory server. This is obtained from your NIS auto.map entry. If you have not compiled Samba with the
 
384
\fB--with-automount\fR
 
385
option, this value will be the same as %L.
 
386
.TP 3n
326
387
%p
327
 
the path of the service's home directory, obtained from your NIS auto\&.map entry\&. The NIS auto\&.map entry is split up as %N:%p\&.
328
 
 
 
388
the path of the service's home directory, obtained from your NIS auto.map entry. The NIS auto.map entry is split up as
 
389
%N:%p.
329
390
.PP
330
 
There are some quite creative things that can be done with these substitutions and other\fIsmb\&.conf\fR options\&.
331
 
 
 
391
There are some quite creative things that can be done with these substitutions and other
 
392
\fIsmb.conf\fR
 
393
options.
332
394
.SH "NAME MANGLING"
333
 
 
334
 
.PP
335
 
Samba supports name mangling so that DOS and Windows clients can use files that don't conform to the 8\&.3 format\&. It can also be set to adjust the case of 8\&.3 format filenames\&.
336
 
 
337
 
.PP
338
 
There are several options that control the way mangling is performed, and they are grouped here rather than listed separately\&. For the defaults look at the output of the testparm program\&.
339
 
 
340
 
.PP
341
 
All of these options can be set separately for each service (or globally, of course)\&.
342
 
 
 
395
.PP
 
396
Samba supports
 
397
name mangling
 
398
so that DOS and Windows clients can use files that don't conform to the 8.3 format. It can also be set to adjust the case of 8.3 format filenames.
 
399
.PP
 
400
There are several options that control the way mangling is performed, and they are grouped here rather than listed separately. For the defaults look at the output of the testparm program.
 
401
.PP
 
402
All of these options can be set separately for each service (or globally, of course).
343
403
.PP
344
404
The options are:
345
 
 
346
 
.TP
 
405
.TP 3n
347
406
case sensitive = yes/no/auto
348
 
controls whether filenames are case sensitive\&. If they aren't, Samba must do a filename search and match on passed names\&. The default setting of auto allows clients that support case sensitive filenames (Linux CIFSVFS and smbclient 3\&.0\&.5 and above currently) to tell the Samba server on a per\-packet basis that they wish to access the file system in a case\-sensitive manner (to support UNIX case sensitive semantics)\&. No Windows or DOS system supports case\-sensitive filename so setting this option to auto is that same as setting it to no for them\&. Default \fBauto\fR\&.
349
 
 
350
 
.TP
 
407
controls whether filenames are case sensitive. If they aren't, Samba must do a filename search and match on passed names. The default setting of auto allows clients that support case sensitive filenames (Linux CIFSVFS and smbclient 3.0.5 and above currently) to tell the Samba server on a per-packet basis that they wish to access the file system in a case-sensitive manner (to support UNIX case sensitive semantics). No Windows or DOS system supports case-sensitive filename so setting this option to auto is that same as setting it to no for them. Default
 
408
\fBauto\fR.
 
409
.TP 3n
351
410
default case = upper/lower
352
 
controls what the default case is for new filenames (ie\&. files that don't currently exist in the filesystem)\&. Default \fBlower\fR\&. IMPORTANT NOTE: This option will be used to modify the case of\fBall\fR incoming client filenames, not just new filenames if the options case sensitive = yes, preserve case = No,short preserve case = No are set\&. This change is needed as part of the optimisations for directories containing large numbers of files\&.
353
 
 
354
 
.TP
 
411
controls what the default case is for new filenames (ie. files that don't currently exist in the filesystem). Default
 
412
\fBlower\fR. IMPORTANT NOTE: This option will be used to modify the case of
 
413
\fBall\fR
 
414
incoming client filenames, not just new filenames if the options
 
415
case sensitive = yes,
 
416
preserve case = No,
 
417
short preserve case = No are set. This change is needed as part of the optimisations for directories containing large numbers of files.
 
418
.TP 3n
355
419
preserve case = yes/no
356
 
controls whether new files (ie\&. files that don't currently exist in the filesystem) are created with the case that the client passes, or if they are forced to be the default case\&. Default\fByes\fR\&.
357
 
 
358
 
.TP
 
420
controls whether new files (ie. files that don't currently exist in the filesystem) are created with the case that the client passes, or if they are forced to be the
 
421
default
 
422
case. Default
 
423
\fByes\fR.
 
424
.TP 3n
359
425
short preserve case = yes/no
360
 
controls if new files (ie\&. files that don't currently exist in the filesystem) which conform to 8\&.3 syntax, that is all in upper case and of suitable length, are created upper case, or if they are forced to be thedefault case\&. This option can be used with preserve case = yes to permit long filenames to retain their case, while short names are lowercased\&. Default \fByes\fR\&.
361
 
 
 
426
controls if new files (ie. files that don't currently exist in the filesystem) which conform to 8.3 syntax, that is all in upper case and of suitable length, are created upper case, or if they are forced to be the
 
427
default
 
428
case. This option can be used with
 
429
preserve case = yes
 
430
to permit long filenames to retain their case, while short names are lowercased. Default
 
431
\fByes\fR.
362
432
.PP
363
 
By default, Samba 3\&.0 has the same semantics as a Windows NT server, in that it is case insensitive but case preserving\&. As a special case for directories with large numbers of files, if the case options are set as follows, "case sensitive = yes", "case preserve = no", "short preserve case = no" then the "default case" option will be applied and will modify all filenames sent from the client when accessing this share\&.
364
 
 
 
433
By default, Samba 3.0 has the same semantics as a Windows NT server, in that it is case insensitive but case preserving. As a special case for directories with large numbers of files, if the case options are set as follows, "case sensitive = yes", "case preserve = no", "short preserve case = no" then the "default case" option will be applied and will modify all filenames sent from the client when accessing this share.
365
434
.SH "NOTE ABOUT USERNAME/PASSWORD VALIDATION"
366
 
 
367
 
.PP
368
 
There are a number of ways in which a user can connect to a service\&. The server uses the following steps in determining if it will allow a connection to a specified service\&. If all the steps fail, the connection request is rejected\&. However, if one of the steps succeeds, the following steps are not checked\&.
369
 
 
370
 
.PP
371
 
If the service is marked ``guest only = yes'' and the server is running with share\-level security (``security = share'', steps 1 to 5 are skipped\&.
372
 
 
373
 
.TP 3
 
435
.PP
 
436
There are a number of ways in which a user can connect to a service. The server uses the following steps in determining if it will allow a connection to a specified service. If all the steps fail, the connection request is rejected. However, if one of the steps succeeds, the following steps are not checked.
 
437
.PP
 
438
If the service is marked
 
439
“guest only = yes”
 
440
and the server is running with share-level security (“security = share”, steps 1 to 5 are skipped.
 
441
.TP 3n
374
442
1.
375
 
If the client has passed a username/password pair and that username/password pair is validated by the UNIX system's password programs, the connection is made as that username\&. This includes the\\\\server\\service%\fIusername\fR method of passing a username\&.
376
 
.TP
 
443
If the client has passed a username/password pair and that username/password pair is validated by the UNIX system's password programs, the connection is made as that username. This includes the
 
444
\\server\service%\fIusername\fR
 
445
method of passing a username.
 
446
.TP 3n
377
447
2.
378
 
If the client has previously registered a username with the system and now supplies a correct password for that username, the connection is allowed\&.
379
 
.TP
 
448
If the client has previously registered a username with the system and now supplies a correct password for that username, the connection is allowed.
 
449
.TP 3n
380
450
3.
381
 
The client's NetBIOS name and any previously used usernames are checked against the supplied password\&. If they match, the connection is allowed as the corresponding user\&.
382
 
.TP
 
451
The client's NetBIOS name and any previously used usernames are checked against the supplied password. If they match, the connection is allowed as the corresponding user.
 
452
.TP 3n
383
453
4.
384
 
If the client has previously validated a username/password pair with the server and the client has passed the validation token, that username is used\&.
385
 
.TP
 
454
If the client has previously validated a username/password pair with the server and the client has passed the validation token, that username is used.
 
455
.TP 3n
386
456
5.
387
 
If a user = field is given in the \fIsmb\&.conf\fR file for the service and the client has supplied a password, and that password matches (according to the UNIX system's password checking) with one of the usernames from the user = field, the connection is made as the username in the user = line\&. If one of the usernames in the user = list begins with a @, that name expands to a list of names in the group of the same name\&.
388
 
.TP
 
457
If a
 
458
user =
 
459
field is given in the
 
460
\fIsmb.conf\fR
 
461
file for the service and the client has supplied a password, and that password matches (according to the UNIX system's password checking) with one of the usernames from the
 
462
user =
 
463
field, the connection is made as the username in the
 
464
user =
 
465
line. If one of the usernames in the
 
466
user =
 
467
list begins with a
 
468
@, that name expands to a list of names in the group of the same name.
 
469
.TP 3n
389
470
6.
390
 
If the service is a guest service, a connection is made as the username given in the guest account = for the service, irrespective of the supplied password\&.
391
 
.LP
392
 
 
 
471
If the service is a guest service, a connection is made as the username given in the
 
472
guest account =
 
473
for the service, irrespective of the supplied password.
393
474
.SH "EXPLANATION OF EACH PARAMETER"
394
 
 
395
 
.TP
 
475
.TP 3n
396
476
abort shutdown script (G)
397
 
This a full path name to a script called by \fBsmbd\fR(8) that should stop a shutdown procedure issued by the shutdown script\&.
398
 
 
399
 
If the connected user posseses the \fBSeRemoteShutdownPrivilege\fR, right, this command will be run as user\&.
400
 
 
401
 
Default: \fB\fIabort shutdown script\fR = \fR 
402
 
 
403
 
Example: \fB\fIabort shutdown script\fR = /sbin/shutdown \-c \fR 
404
 
 
405
 
.TP
 
477
This a full path name to a script called by
 
478
\fBsmbd\fR(8)
 
479
that should stop a shutdown procedure issued by the
 
480
shutdown script.
 
481
.sp
 
482
If the connected user posseses the
 
483
\fBSeRemoteShutdownPrivilege\fR, right, this command will be run as user.
 
484
.sp
 
485
Default:
 
486
\fB\fIabort shutdown script\fR = \fR
 
487
.sp
 
488
Example:
 
489
\fB\fIabort shutdown script\fR = /sbin/shutdown -c \fR
 
490
.TP 3n
406
491
acl check permissions (S)
407
 
This boolean parameter controls what \fBsmbd\fR(8)does on receiving a protocol request of "open for delete" from a Windows client\&. If a Windows client doesn't have permissions to delete a file then they expect this to be denied at open time\&. POSIX systems normally only detect restrictions on delete by actually attempting to delete the file or directory\&. As Windows clients can (and do) "back out" a delete request by unsetting the "delete on close" bit Samba cannot delete the file immediately on "open for delete" request as we cannot restore such a deleted file\&. With this parameter set to true (the default) then smbd checks the file system permissions directly on "open for delete" and denies the request without actually deleting the file if the file system permissions would seem to deny it\&. This is not perfect, as it's possible a user could have deleted a file without Samba being able to check the permissions correctly, but it is close enough to Windows semantics for mostly correct behaviour\&. Samba will correctly check POSIX ACL semantics in this case\&.
408
 
 
409
 
If this parameter is set to "false" Samba doesn't check permissions on "open for delete" and allows the open\&. If the user doesn't have permission to delete the file this will only be discovered at close time, which is too late for the Windows user tools to display an error message to the user\&. The symptom of this is files that appear to have been deleted "magically" re\-appearing on a Windows explorer refersh\&. This is an extremely advanced protocol option which should not need to be changed\&. This parameter was introduced in its final form in 3\&.0\&.21, an earlier version with slightly different semantics was introduced in 3\&.0\&.20\&. That older version is not documented here\&.
410
 
 
411
 
Default: \fB\fIacl check permissions\fR = True \fR 
412
 
 
413
 
.TP
 
492
This boolean parameter controls what
 
493
\fBsmbd\fR(8)does on receiving a protocol request of "open for delete" from a Windows client. If a Windows client doesn't have permissions to delete a file then they expect this to be denied at open time. POSIX systems normally only detect restrictions on delete by actually attempting to delete the file or directory. As Windows clients can (and do) "back out" a delete request by unsetting the "delete on close" bit Samba cannot delete the file immediately on "open for delete" request as we cannot restore such a deleted file. With this parameter set to true (the default) then smbd checks the file system permissions directly on "open for delete" and denies the request without actually deleting the file if the file system permissions would seem to deny it. This is not perfect, as it's possible a user could have deleted a file without Samba being able to check the permissions correctly, but it is close enough to Windows semantics for mostly correct behaviour. Samba will correctly check POSIX ACL semantics in this case.
 
494
.sp
 
495
If this parameter is set to "false" Samba doesn't check permissions on "open for delete" and allows the open. If the user doesn't have permission to delete the file this will only be discovered at close time, which is too late for the Windows user tools to display an error message to the user. The symptom of this is files that appear to have been deleted "magically" re-appearing on a Windows explorer refersh. This is an extremely advanced protocol option which should not need to be changed. This parameter was introduced in its final form in 3.0.21, an earlier version with slightly different semantics was introduced in 3.0.20. That older version is not documented here.
 
496
.sp
 
497
Default:
 
498
\fB\fIacl check permissions\fR = True \fR
 
499
.TP 3n
414
500
acl compatibility (S)
415
 
This parameter specifies what OS ACL semantics should be compatible with\&. Possible values are \fBwinnt\fR for Windows NT 4,\fBwin2k\fR for Windows 2000 and above and \fBauto\fR\&. If you specify \fBauto\fR, the value for this parameter will be based upon the version of the client\&. There should be no reason to change this parameter from the default\&.
416
 
 
417
 
Default: \fB\fIacl compatibility\fR = Auto \fR 
418
 
 
419
 
Example: \fB\fIacl compatibility\fR = win2k \fR 
420
 
 
421
 
.TP
 
501
This parameter specifies what OS ACL semantics should be compatible with. Possible values are
 
502
\fBwinnt\fR
 
503
for Windows NT 4,
 
504
\fBwin2k\fR
 
505
for Windows 2000 and above and
 
506
\fBauto\fR. If you specify
 
507
\fBauto\fR, the value for this parameter will be based upon the version of the client. There should be no reason to change this parameter from the default.
 
508
.sp
 
509
Default:
 
510
\fB\fIacl compatibility\fR = Auto \fR
 
511
.sp
 
512
Example:
 
513
\fB\fIacl compatibility\fR = win2k \fR
 
514
.TP 3n
422
515
acl group control (S)
423
 
In a POSIX filesystem, only the owner of a file or directory and the superuser can modify the permissions and ACLs on a file\&. If this parameter is set, then Samba overrides this restriction, and also allows the\fBprimary group owner\fR of a file or directory to modify the permissions and ACLs on that file\&.
424
 
 
425
 
On a Windows server, groups may be the owner of a file or directory \- thus allowing anyone in that group to modify the permissions on it\&. This allows the delegation of security controls on a point in the filesystem to the group owner of a directory and anything below it also owned by that group\&. This means there are multiple people with permissions to modify ACLs on a file or directory, easing managability\&.
426
 
 
427
 
This parameter allows Samba to also permit delegation of the control over a point in the exported directory hierarchy in much the same was as Windows\&. This allows all members of a UNIX group to control the permissions on a file or directory they have group ownership on\&.
428
 
 
429
 
This parameter is best used with the inherit owner option and also on on a share containing directories with the UNIX \fBsetgid bit\fR bit set on them, which causes new files and directories created within it to inherit the group ownership from the containing directory\&.
430
 
 
431
 
This is a new parameter introduced in Samba 3\&.0\&.20\&.
432
 
 
433
 
This can be particularly useful to allow groups to manage their own security on a part of the filesystem they have group ownership of, removing the bottleneck of having only the user owner or superuser able to reset permissions\&.
434
 
 
435
 
Default: \fB\fIacl group control\fR = no \fR 
436
 
 
437
 
.TP
 
516
In a POSIX filesystem, only the owner of a file or directory and the superuser can modify the permissions and ACLs on a file. If this parameter is set, then Samba overrides this restriction, and also allows the
 
517
\fBprimary group owner\fR
 
518
of a file or directory to modify the permissions and ACLs on that file.
 
519
.sp
 
520
On a Windows server, groups may be the owner of a file or directory - thus allowing anyone in that group to modify the permissions on it. This allows the delegation of security controls on a point in the filesystem to the group owner of a directory and anything below it also owned by that group. This means there are multiple people with permissions to modify ACLs on a file or directory, easing managability.
 
521
.sp
 
522
This parameter allows Samba to also permit delegation of the control over a point in the exported directory hierarchy in much the same was as Windows. This allows all members of a UNIX group to control the permissions on a file or directory they have group ownership on.
 
523
.sp
 
524
This parameter is best used with the
 
525
inherit owner option and also on on a share containing directories with the UNIX
 
526
\fBsetgid bit\fR
 
527
bit set on them, which causes new files and directories created within it to inherit the group ownership from the containing directory.
 
528
.sp
 
529
This is parameter has been marked deprecated in Samba 3.0.23. The same behavior is now implemented by the
 
530
\fIdos filemode\fR
 
531
option.
 
532
.sp
 
533
Default:
 
534
\fB\fIacl group control\fR = no \fR
 
535
.TP 3n
438
536
acl map full control (S)
439
 
This boolean parameter controls whether \fBsmbd\fR(8)maps a POSIX ACE entry of "rwx" (read/write/execute), the maximum allowed POSIX permission set, into a Windows ACL of "FULL CONTROL"\&. If this parameter is set to true any POSIX ACE entry of "rwx" will be returned in a Windows ACL as "FULL CONTROL", is this parameter is set to false any POSIX ACE entry of "rwx" will be returned as the specific Windows ACL bits representing read, write and execute\&.
440
 
 
441
 
Default: \fB\fIacl map full control\fR = True \fR 
442
 
 
443
 
.TP
 
537
This boolean parameter controls whether
 
538
\fBsmbd\fR(8)maps a POSIX ACE entry of "rwx" (read/write/execute), the maximum allowed POSIX permission set, into a Windows ACL of "FULL CONTROL". If this parameter is set to true any POSIX ACE entry of "rwx" will be returned in a Windows ACL as "FULL CONTROL", is this parameter is set to false any POSIX ACE entry of "rwx" will be returned as the specific Windows ACL bits representing read, write and execute.
 
539
.sp
 
540
Default:
 
541
\fB\fIacl map full control\fR = True \fR
 
542
.TP 3n
444
543
add group script (G)
445
 
This is the full pathname to a script that will be run\fBAS ROOT\fR by \fBsmbd\fR(8) when a new group is requested\&. It will expand any \fI%g\fR to the group name passed\&. This script is only useful for installations using the Windows NT domain administration tools\&. The script is free to create a group with an arbitrary name to circumvent unix group name restrictions\&. In that case the script must print the numeric gid of the created group on stdout\&.
446
 
 
 
544
This is the full pathname to a script that will be run
 
545
\fBAS ROOT\fR
 
546
by
 
547
\fBsmbd\fR(8)
 
548
when a new group is requested. It will expand any
 
549
\fI%g\fR
 
550
to the group name passed. This script is only useful for installations using the Windows NT domain administration tools. The script is free to create a group with an arbitrary name to circumvent unix group name restrictions. In that case the script must print the numeric gid of the created group on stdout.
 
551
.sp
447
552
\fBNo default\fR
448
 
 
449
 
.TP
 
553
.TP 3n
450
554
add machine script (G)
451
 
This is the full pathname to a script that will be run by\fBsmbd\fR(8) when a machine is added to it's domain using the administrator username and password method\&.
452
 
 
453
 
This option is only required when using sam back\-ends tied to the Unix uid method of RID calculation such as smbpasswd\&. This option is only available in Samba 3\&.0\&.
454
 
 
455
 
Default: \fB\fIadd machine script\fR = \fR 
456
 
 
457
 
Example: \fB\fIadd machine script\fR = /usr/sbin/adduser \-n \-g machines \-c Machine \-d /var/lib/nobody \-s /bin/false %u \fR 
458
 
 
459
 
.TP
 
555
This is the full pathname to a script that will be run by
 
556
\fBsmbd\fR(8)
 
557
when a machine is added to it's domain using the administrator username and password method.
 
558
.sp
 
559
This option is only required when using sam back-ends tied to the Unix uid method of RID calculation such as smbpasswd. This option is only available in Samba 3.0.
 
560
.sp
 
561
Default:
 
562
\fB\fIadd machine script\fR = \fR
 
563
.sp
 
564
Example:
 
565
\fB\fIadd machine script\fR = /usr/sbin/adduser -n -g machines -c Machine -d /var/lib/nobody -s /bin/false %u \fR
 
566
.TP 3n
 
567
add port command (G)
 
568
Samba 3.0.23 introduces support for adding printer ports remotely using the Windows "Add Standard TCP/IP Port Wizard". This option defines an external program to be executed when smbd receives a request to add a new Port to the system. he script is passed two parameters:
 
569
.RS 3n
 
570
.TP 3n
 
571
•
 
572
\fIport name\fR
 
573
.TP 3n
 
574
•
 
575
\fIdevice URI\fR
 
576
.RE
 
577
.IP "" 3n
 
578
The deviceURI is in the for of socket://<hostname>[:<portnumber>] or lpd://<hostname>/<queuename>.
 
579
.sp
 
580
Default:
 
581
\fB\fIadd port command\fR = \fR
 
582
.sp
 
583
Example:
 
584
\fB\fIadd port command\fR = /etc/samba/scripts/addport.sh \fR
 
585
.TP 3n
460
586
add printer command (G)
461
 
With the introduction of MS\-RPC based printing support for Windows NT/2000 clients in Samba 2\&.2, The MS Add Printer Wizard (APW) icon is now also available in the "Printers\&.\&.\&." folder displayed a share listing\&. The APW allows for printers to be add remotely to a Samba or Windows NT/2000 print server\&.
462
 
 
463
 
For a Samba host this means that the printer must be physically added to the underlying printing system\&. The \fIadd printer command\fR defines a script to be run which will perform the necessary operations for adding the printer to the print system and to add the appropriate service definition to the \fIsmb\&.conf\fR file in order that it can be shared by \fBsmbd\fR(8)\&.
464
 
 
465
 
The \fIaddprinter command\fR is automatically invoked with the following parameter (in order):
466
 
 
467
 
 
468
 
.RS
469
 
.TP 3
470
 
\(bu
 
587
With the introduction of MS-RPC based printing support for Windows NT/2000 clients in Samba 2.2, The MS Add Printer Wizard (APW) icon is now also available in the "Printers..." folder displayed a share listing. The APW allows for printers to be add remotely to a Samba or Windows NT/2000 print server.
 
588
.sp
 
589
For a Samba host this means that the printer must be physically added to the underlying printing system. The
 
590
\fIadd printer command\fR
 
591
defines a script to be run which will perform the necessary operations for adding the printer to the print system and to add the appropriate service definition to the
 
592
\fIsmb.conf\fR
 
593
file in order that it can be shared by
 
594
\fBsmbd\fR(8).
 
595
.sp
 
596
The
 
597
\fIaddprinter command\fR
 
598
is automatically invoked with the following parameter (in order):
 
599
.RS 3n
 
600
.TP 3n
 
601
&#8226;
471
602
\fIprinter name\fR
472
 
.TP
473
 
\(bu
 
603
.TP 3n
 
604
&#8226;
474
605
\fIshare name\fR
475
 
.TP
476
 
\(bu
 
606
.TP 3n
 
607
&#8226;
477
608
\fIport name\fR
478
 
.TP
479
 
\(bu
 
609
.TP 3n
 
610
&#8226;
480
611
\fIdriver name\fR
481
 
.TP
482
 
\(bu
 
612
.TP 3n
 
613
&#8226;
483
614
\fIlocation\fR
484
 
.TP
485
 
\(bu
 
615
.TP 3n
 
616
&#8226;
486
617
\fIWindows 9x driver location\fR
487
 
.LP
488
618
.RE
489
 
.IP
490
 
All parameters are filled in from the PRINTER_INFO_2 structure sent by the Windows NT/2000 client with one exception\&. The "Windows 9x driver location" parameter is included for backwards compatibility only\&. The remaining fields in the structure are generated from answers to the APW questions\&.
491
 
 
492
 
Once the \fIaddprinter command\fR has been executed, \fBsmbd\fR will reparse the \fI smb\&.conf\fR to determine if the share defined by the APW exists\&. If the sharename is still invalid, then \fBsmbd \fR will return an ACCESS_DENIED error to the client\&.
493
 
 
494
 
The "add printer command" program can output a single line of text, which Samba will set as the port the new printer is connected to\&. If this line isn't output, Samba won't reload its printer shares\&.
495
 
 
496
 
Default: \fB\fIadd printer command\fR = \fR 
497
 
 
498
 
Example: \fB\fIadd printer command\fR = /usr/bin/addprinter \fR 
499
 
 
500
 
.TP
 
619
.IP "" 3n
 
620
All parameters are filled in from the PRINTER_INFO_2 structure sent by the Windows NT/2000 client with one exception. The "Windows 9x driver location" parameter is included for backwards compatibility only. The remaining fields in the structure are generated from answers to the APW questions.
 
621
.sp
 
622
Once the
 
623
\fIaddprinter command\fR
 
624
has been executed,
 
625
\fBsmbd\fR
 
626
will reparse the
 
627
\fI smb.conf\fR
 
628
to determine if the share defined by the APW exists. If the sharename is still invalid, then
 
629
\fBsmbd \fR
 
630
will return an ACCESS_DENIED error to the client.
 
631
.sp
 
632
The "add printer command" program can output a single line of text, which Samba will set as the port the new printer is connected to. If this line isn't output, Samba won't reload its printer shares.
 
633
.sp
 
634
Default:
 
635
\fB\fIadd printer command\fR = \fR
 
636
.sp
 
637
Example:
 
638
\fB\fIadd printer command\fR = /usr/bin/addprinter \fR
 
639
.TP 3n
501
640
add share command (G)
502
 
Samba 2\&.2\&.0 introduced the ability to dynamically add and delete shares via the Windows NT 4\&.0 Server Manager\&. The\fIadd share command\fR is used to define an external program or script which will add a new service definition to \fIsmb\&.conf\fR\&. In order to successfully execute the \fIadd share command\fR, \fBsmbd\fR requires that the administrator be connected using a root account (i\&.e\&. uid == 0)\&.
503
 
 
504
 
When executed, \fBsmbd\fR will automatically invoke the\fIadd share command\fR with four parameters\&.
505
 
 
506
 
 
507
 
.RS
508
 
.TP 3
509
 
\(bu
510
 
\fIconfigFile\fR \- the location of the global \fIsmb\&.conf\fR file\&.
511
 
.TP
512
 
\(bu
513
 
\fIshareName\fR \- the name of the new share\&.
514
 
.TP
515
 
\(bu
516
 
\fIpathName\fR \- path to an **existing** directory on disk\&.
517
 
.TP
518
 
\(bu
519
 
\fIcomment\fR \- comment string to associate with the new share\&.
520
 
.LP
 
641
Samba 2.2.0 introduced the ability to dynamically add and delete shares via the Windows NT 4.0 Server Manager. The
 
642
\fIadd share command\fR
 
643
is used to define an external program or script which will add a new service definition to
 
644
\fIsmb.conf\fR. In order to successfully execute the
 
645
\fIadd share command\fR,
 
646
\fBsmbd\fR
 
647
requires that the administrator be connected using a root account (i.e. uid == 0).
 
648
.sp
 
649
When executed,
 
650
\fBsmbd\fR
 
651
will automatically invoke the
 
652
\fIadd share command\fR
 
653
with five parameters.
 
654
.RS 3n
 
655
.TP 3n
 
656
&#8226;
 
657
\fIconfigFile\fR
 
658
- the location of the global
 
659
\fIsmb.conf\fR
 
660
file.
 
661
.TP 3n
 
662
&#8226;
 
663
\fIshareName\fR
 
664
- the name of the new share.
 
665
.TP 3n
 
666
&#8226;
 
667
\fIpathName\fR
 
668
- path to an **existing** directory on disk.
 
669
.TP 3n
 
670
&#8226;
 
671
\fIcomment\fR
 
672
- comment string to associate with the new share.
 
673
.TP 3n
 
674
&#8226;
 
675
\fImax connections\fR
 
676
Number of maximum simultaneous connections to this share.
521
677
.RE
522
 
.IP
523
 
This parameter is only used for add file shares\&. To add printer shares, see the addprinter command\&.
524
 
 
525
 
Default: \fB\fIadd share command\fR = \fR 
526
 
 
527
 
Example: \fB\fIadd share command\fR = /usr/local/bin/addshare \fR 
528
 
 
529
 
.TP
 
678
.IP "" 3n
 
679
This parameter is only used for add file shares. To add printer shares, see the
 
680
addprinter command.
 
681
.sp
 
682
Default:
 
683
\fB\fIadd share command\fR = \fR
 
684
.sp
 
685
Example:
 
686
\fB\fIadd share command\fR = /usr/local/bin/addshare \fR
 
687
.TP 3n
530
688
add user script (G)
531
 
This is the full pathname to a script that will be run \fBAS ROOT\fR by\fBsmbd\fR(8) under special circumstances described below\&.
532
 
 
533
 
Normally, a Samba server requires that UNIX users are created for all users accessing files on this server\&. For sites that use Windows NT account databases as their primary user database creating these users and keeping the user list in sync with the Windows NT PDC is an onerous task\&. This option allows smbd to create the required UNIX users\fBON DEMAND\fR when a user accesses the Samba server\&.
534
 
 
535
 
In order to use this option, \fBsmbd\fR(8) must \fBNOT\fR be set tosecurity = share and add user script must be set to a full pathname for a script that will create a UNIX user given one argument of\fI%u\fR, which expands into the UNIX user name to create\&.
536
 
 
537
 
When the Windows user attempts to access the Samba server, at login (session setup in the SMB protocol) time, \fBsmbd\fR(8) contacts the password server and attempts to authenticate the given user with the given password\&. If the authentication succeeds then \fBsmbd\fR attempts to find a UNIX user in the UNIX password database to map the Windows user into\&. If this lookup fails, andadd user script is set then \fBsmbd\fR will call the specified script \fBAS ROOT\fR, expanding any\fI%u\fR argument to be the user name to create\&.
538
 
 
539
 
If this script successfully creates the user then \fBsmbd\fR will continue on as though the UNIX user already existed\&. In this way, UNIX users are dynamically created to match existing Windows NT accounts\&.
540
 
 
541
 
See also security, password server,delete user script\&.
542
 
 
543
 
Default: \fB\fIadd user script\fR = \fR 
544
 
 
545
 
Example: \fB\fIadd user script\fR = /usr/local/samba/bin/add_user %u \fR 
546
 
 
547
 
.TP
 
689
This is the full pathname to a script that will be run
 
690
\fBAS ROOT\fR
 
691
by
 
692
\fBsmbd\fR(8)
 
693
under special circumstances described below.
 
694
.sp
 
695
Normally, a Samba server requires that UNIX users are created for all users accessing files on this server. For sites that use Windows NT account databases as their primary user database creating these users and keeping the user list in sync with the Windows NT PDC is an onerous task. This option allows smbd to create the required UNIX users
 
696
\fBON DEMAND\fR
 
697
when a user accesses the Samba server.
 
698
.sp
 
699
In order to use this option,
 
700
\fBsmbd\fR(8)
 
701
must
 
702
\fBNOT\fR
 
703
be set to
 
704
security = share and
 
705
add user script must be set to a full pathname for a script that will create a UNIX user given one argument of
 
706
\fI%u\fR, which expands into the UNIX user name to create.
 
707
.sp
 
708
When the Windows user attempts to access the Samba server, at login (session setup in the SMB protocol) time,
 
709
\fBsmbd\fR(8)
 
710
contacts the
 
711
password server and attempts to authenticate the given user with the given password. If the authentication succeeds then
 
712
\fBsmbd\fR
 
713
attempts to find a UNIX user in the UNIX password database to map the Windows user into. If this lookup fails, and
 
714
add user script is set then
 
715
\fBsmbd\fR
 
716
will call the specified script
 
717
\fBAS ROOT\fR, expanding any
 
718
\fI%u\fR
 
719
argument to be the user name to create.
 
720
.sp
 
721
If this script successfully creates the user then
 
722
\fBsmbd\fR
 
723
will continue on as though the UNIX user already existed. In this way, UNIX users are dynamically created to match existing Windows NT accounts.
 
724
.sp
 
725
See also
 
726
security,
 
727
password server,
 
728
delete user script.
 
729
.sp
 
730
Default:
 
731
\fB\fIadd user script\fR = \fR
 
732
.sp
 
733
Example:
 
734
\fB\fIadd user script\fR = /usr/local/samba/bin/add_user %u \fR
 
735
.TP 3n
548
736
add user to group script (G)
549
 
Full path to the script that will be called when a user is added to a group using the Windows NT domain administration tools\&. It will be run by \fBsmbd\fR(8) \fBAS ROOT\fR\&. Any \fI%g\fR will be replaced with the group name and any \fI%u\fR will be replaced with the user name\&.
550
 
 
551
 
Note that the \fBadduser\fR command used in the example below does not support the used syntax on all systems\&.
552
 
 
553
 
Default: \fB\fIadd user to group script\fR = \fR 
554
 
 
555
 
Example: \fB\fIadd user to group script\fR = /usr/sbin/adduser %u %g \fR 
556
 
 
557
 
.TP
 
737
Full path to the script that will be called when a user is added to a group using the Windows NT domain administration tools. It will be run by
 
738
\fBsmbd\fR(8)
 
739
\fBAS ROOT\fR. Any
 
740
\fI%g\fR
 
741
will be replaced with the group name and any
 
742
\fI%u\fR
 
743
will be replaced with the user name.
 
744
.sp
 
745
Note that the
 
746
\fBadduser\fR
 
747
command used in the example below does not support the used syntax on all systems.
 
748
.sp
 
749
Default:
 
750
\fB\fIadd user to group script\fR = \fR
 
751
.sp
 
752
Example:
 
753
\fB\fIadd user to group script\fR = /usr/sbin/adduser %u %g \fR
 
754
.TP 3n
558
755
admin users (S)
559
 
This is a list of users who will be granted administrative privileges on the share\&. This means that they will do all file operations as the super\-user (root)\&.
560
 
 
561
 
You should use this option very carefully, as any user in this list will be able to do anything they like on the share, irrespective of file permissions\&.
562
 
 
563
 
This parameter will not work with the security = share in Samba 3\&.0\&. This is by design\&.
564
 
 
565
 
Default: \fB\fIadmin users\fR = \fR 
566
 
 
567
 
Example: \fB\fIadmin users\fR = jason \fR 
568
 
 
569
 
.TP
 
756
This is a list of users who will be granted administrative privileges on the share. This means that they will do all file operations as the super-user (root).
 
757
.sp
 
758
You should use this option very carefully, as any user in this list will be able to do anything they like on the share, irrespective of file permissions.
 
759
.sp
 
760
This parameter will not work with the
 
761
security = share in Samba 3.0. This is by design.
 
762
.sp
 
763
Default:
 
764
\fB\fIadmin users\fR = \fR
 
765
.sp
 
766
Example:
 
767
\fB\fIadmin users\fR = jason \fR
 
768
.TP 3n
570
769
afs share (S)
571
 
This parameter controls whether special AFS features are enabled for this share\&. If enabled, it assumes that the directory exported via the \fIpath\fR parameter is a local AFS import\&. The special AFS features include the attempt to hand\-craft an AFS token if you enabled \-\-with\-fake\-kaserver in configure\&.
572
 
 
573
 
Default: \fB\fIafs share\fR = no \fR 
574
 
 
575
 
.TP
 
770
This parameter controls whether special AFS features are enabled for this share. If enabled, it assumes that the directory exported via the
 
771
\fIpath\fR
 
772
parameter is a local AFS import. The special AFS features include the attempt to hand-craft an AFS token if you enabled --with-fake-kaserver in configure.
 
773
.sp
 
774
Default:
 
775
\fB\fIafs share\fR = no \fR
 
776
.TP 3n
576
777
afs username map (G)
577
 
If you are using the fake kaserver AFS feature, you might want to hand\-craft the usernames you are creating tokens for\&. For example this is necessary if you have users from several domain in your AFS Protection Database\&. One possible scheme to code users as DOMAIN+User as it is done by winbind with the + as a separator\&.
578
 
 
579
 
The mapped user name must contain the cell name to log into, so without setting this parameter there will be no token\&.
580
 
 
581
 
Default: \fB\fIafs username map\fR = \fR 
582
 
 
583
 
Example: \fB\fIafs username map\fR = %u@afs\&.samba\&.org \fR 
584
 
 
585
 
.TP
 
778
If you are using the fake kaserver AFS feature, you might want to hand-craft the usernames you are creating tokens for. For example this is necessary if you have users from several domain in your AFS Protection Database. One possible scheme to code users as DOMAIN+User as it is done by winbind with the + as a separator.
 
779
.sp
 
780
The mapped user name must contain the cell name to log into, so without setting this parameter there will be no token.
 
781
.sp
 
782
Default:
 
783
\fB\fIafs username map\fR = \fR
 
784
.sp
 
785
Example:
 
786
\fB\fIafs username map\fR = %u@afs.samba.org \fR
 
787
.TP 3n
586
788
algorithmic rid base (G)
587
 
This determines how Samba will use its algorithmic mapping from uids/gid to the RIDs needed to construct NT Security Identifiers\&.
588
 
 
589
 
Setting this option to a larger value could be useful to sites transitioning from WinNT and Win2k, as existing user and group rids would otherwise clash with sytem users etc\&.
590
 
 
591
 
All UIDs and GIDs must be able to be resolved into SIDs for the correct operation of ACLs on the server\&. As such the algorithmic mapping can't be 'turned off', but pushing it 'out of the way' should resolve the issues\&. Users and groups can then be assigned 'low' RIDs in arbitary\-rid supporting backends\&.
592
 
 
593
 
Default: \fB\fIalgorithmic rid base\fR = 1000 \fR 
594
 
 
595
 
Example: \fB\fIalgorithmic rid base\fR = 100000 \fR 
596
 
 
597
 
.TP
 
789
This determines how Samba will use its algorithmic mapping from uids/gid to the RIDs needed to construct NT Security Identifiers.
 
790
.sp
 
791
Setting this option to a larger value could be useful to sites transitioning from WinNT and Win2k, as existing user and group rids would otherwise clash with sytem users etc.
 
792
.sp
 
793
All UIDs and GIDs must be able to be resolved into SIDs for the correct operation of ACLs on the server. As such the algorithmic mapping can't be 'turned off', but pushing it 'out of the way' should resolve the issues. Users and groups can then be assigned 'low' RIDs in arbitary-rid supporting backends.
 
794
.sp
 
795
Default:
 
796
\fB\fIalgorithmic rid base\fR = 1000 \fR
 
797
.sp
 
798
Example:
 
799
\fB\fIalgorithmic rid base\fR = 100000 \fR
 
800
.TP 3n
598
801
allocation roundup size (S)
599
 
This parameter allows an administrator to tune the allocation size reported to Windows clients\&. The default size of 1Mb generally results in improved Windows client performance\&. However, rounding the allocation size may cause difficulties for some applications, e\&.g\&. MS Visual Studio\&. If the MS Visual Studio compiler starts to crash with an internal error, set this parameter to zero for this share\&.
600
 
 
601
 
The integer parameter specifies the roundup size in bytes\&.
602
 
 
603
 
Default: \fB\fIallocation roundup size\fR = 1048576 \fR 
604
 
 
605
 
Example: \fB\fIallocation roundup size\fR = 0 # (to disable roundups) \fR 
606
 
 
607
 
.TP
 
802
This parameter allows an administrator to tune the allocation size reported to Windows clients. The default size of 1Mb generally results in improved Windows client performance. However, rounding the allocation size may cause difficulties for some applications, e.g. MS Visual Studio. If the MS Visual Studio compiler starts to crash with an internal error, set this parameter to zero for this share.
 
803
.sp
 
804
The integer parameter specifies the roundup size in bytes.
 
805
.sp
 
806
Default:
 
807
\fB\fIallocation roundup size\fR = 1048576 \fR
 
808
.sp
 
809
Example:
 
810
\fB\fIallocation roundup size\fR = 0 # (to disable roundups) \fR
 
811
.TP 3n
608
812
allow trusted domains (G)
609
 
This option only takes effect when the security option is set to \fBserver\fR,\fBdomain\fR or \fBads\fR\&. If it is set to no, then attempts to connect to a resource from a domain or workgroup other than the one which smbd is running in will fail, even if that domain is trusted by the remote server doing the authentication\&.
610
 
 
611
 
This is useful if you only want your Samba server to serve resources to users in the domain it is a member of\&. As an example, suppose that there are two domains DOMA and DOMB\&. DOMB is trusted by DOMA, which contains the Samba server\&. Under normal circumstances, a user with an account in DOMB can then access the resources of a UNIX account with the same account name on the Samba server even if they do not have an account in DOMA\&. This can make implementing a security boundary difficult\&.
612
 
 
613
 
Default: \fB\fIallow trusted domains\fR = yes \fR 
614
 
 
615
 
.TP
 
813
This option only takes effect when the
 
814
security option is set to
 
815
\fBserver\fR,\fBdomain\fR
 
816
or
 
817
\fBads\fR. If it is set to no, then attempts to connect to a resource from a domain or workgroup other than the one which smbd is running in will fail, even if that domain is trusted by the remote server doing the authentication.
 
818
.sp
 
819
This is useful if you only want your Samba server to serve resources to users in the domain it is a member of. As an example, suppose that there are two domains DOMA and DOMB. DOMB is trusted by DOMA, which contains the Samba server. Under normal circumstances, a user with an account in DOMB can then access the resources of a UNIX account with the same account name on the Samba server even if they do not have an account in DOMA. This can make implementing a security boundary difficult.
 
820
.sp
 
821
Default:
 
822
\fB\fIallow trusted domains\fR = yes \fR
 
823
.TP 3n
616
824
announce as (G)
617
 
This specifies what type of server \fBnmbd\fR(8) will announce itself as, to a network neighborhood browse list\&. By default this is set to Windows NT\&. The valid options are : "NT Server" (which can also be written as "NT"), "NT Workstation", "Win95" or "WfW" meaning Windows NT Server, Windows NT Workstation, Windows 95 and Windows for Workgroups respectively\&. Do not change this parameter unless you have a specific need to stop Samba appearing as an NT server as this may prevent Samba servers from participating as browser servers correctly\&.
618
 
 
619
 
Default: \fB\fIannounce as\fR = NT Server \fR 
620
 
 
621
 
Example: \fB\fIannounce as\fR = Win95 \fR 
622
 
 
623
 
.TP
 
825
This specifies what type of server
 
826
\fBnmbd\fR(8)
 
827
will announce itself as, to a network neighborhood browse list. By default this is set to Windows NT. The valid options are : "NT Server" (which can also be written as "NT"), "NT Workstation", "Win95" or "WfW" meaning Windows NT Server, Windows NT Workstation, Windows 95 and Windows for Workgroups respectively. Do not change this parameter unless you have a specific need to stop Samba appearing as an NT server as this may prevent Samba servers from participating as browser servers correctly.
 
828
.sp
 
829
Default:
 
830
\fB\fIannounce as\fR = NT Server \fR
 
831
.sp
 
832
Example:
 
833
\fB\fIannounce as\fR = Win95 \fR
 
834
.TP 3n
624
835
announce version (G)
625
 
This specifies the major and minor version numbers that nmbd will use when announcing itself as a server\&. The default is 4\&.9\&. Do not change this parameter unless you have a specific need to set a Samba server to be a downlevel server\&.
626
 
 
627
 
Default: \fB\fIannounce version\fR = 4\&.9 \fR 
628
 
 
629
 
Example: \fB\fIannounce version\fR = 2\&.0 \fR 
630
 
 
631
 
.TP
 
836
This specifies the major and minor version numbers that nmbd will use when announcing itself as a server. The default is 4.9. Do not change this parameter unless you have a specific need to set a Samba server to be a downlevel server.
 
837
.sp
 
838
Default:
 
839
\fB\fIannounce version\fR = 4.9 \fR
 
840
.sp
 
841
Example:
 
842
\fB\fIannounce version\fR = 2.0 \fR
 
843
.TP 3n
632
844
auth methods (G)
633
 
This option allows the administrator to chose what authentication methods \fBsmbd\fR will use when authenticating a user\&. This option defaults to sensible values based on security\&. This should be considered a developer option and used only in rare circumstances\&. In the majority (if not all) of production servers, the default setting should be adequate\&.
634
 
 
635
 
Each entry in the list attempts to authenticate the user in turn, until the user authenticates\&. In practice only one method will ever actually be able to complete the authentication\&.
636
 
 
637
 
Possible options include \fBguest\fR (anonymous access), \fBsam\fR (lookups in local list of accounts based on netbios name or domain name), \fBwinbind\fR (relay authentication requests for remote users through winbindd), \fBntdomain\fR (pre\-winbindd method of authentication for remote domain users; deprecated in favour of winbind method), \fBtrustdomain\fR (authenticate trusted users by contacting the remote DC directly from smbd; deprecated in favour of winbind method)\&.
638
 
 
639
 
Default: \fB\fIauth methods\fR = \fR 
640
 
 
641
 
Example: \fB\fIauth methods\fR = guest sam winbind \fR 
642
 
 
643
 
.TP
 
845
This option allows the administrator to chose what authentication methods
 
846
\fBsmbd\fR
 
847
will use when authenticating a user. This option defaults to sensible values based on
 
848
security. This should be considered a developer option and used only in rare circumstances. In the majority (if not all) of production servers, the default setting should be adequate.
 
849
.sp
 
850
Each entry in the list attempts to authenticate the user in turn, until the user authenticates. In practice only one method will ever actually be able to complete the authentication.
 
851
.sp
 
852
Possible options include
 
853
\fBguest\fR
 
854
(anonymous access),
 
855
\fBsam\fR
 
856
(lookups in local list of accounts based on netbios name or domain name),
 
857
\fBwinbind\fR
 
858
(relay authentication requests for remote users through winbindd),
 
859
\fBntdomain\fR
 
860
(pre-winbindd method of authentication for remote domain users; deprecated in favour of winbind method),
 
861
\fBtrustdomain\fR
 
862
(authenticate trusted users by contacting the remote DC directly from smbd; deprecated in favour of winbind method).
 
863
.sp
 
864
Default:
 
865
\fB\fIauth methods\fR = \fR
 
866
.sp
 
867
Example:
 
868
\fB\fIauth methods\fR = guest sam winbind \fR
 
869
.TP 3n
644
870
available (S)
645
 
This parameter lets you "turn off" a service\&. If\fIavailable = no\fR, then \fBALL\fR attempts to connect to the service will fail\&. Such failures are logged\&.
646
 
 
647
 
Default: \fB\fIavailable\fR = yes \fR 
648
 
 
649
 
.TP
 
871
This parameter lets you "turn off" a service. If
 
872
\fIavailable = no\fR, then
 
873
\fBALL\fR
 
874
attempts to connect to the service will fail. Such failures are logged.
 
875
.sp
 
876
Default:
 
877
\fB\fIavailable\fR = yes \fR
 
878
.TP 3n
650
879
bind interfaces only (G)
651
 
This global parameter allows the Samba admin to limit what interfaces on a machine will serve SMB requests\&. It affects file service \fBsmbd\fR(8) and name service \fBnmbd\fR(8) in a slightly different ways\&.
652
 
 
653
 
For name service it causes \fBnmbd\fR to bind to ports 137 and 138 on the interfaces listed in the interfaces parameter\&. \fBnmbd\fR also binds to the "all addresses" interface (0\&.0\&.0\&.0) on ports 137 and 138 for the purposes of reading broadcast messages\&. If this option is not set then \fBnmbd\fR will service name requests on all of these sockets\&. If bind interfaces only is set then\fBnmbd\fR will check the source address of any packets coming in on the broadcast sockets and discard any that don't match the broadcast addresses of the interfaces in theinterfaces parameter list\&. As unicast packets are received on the other sockets it allows \fBnmbd\fR to refuse to serve names to machines that send packets that arrive through any interfaces not listed in the interfaces list\&. IP Source address spoofing does defeat this simple check, however, so it must not be used seriously as a security feature for\fBnmbd\fR\&.
654
 
 
655
 
For file service it causes \fBsmbd\fR(8) to bind only to the interface list given in the interfaces parameter\&. This restricts the networks that \fBsmbd\fR will serve to packets coming in those interfaces\&. Note that you should not use this parameter for machines that are serving PPP or other intermittent or non\-broadcast network interfaces as it will not cope with non\-permanent interfaces\&.
656
 
 
657
 
If bind interfaces only is set then unless the network address\fB127\&.0\&.0\&.1\fR is added to the interfaces parameter list\fBsmbpasswd\fR(8) and\fBswat\fR(8) may not work as expected due to the reasons covered below\&.
658
 
 
659
 
To change a users SMB password, the \fBsmbpasswd\fR by default connects to the\fBlocalhost \- 127\&.0\&.0\&.1\fR address as an SMB client to issue the password change request\&. Ifbind interfaces only is set then unless the network address\fB127\&.0\&.0\&.1\fR is added to the interfaces parameter list then \fB smbpasswd\fR will fail to connect in it's default mode\&. \fBsmbpasswd\fR can be forced to use the primary IP interface of the local host by using its \fBsmbpasswd\fR(8)\fI\-r \fIremote machine\fR\fR parameter, with \fIremote machine\fR set to the IP name of the primary interface of the local host\&.
660
 
 
661
 
The \fBswat\fR status page tries to connect with \fBsmbd\fR and \fBnmbd\fR at the address\fB127\&.0\&.0\&.1\fR to determine if they are running\&. Not adding \fB127\&.0\&.0\&.1\fR will cause \fB smbd\fR and \fBnmbd\fR to always show "not running" even if they really are\&. This can prevent \fB swat\fR from starting/stopping/restarting \fBsmbd\fR and \fBnmbd\fR\&.
662
 
 
663
 
Default: \fB\fIbind interfaces only\fR = no \fR 
664
 
 
665
 
.TP
 
880
This global parameter allows the Samba admin to limit what interfaces on a machine will serve SMB requests. It affects file service
 
881
\fBsmbd\fR(8)
 
882
and name service
 
883
\fBnmbd\fR(8)
 
884
in a slightly different ways.
 
885
.sp
 
886
For name service it causes
 
887
\fBnmbd\fR
 
888
to bind to ports 137 and 138 on the interfaces listed in the
 
889
interfaces parameter.
 
890
\fBnmbd\fR
 
891
also binds to the "all addresses" interface (0.0.0.0) on ports 137 and 138 for the purposes of reading broadcast messages. If this option is not set then
 
892
\fBnmbd\fR
 
893
will service name requests on all of these sockets. If
 
894
bind interfaces only is set then
 
895
\fBnmbd\fR
 
896
will check the source address of any packets coming in on the broadcast sockets and discard any that don't match the broadcast addresses of the interfaces in the
 
897
interfaces parameter list. As unicast packets are received on the other sockets it allows
 
898
\fBnmbd\fR
 
899
to refuse to serve names to machines that send packets that arrive through any interfaces not listed in the
 
900
interfaces list. IP Source address spoofing does defeat this simple check, however, so it must not be used seriously as a security feature for
 
901
\fBnmbd\fR.
 
902
.sp
 
903
For file service it causes
 
904
\fBsmbd\fR(8)
 
905
to bind only to the interface list given in the
 
906
interfaces parameter. This restricts the networks that
 
907
\fBsmbd\fR
 
908
will serve to packets coming in those interfaces. Note that you should not use this parameter for machines that are serving PPP or other intermittent or non-broadcast network interfaces as it will not cope with non-permanent interfaces.
 
909
.sp
 
910
If
 
911
bind interfaces only is set then unless the network address
 
912
\fB127.0.0.1\fR
 
913
is added to the
 
914
interfaces parameter list
 
915
\fBsmbpasswd\fR(8)
 
916
and
 
917
\fBswat\fR(8)
 
918
may not work as expected due to the reasons covered below.
 
919
.sp
 
920
To change a users SMB password, the
 
921
\fBsmbpasswd\fR
 
922
by default connects to the
 
923
\fBlocalhost - 127.0.0.1\fR
 
924
address as an SMB client to issue the password change request. If
 
925
bind interfaces only is set then unless the network address
 
926
\fB127.0.0.1\fR
 
927
is added to the
 
928
interfaces parameter list then
 
929
\fB smbpasswd\fR
 
930
will fail to connect in it's default mode.
 
931
\fBsmbpasswd\fR
 
932
can be forced to use the primary IP interface of the local host by using its
 
933
\fBsmbpasswd\fR(8)
 
934
\fI-r \fR\fI\fIremote machine\fR\fR
 
935
parameter, with
 
936
\fIremote machine\fR
 
937
set to the IP name of the primary interface of the local host.
 
938
.sp
 
939
The
 
940
\fBswat\fR
 
941
status page tries to connect with
 
942
\fBsmbd\fR
 
943
and
 
944
\fBnmbd\fR
 
945
at the address
 
946
\fB127.0.0.1\fR
 
947
to determine if they are running. Not adding
 
948
\fB127.0.0.1\fR
 
949
will cause
 
950
\fB smbd\fR
 
951
and
 
952
\fBnmbd\fR
 
953
to always show "not running" even if they really are. This can prevent
 
954
\fB swat\fR
 
955
from starting/stopping/restarting
 
956
\fBsmbd\fR
 
957
and
 
958
\fBnmbd\fR.
 
959
.sp
 
960
Default:
 
961
\fB\fIbind interfaces only\fR = no \fR
 
962
.TP 3n
666
963
blocking locks (S)
667
 
This parameter controls the behavior of \fBsmbd\fR(8) when given a request by a client to obtain a byte range lock on a region of an open file, and the request has a time limit associated with it\&.
668
 
 
669
 
If this parameter is set and the lock range requested cannot be immediately satisfied, samba will internally queue the lock request, and periodically attempt to obtain the lock until the timeout period expires\&.
670
 
 
671
 
If this parameter is set to \fBno\fR, then samba will behave as previous versions of Samba would and will fail the lock request immediately if the lock range cannot be obtained\&.
672
 
 
673
 
Default: \fB\fIblocking locks\fR = yes \fR 
674
 
 
675
 
.TP
 
964
This parameter controls the behavior of
 
965
\fBsmbd\fR(8)
 
966
when given a request by a client to obtain a byte range lock on a region of an open file, and the request has a time limit associated with it.
 
967
.sp
 
968
If this parameter is set and the lock range requested cannot be immediately satisfied, samba will internally queue the lock request, and periodically attempt to obtain the lock until the timeout period expires.
 
969
.sp
 
970
If this parameter is set to
 
971
\fBno\fR, then samba will behave as previous versions of Samba would and will fail the lock request immediately if the lock range cannot be obtained.
 
972
.sp
 
973
Default:
 
974
\fB\fIblocking locks\fR = yes \fR
 
975
.TP 3n
676
976
block size (S)
677
 
This parameter controls the behavior of \fBsmbd\fR(8) when reporting disk free sizes\&. By default, this reports a disk block size of 1024 bytes\&.
678
 
 
679
 
Changing this parameter may have some effect on the efficiency of client writes, this is not yet confirmed\&. This parameter was added to allow advanced administrators to change it (usually to a higher value) and test the effect it has on client write performance without re\-compiling the code\&. As this is an experimental option it may be removed in a future release\&.
680
 
 
681
 
Changing this option does not change the disk free reporting size, just the block size unit reported to the client\&.
682
 
 
683
 
\fBNo default\fR
684
 
 
685
 
.TP
 
977
This parameter controls the behavior of
 
978
\fBsmbd\fR(8)
 
979
when reporting disk free sizes. By default, this reports a disk block size of 1024 bytes.
 
980
.sp
 
981
Changing this parameter may have some effect on the efficiency of client writes, this is not yet confirmed. This parameter was added to allow advanced administrators to change it (usually to a higher value) and test the effect it has on client write performance without re-compiling the code. As this is an experimental option it may be removed in a future release.
 
982
.sp
 
983
Changing this option does not change the disk free reporting size, just the block size unit reported to the client.
 
984
.sp
 
985
Default:
 
986
\fB\fIblock size\fR = 1024 \fR
 
987
.sp
 
988
Example:
 
989
\fB\fIblock size\fR = 4096 \fR
 
990
.TP 3n
686
991
browsable
687
 
This parameter is a synonym for browseable\&.
688
 
 
689
 
.TP
 
992
This parameter is a synonym for browseable.
 
993
.TP 3n
690
994
browseable (S)
691
 
This controls whether this share is seen in the list of available shares in a net view and in the browse list\&.
692
 
 
693
 
Default: \fB\fIbrowseable\fR = yes \fR 
694
 
 
695
 
.TP
 
995
This controls whether this share is seen in the list of available shares in a net view and in the browse list.
 
996
.sp
 
997
Default:
 
998
\fB\fIbrowseable\fR = yes \fR
 
999
.TP 3n
696
1000
browse list (G)
697
 
This controls whether \fBsmbd\fR(8) will serve a browse list to a client doing a \fBNetServerEnum\fR call\&. Normally set to \fByes\fR\&. You should never need to change this\&.
698
 
 
699
 
Default: \fB\fIbrowse list\fR = yes \fR 
700
 
 
701
 
.TP
 
1001
This controls whether
 
1002
\fBsmbd\fR(8)
 
1003
will serve a browse list to a client doing a
 
1004
\fBNetServerEnum\fR
 
1005
call. Normally set to
 
1006
\fByes\fR. You should never need to change this.
 
1007
.sp
 
1008
Default:
 
1009
\fB\fIbrowse list\fR = yes \fR
 
1010
.TP 3n
702
1011
casesignames
703
 
This parameter is a synonym for case sensitive\&.
704
 
 
705
 
.TP
 
1012
This parameter is a synonym for case sensitive.
 
1013
.TP 3n
706
1014
case sensitive (S)
707
 
See the discussion in the section name mangling\&.
708
 
 
709
 
Default: \fB\fIcase sensitive\fR = no \fR 
710
 
 
711
 
.TP
712
 
change notify timeout (G)
713
 
This SMB allows a client to tell a server to "watch" a particular directory for any changes and only reply to the SMB request when a change has occurred\&. Such constant scanning of a directory is expensive under UNIX, hence an \fBsmbd\fR(8) daemon only performs such a scan on each requested directory once every \fIchange notify timeout\fR seconds\&.
714
 
 
715
 
Default: \fB\fIchange notify timeout\fR = 60 \fR 
716
 
 
717
 
Example: \fB\fIchange notify timeout\fR = 300 # Would change the scan time to every 5 minutes\&. \fR 
718
 
 
719
 
.TP
 
1015
See the discussion in the section
 
1016
name mangling.
 
1017
.sp
 
1018
Default:
 
1019
\fB\fIcase sensitive\fR = no \fR
 
1020
.TP 3n
 
1021
change notify timeout (S)
 
1022
This SMB allows a client to tell a server to "watch" a particular directory for any changes and only reply to the SMB request when a change has occurred. Such constant scanning of a directory is expensive under UNIX, hence an
 
1023
\fBsmbd\fR(8)
 
1024
daemon only performs such a scan on each requested directory once every
 
1025
\fIchange notify timeout\fR
 
1026
seconds. Note that in 3.0.23 this has been changed to a per-share parameter and setting this to zero prevents any change notify directory scans completely on a share. This is to allow this paramter to be set to zero on shares configured for very large directories, where a Windows client will re-scan the entire directory after every delete operation (when deleting many files) due to the change notify triggering. This is an extremely expensive operation on some systems.
 
1027
.sp
 
1028
Default:
 
1029
\fB\fIchange notify timeout\fR = 60 \fR
 
1030
.sp
 
1031
Example:
 
1032
\fB\fIchange notify timeout\fR = 300 # Would change the scan time to every 5 minutes. \fR
 
1033
.TP 3n
720
1034
change share command (G)
721
 
Samba 2\&.2\&.0 introduced the ability to dynamically add and delete shares via the Windows NT 4\&.0 Server Manager\&. The\fIchange share command\fR is used to define an external program or script which will modify an existing service definition in \fIsmb\&.conf\fR\&. In order to successfully execute the \fIchange share command\fR, \fBsmbd\fR requires that the administrator be connected using a root account (i\&.e\&. uid == 0)\&.
722
 
 
723
 
When executed, \fBsmbd\fR will automatically invoke the\fIchange share command\fR with four parameters\&.
724
 
 
725
 
 
726
 
.RS
727
 
.TP 3
728
 
\(bu
729
 
\fIconfigFile\fR \- the location of the global \fIsmb\&.conf\fR file\&.
730
 
.TP
731
 
\(bu
732
 
\fIshareName\fR \- the name of the new share\&.
733
 
.TP
734
 
\(bu
735
 
\fIpathName\fR \- path to an **existing** directory on disk\&.
736
 
.TP
737
 
\(bu
738
 
\fIcomment\fR \- comment string to associate with the new share\&.
739
 
.LP
 
1035
Samba 2.2.0 introduced the ability to dynamically add and delete shares via the Windows NT 4.0 Server Manager. The
 
1036
\fIchange share command\fR
 
1037
is used to define an external program or script which will modify an existing service definition in
 
1038
\fIsmb.conf\fR. In order to successfully execute the
 
1039
\fIchange share command\fR,
 
1040
\fBsmbd\fR
 
1041
requires that the administrator be connected using a root account (i.e. uid == 0).
 
1042
.sp
 
1043
When executed,
 
1044
\fBsmbd\fR
 
1045
will automatically invoke the
 
1046
\fIchange share command\fR
 
1047
with five parameters.
 
1048
.RS 3n
 
1049
.TP 3n
 
1050
&#8226;
 
1051
\fIconfigFile\fR
 
1052
- the location of the global
 
1053
\fIsmb.conf\fR
 
1054
file.
 
1055
.TP 3n
 
1056
&#8226;
 
1057
\fIshareName\fR
 
1058
- the name of the new share.
 
1059
.TP 3n
 
1060
&#8226;
 
1061
\fIpathName\fR
 
1062
- path to an **existing** directory on disk.
 
1063
.TP 3n
 
1064
&#8226;
 
1065
\fIcomment\fR
 
1066
- comment string to associate with the new share.
 
1067
.TP 3n
 
1068
&#8226;
 
1069
\fImax connections\fR
 
1070
Number of maximum simultaneous connections to this share.
740
1071
.RE
741
 
.IP
742
 
This parameter is only used modify existing file shares definitions\&. To modify printer shares, use the "Printers\&.\&.\&." folder as seen when browsing the Samba host\&.
743
 
 
744
 
Default: \fB\fIchange share command\fR = \fR 
745
 
 
746
 
Example: \fB\fIchange share command\fR = /usr/local/bin/addshare \fR 
747
 
 
748
 
.TP
 
1072
.IP "" 3n
 
1073
This parameter is only used modify existing file shares definitions. To modify printer shares, use the "Printers..." folder as seen when browsing the Samba host.
 
1074
.sp
 
1075
Default:
 
1076
\fB\fIchange share command\fR = \fR
 
1077
.sp
 
1078
Example:
 
1079
\fB\fIchange share command\fR = /usr/local/bin/addshare \fR
 
1080
.TP 3n
749
1081
check password script (G)
750
 
The name of a program that can be used to check password complexity\&. The password is sent to the program's standrad input\&.
751
 
 
752
 
The program must return 0 on good password any other value otherwise\&. In case the password is considered weak (the program do not return 0) the user will be notified and the password change will fail\&.
753
 
 
 
1082
The name of a program that can be used to check password complexity. The password is sent to the program's standrad input.
 
1083
.sp
 
1084
The program must return 0 on good password any other value otherwise. In case the password is considered weak (the program do not return 0) the user will be notified and the password change will fail.
 
1085
.sp
754
1086
Note: In the example directory there is a sample program called crackcheck that uses cracklib to checkpassword quality
755
 
 
756
 
\&.
757
 
 
758
 
 
759
 
Default: \fB\fIcheck password script\fR = Disabled \fR 
760
 
 
761
 
Example: \fB\fIcheck password script\fR = check password script = /usr/local/sbin/crackcheck \fR 
762
 
 
763
 
.TP
 
1087
.sp
 
1088
.
 
1089
 
 
1090
 
 
1091
Default:
 
1092
\fB\fIcheck password script\fR = Disabled \fR
 
1093
.sp
 
1094
Example:
 
1095
\fB\fIcheck password script\fR = check password script = /usr/local/sbin/crackcheck \fR
 
1096
.TP 3n
764
1097
client lanman auth (G)
765
 
This parameter determines whether or not \fBsmbclient\fR(8) and other samba client tools will attempt to authenticate itself to servers using the weaker LANMAN password hash\&. If disabled, only server which support NT password hashes (e\&.g\&. Windows NT/2000, Samba, etc\&.\&.\&. but not Windows 95/98) will be able to be connected from the Samba client\&.
766
 
 
767
 
The LANMAN encrypted response is easily broken, due to it's case\-insensitive nature, and the choice of algorithm\&. Clients without Windows 95/98 servers are advised to disable this option\&.
768
 
 
769
 
Disabling this option will also disable the \fBclient plaintext auth\fR option
770
 
 
771
 
Likewise, if the \fBclient ntlmv2 auth\fR parameter is enabled, then only NTLMv2 logins will be attempted\&.
772
 
 
773
 
Default: \fB\fIclient lanman auth\fR = yes \fR 
774
 
 
775
 
.TP
 
1098
This parameter determines whether or not
 
1099
\fBsmbclient\fR(8)
 
1100
and other samba client tools will attempt to authenticate itself to servers using the weaker LANMAN password hash. If disabled, only server which support NT password hashes (e.g. Windows NT/2000, Samba, etc... but not Windows 95/98) will be able to be connected from the Samba client.
 
1101
.sp
 
1102
The LANMAN encrypted response is easily broken, due to it's case-insensitive nature, and the choice of algorithm. Clients without Windows 95/98 servers are advised to disable this option.
 
1103
.sp
 
1104
Disabling this option will also disable the
 
1105
\fBclient plaintext auth\fR
 
1106
option
 
1107
.sp
 
1108
Likewise, if the
 
1109
\fBclient ntlmv2 auth\fR
 
1110
parameter is enabled, then only NTLMv2 logins will be attempted.
 
1111
.sp
 
1112
Default:
 
1113
\fB\fIclient lanman auth\fR = yes \fR
 
1114
.TP 3n
776
1115
client ntlmv2 auth (G)
777
 
This parameter determines whether or not \fBsmbclient\fR(8) will attempt to authenticate itself to servers using the NTLMv2 encrypted password response\&.
778
 
 
779
 
If enabled, only an NTLMv2 and LMv2 response (both much more secure than earlier versions) will be sent\&. Many servers (including NT4 < SP4, Win9x and Samba 2\&.2) are not compatible with NTLMv2\&.
780
 
 
781
 
Similarly, if enabled, NTLMv1, \fBclient lanman auth\fR and \fBclient plaintext auth\fR authentication will be disabled\&. This also disables share\-level authentication\&.
782
 
 
783
 
If disabled, an NTLM response (and possibly a LANMAN response) will be sent by the client, depending on the value of \fBclient lanman auth\fR\&.
784
 
 
785
 
Note that some sites (particularly those following 'best practice' security polices) only allow NTLMv2 responses, and not the weaker LM or NTLM\&.
786
 
 
787
 
Default: \fB\fIclient ntlmv2 auth\fR = no \fR 
788
 
 
789
 
.TP
 
1116
This parameter determines whether or not
 
1117
\fBsmbclient\fR(8)
 
1118
will attempt to authenticate itself to servers using the NTLMv2 encrypted password response.
 
1119
.sp
 
1120
If enabled, only an NTLMv2 and LMv2 response (both much more secure than earlier versions) will be sent. Many servers (including NT4 < SP4, Win9x and Samba 2.2) are not compatible with NTLMv2.
 
1121
.sp
 
1122
Similarly, if enabled, NTLMv1,
 
1123
\fBclient lanman auth\fR
 
1124
and
 
1125
\fBclient plaintext auth\fR
 
1126
authentication will be disabled. This also disables share-level authentication.
 
1127
.sp
 
1128
If disabled, an NTLM response (and possibly a LANMAN response) will be sent by the client, depending on the value of
 
1129
\fBclient lanman auth\fR.
 
1130
.sp
 
1131
Note that some sites (particularly those following 'best practice' security polices) only allow NTLMv2 responses, and not the weaker LM or NTLM.
 
1132
.sp
 
1133
Default:
 
1134
\fB\fIclient ntlmv2 auth\fR = no \fR
 
1135
.TP 3n
790
1136
client plaintext auth (G)
791
 
Specifies whether a client should send a plaintext password if the server does not support encrypted passwords\&.
792
 
 
793
 
Default: \fB\fIclient plaintext auth\fR = yes \fR 
794
 
 
795
 
.TP
 
1137
Specifies whether a client should send a plaintext password if the server does not support encrypted passwords.
 
1138
.sp
 
1139
Default:
 
1140
\fB\fIclient plaintext auth\fR = yes \fR
 
1141
.TP 3n
796
1142
client schannel (G)
797
 
This controls whether the client offers or even demands the use of the netlogon schannel\&. client schannel = no does not offer the schannel, client schannel = auto offers the schannel but does not enforce it, and client schannel = yes denies access if the server is not able to speak netlogon schannel\&.
798
 
 
799
 
Default: \fB\fIclient schannel\fR = auto \fR 
800
 
 
801
 
Example: \fB\fIclient schannel\fR = yes \fR 
802
 
 
803
 
.TP
 
1143
This controls whether the client offers or even demands the use of the netlogon schannel.
 
1144
client schannel = no does not offer the schannel,
 
1145
client schannel = auto offers the schannel but does not enforce it, and
 
1146
client schannel = yes denies access if the server is not able to speak netlogon schannel.
 
1147
.sp
 
1148
Default:
 
1149
\fB\fIclient schannel\fR = auto \fR
 
1150
.sp
 
1151
Example:
 
1152
\fB\fIclient schannel\fR = yes \fR
 
1153
.TP 3n
804
1154
client signing (G)
805
 
This controls whether the client offers or requires the server it talks to to use SMB signing\&. Possible values are \fBauto\fR, \fBmandatory\fR and \fBdisabled\fR\&.
806
 
 
807
 
When set to auto, SMB signing is offered, but not enforced\&. When set to mandatory, SMB signing is required and if set to disabled, SMB signing is not offered either\&.
808
 
 
809
 
Default: \fB\fIclient signing\fR = auto \fR 
810
 
 
811
 
.TP
 
1155
This controls whether the client offers or requires the server it talks to to use SMB signing. Possible values are
 
1156
\fBauto\fR,
 
1157
\fBmandatory\fR
 
1158
and
 
1159
\fBdisabled\fR.
 
1160
.sp
 
1161
When set to auto, SMB signing is offered, but not enforced. When set to mandatory, SMB signing is required and if set to disabled, SMB signing is not offered either.
 
1162
.sp
 
1163
Default:
 
1164
\fB\fIclient signing\fR = auto \fR
 
1165
.TP 3n
812
1166
client use spnego (G)
813
 
This variable controls whether Samba clients will try to use Simple and Protected NEGOciation (as specified by rfc2478) with supporting servers (including WindowsXP, Windows2000 and Samba 3\&.0) to agree upon an authentication mechanism\&. This enables Kerberos authentication in particular\&.
814
 
 
815
 
Default: \fB\fIclient use spnego\fR = yes \fR 
816
 
 
817
 
.TP
 
1167
This variable controls whether Samba clients will try to use Simple and Protected NEGOciation (as specified by rfc2478) with supporting servers (including WindowsXP, Windows2000 and Samba 3.0) to agree upon an authentication mechanism. This enables Kerberos authentication in particular.
 
1168
.sp
 
1169
Default:
 
1170
\fB\fIclient use spnego\fR = yes \fR
 
1171
.TP 3n
818
1172
comment (S)
819
 
This is a text field that is seen next to a share when a client does a queries the server, either via the network neighborhood or via \fBnet view\fR to list what shares are available\&.
820
 
 
821
 
If you want to set the string that is displayed next to the machine name then see the server string parameter\&.
822
 
 
823
 
Default: \fB\fIcomment\fR = # No comment \fR 
824
 
 
825
 
Example: \fB\fIcomment\fR = Fred's Files \fR 
826
 
 
827
 
.TP
 
1173
This is a text field that is seen next to a share when a client does a queries the server, either via the network neighborhood or via
 
1174
\fBnet view\fR
 
1175
to list what shares are available.
 
1176
.sp
 
1177
If you want to set the string that is displayed next to the machine name then see the
 
1178
server string parameter.
 
1179
.sp
 
1180
Default:
 
1181
\fB\fIcomment\fR = # No comment \fR
 
1182
.sp
 
1183
Example:
 
1184
\fB\fIcomment\fR = Fred's Files \fR
 
1185
.TP 3n
828
1186
config file (G)
829
 
This allows you to override the config file to use, instead of the default (usually \fIsmb\&.conf\fR)\&. There is a chicken and egg problem here as this option is set in the config file!
830
 
 
831
 
For this reason, if the name of the config file has changed when the parameters are loaded then it will reload them from the new config file\&.
832
 
 
833
 
This option takes the usual substitutions, which can be very useful\&.
834
 
 
835
 
If the config file doesn't exist then it won't be loaded (allowing you to special case the config files of just a few clients)\&.
836
 
 
 
1187
This allows you to override the config file to use, instead of the default (usually
 
1188
\fIsmb.conf\fR). There is a chicken and egg problem here as this option is set in the config file!
 
1189
.sp
 
1190
For this reason, if the name of the config file has changed when the parameters are loaded then it will reload them from the new config file.
 
1191
.sp
 
1192
This option takes the usual substitutions, which can be very useful.
 
1193
.sp
 
1194
If the config file doesn't exist then it won't be loaded (allowing you to special case the config files of just a few clients).
 
1195
.sp
837
1196
\fBNo default\fR
838
 
 
839
 
Example: \fB\fIconfig file\fR = /usr/local/samba/lib/smb\&.conf\&.%m \fR 
840
 
 
841
 
.TP
 
1197
.sp
 
1198
Example:
 
1199
\fB\fIconfig file\fR = /usr/local/samba/lib/smb.conf.%m \fR
 
1200
.TP 3n
842
1201
copy (S)
843
 
This parameter allows you to "clone" service entries\&. The specified service is simply duplicated under the current service's name\&. Any parameters specified in the current section will override those in the section being copied\&.
844
 
 
845
 
This feature lets you set up a 'template' service and create similar services easily\&. Note that the service being copied must occur earlier in the configuration file than the service doing the copying\&.
846
 
 
847
 
Default: \fB\fIcopy\fR = \fR 
848
 
 
849
 
Example: \fB\fIcopy\fR = otherservice \fR 
850
 
 
851
 
.TP
 
1202
This parameter allows you to "clone" service entries. The specified service is simply duplicated under the current service's name. Any parameters specified in the current section will override those in the section being copied.
 
1203
.sp
 
1204
This feature lets you set up a 'template' service and create similar services easily. Note that the service being copied must occur earlier in the configuration file than the service doing the copying.
 
1205
.sp
 
1206
Default:
 
1207
\fB\fIcopy\fR = \fR
 
1208
.sp
 
1209
Example:
 
1210
\fB\fIcopy\fR = otherservice \fR
 
1211
.TP 3n
852
1212
create mode
853
 
This parameter is a synonym for create mask\&.
854
 
 
855
 
.TP
 
1213
This parameter is a synonym for create mask.
 
1214
.TP 3n
856
1215
create mask (S)
857
 
When a file is created, the necessary permissions are calculated according to the mapping from DOS modes to UNIX permissions, and the resulting UNIX mode is then bit\-wise 'AND'ed with this parameter\&. This parameter may be thought of as a bit\-wise MASK for the UNIX modes of a file\&. Any bit \fBnot\fR set here will be removed from the modes set on a file when it is created\&.
858
 
 
859
 
The default value of this parameter removes the group and other write and execute bits from the UNIX modes\&.
860
 
 
861
 
Following this Samba will bit\-wise 'OR' the UNIX mode created from this parameter with the value of theforce create mode parameter which is set to 000 by default\&.
862
 
 
863
 
This parameter does not affect directory masks\&. See the parameter directory mask for details\&.
864
 
 
865
 
Note that this parameter does not apply to permissions set by Windows NT/2000 ACL editors\&. If the administrator wishes to enforce a mask on access control lists also, they need to set the security mask\&.
866
 
 
867
 
Default: \fB\fIcreate mask\fR = 0744 \fR 
868
 
 
869
 
Example: \fB\fIcreate mask\fR = 0775 \fR 
870
 
 
871
 
.TP
 
1216
When a file is created, the necessary permissions are calculated according to the mapping from DOS modes to UNIX permissions, and the resulting UNIX mode is then bit-wise 'AND'ed with this parameter. This parameter may be thought of as a bit-wise MASK for the UNIX modes of a file. Any bit
 
1217
\fBnot\fR
 
1218
set here will be removed from the modes set on a file when it is created.
 
1219
.sp
 
1220
The default value of this parameter removes the
 
1221
group
 
1222
and
 
1223
other
 
1224
write and execute bits from the UNIX modes.
 
1225
.sp
 
1226
Following this Samba will bit-wise 'OR' the UNIX mode created from this parameter with the value of the
 
1227
force create mode parameter which is set to 000 by default.
 
1228
.sp
 
1229
This parameter does not affect directory masks. See the parameter
 
1230
directory mask for details.
 
1231
.sp
 
1232
Note that this parameter does not apply to permissions set by Windows NT/2000 ACL editors. If the administrator wishes to enforce a mask on access control lists also, they need to set the
 
1233
security mask.
 
1234
.sp
 
1235
Default:
 
1236
\fB\fIcreate mask\fR = 0744 \fR
 
1237
.sp
 
1238
Example:
 
1239
\fB\fIcreate mask\fR = 0775 \fR
 
1240
.TP 3n
872
1241
csc policy (S)
873
 
This stands for \fBclient\-side caching policy\fR, and specifies how clients capable of offline caching will cache the files in the share\&. The valid values are: manual, documents, programs, disable\&.
874
 
 
875
 
These values correspond to those used on Windows servers\&.
876
 
 
877
 
For example, shares containing roaming profiles can have offline caching disabled usingcsc policy = disable\&.
878
 
 
879
 
Default: \fB\fIcsc policy\fR = manual \fR 
880
 
 
881
 
Example: \fB\fIcsc policy\fR = programs \fR 
882
 
 
883
 
.TP
 
1242
This stands for
 
1243
\fBclient-side caching policy\fR, and specifies how clients capable of offline caching will cache the files in the share. The valid values are: manual, documents, programs, disable.
 
1244
.sp
 
1245
These values correspond to those used on Windows servers.
 
1246
.sp
 
1247
For example, shares containing roaming profiles can have offline caching disabled using
 
1248
csc policy = disable.
 
1249
.sp
 
1250
Default:
 
1251
\fB\fIcsc policy\fR = manual \fR
 
1252
.sp
 
1253
Example:
 
1254
\fB\fIcsc policy\fR = programs \fR
 
1255
.TP 3n
884
1256
cups options (S)
885
 
This parameter is only applicable if printing is set to \fBcups\fR\&. Its value is a free form string of options passed directly to the cups library\&.
886
 
 
887
 
You can pass any generic print option known to CUPS (as listed in the CUPS "Software Users' Manual")\&. You can also pass any printer specific option (as listed in "lpoptions \-d printername \-l") valid for the target queue\&.
888
 
 
889
 
You should set this parameter to \fBraw\fR if your CUPS server \fIerror_log\fR file contains messages such as "Unsupported format 'application/octet\-stream'" when printing from a Windows client through Samba\&. It is no longer necessary to enable system wide raw printing in \fI/etc/cups/mime\&.{convs,types}\fR\&.
890
 
 
891
 
Default: \fB\fIcups options\fR = "" \fR 
892
 
 
893
 
Example: \fB\fIcups options\fR = "raw,media=a4,job\-sheets=secret,secret" \fR 
894
 
 
895
 
.TP
 
1257
This parameter is only applicable if
 
1258
printing is set to
 
1259
\fBcups\fR. Its value is a free form string of options passed directly to the cups library.
 
1260
.sp
 
1261
You can pass any generic print option known to CUPS (as listed in the CUPS "Software Users' Manual"). You can also pass any printer specific option (as listed in "lpoptions -d printername -l") valid for the target queue.
 
1262
.sp
 
1263
You should set this parameter to
 
1264
\fBraw\fR
 
1265
if your CUPS server
 
1266
\fIerror_log\fR
 
1267
file contains messages such as "Unsupported format 'application/octet-stream'" when printing from a Windows client through Samba. It is no longer necessary to enable system wide raw printing in
 
1268
\fI/etc/cups/mime.{convs,types}\fR.
 
1269
.sp
 
1270
Default:
 
1271
\fB\fIcups options\fR = "" \fR
 
1272
.sp
 
1273
Example:
 
1274
\fB\fIcups options\fR = "raw,media=a4,job-sheets=secret,secret" \fR
 
1275
.TP 3n
896
1276
cups server (G)
897
 
This parameter is only applicable if printing is set to \fBcups\fR\&.
898
 
 
899
 
If set, this option overrides the ServerName option in the CUPS \fIclient\&.conf\fR\&. This is necessary if you have virtual samba servers that connect to different CUPS daemons\&.
900
 
 
901
 
Default: \fB\fIcups server\fR = "" \fR 
902
 
 
903
 
Example: \fB\fIcups server\fR = MYCUPSSERVER \fR 
904
 
 
905
 
.TP
 
1277
This parameter is only applicable if
 
1278
printing is set to
 
1279
\fBcups\fR.
 
1280
.sp
 
1281
If set, this option overrides the ServerName option in the CUPS
 
1282
\fIclient.conf\fR. This is necessary if you have virtual samba servers that connect to different CUPS daemons.
 
1283
.sp
 
1284
Optionally, a port can be specified by separating the server name and port number with a colon. If no port was specified, the default port for IPP (631) will be used.
 
1285
.sp
 
1286
Default:
 
1287
\fB\fIcups server\fR = "" \fR
 
1288
.sp
 
1289
Example:
 
1290
\fB\fIcups server\fR = mycupsserver \fR
 
1291
.sp
 
1292
Example:
 
1293
\fB\fIcups server\fR = mycupsserver:1631 \fR
 
1294
.TP 3n
906
1295
deadtime (G)
907
 
The value of the parameter (a decimal integer) represents the number of minutes of inactivity before a connection is considered dead, and it is disconnected\&. The deadtime only takes effect if the number of open files is zero\&.
908
 
 
909
 
This is useful to stop a server's resources being exhausted by a large number of inactive connections\&.
910
 
 
911
 
Most clients have an auto\-reconnect feature when a connection is broken so in most cases this parameter should be transparent to users\&.
912
 
 
913
 
Using this parameter with a timeout of a few minutes is recommended for most systems\&.
914
 
 
915
 
A deadtime of zero indicates that no auto\-disconnection should be performed\&.
916
 
 
917
 
Default: \fB\fIdeadtime\fR = 0 \fR 
918
 
 
919
 
Example: \fB\fIdeadtime\fR = 15 \fR 
920
 
 
921
 
.TP
 
1296
The value of the parameter (a decimal integer) represents the number of minutes of inactivity before a connection is considered dead, and it is disconnected. The deadtime only takes effect if the number of open files is zero.
 
1297
.sp
 
1298
This is useful to stop a server's resources being exhausted by a large number of inactive connections.
 
1299
.sp
 
1300
Most clients have an auto-reconnect feature when a connection is broken so in most cases this parameter should be transparent to users.
 
1301
.sp
 
1302
Using this parameter with a timeout of a few minutes is recommended for most systems.
 
1303
.sp
 
1304
A deadtime of zero indicates that no auto-disconnection should be performed.
 
1305
.sp
 
1306
Default:
 
1307
\fB\fIdeadtime\fR = 0 \fR
 
1308
.sp
 
1309
Example:
 
1310
\fB\fIdeadtime\fR = 15 \fR
 
1311
.TP 3n
922
1312
debug hires timestamp (G)
923
 
Sometimes the timestamps in the log messages are needed with a resolution of higher that seconds, this boolean parameter adds microsecond resolution to the timestamp message header when turned on\&.
924
 
 
925
 
Note that the parameter debug timestamp must be on for this to have an effect\&.
926
 
 
927
 
Default: \fB\fIdebug hires timestamp\fR = no \fR 
928
 
 
929
 
.TP
 
1313
Sometimes the timestamps in the log messages are needed with a resolution of higher that seconds, this boolean parameter adds microsecond resolution to the timestamp message header when turned on.
 
1314
.sp
 
1315
Note that the parameter
 
1316
debug timestamp must be on for this to have an effect.
 
1317
.sp
 
1318
Default:
 
1319
\fB\fIdebug hires timestamp\fR = no \fR
 
1320
.TP 3n
930
1321
debug pid (G)
931
 
When using only one log file for more then one forked \fBsmbd\fR(8)\-process there may be hard to follow which process outputs which message\&. This boolean parameter is adds the process\-id to the timestamp message headers in the logfile when turned on\&.
932
 
 
933
 
Note that the parameter debug timestamp must be on for this to have an effect\&.
934
 
 
935
 
Default: \fB\fIdebug pid\fR = no \fR 
936
 
 
937
 
.TP
 
1322
When using only one log file for more then one forked
 
1323
\fBsmbd\fR(8)-process there may be hard to follow which process outputs which message. This boolean parameter is adds the process-id to the timestamp message headers in the logfile when turned on.
 
1324
.sp
 
1325
Note that the parameter
 
1326
debug timestamp must be on for this to have an effect.
 
1327
.sp
 
1328
Default:
 
1329
\fB\fIdebug pid\fR = no \fR
 
1330
.TP 3n
938
1331
timestamp logs
939
 
This parameter is a synonym for debug timestamp\&.
940
 
 
941
 
.TP
 
1332
This parameter is a synonym for debug timestamp.
 
1333
.TP 3n
942
1334
debug timestamp (G)
943
 
Samba debug log messages are timestamped by default\&. If you are running at a high debug level these timestamps can be distracting\&. This boolean parameter allows timestamping to be turned off\&.
944
 
 
945
 
Default: \fB\fIdebug timestamp\fR = yes \fR 
946
 
 
947
 
.TP
 
1335
Samba debug log messages are timestamped by default. If you are running at a high
 
1336
debug level these timestamps can be distracting. This boolean parameter allows timestamping to be turned off.
 
1337
.sp
 
1338
Default:
 
1339
\fB\fIdebug timestamp\fR = yes \fR
 
1340
.TP 3n
948
1341
debug uid (G)
949
 
Samba is sometimes run as root and sometime run as the connected user, this boolean parameter inserts the current euid, egid, uid and gid to the timestamp message headers in the log file if turned on\&.
950
 
 
951
 
Note that the parameter debug timestamp must be on for this to have an effect\&.
952
 
 
953
 
Default: \fB\fIdebug uid\fR = no \fR 
954
 
 
955
 
.TP
 
1342
Samba is sometimes run as root and sometime run as the connected user, this boolean parameter inserts the current euid, egid, uid and gid to the timestamp message headers in the log file if turned on.
 
1343
.sp
 
1344
Note that the parameter
 
1345
debug timestamp must be on for this to have an effect.
 
1346
.sp
 
1347
Default:
 
1348
\fB\fIdebug uid\fR = no \fR
 
1349
.TP 3n
956
1350
default case (S)
957
 
See the section on name mangling \&. Also note the short preserve case parameter\&.
958
 
 
959
 
Default: \fB\fIdefault case\fR = lower \fR 
960
 
 
961
 
.TP
 
1351
See the section on
 
1352
name mangling . Also note the
 
1353
short preserve case parameter.
 
1354
.sp
 
1355
Default:
 
1356
\fB\fIdefault case\fR = lower \fR
 
1357
.TP 3n
962
1358
default devmode (S)
963
 
This parameter is only applicable to printable services\&. When smbd is serving Printer Drivers to Windows NT/2k/XP clients, each printer on the Samba server has a Device Mode which defines things such as paper size and orientation and duplex settings\&. The device mode can only correctly be generated by the printer driver itself (which can only be executed on a Win32 platform)\&. Because smbd is unable to execute the driver code to generate the device mode, the default behavior is to set this field to NULL\&.
964
 
 
965
 
Most problems with serving printer drivers to Windows NT/2k/XP clients can be traced to a problem with the generated device mode\&. Certain drivers will do things such as crashing the client's Explorer\&.exe with a NULL devmode\&. However, other printer drivers can cause the client's spooler service (spoolsv\&.exe) to die if the devmode was not created by the driver itself (i\&.e\&. smbd generates a default devmode)\&.
966
 
 
967
 
This parameter should be used with care and tested with the printer driver in question\&. It is better to leave the device mode to NULL and let the Windows client set the correct values\&. Because drivers do not do this all the time, setting \fBdefault devmode = yes\fR will instruct smbd to generate a default one\&.
968
 
 
969
 
For more information on Windows NT/2k printing and Device Modes, see the MSDN documentation\&.
970
 
 
971
 
Default: \fB\fIdefault devmode\fR = no \fR 
972
 
 
973
 
.TP
 
1359
This parameter is only applicable to
 
1360
printable services. When smbd is serving Printer Drivers to Windows NT/2k/XP clients, each printer on the Samba server has a Device Mode which defines things such as paper size and orientation and duplex settings. The device mode can only correctly be generated by the printer driver itself (which can only be executed on a Win32 platform). Because smbd is unable to execute the driver code to generate the device mode, the default behavior is to set this field to NULL.
 
1361
.sp
 
1362
Most problems with serving printer drivers to Windows NT/2k/XP clients can be traced to a problem with the generated device mode. Certain drivers will do things such as crashing the client's Explorer.exe with a NULL devmode. However, other printer drivers can cause the client's spooler service (spoolsv.exe) to die if the devmode was not created by the driver itself (i.e. smbd generates a default devmode).
 
1363
.sp
 
1364
This parameter should be used with care and tested with the printer driver in question. It is better to leave the device mode to NULL and let the Windows client set the correct values. Because drivers do not do this all the time, setting
 
1365
\fBdefault devmode = yes\fR
 
1366
will instruct smbd to generate a default one.
 
1367
.sp
 
1368
For more information on Windows NT/2k printing and Device Modes, see the
 
1369
MSDN documentation.
 
1370
.sp
 
1371
Default:
 
1372
\fB\fIdefault devmode\fR = no \fR
 
1373
.TP 3n
974
1374
default
975
 
This parameter is a synonym for default service\&.
976
 
 
977
 
.TP
 
1375
This parameter is a synonym for default service.
 
1376
.TP 3n
978
1377
default service (G)
979
 
This parameter specifies the name of a service which will be connected to if the service actually requested cannot be found\&. Note that the square brackets are \fBNOT\fR given in the parameter value (see example below)\&.
980
 
 
981
 
There is no default value for this parameter\&. If this parameter is not given, attempting to connect to a nonexistent service results in an error\&.
982
 
 
983
 
Typically the default service would be a guest ok, read\-only service\&.
984
 
 
985
 
Also note that the apparent service name will be changed to equal that of the requested service, this is very useful as it allows you to use macros like \fI%S\fR to make a wildcard service\&.
986
 
 
987
 
Note also that any "_" characters in the name of the service used in the default service will get mapped to a "/"\&. This allows for interesting things\&.
988
 
 
989
 
Default: \fB\fIdefault service\fR = \fR 
990
 
 
991
 
Example: \fB\fIdefault service\fR = pub \fR 
992
 
 
993
 
.TP
 
1378
This parameter specifies the name of a service which will be connected to if the service actually requested cannot be found. Note that the square brackets are
 
1379
\fBNOT\fR
 
1380
given in the parameter value (see example below).
 
1381
.sp
 
1382
There is no default value for this parameter. If this parameter is not given, attempting to connect to a nonexistent service results in an error.
 
1383
.sp
 
1384
Typically the default service would be a
 
1385
guest ok,
 
1386
read-only service.
 
1387
.sp
 
1388
Also note that the apparent service name will be changed to equal that of the requested service, this is very useful as it allows you to use macros like
 
1389
\fI%S\fR
 
1390
to make a wildcard service.
 
1391
.sp
 
1392
Note also that any "_" characters in the name of the service used in the default service will get mapped to a "/". This allows for interesting things.
 
1393
.sp
 
1394
Default:
 
1395
\fB\fIdefault service\fR = \fR
 
1396
.sp
 
1397
Example:
 
1398
\fB\fIdefault service\fR = pub \fR
 
1399
.TP 3n
994
1400
defer sharing violations (G)
995
 
Windows allows specifying how a file will be shared with other processes when it is opened\&. Sharing violations occur when a file is opened by a different process using options that violate the share settings specified by other processes\&. This parameter causes smbd to act as a Windows server does, and defer returning a "sharing violation" error message for up to one second, allowing the client to close the file causing the violation in the meantime\&.
996
 
 
997
 
UNIX by default does not have this behaviour\&.
998
 
 
999
 
There should be no reason to turn off this parameter, as it is designed to enable Samba to more correctly emulate Windows\&.
1000
 
 
1001
 
Default: \fB\fIdefer sharing violations\fR = True \fR 
1002
 
 
1003
 
.TP
 
1401
Windows allows specifying how a file will be shared with other processes when it is opened. Sharing violations occur when a file is opened by a different process using options that violate the share settings specified by other processes. This parameter causes smbd to act as a Windows server does, and defer returning a "sharing violation" error message for up to one second, allowing the client to close the file causing the violation in the meantime.
 
1402
.sp
 
1403
UNIX by default does not have this behaviour.
 
1404
.sp
 
1405
There should be no reason to turn off this parameter, as it is designed to enable Samba to more correctly emulate Windows.
 
1406
.sp
 
1407
Default:
 
1408
\fB\fIdefer sharing violations\fR = True \fR
 
1409
.TP 3n
1004
1410
delete group script (G)
1005
 
This is the full pathname to a script that will be run \fBAS ROOT\fR  \fBsmbd\fR(8) when a group is requested to be deleted\&. It will expand any \fI%g\fR to the group name passed\&. This script is only useful for installations using the Windows NT domain administration tools\&.
1006
 
 
1007
 
Default: \fB\fIdelete group script\fR = \fR 
1008
 
 
1009
 
.TP
 
1411
This is the full pathname to a script that will be run
 
1412
\fBAS ROOT\fR
 
1413
\fBsmbd\fR(8)
 
1414
when a group is requested to be deleted. It will expand any
 
1415
\fI%g\fR
 
1416
to the group name passed. This script is only useful for installations using the Windows NT domain administration tools.
 
1417
.sp
 
1418
Default:
 
1419
\fB\fIdelete group script\fR = \fR
 
1420
.TP 3n
1010
1421
deleteprinter command (G)
1011
 
With the introduction of MS\-RPC based printer support for Windows NT/2000 clients in Samba 2\&.2, it is now possible to delete printer at run time by issuing the DeletePrinter() RPC call\&.
1012
 
 
1013
 
For a Samba host this means that the printer must be physically deleted from underlying printing system\&. The deleteprinter command defines a script to be run which will perform the necessary operations for removing the printer from the print system and from \fIsmb\&.conf\fR\&.
1014
 
 
1015
 
The deleteprinter command is automatically called with only one parameter: printer name\&.
1016
 
 
1017
 
Once the deleteprinter command has been executed, \fBsmbd\fR will reparse the \fI smb\&.conf\fR to associated printer no longer exists\&. If the sharename is still valid, then \fBsmbd \fR will return an ACCESS_DENIED error to the client\&.
1018
 
 
1019
 
Default: \fB\fIdeleteprinter command\fR = \fR 
1020
 
 
1021
 
Example: \fB\fIdeleteprinter command\fR = /usr/bin/removeprinter \fR 
1022
 
 
1023
 
.TP
 
1422
With the introduction of MS-RPC based printer support for Windows NT/2000 clients in Samba 2.2, it is now possible to delete printer at run time by issuing the DeletePrinter() RPC call.
 
1423
.sp
 
1424
For a Samba host this means that the printer must be physically deleted from underlying printing system. The
 
1425
deleteprinter command defines a script to be run which will perform the necessary operations for removing the printer from the print system and from
 
1426
\fIsmb.conf\fR.
 
1427
.sp
 
1428
The
 
1429
deleteprinter command is automatically called with only one parameter:
 
1430
printer name.
 
1431
.sp
 
1432
Once the
 
1433
deleteprinter command has been executed,
 
1434
\fBsmbd\fR
 
1435
will reparse the
 
1436
\fI smb.conf\fR
 
1437
to associated printer no longer exists. If the sharename is still valid, then
 
1438
\fBsmbd \fR
 
1439
will return an ACCESS_DENIED error to the client.
 
1440
.sp
 
1441
Default:
 
1442
\fB\fIdeleteprinter command\fR = \fR
 
1443
.sp
 
1444
Example:
 
1445
\fB\fIdeleteprinter command\fR = /usr/bin/removeprinter \fR
 
1446
.TP 3n
1024
1447
delete readonly (S)
1025
 
This parameter allows readonly files to be deleted\&. This is not normal DOS semantics, but is allowed by UNIX\&.
1026
 
 
1027
 
This option may be useful for running applications such as rcs, where UNIX file ownership prevents changing file permissions, and DOS semantics prevent deletion of a read only file\&.
1028
 
 
1029
 
Default: \fB\fIdelete readonly\fR = no \fR 
1030
 
 
1031
 
.TP
 
1448
This parameter allows readonly files to be deleted. This is not normal DOS semantics, but is allowed by UNIX.
 
1449
.sp
 
1450
This option may be useful for running applications such as rcs, where UNIX file ownership prevents changing file permissions, and DOS semantics prevent deletion of a read only file.
 
1451
.sp
 
1452
Default:
 
1453
\fB\fIdelete readonly\fR = no \fR
 
1454
.TP 3n
1032
1455
delete share command (G)
1033
 
Samba 2\&.2\&.0 introduced the ability to dynamically add and delete shares via the Windows NT 4\&.0 Server Manager\&. The\fIdelete share command\fR is used to define an external program or script which will remove an existing service definition from \fIsmb\&.conf\fR\&. In order to successfully execute the \fIdelete share command\fR, \fBsmbd\fR requires that the administrator be connected using a root account (i\&.e\&. uid == 0)\&.
1034
 
 
1035
 
When executed, \fBsmbd\fR will automatically invoke the\fIdelete share command\fR with two parameters\&.
1036
 
 
1037
 
 
1038
 
.RS
1039
 
.TP 3
1040
 
\(bu
1041
 
\fIconfigFile\fR \- the location of the global \fIsmb\&.conf\fR file\&.
1042
 
.TP
1043
 
\(bu
1044
 
\fIshareName\fR \- the name of the existing service\&.
1045
 
.LP
 
1456
Samba 2.2.0 introduced the ability to dynamically add and delete shares via the Windows NT 4.0 Server Manager. The
 
1457
\fIdelete share command\fR
 
1458
is used to define an external program or script which will remove an existing service definition from
 
1459
\fIsmb.conf\fR. In order to successfully execute the
 
1460
\fIdelete share command\fR,
 
1461
\fBsmbd\fR
 
1462
requires that the administrator be connected using a root account (i.e. uid == 0).
 
1463
.sp
 
1464
When executed,
 
1465
\fBsmbd\fR
 
1466
will automatically invoke the
 
1467
\fIdelete share command\fR
 
1468
with two parameters.
 
1469
.RS 3n
 
1470
.TP 3n
 
1471
&#8226;
 
1472
\fIconfigFile\fR
 
1473
- the location of the global
 
1474
\fIsmb.conf\fR
 
1475
file.
 
1476
.TP 3n
 
1477
&#8226;
 
1478
\fIshareName\fR
 
1479
- the name of the existing service.
1046
1480
.RE
1047
 
.IP
1048
 
This parameter is only used to remove file shares\&. To delete printer shares, see the deleteprinter command\&.
1049
 
 
1050
 
Default: \fB\fIdelete share command\fR = \fR 
1051
 
 
1052
 
Example: \fB\fIdelete share command\fR = /usr/local/bin/delshare \fR 
1053
 
 
1054
 
.TP
 
1481
.IP "" 3n
 
1482
This parameter is only used to remove file shares. To delete printer shares, see the
 
1483
deleteprinter command.
 
1484
.sp
 
1485
Default:
 
1486
\fB\fIdelete share command\fR = \fR
 
1487
.sp
 
1488
Example:
 
1489
\fB\fIdelete share command\fR = /usr/local/bin/delshare \fR
 
1490
.TP 3n
1055
1491
delete user from group script (G)
1056
 
Full path to the script that will be called when a user is removed from a group using the Windows NT domain administration tools\&. It will be run by \fBsmbd\fR(8)  \fBAS ROOT\fR\&. Any \fI%g\fR will be replaced with the group name and any \fI%u\fR will be replaced with the user name\&.
1057
 
 
1058
 
Default: \fB\fIdelete user from group script\fR = \fR 
1059
 
 
1060
 
Example: \fB\fIdelete user from group script\fR = /usr/sbin/deluser %u %g \fR 
1061
 
 
1062
 
.TP
 
1492
Full path to the script that will be called when a user is removed from a group using the Windows NT domain administration tools. It will be run by
 
1493
\fBsmbd\fR(8)
 
1494
\fBAS ROOT\fR. Any
 
1495
\fI%g\fR
 
1496
will be replaced with the group name and any
 
1497
\fI%u\fR
 
1498
will be replaced with the user name.
 
1499
.sp
 
1500
Default:
 
1501
\fB\fIdelete user from group script\fR = \fR
 
1502
.sp
 
1503
Example:
 
1504
\fB\fIdelete user from group script\fR = /usr/sbin/deluser %u %g \fR
 
1505
.TP 3n
1063
1506
delete user script (G)
1064
 
This is the full pathname to a script that will be run by \fBsmbd\fR(8) when managing users with remote RPC (NT) tools\&.
1065
 
 
1066
 
This script is called when a remote client removes a user from the server, normally using 'User Manager for Domains' or\fBrpcclient\fR\&.
1067
 
 
1068
 
This script should delete the given UNIX username\&.
1069
 
 
1070
 
Default: \fB\fIdelete user script\fR = \fR 
1071
 
 
1072
 
Example: \fB\fIdelete user script\fR = /usr/local/samba/bin/del_user %u \fR 
1073
 
 
1074
 
.TP
 
1507
This is the full pathname to a script that will be run by
 
1508
\fBsmbd\fR(8)
 
1509
when managing users with remote RPC (NT) tools.
 
1510
.sp
 
1511
This script is called when a remote client removes a user from the server, normally using 'User Manager for Domains' or
 
1512
\fBrpcclient\fR.
 
1513
.sp
 
1514
This script should delete the given UNIX username.
 
1515
.sp
 
1516
Default:
 
1517
\fB\fIdelete user script\fR = \fR
 
1518
.sp
 
1519
Example:
 
1520
\fB\fIdelete user script\fR = /usr/local/samba/bin/del_user %u \fR
 
1521
.TP 3n
1075
1522
delete veto files (S)
1076
 
This option is used when Samba is attempting to delete a directory that contains one or more vetoed directories (see the veto files option)\&. If this option is set to \fBno\fR (the default) then if a vetoed directory contains any non\-vetoed files or directories then the directory delete will fail\&. This is usually what you want\&.
1077
 
 
1078
 
If this option is set to \fByes\fR, then Samba will attempt to recursively delete any files and directories within the vetoed directory\&. This can be useful for integration with file serving systems such as NetAtalk which create meta\-files within directories you might normally veto DOS/Windows users from seeing (e\&.g\&. \fI\&.AppleDouble\fR)
1079
 
 
1080
 
Setting delete veto files = yes allows these directories to be transparently deleted when the parent directory is deleted (so long as the user has permissions to do so)\&.
1081
 
 
1082
 
Default: \fB\fIdelete veto files\fR = no \fR 
1083
 
 
1084
 
.TP
 
1523
This option is used when Samba is attempting to delete a directory that contains one or more vetoed directories (see the
 
1524
veto files option). If this option is set to
 
1525
\fBno\fR
 
1526
(the default) then if a vetoed directory contains any non-vetoed files or directories then the directory delete will fail. This is usually what you want.
 
1527
.sp
 
1528
If this option is set to
 
1529
\fByes\fR, then Samba will attempt to recursively delete any files and directories within the vetoed directory. This can be useful for integration with file serving systems such as NetAtalk which create meta-files within directories you might normally veto DOS/Windows users from seeing (e.g.
 
1530
\fI.AppleDouble\fR)
 
1531
.sp
 
1532
Setting
 
1533
delete veto files = yes allows these directories to be transparently deleted when the parent directory is deleted (so long as the user has permissions to do so).
 
1534
.sp
 
1535
Default:
 
1536
\fB\fIdelete veto files\fR = no \fR
 
1537
.TP 3n
1085
1538
dfree cache time (S)
1086
 
The \fIdfree cache time\fR should only be used on systems where a problem occurs with the internal disk space calculations\&. This has been known to happen with Ultrix, but may occur with other operating systems\&. The symptom that was seen was an error of "Abort Retry Ignore" at the end of each directory listing\&.
1087
 
 
1088
 
This is a new parameter introduced in Samba version 3\&.0\&.21\&. It specifies in seconds the time that smbd will cache the output of a disk free query\&. If set to zero (the default) no caching is done\&. This allows a heavily loaded server to prevent rapid spawning of dfree command scripts increasing the load\&.
1089
 
 
1090
 
By default this parameter is zero, meaning no caching will be done\&.
1091
 
 
 
1539
The
 
1540
\fIdfree cache time\fR
 
1541
should only be used on systems where a problem occurs with the internal disk space calculations. This has been known to happen with Ultrix, but may occur with other operating systems. The symptom that was seen was an error of "Abort Retry Ignore" at the end of each directory listing.
 
1542
.sp
 
1543
This is a new parameter introduced in Samba version 3.0.21. It specifies in seconds the time that smbd will cache the output of a disk free query. If set to zero (the default) no caching is done. This allows a heavily loaded server to prevent rapid spawning of
 
1544
dfree command scripts increasing the load.
 
1545
.sp
 
1546
By default this parameter is zero, meaning no caching will be done.
 
1547
.sp
1092
1548
\fBNo default\fR
1093
 
 
1094
 
Example: \fB\fIdfree cache time\fR = dfree cache time = 60 \fR 
1095
 
 
1096
 
.TP
 
1549
.sp
 
1550
Example:
 
1551
\fB\fIdfree cache time\fR = dfree cache time = 60 \fR
 
1552
.TP 3n
1097
1553
dfree command (S)
1098
 
The \fIdfree command\fR setting should only be used on systems where a problem occurs with the internal disk space calculations\&. This has been known to happen with Ultrix, but may occur with other operating systems\&. The symptom that was seen was an error of "Abort Retry Ignore" at the end of each directory listing\&.
1099
 
 
1100
 
This setting allows the replacement of the internal routines to calculate the total disk space and amount available with an external routine\&. The example below gives a possible script that might fulfill this function\&.
1101
 
 
1102
 
In Samba version 3\&.0\&.21 this parameter has been changed to be a per\-share parameter, and in addition the parameter dfree cache time was added to allow the output of this script to be cached for systems under heavy load\&.
1103
 
 
1104
 
The external program will be passed a single parameter indicating a directory in the filesystem being queried\&. This will typically consist of the string \fI\&./\fR\&. The script should return two integers in ASCII\&. The first should be the total disk space in blocks, and the second should be the number of available blocks\&. An optional third return value can give the block size in bytes\&. The default blocksize is 1024 bytes\&.
1105
 
 
1106
 
Note: Your script should \fBNOT\fR be setuid or setgid and should be owned by (and writeable only by) root!
1107
 
 
1108
 
Where the script dfree (which must be made executable) could be: 
1109
 
.nf
1110
 
 
1111
 
#!/bin/sh
1112
 
df $1 | tail \-1 | awk '{print $2" "$4}'
1113
 
.fi
1114
 
 or perhaps (on Sys V based systems): 
1115
 
.nf
1116
 
 
1117
 
#!/bin/sh
1118
 
/usr/bin/df \-k $1 | tail \-1 | awk '{print $3" "$5}'
1119
 
.fi
1120
 
 Note that you may have to replace the command names with full path names on some systems\&.
1121
 
 
1122
 
By default internal routines for determining the disk capacity and remaining space will be used\&.
1123
 
 
 
1554
The
 
1555
\fIdfree command\fR
 
1556
setting should only be used on systems where a problem occurs with the internal disk space calculations. This has been known to happen with Ultrix, but may occur with other operating systems. The symptom that was seen was an error of "Abort Retry Ignore" at the end of each directory listing.
 
1557
.sp
 
1558
This setting allows the replacement of the internal routines to calculate the total disk space and amount available with an external routine. The example below gives a possible script that might fulfill this function.
 
1559
.sp
 
1560
In Samba version 3.0.21 this parameter has been changed to be a per-share parameter, and in addition the parameter
 
1561
dfree cache time was added to allow the output of this script to be cached for systems under heavy load.
 
1562
.sp
 
1563
The external program will be passed a single parameter indicating a directory in the filesystem being queried. This will typically consist of the string
 
1564
\fI./\fR. The script should return two integers in ASCII. The first should be the total disk space in blocks, and the second should be the number of available blocks. An optional third return value can give the block size in bytes. The default blocksize is 1024 bytes.
 
1565
.sp
 
1566
Note: Your script should
 
1567
\fBNOT\fR
 
1568
be setuid or setgid and should be owned by (and writeable only by) root!
 
1569
.sp
 
1570
Where the script dfree (which must be made executable) could be:
 
1571
 
 
1572
.sp
 
1573
.nf
 
1574
 
 
1575
#!/bin/sh
 
1576
df $1 | tail -1 | awk '{print $2" "$4}'
 
1577
.fi
 
1578
or perhaps (on Sys V based systems):
 
1579
 
 
1580
.sp
 
1581
.nf
 
1582
 
 
1583
#!/bin/sh
 
1584
/usr/bin/df -k $1 | tail -1 | awk '{print $3" "$5}'
 
1585
.fi
 
1586
Note that you may have to replace the command names with full path names on some systems.
 
1587
.sp
 
1588
By default internal routines for determining the disk capacity and remaining space will be used.
 
1589
.sp
1124
1590
\fBNo default\fR
1125
 
 
1126
 
Example: \fB\fIdfree command\fR = /usr/local/samba/bin/dfree \fR 
1127
 
 
1128
 
.TP
 
1591
.sp
 
1592
Example:
 
1593
\fB\fIdfree command\fR = /usr/local/samba/bin/dfree \fR
 
1594
.TP 3n
1129
1595
directory mode
1130
 
This parameter is a synonym for directory mask\&.
1131
 
 
1132
 
.TP
 
1596
This parameter is a synonym for directory mask.
 
1597
.TP 3n
1133
1598
directory mask (S)
1134
 
This parameter is the octal modes which are used when converting DOS modes to UNIX modes when creating UNIX directories\&.
1135
 
 
1136
 
When a directory is created, the necessary permissions are calculated according to the mapping from DOS modes to UNIX permissions, and the resulting UNIX mode is then bit\-wise 'AND'ed with this parameter\&. This parameter may be thought of as a bit\-wise MASK for the UNIX modes of a directory\&. Any bit \fBnot\fR set here will be removed from the modes set on a directory when it is created\&.
1137
 
 
1138
 
The default value of this parameter removes the 'group' and 'other' write bits from the UNIX mode, allowing only the user who owns the directory to modify it\&.
1139
 
 
1140
 
Following this Samba will bit\-wise 'OR' the UNIX mode created from this parameter with the value of the force directory mode parameter\&. This parameter is set to 000 by default (i\&.e\&. no extra mode bits are added)\&.
1141
 
 
1142
 
Note that this parameter does not apply to permissions set by Windows NT/2000 ACL editors\&. If the administrator wishes to enforce a mask on access control lists also, they need to set the directory security mask\&.
1143
 
 
1144
 
Default: \fB\fIdirectory mask\fR = 0755 \fR 
1145
 
 
1146
 
Example: \fB\fIdirectory mask\fR = 0775 \fR 
1147
 
 
1148
 
.TP
 
1599
This parameter is the octal modes which are used when converting DOS modes to UNIX modes when creating UNIX directories.
 
1600
.sp
 
1601
When a directory is created, the necessary permissions are calculated according to the mapping from DOS modes to UNIX permissions, and the resulting UNIX mode is then bit-wise 'AND'ed with this parameter. This parameter may be thought of as a bit-wise MASK for the UNIX modes of a directory. Any bit
 
1602
\fBnot\fR
 
1603
set here will be removed from the modes set on a directory when it is created.
 
1604
.sp
 
1605
The default value of this parameter removes the 'group' and 'other' write bits from the UNIX mode, allowing only the user who owns the directory to modify it.
 
1606
.sp
 
1607
Following this Samba will bit-wise 'OR' the UNIX mode created from this parameter with the value of the
 
1608
force directory mode parameter. This parameter is set to 000 by default (i.e. no extra mode bits are added).
 
1609
.sp
 
1610
Note that this parameter does not apply to permissions set by Windows NT/2000 ACL editors. If the administrator wishes to enforce a mask on access control lists also, they need to set the
 
1611
directory security mask.
 
1612
.sp
 
1613
Default:
 
1614
\fB\fIdirectory mask\fR = 0755 \fR
 
1615
.sp
 
1616
Example:
 
1617
\fB\fIdirectory mask\fR = 0775 \fR
 
1618
.TP 3n
1149
1619
directory security mask (S)
1150
 
This parameter controls what UNIX permission bits can be modified when a Windows NT client is manipulating the UNIX permission on a directory using the native NT security dialog box\&.
1151
 
 
1152
 
This parameter is applied as a mask (AND'ed with) to the changed permission bits, thus preventing any bits not in this mask from being modified\&. Make sure not to mix up this parameter with force directory security mode, which works similar like this one but uses logical OR instead of AND\&. Essentially, zero bits in this mask may be treated as a set of bits the user is not allowed to change\&.
1153
 
 
1154
 
If not set explicitly this parameter is set to 0777 meaning a user is allowed to modify all the user/group/world permissions on a directory\&.
1155
 
 
1156
 
\fBNote\fR that users who can access the Samba server through other means can easily bypass this restriction, so it is primarily useful for standalone "appliance" systems\&. Administrators of most normal systems will probably want to leave it as the default of \fB0777\fR\&.
1157
 
 
1158
 
Default: \fB\fIdirectory security mask\fR = 0777 \fR 
1159
 
 
1160
 
Example: \fB\fIdirectory security mask\fR = 0700 \fR 
1161
 
 
1162
 
.TP
 
1620
This parameter controls what UNIX permission bits can be modified when a Windows NT client is manipulating the UNIX permission on a directory using the native NT security dialog box.
 
1621
.sp
 
1622
This parameter is applied as a mask (AND'ed with) to the changed permission bits, thus preventing any bits not in this mask from being modified. Make sure not to mix up this parameter with
 
1623
force directory security mode, which works similar like this one but uses logical OR instead of AND. Essentially, zero bits in this mask may be treated as a set of bits the user is not allowed to change.
 
1624
.sp
 
1625
If not set explicitly this parameter is set to 0777 meaning a user is allowed to modify all the user/group/world permissions on a directory.
 
1626
.sp
 
1627
\fBNote\fR
 
1628
that users who can access the Samba server through other means can easily bypass this restriction, so it is primarily useful for standalone "appliance" systems. Administrators of most normal systems will probably want to leave it as the default of
 
1629
\fB0777\fR.
 
1630
.sp
 
1631
Default:
 
1632
\fB\fIdirectory security mask\fR = 0777 \fR
 
1633
.sp
 
1634
Example:
 
1635
\fB\fIdirectory security mask\fR = 0700 \fR
 
1636
.TP 3n
1163
1637
disable netbios (G)
1164
 
Enabling this parameter will disable netbios support in Samba\&. Netbios is the only available form of browsing in all windows versions except for 2000 and XP\&.
1165
 
 
1166
 
 
1167
 
.RS
1168
 
.Sh "Note"
1169
 
Clients that only support netbios won't be able to see your samba server when netbios support is disabled\&.
1170
 
 
1171
 
.RE
1172
 
Default: \fB\fIdisable netbios\fR = no \fR 
1173
 
 
1174
 
.TP
 
1638
Enabling this parameter will disable netbios support in Samba. Netbios is the only available form of browsing in all windows versions except for 2000 and XP.
 
1639
.sp
 
1640
.it 1 an-trap
 
1641
.nr an-no-space-flag 1
 
1642
.nr an-break-flag 1
 
1643
.br
 
1644
\fBNote\fR
 
1645
Clients that only support netbios won't be able to see your samba server when netbios support is disabled.
 
1646
Default:
 
1647
\fB\fIdisable netbios\fR = no \fR
 
1648
.TP 3n
1175
1649
disable spoolss (G)
1176
 
Enabling this parameter will disable Samba's support for the SPOOLSS set of MS\-RPC's and will yield identical behavior as Samba 2\&.0\&.x\&. Windows NT/2000 clients will downgrade to using Lanman style printing commands\&. Windows 9x/ME will be uneffected by the parameter\&. However, this will also disable the ability to upload printer drivers to a Samba server via the Windows NT Add Printer Wizard or by using the NT printer properties dialog window\&. It will also disable the capability of Windows NT/2000 clients to download print drivers from the Samba host upon demand\&. \fBBe very careful about enabling this parameter\&.\fR 
1177
 
 
1178
 
Default: \fB\fIdisable spoolss\fR = no \fR 
1179
 
 
1180
 
.TP
 
1650
Enabling this parameter will disable Samba's support for the SPOOLSS set of MS-RPC's and will yield identical behavior as Samba 2.0.x. Windows NT/2000 clients will downgrade to using Lanman style printing commands. Windows 9x/ME will be unaffected by the parameter. However, this will also disable the ability to upload printer drivers to a Samba server via the Windows NT Add Printer Wizard or by using the NT printer properties dialog window. It will also disable the capability of Windows NT/2000 clients to download print drivers from the Samba host upon demand.
 
1651
\fBBe very careful about enabling this parameter.\fR
 
1652
.sp
 
1653
Default:
 
1654
\fB\fIdisable spoolss\fR = no \fR
 
1655
.TP 3n
1181
1656
display charset (G)
1182
 
Specifies the charset that samba will use to print messages to stdout and stderr and SWAT will use\&. Should generally be the same as the unix charset\&.
1183
 
 
1184
 
Default: \fB\fIdisplay charset\fR = ASCII \fR 
1185
 
 
1186
 
Example: \fB\fIdisplay charset\fR = UTF8 \fR 
1187
 
 
1188
 
.TP
 
1657
Specifies the charset that samba will use to print messages to stdout and stderr and SWAT will use. Should generally be the same as the
 
1658
unix charset.
 
1659
.sp
 
1660
Default:
 
1661
\fB\fIdisplay charset\fR = ASCII \fR
 
1662
.sp
 
1663
Example:
 
1664
\fB\fIdisplay charset\fR = UTF8 \fR
 
1665
.TP 3n
 
1666
dmapi support (S)
 
1667
This parameter specifies whether Samba should use DMAPI to determine whether a file is offline or not. This would typically be used in conjunction with a hierarchical storage system that automatically migrates files to tape.
 
1668
.sp
 
1669
Note that Samba infers the status of a file by examining the events that a DMAPI application has registered interest in. This heuristic is satisfactory for a number of hierarchical storage systems, but there may be system for which it will fail. In this case, Samba may erroneously report files to be offline.
 
1670
.sp
 
1671
This parameter is only available if a supported DMAPI implementation was found at compilation time. It will only be used if DMAPI is found to enabled on the system at run time.
 
1672
.sp
 
1673
 
 
1674
.sp
 
1675
Default:
 
1676
\fB\fIdmapi support\fR = no \fR
 
1677
.TP 3n
1189
1678
dns proxy (G)
1190
 
Specifies that \fBnmbd\fR(8) when acting as a WINS server and finding that a NetBIOS name has not been registered, should treat the NetBIOS name word\-for\-word as a DNS name and do a lookup with the DNS server for that name on behalf of the name\-querying client\&.
1191
 
 
1192
 
Note that the maximum length for a NetBIOS name is 15 characters, so the DNS name (or DNS alias) can likewise only be 15 characters, maximum\&.
1193
 
 
1194
 
\fBnmbd\fR spawns a second copy of itself to do the DNS name lookup requests, as doing a name lookup is a blocking action\&.
1195
 
 
1196
 
Default: \fB\fIdns proxy\fR = yes \fR 
1197
 
 
1198
 
.TP
 
1679
Specifies that
 
1680
\fBnmbd\fR(8)
 
1681
when acting as a WINS server and finding that a NetBIOS name has not been registered, should treat the NetBIOS name word-for-word as a DNS name and do a lookup with the DNS server for that name on behalf of the name-querying client.
 
1682
.sp
 
1683
Note that the maximum length for a NetBIOS name is 15 characters, so the DNS name (or DNS alias) can likewise only be 15 characters, maximum.
 
1684
.sp
 
1685
\fBnmbd\fR
 
1686
spawns a second copy of itself to do the DNS name lookup requests, as doing a name lookup is a blocking action.
 
1687
.sp
 
1688
Default:
 
1689
\fB\fIdns proxy\fR = yes \fR
 
1690
.TP 3n
1199
1691
domain logons (G)
1200
 
If set to \fByes\fR, the Samba server will provide the netlogon service for Windows 9X network logons for theworkgroup it is in\&. This will also cause the Samba server to act as a domain controller for NT4 style domain services\&. For more details on setting up this feature see the Domain Control chapter of the Samba HOWTO Collection\&.
1201
 
 
1202
 
Default: \fB\fIdomain logons\fR = no \fR 
1203
 
 
1204
 
.TP
 
1692
If set to
 
1693
\fByes\fR, the Samba server will provide the netlogon service for Windows 9X network logons for the
 
1694
workgroup it is in. This will also cause the Samba server to act as a domain controller for NT4 style domain services. For more details on setting up this feature see the Domain Control chapter of the Samba HOWTO Collection.
 
1695
.sp
 
1696
Default:
 
1697
\fB\fIdomain logons\fR = no \fR
 
1698
.TP 3n
1205
1699
domain master (G)
1206
 
Tell \fBsmbd\fR(8) to enable WAN\-wide browse list collation\&. Setting this option causes \fBnmbd\fR to claim a special domain specific NetBIOS name that identifies it as a domain master browser for its givenworkgroup\&. Local master browsers in the same workgroup on broadcast\-isolated subnets will give this \fBnmbd\fR their local browse lists, and then ask \fBsmbd\fR(8) for a complete copy of the browse list for the whole wide area network\&. Browser clients will then contact their local master browser, and will receive the domain\-wide browse list, instead of just the list for their broadcast\-isolated subnet\&.
1207
 
 
1208
 
Note that Windows NT Primary Domain Controllers expect to be able to claim this workgroup specific special NetBIOS name that identifies them as domain master browsers for thatworkgroup by default (i\&.e\&. there is no way to prevent a Windows NT PDC from attempting to do this)\&. This means that if this parameter is set and \fBnmbd\fR claims the special name for a workgroup before a Windows NT PDC is able to do so then cross subnet browsing will behave strangely and may fail\&.
1209
 
 
1210
 
If domain logons = yes, then the default behavior is to enable thedomain master parameter\&. If domain logons is not enabled (the default setting), then neither will domain master be enabled by default\&.
1211
 
 
1212
 
When domain logons = Yes the default setting for this parameter is Yes, with the result that Samba will be a PDC\&. If domain master = No, Samba will function as a BDC\&. In general, this parameter should be set to 'No' only on a BDC\&.
1213
 
 
1214
 
Default: \fB\fIdomain master\fR = auto \fR 
1215
 
 
1216
 
.TP
 
1700
Tell
 
1701
\fBsmbd\fR(8)
 
1702
to enable WAN-wide browse list collation. Setting this option causes
 
1703
\fBnmbd\fR
 
1704
to claim a special domain specific NetBIOS name that identifies it as a domain master browser for its given
 
1705
workgroup. Local master browsers in the same
 
1706
workgroup on broadcast-isolated subnets will give this
 
1707
\fBnmbd\fR
 
1708
their local browse lists, and then ask
 
1709
\fBsmbd\fR(8)
 
1710
for a complete copy of the browse list for the whole wide area network. Browser clients will then contact their local master browser, and will receive the domain-wide browse list, instead of just the list for their broadcast-isolated subnet.
 
1711
.sp
 
1712
Note that Windows NT Primary Domain Controllers expect to be able to claim this
 
1713
workgroup specific special NetBIOS name that identifies them as domain master browsers for that
 
1714
workgroup by default (i.e. there is no way to prevent a Windows NT PDC from attempting to do this). This means that if this parameter is set and
 
1715
\fBnmbd\fR
 
1716
claims the special name for a
 
1717
workgroup before a Windows NT PDC is able to do so then cross subnet browsing will behave strangely and may fail.
 
1718
.sp
 
1719
If
 
1720
domain logons = yes, then the default behavior is to enable the
 
1721
domain master parameter. If
 
1722
domain logons is not enabled (the default setting), then neither will
 
1723
domain master be enabled by default.
 
1724
.sp
 
1725
When
 
1726
domain logons = Yes the default setting for this parameter is Yes, with the result that Samba will be a PDC. If
 
1727
domain master = No, Samba will function as a BDC. In general, this parameter should be set to 'No' only on a BDC.
 
1728
.sp
 
1729
Default:
 
1730
\fB\fIdomain master\fR = auto \fR
 
1731
.TP 3n
1217
1732
dont descend (S)
1218
 
There are certain directories on some systems (e\&.g\&., the \fI/proc\fR tree under Linux) that are either not of interest to clients or are infinitely deep (recursive)\&. This parameter allows you to specify a comma\-delimited list of directories that the server should always show as empty\&.
1219
 
 
1220
 
Note that Samba can be very fussy about the exact format of the "dont descend" entries\&. For example you may need \fI \&./proc\fR instead of just \fI/proc\fR\&. Experimentation is the best policy :\-)
1221
 
 
1222
 
Default: \fB\fIdont descend\fR = \fR 
1223
 
 
1224
 
Example: \fB\fIdont descend\fR = /proc,/dev \fR 
1225
 
 
1226
 
.TP
 
1733
There are certain directories on some systems (e.g., the
 
1734
\fI/proc\fR
 
1735
tree under Linux) that are either not of interest to clients or are infinitely deep (recursive). This parameter allows you to specify a comma-delimited list of directories that the server should always show as empty.
 
1736
.sp
 
1737
Note that Samba can be very fussy about the exact format of the "dont descend" entries. For example you may need
 
1738
\fI ./proc\fR
 
1739
instead of just
 
1740
\fI/proc\fR. Experimentation is the best policy :-)
 
1741
.sp
 
1742
Default:
 
1743
\fB\fIdont descend\fR = \fR
 
1744
.sp
 
1745
Example:
 
1746
\fB\fIdont descend\fR = /proc,/dev \fR
 
1747
.TP 3n
1227
1748
dos charset (G)
1228
 
DOS SMB clients assume the server has the same charset as they do\&. This option specifies which charset Samba should talk to DOS clients\&.
1229
 
 
1230
 
The default depends on which charsets you have installed\&. Samba tries to use charset 850 but falls back to ASCII in case it is not available\&. Run \fBtestparm\fR(1) to check the default on your system\&.
1231
 
 
 
1749
DOS SMB clients assume the server has the same charset as they do. This option specifies which charset Samba should talk to DOS clients.
 
1750
.sp
 
1751
The default depends on which charsets you have installed. Samba tries to use charset 850 but falls back to ASCII in case it is not available. Run
 
1752
\fBtestparm\fR(1)
 
1753
to check the default on your system.
 
1754
.sp
1232
1755
\fBNo default\fR
1233
 
 
1234
 
.TP
 
1756
.TP 3n
1235
1757
dos filemode (S)
1236
 
The default behavior in Samba is to provide UNIX\-like behavior where only the owner of a file/directory is able to change the permissions on it\&. However, this behavior is often confusing to DOS/Windows users\&. Enabling this parameter allows a user who has write access to the file (by whatever means) to modify the permissions on it\&. Note that a user belonging to the group owning the file will not be allowed to change permissions if the group is only granted read access\&. Ownership of the file/directory is not changed, only the permissions are modified\&.
1237
 
 
1238
 
Default: \fB\fIdos filemode\fR = no \fR 
1239
 
 
1240
 
.TP
 
1758
The default behavior in Samba is to provide UNIX-like behavior where only the owner of a file/directory is able to change the permissions on it. However, this behavior is often confusing to DOS/Windows users. Enabling this parameter allows a user who has write access to the file (by whatever means) to modify the permissions (including ACL) on it. Note that a user belonging to the group owning the file will not be allowed to change permissions if the group is only granted read access. Ownership of the file/directory may also be changed.
 
1759
.sp
 
1760
Default:
 
1761
\fB\fIdos filemode\fR = no \fR
 
1762
.TP 3n
1241
1763
dos filetime resolution (S)
1242
 
Under the DOS and Windows FAT filesystem, the finest granularity on time resolution is two seconds\&. Setting this parameter for a share causes Samba to round the reported time down to the nearest two second boundary when a query call that requires one second resolution is made to \fBsmbd\fR(8)\&.
1243
 
 
1244
 
This option is mainly used as a compatibility option for Visual C++ when used against Samba shares\&. If oplocks are enabled on a share, Visual C++ uses two different time reading calls to check if a file has changed since it was last read\&. One of these calls uses a one\-second granularity, the other uses a two second granularity\&. As the two second call rounds any odd second down, then if the file has a timestamp of an odd number of seconds then the two timestamps will not match and Visual C++ will keep reporting the file has changed\&. Setting this option causes the two timestamps to match, and Visual C++ is happy\&.
1245
 
 
1246
 
Default: \fB\fIdos filetime resolution\fR = no \fR 
1247
 
 
1248
 
.TP
 
1764
Under the DOS and Windows FAT filesystem, the finest granularity on time resolution is two seconds. Setting this parameter for a share causes Samba to round the reported time down to the nearest two second boundary when a query call that requires one second resolution is made to
 
1765
\fBsmbd\fR(8).
 
1766
.sp
 
1767
This option is mainly used as a compatibility option for Visual C++ when used against Samba shares. If oplocks are enabled on a share, Visual C++ uses two different time reading calls to check if a file has changed since it was last read. One of these calls uses a one-second granularity, the other uses a two second granularity. As the two second call rounds any odd second down, then if the file has a timestamp of an odd number of seconds then the two timestamps will not match and Visual C++ will keep reporting the file has changed. Setting this option causes the two timestamps to match, and Visual C++ is happy.
 
1768
.sp
 
1769
Default:
 
1770
\fB\fIdos filetime resolution\fR = no \fR
 
1771
.TP 3n
1249
1772
dos filetimes (S)
1250
 
Under DOS and Windows, if a user can write to a file they can change the timestamp on it\&. Under POSIX semantics, only the owner of the file or root may change the timestamp\&. By default, Samba runs with POSIX semantics and refuses to change the timestamp on a file if the user \fBsmbd\fR is acting on behalf of is not the file owner\&. Setting this option to \fB yes\fR allows DOS semantics and \fBsmbd\fR(8) will change the file timestamp as DOS requires\&. Due to changes in Microsoft Office 2000 and beyond, the default for this parameter has been changed from "no" to "yes" in Samba 3\&.0\&.14 and above\&. Microsoft Excel will display dialog box warnings about the file being changed by another user if this parameter is not set to "yes" and files are being shared between users\&.
1251
 
 
1252
 
Default: \fB\fIdos filetimes\fR = yes \fR 
1253
 
 
1254
 
.TP
 
1773
Under DOS and Windows, if a user can write to a file they can change the timestamp on it. Under POSIX semantics, only the owner of the file or root may change the timestamp. By default, Samba runs with POSIX semantics and refuses to change the timestamp on a file if the user
 
1774
\fBsmbd\fR
 
1775
is acting on behalf of is not the file owner. Setting this option to
 
1776
\fB yes\fR
 
1777
allows DOS semantics and
 
1778
\fBsmbd\fR(8)
 
1779
will change the file timestamp as DOS requires. Due to changes in Microsoft Office 2000 and beyond, the default for this parameter has been changed from "no" to "yes" in Samba 3.0.14 and above. Microsoft Excel will display dialog box warnings about the file being changed by another user if this parameter is not set to "yes" and files are being shared between users.
 
1780
.sp
 
1781
Default:
 
1782
\fB\fIdos filetimes\fR = yes \fR
 
1783
.TP 3n
1255
1784
ea support (S)
1256
 
This boolean parameter controls whether \fBsmbd\fR(8) will allow clients to attempt to store OS/2 style Extended attributes on a share\&. In order to enable this parameter the underlying filesystem exported by the share must support extended attributes (such as provided on XFS and EXT3 on Linux, with the correct kernel patches)\&. On Linux the filesystem must have been mounted with the mount option user_xattr in order for extended attributes to work, also extended attributes must be compiled into the Linux kernel\&.
1257
 
 
1258
 
Default: \fB\fIea support\fR = no \fR 
1259
 
 
1260
 
.TP
 
1785
This boolean parameter controls whether
 
1786
\fBsmbd\fR(8)
 
1787
will allow clients to attempt to store OS/2 style Extended attributes on a share. In order to enable this parameter the underlying filesystem exported by the share must support extended attributes (such as provided on XFS and EXT3 on Linux, with the correct kernel patches). On Linux the filesystem must have been mounted with the mount option user_xattr in order for extended attributes to work, also extended attributes must be compiled into the Linux kernel.
 
1788
.sp
 
1789
Default:
 
1790
\fB\fIea support\fR = no \fR
 
1791
.TP 3n
1261
1792
enable asu support (G)
1262
 
Hosts running the "Advanced Server for Unix (ASU)" product require some special accomodations such as creating a builting [ADMIN$] share that only supports IPC connections\&. The has been the default behavior in smbd for many years\&. However, certain Microsoft applications such as the Print Migrator tool require that the remote server support an [ADMIN$} file share\&. Disabling this parameter allows for creating an [ADMIN$] file share in smb\&.conf\&.
1263
 
 
1264
 
Default: \fB\fIenable asu support\fR = yes \fR 
1265
 
 
1266
 
.TP
 
1793
Hosts running the "Advanced Server for Unix (ASU)" product require some special accomodations such as creating a builting [ADMIN$] share that only supports IPC connections. The has been the default behavior in smbd for many years. However, certain Microsoft applications such as the Print Migrator tool require that the remote server support an [ADMIN$} file share. Disabling this parameter allows for creating an [ADMIN$] file share in smb.conf.
 
1794
.sp
 
1795
Default:
 
1796
\fB\fIenable asu support\fR = no \fR
 
1797
.TP 3n
1267
1798
enable privileges (G)
1268
 
This parameter controls whether or not smbd will honor privileges assigned to specific SIDs via either \fBnet rpc rights\fR or one of the Windows user and group manager tools\&. This parameter is disabled by default to prevent members of the Domain Admins group from being able to assign privileges to users or groups which can then result in certain smbd operations running as root that would normally run under the context of the connected user\&.
1269
 
 
1270
 
An example of how privileges can be used is to assign the right to join clients to a Samba controlled domain without providing root access to the server via smbd\&.
1271
 
 
1272
 
Please read the extended description provided in the Samba documentation before enabling this option\&.
1273
 
 
1274
 
Default: \fB\fIenable privileges\fR = no \fR 
1275
 
 
1276
 
.TP
1277
 
enable rid algorithm (G)
1278
 
This option is used to control whether or not smbd in Samba 3\&.0 should fallback to the algorithm used by Samba 2\&.2 to generate user and group RIDs\&. The longterm development goal is to remove the algorithmic mappings of RIDs altogether, but this has proved to be difficult\&. This parameter is mainly provided so that developers can turn the algorithm on and off and see what breaks\&. This parameter should not be disabled by non\-developers because certain features in Samba will fail to work without it\&.
1279
 
 
1280
 
Default: \fB\fIenable rid algorithm\fR = yes \fR 
1281
 
 
1282
 
.TP
 
1799
This parameter controls whether or not smbd will honor privileges assigned to specific SIDs via either
 
1800
\fBnet rpc rights\fR
 
1801
or one of the Windows user and group manager tools. This parameter is enabled by default. It can be disabled to prevent members of the Domain Admins group from being able to assign privileges to users or groups which can then result in certain smbd operations running as root that would normally run under the context of the connected user.
 
1802
.sp
 
1803
An example of how privileges can be used is to assign the right to join clients to a Samba controlled domain without providing root access to the server via smbd.
 
1804
.sp
 
1805
Please read the extended description provided in the Samba HOWTO documentation.
 
1806
.sp
 
1807
Default:
 
1808
\fB\fIenable privileges\fR = yes \fR
 
1809
.TP 3n
1283
1810
encrypt passwords (G)
1284
 
This boolean controls whether encrypted passwords will be negotiated with the client\&. Note that Windows NT 4\&.0 SP3 and above and also Windows 98 will by default expect encrypted passwords unless a registry entry is changed\&. To use encrypted passwords in Samba see the chapter "User Database" in the Samba HOWTO Collection\&.
1285
 
 
1286
 
MS Windows clients that expect Microsoft encrypted passwords and that do not have plain text password support enabled will be able to connect only to a Samba server that has encypted password support enabled and for which the user accounts have a valid encrypted password\&. Refer to the smbpasswd command man page for information regarding the creation of encrypted passwords for user accounts\&.
1287
 
 
1288
 
The use of plain text passwords is NOT advised as support for this feature is no longer maintained in Microsoft Windows products\&. If you want to use plain text passwords you must set this parameter to no\&.
1289
 
 
1290
 
In order for encrypted passwords to work correctly \fBsmbd\fR(8) must either have access to a local \fBsmbpasswd\fR(5) file (see the \fBsmbpasswd\fR(8) program for information on how to set up and maintain this file), or set the security = [server|domain|ads] parameter which causes \fBsmbd\fR to authenticate against another server\&.
1291
 
 
1292
 
Default: \fB\fIencrypt passwords\fR = yes \fR 
1293
 
 
1294
 
.TP
 
1811
This boolean controls whether encrypted passwords will be negotiated with the client. Note that Windows NT 4.0 SP3 and above and also Windows 98 will by default expect encrypted passwords unless a registry entry is changed. To use encrypted passwords in Samba see the chapter "User Database" in the Samba HOWTO Collection.
 
1812
.sp
 
1813
MS Windows clients that expect Microsoft encrypted passwords and that do not have plain text password support enabled will be able to connect only to a Samba server that has encypted password support enabled and for which the user accounts have a valid encrypted password. Refer to the smbpasswd command man page for information regarding the creation of encrypted passwords for user accounts.
 
1814
.sp
 
1815
The use of plain text passwords is NOT advised as support for this feature is no longer maintained in Microsoft Windows products. If you want to use plain text passwords you must set this parameter to no.
 
1816
.sp
 
1817
In order for encrypted passwords to work correctly
 
1818
\fBsmbd\fR(8)
 
1819
must either have access to a local
 
1820
\fBsmbpasswd\fR(5)
 
1821
file (see the
 
1822
\fBsmbpasswd\fR(8)
 
1823
program for information on how to set up and maintain this file), or set the
 
1824
security = [server|domain|ads] parameter which causes
 
1825
\fBsmbd\fR
 
1826
to authenticate against another server.
 
1827
.sp
 
1828
Default:
 
1829
\fB\fIencrypt passwords\fR = yes \fR
 
1830
.TP 3n
1295
1831
enhanced browsing (G)
1296
 
This option enables a couple of enhancements to cross\-subnet browse propagation that have been added in Samba but which are not standard in Microsoft implementations\&.
1297
 
 
1298
 
The first enhancement to browse propagation consists of a regular wildcard query to a Samba WINS server for all Domain Master Browsers, followed by a browse synchronization with each of the returned DMBs\&. The second enhancement consists of a regular randomised browse synchronization with all currently known DMBs\&.
1299
 
 
1300
 
You may wish to disable this option if you have a problem with empty workgroups not disappearing from browse lists\&. Due to the restrictions of the browse protocols these enhancements can cause a empty workgroup to stay around forever which can be annoying\&.
1301
 
 
1302
 
In general you should leave this option enabled as it makes cross\-subnet browse propagation much more reliable\&.
1303
 
 
1304
 
Default: \fB\fIenhanced browsing\fR = yes \fR 
1305
 
 
1306
 
.TP
 
1832
This option enables a couple of enhancements to cross-subnet browse propagation that have been added in Samba but which are not standard in Microsoft implementations.
 
1833
.sp
 
1834
The first enhancement to browse propagation consists of a regular wildcard query to a Samba WINS server for all Domain Master Browsers, followed by a browse synchronization with each of the returned DMBs. The second enhancement consists of a regular randomised browse synchronization with all currently known DMBs.
 
1835
.sp
 
1836
You may wish to disable this option if you have a problem with empty workgroups not disappearing from browse lists. Due to the restrictions of the browse protocols these enhancements can cause a empty workgroup to stay around forever which can be annoying.
 
1837
.sp
 
1838
In general you should leave this option enabled as it makes cross-subnet browse propagation much more reliable.
 
1839
.sp
 
1840
Default:
 
1841
\fB\fIenhanced browsing\fR = yes \fR
 
1842
.TP 3n
1307
1843
enumports command (G)
1308
 
The concept of a "port" is fairly foreign to UNIX hosts\&. Under Windows NT/2000 print servers, a port is associated with a port monitor and generally takes the form of a local port (i\&.e\&. LPT1:, COM1:, FILE:) or a remote port (i\&.e\&. LPD Port Monitor, etc\&.\&.\&.)\&. By default, Samba has only one port defined\-\-\fB"Samba Printer Port"\fR\&. Under Windows NT/2000, all printers must have a valid port name\&. If you wish to have a list of ports displayed (\fBsmbd \fR does not use a port name for anything) other than the default \fB"Samba Printer Port"\fR, you can define \fIenumports command\fR to point to a program which should generate a list of ports, one per line, to standard output\&. This listing will then be used in response to the level 1 and 2 EnumPorts() RPC\&.
1309
 
 
1310
 
Default: \fB\fIenumports command\fR = \fR 
1311
 
 
1312
 
Example: \fB\fIenumports command\fR = /usr/bin/listports \fR 
1313
 
 
1314
 
.TP
 
1844
The concept of a "port" is fairly foreign to UNIX hosts. Under Windows NT/2000 print servers, a port is associated with a port monitor and generally takes the form of a local port (i.e. LPT1:, COM1:, FILE:) or a remote port (i.e. LPD Port Monitor, etc...). By default, Samba has only one port defined--\fB"Samba Printer Port"\fR. Under Windows NT/2000, all printers must have a valid port name. If you wish to have a list of ports displayed (\fBsmbd \fR
 
1845
does not use a port name for anything) other than the default
 
1846
\fB"Samba Printer Port"\fR, you can define
 
1847
\fIenumports command\fR
 
1848
to point to a program which should generate a list of ports, one per line, to standard output. This listing will then be used in response to the level 1 and 2 EnumPorts() RPC.
 
1849
.sp
 
1850
Default:
 
1851
\fB\fIenumports command\fR = \fR
 
1852
.sp
 
1853
Example:
 
1854
\fB\fIenumports command\fR = /usr/bin/listports \fR
 
1855
.TP 3n
1315
1856
eventlog list (G)
1316
 
This option defines a list of log names that Samba will report to the Microsoft EventViewer utility\&. The listed eventlogs will be associated with tdb file on disk in the \fI$(libdir)/eventlog\fR\&.
1317
 
 
1318
 
The administrator must use an external process to parse the normal Unix logs such as \fI/var/log/messages\fR and write then entries to the eventlog tdb files\&. Refer to the eventlogadm(8) utility for how to write eventlog entries\&.
1319
 
 
1320
 
Default: \fB\fIeventlog list\fR = \fR 
1321
 
 
1322
 
Example: \fB\fIeventlog list\fR = Security Application Syslog Apache \fR 
1323
 
 
1324
 
.TP
 
1857
This option defines a list of log names that Samba will report to the Microsoft EventViewer utility. The listed eventlogs will be associated with tdb file on disk in the
 
1858
\fI$(lockdir)/eventlog\fR.
 
1859
.sp
 
1860
The administrator must use an external process to parse the normal Unix logs such as
 
1861
\fI/var/log/messages\fR
 
1862
and write then entries to the eventlog tdb files. Refer to the eventlogadm(8) utility for how to write eventlog entries.
 
1863
.sp
 
1864
Default:
 
1865
\fB\fIeventlog list\fR = \fR
 
1866
.sp
 
1867
Example:
 
1868
\fB\fIeventlog list\fR = Security Application Syslog Apache \fR
 
1869
.TP 3n
1325
1870
fake directory create times (S)
1326
 
NTFS and Windows VFAT file systems keep a create time for all files and directories\&. This is not the same as the ctime \- status change time \- that Unix keeps, so Samba by default reports the earliest of the various times Unix does keep\&. Setting this parameter for a share causes Samba to always report midnight 1\-1\-1980 as the create time for directories\&.
1327
 
 
1328
 
This option is mainly used as a compatibility option for Visual C++ when used against Samba shares\&. Visual C++ generated makefiles have the object directory as a dependency for each object file, and a make rule to create the directory\&. Also, when NMAKE compares timestamps it uses the creation time when examining a directory\&. Thus the object directory will be created if it does not exist, but once it does exist it will always have an earlier timestamp than the object files it contains\&.
1329
 
 
1330
 
However, Unix time semantics mean that the create time reported by Samba will be updated whenever a file is created or or deleted in the directory\&. NMAKE finds all object files in the object directory\&. The timestamp of the last one built is then compared to the timestamp of the object directory\&. If the directory's timestamp if newer, then all object files will be rebuilt\&. Enabling this option ensures directories always predate their contents and an NMAKE build will proceed as expected\&.
1331
 
 
1332
 
Default: \fB\fIfake directory create times\fR = no \fR 
1333
 
 
1334
 
.TP
 
1871
NTFS and Windows VFAT file systems keep a create time for all files and directories. This is not the same as the ctime - status change time - that Unix keeps, so Samba by default reports the earliest of the various times Unix does keep. Setting this parameter for a share causes Samba to always report midnight 1-1-1980 as the create time for directories.
 
1872
.sp
 
1873
This option is mainly used as a compatibility option for Visual C++ when used against Samba shares. Visual C++ generated makefiles have the object directory as a dependency for each object file, and a make rule to create the directory. Also, when NMAKE compares timestamps it uses the creation time when examining a directory. Thus the object directory will be created if it does not exist, but once it does exist it will always have an earlier timestamp than the object files it contains.
 
1874
.sp
 
1875
However, Unix time semantics mean that the create time reported by Samba will be updated whenever a file is created or or deleted in the directory. NMAKE finds all object files in the object directory. The timestamp of the last one built is then compared to the timestamp of the object directory. If the directory's timestamp if newer, then all object files will be rebuilt. Enabling this option ensures directories always predate their contents and an NMAKE build will proceed as expected.
 
1876
.sp
 
1877
Default:
 
1878
\fB\fIfake directory create times\fR = no \fR
 
1879
.TP 3n
1335
1880
fake oplocks (S)
1336
 
Oplocks are the way that SMB clients get permission from a server to locally cache file operations\&. If a server grants an oplock (opportunistic lock) then the client is free to assume that it is the only one accessing the file and it will aggressively cache file data\&. With some oplock types the client may even cache file open/close operations\&. This can give enormous performance benefits\&.
1337
 
 
1338
 
When you set \fBfake oplocks = yes\fR, \fBsmbd\fR(8) will always grant oplock requests no matter how many clients are using the file\&.
1339
 
 
1340
 
It is generally much better to use the real oplocks support rather than this parameter\&.
1341
 
 
1342
 
If you enable this option on all read\-only shares or shares that you know will only be accessed from one client at a time such as physically read\-only media like CDROMs, you will see a big performance improvement on many operations\&. If you enable this option on shares where multiple clients may be accessing the files read\-write at the same time you can get data corruption\&. Use this option carefully!
1343
 
 
1344
 
Default: \fB\fIfake oplocks\fR = no \fR 
1345
 
 
1346
 
.TP
 
1881
Oplocks are the way that SMB clients get permission from a server to locally cache file operations. If a server grants an oplock (opportunistic lock) then the client is free to assume that it is the only one accessing the file and it will aggressively cache file data. With some oplock types the client may even cache file open/close operations. This can give enormous performance benefits.
 
1882
.sp
 
1883
When you set
 
1884
\fBfake oplocks = yes\fR,
 
1885
\fBsmbd\fR(8)
 
1886
will always grant oplock requests no matter how many clients are using the file.
 
1887
.sp
 
1888
It is generally much better to use the real
 
1889
oplocks support rather than this parameter.
 
1890
.sp
 
1891
If you enable this option on all read-only shares or shares that you know will only be accessed from one client at a time such as physically read-only media like CDROMs, you will see a big performance improvement on many operations. If you enable this option on shares where multiple clients may be accessing the files read-write at the same time you can get data corruption. Use this option carefully!
 
1892
.sp
 
1893
Default:
 
1894
\fB\fIfake oplocks\fR = no \fR
 
1895
.TP 3n
 
1896
fam change notify (G)
 
1897
This parameter specifies whether Samba should ask the FAM daemon change notifications in directories so that SMB clients can refresh whenever the data on the server changes.
 
1898
.sp
 
1899
This parameter is only used when your system supports change notification to user programs, using the FAM daemon. If the FAM daemon is not running, this parameter is automatically disabled. The
 
1900
\fIkernel change notify\fR
 
1901
parameter will take precedence if it is also enabled.
 
1902
.sp
 
1903
Default:
 
1904
\fB\fIfam change notify\fR = yes \fR
 
1905
.TP 3n
1347
1906
follow symlinks (S)
1348
 
This parameter allows the Samba administrator to stop \fBsmbd\fR(8)from following symbolic links in a particular share\&. Setting this parameter to \fBno\fR prevents any file or directory that is a symbolic link from being followed (the user will get an error)\&. This option is very useful to stop users from adding a symbolic link to \fI/etc/passwd\fR in their home directory for instance\&. However it will slow filename lookups down slightly\&.
1349
 
 
1350
 
This option is enabled (i\&.e\&. \fBsmbd\fR will follow symbolic links) by default\&.
1351
 
 
1352
 
Default: \fB\fIfollow symlinks\fR = yes \fR 
1353
 
 
1354
 
.TP
 
1907
This parameter allows the Samba administrator to stop
 
1908
\fBsmbd\fR(8)
 
1909
from following symbolic links in a particular share. Setting this parameter to
 
1910
\fBno\fR
 
1911
prevents any file or directory that is a symbolic link from being followed (the user will get an error). This option is very useful to stop users from adding a symbolic link to
 
1912
\fI/etc/passwd\fR
 
1913
in their home directory for instance. However it will slow filename lookups down slightly.
 
1914
.sp
 
1915
This option is enabled (i.e.
 
1916
\fBsmbd\fR
 
1917
will follow symbolic links) by default.
 
1918
.sp
 
1919
Default:
 
1920
\fB\fIfollow symlinks\fR = yes \fR
 
1921
.TP 3n
1355
1922
force create mode (S)
1356
 
This parameter specifies a set of UNIX mode bit permissions that will \fBalways\fR be set on a file created by Samba\&. This is done by bitwise 'OR'ing these bits onto the mode bits of a file that is being created or having its permissions changed\&. The default for this parameter is (in octal) 000\&. The modes in this parameter are bitwise 'OR'ed onto the file mode after the mask set in the \fIcreate mask\fR parameter is applied\&.
1357
 
 
1358
 
The example below would force all created files to have read and execute permissions set for 'group' and 'other' as well as the read/write/execute bits set for the 'user'\&.
1359
 
 
1360
 
Default: \fB\fIforce create mode\fR = 000 \fR 
1361
 
 
1362
 
Example: \fB\fIforce create mode\fR = 0755 \fR 
1363
 
 
1364
 
.TP
 
1923
This parameter specifies a set of UNIX mode bit permissions that will
 
1924
\fBalways\fR
 
1925
be set on a file created by Samba. This is done by bitwise 'OR'ing these bits onto the mode bits of a file that is being created or having its permissions changed. The default for this parameter is (in octal) 000. The modes in this parameter are bitwise 'OR'ed onto the file mode after the mask set in the
 
1926
\fIcreate mask\fR
 
1927
parameter is applied.
 
1928
.sp
 
1929
The example below would force all created files to have read and execute permissions set for 'group' and 'other' as well as the read/write/execute bits set for the 'user'.
 
1930
.sp
 
1931
Default:
 
1932
\fB\fIforce create mode\fR = 000 \fR
 
1933
.sp
 
1934
Example:
 
1935
\fB\fIforce create mode\fR = 0755 \fR
 
1936
.TP 3n
1365
1937
force directory mode (S)
1366
 
This parameter specifies a set of UNIX mode bit permissions that will \fBalways\fR be set on a directory created by Samba\&. This is done by bitwise 'OR'ing these bits onto the mode bits of a directory that is being created\&. The default for this parameter is (in octal) 0000 which will not add any extra permission bits to a created directory\&. This operation is done after the mode mask in the parameter \fIdirectory mask\fR is applied\&.
1367
 
 
1368
 
The example below would force all created directories to have read and execute permissions set for 'group' and 'other' as well as the read/write/execute bits set for the 'user'\&.
1369
 
 
1370
 
Default: \fB\fIforce directory mode\fR = 000 \fR 
1371
 
 
1372
 
Example: \fB\fIforce directory mode\fR = 0755 \fR 
1373
 
 
1374
 
.TP
 
1938
This parameter specifies a set of UNIX mode bit permissions that will
 
1939
\fBalways\fR
 
1940
be set on a directory created by Samba. This is done by bitwise 'OR'ing these bits onto the mode bits of a directory that is being created. The default for this parameter is (in octal) 0000 which will not add any extra permission bits to a created directory. This operation is done after the mode mask in the parameter
 
1941
\fIdirectory mask\fR
 
1942
is applied.
 
1943
.sp
 
1944
The example below would force all created directories to have read and execute permissions set for 'group' and 'other' as well as the read/write/execute bits set for the 'user'.
 
1945
.sp
 
1946
Default:
 
1947
\fB\fIforce directory mode\fR = 000 \fR
 
1948
.sp
 
1949
Example:
 
1950
\fB\fIforce directory mode\fR = 0755 \fR
 
1951
.TP 3n
1375
1952
force directory security mode (S)
1376
 
This parameter controls what UNIX permission bits can be modified when a Windows NT client is manipulating the UNIX permission on a directory using the native NT security dialog box\&.
1377
 
 
1378
 
This parameter is applied as a mask (OR'ed with) to the changed permission bits, thus forcing any bits in this mask that the user may have modified to be on\&. Make sure not to mix up this parameter with directory security mask, which works in a similar manner to this one, but uses a logical AND instead of an OR\&.
1379
 
 
1380
 
Essentially, this mask may be treated as a set of bits that, when modifying security on a directory, to will enable (1) any flags that are off (0) but which the mask has set to on (1)\&.
1381
 
 
1382
 
If not set explicitly this parameter is 0000, which allows a user to modify all the user/group/world permissions on a directory without restrictions\&.
1383
 
 
1384
 
 
1385
 
.RS
1386
 
.Sh "Note"
1387
 
Users who can access the Samba server through other means can easily bypass this restriction, so it is primarily useful for standalone "appliance" systems\&. Administrators of most normal systems will probably want to leave it set as 0000\&.
1388
 
 
1389
 
.RE
1390
 
Default: \fB\fIforce directory security mode\fR = 0 \fR 
1391
 
 
1392
 
Example: \fB\fIforce directory security mode\fR = 700 \fR 
1393
 
 
1394
 
.TP
 
1953
This parameter controls what UNIX permission bits can be modified when a Windows NT client is manipulating the UNIX permission on a directory using the native NT security dialog box.
 
1954
.sp
 
1955
This parameter is applied as a mask (OR'ed with) to the changed permission bits, thus forcing any bits in this mask that the user may have modified to be on. Make sure not to mix up this parameter with
 
1956
directory security mask, which works in a similar manner to this one, but uses a logical AND instead of an OR.
 
1957
.sp
 
1958
Essentially, this mask may be treated as a set of bits that, when modifying security on a directory, to will enable (1) any flags that are off (0) but which the mask has set to on (1).
 
1959
.sp
 
1960
If not set explicitly this parameter is 0000, which allows a user to modify all the user/group/world permissions on a directory without restrictions.
 
1961
.sp
 
1962
.it 1 an-trap
 
1963
.nr an-no-space-flag 1
 
1964
.nr an-break-flag 1
 
1965
.br
 
1966
\fBNote\fR
 
1967
Users who can access the Samba server through other means can easily bypass this restriction, so it is primarily useful for standalone "appliance" systems. Administrators of most normal systems will probably want to leave it set as 0000.
 
1968
Default:
 
1969
\fB\fIforce directory security mode\fR = 0 \fR
 
1970
.sp
 
1971
Example:
 
1972
\fB\fIforce directory security mode\fR = 700 \fR
 
1973
.TP 3n
1395
1974
group
1396
 
This parameter is a synonym for force group\&.
1397
 
 
1398
 
.TP
 
1975
This parameter is a synonym for force group.
 
1976
.TP 3n
1399
1977
force group (S)
1400
 
This specifies a UNIX group name that will be assigned as the default primary group for all users connecting to this service\&. This is useful for sharing files by ensuring that all access to files on service will use the named group for their permissions checking\&. Thus, by assigning permissions for this group to the files and directories within this service the Samba administrator can restrict or allow sharing of these files\&.
1401
 
 
1402
 
In Samba 2\&.0\&.5 and above this parameter has extended functionality in the following way\&. If the group name listed here has a '+' character prepended to it then the current user accessing the share only has the primary group default assigned to this group if they are already assigned as a member of that group\&. This allows an administrator to decide that only users who are already in a particular group will create files with group ownership set to that group\&. This gives a finer granularity of ownership assignment\&. For example, the setting \fIforce group = +sys\fR means that only users who are already in group sys will have their default primary group assigned to sys when accessing this Samba share\&. All other users will retain their ordinary primary group\&.
1403
 
 
1404
 
If the force user parameter is also set the group specified in \fIforce group\fR will override the primary group set in \fIforce user\fR\&.
1405
 
 
1406
 
Default: \fB\fIforce group\fR = \fR 
1407
 
 
1408
 
Example: \fB\fIforce group\fR = agroup \fR 
1409
 
 
1410
 
.TP
 
1978
This specifies a UNIX group name that will be assigned as the default primary group for all users connecting to this service. This is useful for sharing files by ensuring that all access to files on service will use the named group for their permissions checking. Thus, by assigning permissions for this group to the files and directories within this service the Samba administrator can restrict or allow sharing of these files.
 
1979
.sp
 
1980
In Samba 2.0.5 and above this parameter has extended functionality in the following way. If the group name listed here has a '+' character prepended to it then the current user accessing the share only has the primary group default assigned to this group if they are already assigned as a member of that group. This allows an administrator to decide that only users who are already in a particular group will create files with group ownership set to that group. This gives a finer granularity of ownership assignment. For example, the setting
 
1981
\fIforce group = +sys\fR
 
1982
means that only users who are already in group sys will have their default primary group assigned to sys when accessing this Samba share. All other users will retain their ordinary primary group.
 
1983
.sp
 
1984
If the
 
1985
force user parameter is also set the group specified in
 
1986
\fIforce group\fR
 
1987
will override the primary group set in
 
1988
\fIforce user\fR.
 
1989
.sp
 
1990
Default:
 
1991
\fB\fIforce group\fR = \fR
 
1992
.sp
 
1993
Example:
 
1994
\fB\fIforce group\fR = agroup \fR
 
1995
.TP 3n
1411
1996
force printername (S)
1412
 
When printing from Windows NT (or later), each printer in \fIsmb\&.conf\fR has two associated names which can be used by the client\&. The first is the sharename (or shortname) defined in smb\&.conf\&. This is the only printername available for use by Windows 9x clients\&. The second name associated with a printer can be seen when browsing to the "Printers" (or "Printers and Faxes") folder on the Samba server\&. This is referred to simply as the printername (not to be confused with the \fIprinter name\fR option)\&.
1413
 
 
1414
 
When assigning a new driver to a printer on a remote Windows compatible print server such as Samba, the Windows client will rename the printer to match the driver name just uploaded\&. This can result in confusion for users when multiple printers are bound to the same driver\&. To prevent Samba from allowing the printer's printername to differ from the sharename defined in smb\&.conf, set \fIforce printername = yes\fR\&.
1415
 
 
1416
 
Be aware that enabling this parameter may affect migrating printers from a Windows server to Samba since Windows has no way to force the sharename and printername to match\&.
1417
 
 
1418
 
It is recommended that this parameter's value not be changed once the printer is in use by clients as this could cause a user not be able to delete printer connections from their local Printers folder\&.
1419
 
 
1420
 
Default: \fB\fIforce printername\fR = no \fR 
1421
 
 
1422
 
.TP
 
1997
When printing from Windows NT (or later), each printer in
 
1998
\fIsmb.conf\fR
 
1999
has two associated names which can be used by the client. The first is the sharename (or shortname) defined in smb.conf. This is the only printername available for use by Windows 9x clients. The second name associated with a printer can be seen when browsing to the "Printers" (or "Printers and Faxes") folder on the Samba server. This is referred to simply as the printername (not to be confused with the
 
2000
\fIprinter name\fR
 
2001
option).
 
2002
.sp
 
2003
When assigning a new driver to a printer on a remote Windows compatible print server such as Samba, the Windows client will rename the printer to match the driver name just uploaded. This can result in confusion for users when multiple printers are bound to the same driver. To prevent Samba from allowing the printer's printername to differ from the sharename defined in smb.conf, set
 
2004
\fIforce printername = yes\fR.
 
2005
.sp
 
2006
Be aware that enabling this parameter may affect migrating printers from a Windows server to Samba since Windows has no way to force the sharename and printername to match.
 
2007
.sp
 
2008
It is recommended that this parameter's value not be changed once the printer is in use by clients as this could cause a user not be able to delete printer connections from their local Printers folder.
 
2009
.sp
 
2010
Default:
 
2011
\fB\fIforce printername\fR = no \fR
 
2012
.TP 3n
1423
2013
force security mode (S)
1424
 
This parameter controls what UNIX permission bits can be modified when a Windows NT client is manipulating the UNIX permission on a file using the native NT security dialog box\&.
1425
 
 
1426
 
This parameter is applied as a mask (OR'ed with) to the changed permission bits, thus forcing any bits in this mask that the user may have modified to be on\&. Make sure not to mix up this parameter with security mask, which works similar like this one but uses logical AND instead of OR\&.
1427
 
 
1428
 
Essentially, one bits in this mask may be treated as a set of bits that, when modifying security on a file, the user has always set to be on\&.
1429
 
 
1430
 
If not set explicitly this parameter is set to 0, and allows a user to modify all the user/group/world permissions on a file, with no restrictions\&.
1431
 
 
1432
 
\fB Note\fR that users who can access the Samba server through other means can easily bypass this restriction, so it is primarily useful for standalone "appliance" systems\&. Administrators of most normal systems will probably want to leave this set to 0000\&.
1433
 
 
1434
 
Default: \fB\fIforce security mode\fR = 0 \fR 
1435
 
 
1436
 
Example: \fB\fIforce security mode\fR = 700 \fR 
1437
 
 
1438
 
.TP
 
2014
This parameter controls what UNIX permission bits can be modified when a Windows NT client is manipulating the UNIX permission on a file using the native NT security dialog box.
 
2015
.sp
 
2016
This parameter is applied as a mask (OR'ed with) to the changed permission bits, thus forcing any bits in this mask that the user may have modified to be on. Make sure not to mix up this parameter with
 
2017
security mask, which works similar like this one but uses logical AND instead of OR.
 
2018
.sp
 
2019
Essentially, one bits in this mask may be treated as a set of bits that, when modifying security on a file, the user has always set to be on.
 
2020
.sp
 
2021
If not set explicitly this parameter is set to 0, and allows a user to modify all the user/group/world permissions on a file, with no restrictions.
 
2022
.sp
 
2023
\fB Note\fR
 
2024
that users who can access the Samba server through other means can easily bypass this restriction, so it is primarily useful for standalone "appliance" systems. Administrators of most normal systems will probably want to leave this set to 0000.
 
2025
.sp
 
2026
Default:
 
2027
\fB\fIforce security mode\fR = 0 \fR
 
2028
.sp
 
2029
Example:
 
2030
\fB\fIforce security mode\fR = 700 \fR
 
2031
.TP 3n
1439
2032
force unknown acl user (S)
1440
 
If this parameter is set, a Windows NT ACL that contains an unknown SID (security descriptor, or representation of a user or group id) as the owner or group owner of the file will be silently mapped into the current UNIX uid or gid of the currently connected user\&.
1441
 
 
1442
 
This is designed to allow Windows NT clients to copy files and folders containing ACLs that were created locally on the client machine and contain users local to that machine only (no domain users) to be copied to a Samba server (usually with XCOPY /O) and have the unknown userid and groupid of the file owner map to the current connected user\&. This can only be fixed correctly when winbindd allows arbitrary mapping from any Windows NT SID to a UNIX uid or gid\&.
1443
 
 
1444
 
Try using this parameter when XCOPY /O gives an ACCESS_DENIED error\&.
1445
 
 
1446
 
Default: \fB\fIforce unknown acl user\fR = no \fR 
1447
 
 
1448
 
.TP
 
2033
If this parameter is set, a Windows NT ACL that contains an unknown SID (security descriptor, or representation of a user or group id) as the owner or group owner of the file will be silently mapped into the current UNIX uid or gid of the currently connected user.
 
2034
.sp
 
2035
This is designed to allow Windows NT clients to copy files and folders containing ACLs that were created locally on the client machine and contain users local to that machine only (no domain users) to be copied to a Samba server (usually with XCOPY /O) and have the unknown userid and groupid of the file owner map to the current connected user. This can only be fixed correctly when winbindd allows arbitrary mapping from any Windows NT SID to a UNIX uid or gid.
 
2036
.sp
 
2037
Try using this parameter when XCOPY /O gives an ACCESS_DENIED error.
 
2038
.sp
 
2039
Default:
 
2040
\fB\fIforce unknown acl user\fR = no \fR
 
2041
.TP 3n
1449
2042
force user (S)
1450
 
This specifies a UNIX user name that will be assigned as the default user for all users connecting to this service\&. This is useful for sharing files\&. You should also use it carefully as using it incorrectly can cause security problems\&.
1451
 
 
1452
 
This user name only gets used once a connection is established\&. Thus clients still need to connect as a valid user and supply a valid password\&. Once connected, all file operations will be performed as the "forced user", no matter what username the client connected as\&. This can be very useful\&.
1453
 
 
1454
 
In Samba 2\&.0\&.5 and above this parameter also causes the primary group of the forced user to be used as the primary group for all file activity\&. Prior to 2\&.0\&.5 the primary group was left as the primary group of the connecting user (this was a bug)\&.
1455
 
 
1456
 
Default: \fB\fIforce user\fR = \fR 
1457
 
 
1458
 
Example: \fB\fIforce user\fR = auser \fR 
1459
 
 
1460
 
.TP
 
2043
This specifies a UNIX user name that will be assigned as the default user for all users connecting to this service. This is useful for sharing files. You should also use it carefully as using it incorrectly can cause security problems.
 
2044
.sp
 
2045
This user name only gets used once a connection is established. Thus clients still need to connect as a valid user and supply a valid password. Once connected, all file operations will be performed as the "forced user", no matter what username the client connected as. This can be very useful.
 
2046
.sp
 
2047
In Samba 2.0.5 and above this parameter also causes the primary group of the forced user to be used as the primary group for all file activity. Prior to 2.0.5 the primary group was left as the primary group of the connecting user (this was a bug).
 
2048
.sp
 
2049
Default:
 
2050
\fB\fIforce user\fR = \fR
 
2051
.sp
 
2052
Example:
 
2053
\fB\fIforce user\fR = auser \fR
 
2054
.TP 3n
1461
2055
fstype (S)
1462
 
This parameter allows the administrator to configure the string that specifies the type of filesystem a share is using that is reported by \fBsmbd\fR(8) when a client queries the filesystem type for a share\&. The default type is \fBNTFS\fR for compatibility with Windows NT but this can be changed to other strings such as \fBSamba\fR or \fBFAT\fR if required\&.
1463
 
 
1464
 
Default: \fB\fIfstype\fR = NTFS \fR 
1465
 
 
1466
 
Example: \fB\fIfstype\fR = Samba \fR 
1467
 
 
1468
 
.TP
 
2056
This parameter allows the administrator to configure the string that specifies the type of filesystem a share is using that is reported by
 
2057
\fBsmbd\fR(8)
 
2058
when a client queries the filesystem type for a share. The default type is
 
2059
\fBNTFS\fR
 
2060
for compatibility with Windows NT but this can be changed to other strings such as
 
2061
\fBSamba\fR
 
2062
or
 
2063
\fBFAT\fR
 
2064
if required.
 
2065
.sp
 
2066
Default:
 
2067
\fB\fIfstype\fR = NTFS \fR
 
2068
.sp
 
2069
Example:
 
2070
\fB\fIfstype\fR = Samba \fR
 
2071
.TP 3n
1469
2072
get quota command (G)
1470
 
The \fBget quota command\fR should only be used whenever there is no operating system API available from the OS that samba can use\&.
1471
 
 
1472
 
This option is only available with \fB\&./configure \-\-with\-sys\-quotas\fR\&. Or on linux when \fB\&./configure \-\-with\-quotas\fR was used and a working quota api was found in the system\&.
1473
 
 
1474
 
This parameter should specify the path to a script that queries the quota information for the specified user/group for the partition that the specified directory is on\&.
1475
 
 
 
2073
The
 
2074
\fBget quota command\fR
 
2075
should only be used whenever there is no operating system API available from the OS that samba can use.
 
2076
.sp
 
2077
This option is only available with
 
2078
\fB./configure --with-sys-quotas\fR. Or on linux when
 
2079
\fB./configure --with-quotas\fR
 
2080
was used and a working quota api was found in the system.
 
2081
.sp
 
2082
This parameter should specify the path to a script that queries the quota information for the specified user/group for the partition that the specified directory is on.
 
2083
.sp
1476
2084
Such a script should take 3 arguments:
1477
 
 
1478
 
 
1479
 
.RS
1480
 
.TP 3
1481
 
\(bu
 
2085
.RS 3n
 
2086
.TP 3n
 
2087
&#8226;
1482
2088
directory
1483
 
.TP
1484
 
\(bu
 
2089
.TP 3n
 
2090
&#8226;
1485
2091
type of query
1486
 
.TP
1487
 
\(bu
 
2092
.TP 3n
 
2093
&#8226;
1488
2094
uid of user or gid of group
1489
 
.LP
1490
2095
.RE
1491
 
.IP
 
2096
.IP "" 3n
1492
2097
The type of query can be one of :
1493
 
 
1494
 
 
1495
 
.RS
1496
 
.TP 3
1497
 
\(bu
1498
 
1 \- user quotas
1499
 
.TP
1500
 
\(bu
1501
 
2 \- user default quotas (uid = \-1)
1502
 
.TP
1503
 
\(bu
1504
 
3 \- group quotas
1505
 
.TP
1506
 
\(bu
1507
 
4 \- group default quotas (gid = \-1)
1508
 
.LP
1509
 
.RE
1510
 
.IP
1511
 
This script should print one line as output with spaces between the arguments\&. The arguments are:
1512
 
 
1513
 
 
1514
 
.RS
1515
 
.TP 3
1516
 
\(bu
1517
 
Arg 1 \- quota flags (0 = no quotas, 1 = quotas enabled, 2 = quotas enabled and enforced)
1518
 
.TP
1519
 
\(bu
1520
 
Arg 2 \- number of currently used blocks
1521
 
.TP
1522
 
\(bu
1523
 
Arg 3 \- the softlimit number of blocks
1524
 
.TP
1525
 
\(bu
1526
 
Arg 4 \- the hardlimit number of blocks
1527
 
.TP
1528
 
\(bu
1529
 
Arg 5 \- currently used number of inodes
1530
 
.TP
1531
 
\(bu
1532
 
Arg 6 \- the softlimit number of inodes
1533
 
.TP
1534
 
\(bu
1535
 
Arg 7 \- the hardlimit number of inodes
1536
 
.TP
1537
 
\(bu
1538
 
Arg 8(optional) \- the number of bytes in a block(default is 1024)
1539
 
.LP
1540
 
.RE
1541
 
.IP
1542
 
Default: \fB\fIget quota command\fR = \fR 
1543
 
 
1544
 
Example: \fB\fIget quota command\fR = /usr/local/sbin/query_quota \fR 
1545
 
 
1546
 
.TP
 
2098
.RS 3n
 
2099
.TP 3n
 
2100
&#8226;
 
2101
1 - user quotas
 
2102
.TP 3n
 
2103
&#8226;
 
2104
2 - user default quotas (uid = -1)
 
2105
.TP 3n
 
2106
&#8226;
 
2107
3 - group quotas
 
2108
.TP 3n
 
2109
&#8226;
 
2110
4 - group default quotas (gid = -1)
 
2111
.RE
 
2112
.IP "" 3n
 
2113
This script should print one line as output with spaces between the arguments. The arguments are:
 
2114
.RS 3n
 
2115
.TP 3n
 
2116
&#8226;
 
2117
Arg 1 - quota flags (0 = no quotas, 1 = quotas enabled, 2 = quotas enabled and enforced)
 
2118
.TP 3n
 
2119
&#8226;
 
2120
Arg 2 - number of currently used blocks
 
2121
.TP 3n
 
2122
&#8226;
 
2123
Arg 3 - the softlimit number of blocks
 
2124
.TP 3n
 
2125
&#8226;
 
2126
Arg 4 - the hardlimit number of blocks
 
2127
.TP 3n
 
2128
&#8226;
 
2129
Arg 5 - currently used number of inodes
 
2130
.TP 3n
 
2131
&#8226;
 
2132
Arg 6 - the softlimit number of inodes
 
2133
.TP 3n
 
2134
&#8226;
 
2135
Arg 7 - the hardlimit number of inodes
 
2136
.TP 3n
 
2137
&#8226;
 
2138
Arg 8(optional) - the number of bytes in a block(default is 1024)
 
2139
.RE
 
2140
.IP "" 3n
 
2141
Default:
 
2142
\fB\fIget quota command\fR = \fR
 
2143
.sp
 
2144
Example:
 
2145
\fB\fIget quota command\fR = /usr/local/sbin/query_quota \fR
 
2146
.TP 3n
1547
2147
getwd cache (G)
1548
 
This is a tuning option\&. When this is enabled a caching algorithm will be used to reduce the time taken for getwd() calls\&. This can have a significant impact on performance, especially when the wide smbconfoptions parameter is set to \fBno\fR\&.
1549
 
 
1550
 
Default: \fB\fIgetwd cache\fR = yes \fR 
1551
 
 
1552
 
.TP
 
2148
This is a tuning option. When this is enabled a caching algorithm will be used to reduce the time taken for getwd() calls. This can have a significant impact on performance, especially when the
 
2149
wide smbconfoptions parameter is set to
 
2150
\fBno\fR.
 
2151
.sp
 
2152
Default:
 
2153
\fB\fIgetwd cache\fR = yes \fR
 
2154
.TP 3n
1553
2155
guest account (G)
1554
 
This is a username which will be used for access to services which are specified as guest ok (see below)\&. Whatever privileges this user has will be available to any client connecting to the guest service\&. This user must exist in the password file, but does not require a valid login\&. The user account "ftp" is often a good choice for this parameter\&.
1555
 
 
1556
 
On some systems the default guest account "nobody" may not be able to print\&. Use another account in this case\&. You should test this by trying to log in as your guest user (perhaps by using the \fBsu \-\fR command) and trying to print using the system print command such as \fBlpr(1)\fR or \fB lp(1)\fR\&.
1557
 
 
1558
 
This parameter does not accept % macros, because many parts of the system require this value to be constant for correct operation\&.
1559
 
 
1560
 
Default: \fB\fIguest account\fR = nobody # default can be changed at compile\-time \fR 
1561
 
 
1562
 
Example: \fB\fIguest account\fR = ftp \fR 
1563
 
 
1564
 
.TP
 
2156
This is a username which will be used for access to services which are specified as
 
2157
guest ok (see below). Whatever privileges this user has will be available to any client connecting to the guest service. This user must exist in the password file, but does not require a valid login. The user account "ftp" is often a good choice for this parameter.
 
2158
.sp
 
2159
On some systems the default guest account "nobody" may not be able to print. Use another account in this case. You should test this by trying to log in as your guest user (perhaps by using the
 
2160
\fBsu -\fR
 
2161
command) and trying to print using the system print command such as
 
2162
\fBlpr(1)\fR
 
2163
or
 
2164
\fB lp(1)\fR.
 
2165
.sp
 
2166
This parameter does not accept % macros, because many parts of the system require this value to be constant for correct operation.
 
2167
.sp
 
2168
Default:
 
2169
\fB\fIguest account\fR = nobody # default can be changed at compile-time \fR
 
2170
.sp
 
2171
Example:
 
2172
\fB\fIguest account\fR = ftp \fR
 
2173
.TP 3n
1565
2174
public
1566
 
This parameter is a synonym for guest ok\&.
1567
 
 
1568
 
.TP
 
2175
This parameter is a synonym for guest ok.
 
2176
.TP 3n
1569
2177
guest ok (S)
1570
 
If this parameter is \fByes\fR for a service, then no password is required to connect to the service\&. Privileges will be those of the guest account\&.
1571
 
 
1572
 
This paramater nullifies the benifits of setting restrict anonymous = 2
1573
 
 
1574
 
See the section below on security for more information about this option\&.
1575
 
 
1576
 
Default: \fB\fIguest ok\fR = no \fR 
1577
 
 
1578
 
.TP
 
2178
If this parameter is
 
2179
\fByes\fR
 
2180
for a service, then no password is required to connect to the service. Privileges will be those of the
 
2181
guest account.
 
2182
.sp
 
2183
This paramater nullifies the benifits of setting
 
2184
restrict anonymous = 2
 
2185
.sp
 
2186
See the section below on
 
2187
security for more information about this option.
 
2188
.sp
 
2189
Default:
 
2190
\fB\fIguest ok\fR = no \fR
 
2191
.TP 3n
1579
2192
only guest
1580
 
This parameter is a synonym for guest only\&.
1581
 
 
1582
 
.TP
 
2193
This parameter is a synonym for guest only.
 
2194
.TP 3n
1583
2195
guest only (S)
1584
 
If this parameter is \fByes\fR for a service, then only guest connections to the service are permitted\&. This parameter will have no effect if guest ok is not set for the service\&.
1585
 
 
1586
 
See the section below on security for more information about this option\&.
1587
 
 
1588
 
Default: \fB\fIguest only\fR = no \fR 
1589
 
 
1590
 
.TP
 
2196
If this parameter is
 
2197
\fByes\fR
 
2198
for a service, then only guest connections to the service are permitted. This parameter will have no effect if
 
2199
guest ok is not set for the service.
 
2200
.sp
 
2201
See the section below on
 
2202
security for more information about this option.
 
2203
.sp
 
2204
Default:
 
2205
\fB\fIguest only\fR = no \fR
 
2206
.TP 3n
1591
2207
hide dot files (S)
1592
 
This is a boolean parameter that controls whether files starting with a dot appear as hidden files\&.
1593
 
 
1594
 
Default: \fB\fIhide dot files\fR = yes \fR 
1595
 
 
1596
 
.TP
 
2208
This is a boolean parameter that controls whether files starting with a dot appear as hidden files.
 
2209
.sp
 
2210
Default:
 
2211
\fB\fIhide dot files\fR = yes \fR
 
2212
.TP 3n
1597
2213
hide files (S)
1598
 
This is a list of files or directories that are not visible but are accessible\&. The DOS 'hidden' attribute is applied to any files or directories that match\&.
1599
 
 
1600
 
Each entry in the list must be separated by a '/', which allows spaces to be included in the entry\&. '*' and '?' can be used to specify multiple files or directories as in DOS wildcards\&.
1601
 
 
1602
 
Each entry must be a Unix path, not a DOS path and must not include the Unix directory separator '/'\&.
1603
 
 
1604
 
Note that the case sensitivity option is applicable in hiding files\&.
1605
 
 
1606
 
Setting this parameter will affect the performance of Samba, as it will be forced to check all files and directories for a match as they are scanned\&.
1607
 
 
1608
 
The example shown above is based on files that the Macintosh SMB client (DAVE) available from Thursby creates for internal use, and also still hides all files beginning with a dot\&.
1609
 
 
1610
 
An example of us of this parameter is: 
 
2214
This is a list of files or directories that are not visible but are accessible. The DOS 'hidden' attribute is applied to any files or directories that match.
 
2215
.sp
 
2216
Each entry in the list must be separated by a '/', which allows spaces to be included in the entry. '*' and '?' can be used to specify multiple files or directories as in DOS wildcards.
 
2217
.sp
 
2218
Each entry must be a Unix path, not a DOS path and must not include the Unix directory separator '/'.
 
2219
.sp
 
2220
Note that the case sensitivity option is applicable in hiding files.
 
2221
.sp
 
2222
Setting this parameter will affect the performance of Samba, as it will be forced to check all files and directories for a match as they are scanned.
 
2223
.sp
 
2224
The example shown above is based on files that the Macintosh SMB client (DAVE) available from
 
2225
Thursby
 
2226
creates for internal use, and also still hides all files beginning with a dot.
 
2227
.sp
 
2228
An example of us of this parameter is:
 
2229
 
 
2230
.sp
1611
2231
.nf
1612
2232
 
1613
 
hide files = /\&.*/DesktopFolderDB/TrashFor%m/resource\&.frk/
 
2233
hide files = /.*/DesktopFolderDB/TrashFor%m/resource.frk/
1614
2234
.fi
1615
 
 
1616
 
 
1617
 
Default: \fB\fIhide files\fR = # no file are hidden \fR 
1618
 
 
1619
 
.TP
 
2235
 
 
2236
.sp
 
2237
Default:
 
2238
\fB\fIhide files\fR = # no file are hidden \fR
 
2239
.TP 3n
1620
2240
hide special files (S)
1621
 
This parameter prevents clients from seeing special files such as sockets, devices and fifo's in directory listings\&.
1622
 
 
1623
 
Default: \fB\fIhide special files\fR = no \fR 
1624
 
 
1625
 
.TP
 
2241
This parameter prevents clients from seeing special files such as sockets, devices and fifo's in directory listings.
 
2242
.sp
 
2243
Default:
 
2244
\fB\fIhide special files\fR = no \fR
 
2245
.TP 3n
1626
2246
hide unreadable (S)
1627
 
This parameter prevents clients from seeing the existance of files that cannot be read\&. Defaults to off\&.
1628
 
 
1629
 
Default: \fB\fIhide unreadable\fR = no \fR 
1630
 
 
1631
 
.TP
 
2247
This parameter prevents clients from seeing the existance of files that cannot be read. Defaults to off.
 
2248
.sp
 
2249
Default:
 
2250
\fB\fIhide unreadable\fR = no \fR
 
2251
.TP 3n
1632
2252
hide unwriteable files (S)
1633
 
This parameter prevents clients from seeing the existance of files that cannot be written to\&. Defaults to off\&. Note that unwriteable directories are shown as usual\&.
1634
 
 
1635
 
Default: \fB\fIhide unwriteable files\fR = no \fR 
1636
 
 
1637
 
.TP
 
2253
This parameter prevents clients from seeing the existance of files that cannot be written to. Defaults to off. Note that unwriteable directories are shown as usual.
 
2254
.sp
 
2255
Default:
 
2256
\fB\fIhide unwriteable files\fR = no \fR
 
2257
.TP 3n
1638
2258
homedir map (G)
1639
 
If nis homedir is \fByes\fR, and \fBsmbd\fR(8) is also acting as a Win95/98 \fIlogon server\fR then this parameter specifies the NIS (or YP) map from which the server for the user's home directory should be extracted\&. At present, only the Sun auto\&.home map format is understood\&. The form of the map is: 
 
2259
If
 
2260
nis homedir is
 
2261
\fByes\fR, and
 
2262
\fBsmbd\fR(8)
 
2263
is also acting as a Win95/98
 
2264
\fIlogon server\fR
 
2265
then this parameter specifies the NIS (or YP) map from which the server for the user's home directory should be extracted. At present, only the Sun auto.home map format is understood. The form of the map is:
 
2266
 
 
2267
.sp
1640
2268
.nf
1641
2269
 
1642
2270
\fBusername server:/some/file/system\fR
1643
2271
.fi
1644
 
 and the program will extract the servername from before the first ':'\&. There should probably be a better parsing system that copes with different map formats and also Amd (another automounter) maps\&.
1645
 
 
1646
 
 
1647
 
.RS
1648
 
.Sh "Note"
1649
 
A working NIS client is required on the system for this option to work\&.
1650
 
 
1651
 
.RE
1652
 
Default: \fB\fIhomedir map\fR = \fR 
1653
 
 
1654
 
Example: \fB\fIhomedir map\fR = amd\&.homedir \fR 
1655
 
 
1656
 
.TP
 
2272
and the program will extract the servername from before the first ':'. There should probably be a better parsing system that copes with different map formats and also Amd (another automounter) maps.
 
2273
.sp
 
2274
.it 1 an-trap
 
2275
.nr an-no-space-flag 1
 
2276
.nr an-break-flag 1
 
2277
.br
 
2278
\fBNote\fR
 
2279
A working NIS client is required on the system for this option to work.
 
2280
Default:
 
2281
\fB\fIhomedir map\fR = \fR
 
2282
.sp
 
2283
Example:
 
2284
\fB\fIhomedir map\fR = amd.homedir \fR
 
2285
.TP 3n
1657
2286
host msdfs (G)
1658
 
If set to \fByes\fR, Samba will act as a Dfs server, and allow Dfs\-aware clients to browse Dfs trees hosted on the server\&.
1659
 
 
1660
 
See also the msdfs root share level parameter\&. For more information on setting up a Dfs tree on Samba, refer to the MSFDS chapter in the book Samba3\-HOWTO\&.
1661
 
 
1662
 
Default: \fB\fIhost msdfs\fR = no \fR 
1663
 
 
1664
 
.TP
 
2287
If set to
 
2288
\fByes\fR, Samba will act as a Dfs server, and allow Dfs-aware clients to browse Dfs trees hosted on the server.
 
2289
.sp
 
2290
See also the
 
2291
msdfs root share level parameter. For more information on setting up a Dfs tree on Samba, refer to the MSFDS chapter in the book Samba3-HOWTO.
 
2292
.sp
 
2293
Default:
 
2294
\fB\fIhost msdfs\fR = yes \fR
 
2295
.TP 3n
1665
2296
hostname lookups (G)
1666
 
Specifies whether samba should use (expensive) hostname lookups or use the ip addresses instead\&. An example place where hostname lookups are currently used is when checking the \fBhosts deny\fR and \fBhosts allow\fR\&.
1667
 
 
1668
 
Default: \fB\fIhostname lookups\fR = no \fR 
1669
 
 
1670
 
Example: \fB\fIhostname lookups\fR = yes \fR 
1671
 
 
1672
 
.TP
 
2297
Specifies whether samba should use (expensive) hostname lookups or use the ip addresses instead. An example place where hostname lookups are currently used is when checking the
 
2298
\fBhosts deny\fR
 
2299
and
 
2300
\fBhosts allow\fR.
 
2301
.sp
 
2302
Default:
 
2303
\fB\fIhostname lookups\fR = no \fR
 
2304
.sp
 
2305
Example:
 
2306
\fB\fIhostname lookups\fR = yes \fR
 
2307
.TP 3n
1673
2308
allow hosts
1674
 
This parameter is a synonym for hosts allow\&.
1675
 
 
1676
 
.TP
 
2309
This parameter is a synonym for hosts allow.
 
2310
.TP 3n
1677
2311
hosts allow (S)
1678
 
A synonym for this parameter is allow hosts\&.
1679
 
 
1680
 
This parameter is a comma, space, or tab delimited set of hosts which are permitted to access a service\&.
1681
 
 
1682
 
If specified in the [global] section then it will apply to all services, regardless of whether the individual service has a different setting\&.
1683
 
 
1684
 
You can specify the hosts by name or IP number\&. For example, you could restrict access to only the hosts on a Class C subnet with something like \fBallow hosts = 150\&.203\&.5\&.\fR\&. The full syntax of the list is described in the man page \fIhosts_access(5)\fR\&. Note that this man page may not be present on your system, so a brief description will be given here also\&.
1685
 
 
1686
 
Note that the localhost address 127\&.0\&.0\&.1 will always be allowed access unless specifically denied by a hosts deny option\&.
1687
 
 
1688
 
You can also specify hosts by network/netmask pairs and by netgroup names if your system supports netgroups\&. The \fBEXCEPT\fR keyword can also be used to limit a wildcard list\&. The following examples may provide some help:
1689
 
 
1690
 
Example 1: allow all IPs in 150\&.203\&.*\&.*; except one
1691
 
 
1692
 
\fBhosts allow = 150\&.203\&. EXCEPT 150\&.203\&.6\&.66\fR
1693
 
 
 
2312
A synonym for this parameter is
 
2313
allow hosts.
 
2314
.sp
 
2315
This parameter is a comma, space, or tab delimited set of hosts which are permitted to access a service.
 
2316
.sp
 
2317
If specified in the [global] section then it will apply to all services, regardless of whether the individual service has a different setting.
 
2318
.sp
 
2319
You can specify the hosts by name or IP number. For example, you could restrict access to only the hosts on a Class C subnet with something like
 
2320
\fBallow hosts = 150.203.5.\fR. The full syntax of the list is described in the man page
 
2321
\fIhosts_access(5)\fR. Note that this man page may not be present on your system, so a brief description will be given here also.
 
2322
.sp
 
2323
Note that the localhost address 127.0.0.1 will always be allowed access unless specifically denied by a
 
2324
hosts deny option.
 
2325
.sp
 
2326
You can also specify hosts by network/netmask pairs and by netgroup names if your system supports netgroups. The
 
2327
\fBEXCEPT\fR
 
2328
keyword can also be used to limit a wildcard list. The following examples may provide some help:
 
2329
.sp
 
2330
Example 1: allow all IPs in 150.203.*.*; except one
 
2331
.sp
 
2332
\fBhosts allow = 150.203. EXCEPT 150.203.6.66\fR
 
2333
.sp
1694
2334
Example 2: allow hosts that match the given network/netmask
1695
 
 
1696
 
\fBhosts allow = 150\&.203\&.15\&.0/255\&.255\&.255\&.0\fR
1697
 
 
 
2335
.sp
 
2336
\fBhosts allow = 150.203.15.0/255.255.255.0\fR
 
2337
.sp
1698
2338
Example 3: allow a couple of hosts
1699
 
 
 
2339
.sp
1700
2340
\fBhosts allow = lapland, arvidsjaur\fR
1701
 
 
 
2341
.sp
1702
2342
Example 4: allow only hosts in NIS netgroup "foonet", but deny access from one particular host
1703
 
 
 
2343
.sp
1704
2344
\fBhosts allow = @foonet\fR
1705
 
 
 
2345
.sp
1706
2346
\fBhosts deny = pirate\fR
1707
 
 
1708
 
 
1709
 
.RS
1710
 
.Sh "Note"
1711
 
Note that access still requires suitable user\-level passwords\&.
1712
 
 
1713
 
.RE
1714
 
See \fBtestparm\fR(1) for a way of testing your host access to see if it does what you expect\&.
1715
 
 
1716
 
Default: \fB\fIhosts allow\fR = # none (i\&.e\&., all hosts permitted access) \fR 
1717
 
 
1718
 
Example: \fB\fIhosts allow\fR = 150\&.203\&.5\&. myhost\&.mynet\&.edu\&.au \fR 
1719
 
 
1720
 
.TP
 
2347
.sp
 
2348
.it 1 an-trap
 
2349
.nr an-no-space-flag 1
 
2350
.nr an-break-flag 1
 
2351
.br
 
2352
\fBNote\fR
 
2353
Note that access still requires suitable user-level passwords.
 
2354
See
 
2355
\fBtestparm\fR(1)
 
2356
for a way of testing your host access to see if it does what you expect.
 
2357
.sp
 
2358
Default:
 
2359
\fB\fIhosts allow\fR = # none (i.e., all hosts permitted access) \fR
 
2360
.sp
 
2361
Example:
 
2362
\fB\fIhosts allow\fR = 150.203.5. myhost.mynet.edu.au \fR
 
2363
.TP 3n
1721
2364
deny hosts
1722
 
This parameter is a synonym for hosts deny\&.
1723
 
 
1724
 
.TP
 
2365
This parameter is a synonym for hosts deny.
 
2366
.TP 3n
1725
2367
hosts deny (S)
1726
 
The opposite of \fIhosts allow\fR \- hosts listed here are \fBNOT\fR permitted access to services unless the specific services have their own lists to override this one\&. Where the lists conflict, the \fIallow\fR list takes precedence\&.
1727
 
 
1728
 
In the event that it is necessary to deny all by default, use the keyword ALL (or the netmask 0\&.0\&.0\&.0/0) and then explicitly specify to the hosts allow = hosts allow parameter those hosts that should be permitted access\&.
1729
 
 
1730
 
Default: \fB\fIhosts deny\fR = # none (i\&.e\&., no hosts specifically excluded) \fR 
1731
 
 
1732
 
Example: \fB\fIhosts deny\fR = 150\&.203\&.4\&. badhost\&.mynet\&.edu\&.au \fR 
1733
 
 
1734
 
.TP
1735
 
hosts equiv (G)
1736
 
If this global parameter is a non\-null string, it specifies the name of a file to read for the names of hosts and users who will be allowed access without specifying a password\&.
1737
 
 
1738
 
This is not be confused with hosts allow which is about hosts access to services and is more useful for guest services\&. \fI hosts equiv\fR may be useful for NT clients which will not supply passwords to Samba\&.
1739
 
 
1740
 
 
1741
 
.RS
1742
 
.Sh "Note"
1743
 
The use of \fIhosts equiv \fR can be a major security hole\&. This is because you are trusting the PC to supply the correct username\&. It is very easy to get a PC to supply a false username\&. I recommend that the \fIhosts equiv\fR option be only used if you really know what you are doing, or perhaps on a home network where you trust your spouse and kids\&. And only if you \fBreally\fR trust them :\-)\&.
1744
 
 
1745
 
.RE
1746
 
Default: \fB\fIhosts equiv\fR = # no host equivalences \fR 
1747
 
 
1748
 
Example: \fB\fIhosts equiv\fR = hosts equiv = /etc/hosts\&.equiv \fR 
1749
 
 
1750
 
.TP
 
2368
The opposite of
 
2369
\fIhosts allow\fR
 
2370
- hosts listed here are
 
2371
\fBNOT\fR
 
2372
permitted access to services unless the specific services have their own lists to override this one. Where the lists conflict, the
 
2373
\fIallow\fR
 
2374
list takes precedence.
 
2375
.sp
 
2376
In the event that it is necessary to deny all by default, use the keyword ALL (or the netmask
 
2377
0.0.0.0/0) and then explicitly specify to the
 
2378
hosts allow = hosts allow parameter those hosts that should be permitted access.
 
2379
.sp
 
2380
Default:
 
2381
\fB\fIhosts deny\fR = # none (i.e., no hosts specifically excluded) \fR
 
2382
.sp
 
2383
Example:
 
2384
\fB\fIhosts deny\fR = 150.203.4. badhost.mynet.edu.au \fR
 
2385
.TP 3n
1751
2386
idmap backend (G)
1752
 
The purpose of the idmap backend parameter is to allow idmap to NOT use the local idmap tdb file to obtain SID to UID / GID mappings, but instead to obtain them from a common LDAP backend\&. This way all domain members and controllers will have the same UID and GID to SID mappings\&. This avoids the risk of UID / GID inconsistencies across UNIX / Linux systems that are sharing information over protocols other than SMB/CIFS (ie: NFS)\&.
1753
 
 
1754
 
An alternate method of SID to UID / GID mapping can be achieved using the idmap_rid plug\-in\&. This plug\-in uses the account RID to derive the UID and GID by adding the RID to a base value specified\&. This utility requires that the parameter``allow trusted domains = No'' must be specified, as it is not compatible with multiple domain environments\&. The idmap uid and idmap gid ranges must also be specified\&.
1755
 
 
1756
 
Finally, using the idmap_ad module, the UID and GID can directly be retrieved from an Active Directory LDAP Server that supports an RFC2307 compliant LDAP schema\&. idmap_ad supports "Services for Unix" (SFU) version 2\&.x and 3\&.0\&.
1757
 
 
1758
 
Default: \fB\fIidmap backend\fR = \fR 
1759
 
 
1760
 
Example: \fB\fIidmap backend\fR = ldap:ldap://ldapslave\&.example\&.com \fR 
1761
 
 
1762
 
Example: \fB\fIidmap backend\fR = idmap_rid:BUILTIN=1000\-1999,DOMNAME=2000\-100000000 \fR 
1763
 
 
1764
 
Example: \fB\fIidmap backend\fR = idmap_ad \fR 
1765
 
 
1766
 
.TP
 
2387
The purpose of the idmap backend parameter is to allow idmap to NOT use the local idmap tdb file to obtain SID to UID / GID mappings for unmapped SIDs, but instead to obtain them from a common LDAP backend. This way all domain members and controllers will have the same UID and GID to SID mappings. This avoids the risk of UID / GID inconsistencies across UNIX / Linux systems that are sharing information over protocols other than SMB/CIFS (ie: NFS).
 
2388
.sp
 
2389
An alternate method of SID to UID / GID mapping can be achieved using the rid plug-in. This plug-in uses the account RID to derive the UID and GID by adding the RID to a base value specified. This utility requires that the parameter
 
2390
&#8220;allow trusted domains = No&#8221;
 
2391
must be specified, as it is not compatible with multiple domain environments. The idmap uid and idmap gid ranges must also be specified.
 
2392
.sp
 
2393
Finally, using the ad module, the UID and GID can directly be retrieved from an Active Directory LDAP Server that supports an RFC2307 compliant LDAP schema. ad supports "Services for Unix" (SFU) version 2.x and 3.0.
 
2394
.sp
 
2395
Default:
 
2396
\fB\fIidmap backend\fR = \fR
 
2397
.sp
 
2398
Example:
 
2399
\fB\fIidmap backend\fR = ldap:ldap://ldapslave.example.com \fR
 
2400
.sp
 
2401
Example:
 
2402
\fB\fIidmap backend\fR = rid:"BUILTIN=1000-1999,DOMNAME=2000-100000000" \fR
 
2403
.sp
 
2404
Example:
 
2405
\fB\fIidmap backend\fR = ad \fR
 
2406
.TP 3n
1767
2407
winbind gid
1768
 
This parameter is a synonym for idmap gid\&.
1769
 
 
1770
 
.TP
 
2408
This parameter is a synonym for idmap gid.
 
2409
.TP 3n
1771
2410
idmap gid (G)
1772
 
The idmap gid parameter specifies the range of group ids that are allocated for the purpose of mapping UNX groups to NT group SIDs\&. This range of group ids should have no existing local or NIS groups within it as strange conflicts can occur otherwise\&.
1773
 
 
1774
 
The availability of an idmap gid range is essential for correct operation of all group mapping\&.
1775
 
 
1776
 
Default: \fB\fIidmap gid\fR = \fR 
1777
 
 
1778
 
Example: \fB\fIidmap gid\fR = 10000\-20000 \fR 
1779
 
 
1780
 
.TP
 
2411
The idmap gid parameter specifies the range of group ids that are allocated for the purpose of mapping UNX groups to NT group SIDs. This range of group ids should have no existing local or NIS groups within it as strange conflicts can occur otherwise.
 
2412
.sp
 
2413
The availability of an idmap gid range is essential for correct operation of all group mapping.
 
2414
.sp
 
2415
Default:
 
2416
\fB\fIidmap gid\fR = \fR
 
2417
.sp
 
2418
Example:
 
2419
\fB\fIidmap gid\fR = 10000-20000 \fR
 
2420
.TP 3n
1781
2421
winbind uid
1782
 
This parameter is a synonym for idmap uid\&.
1783
 
 
1784
 
.TP
 
2422
This parameter is a synonym for idmap uid.
 
2423
.TP 3n
1785
2424
idmap uid (G)
1786
 
The idmap uid parameter specifies the range of user ids that are allocated for use in mapping UNIX users to NT user SIDs\&. This range of ids should have no existing local or NIS users within it as strange conflicts can occur otherwise\&.
1787
 
 
1788
 
Default: \fB\fIidmap uid\fR = \fR 
1789
 
 
1790
 
Example: \fB\fIidmap uid\fR = 10000\-20000 \fR 
1791
 
 
1792
 
.TP
 
2425
The idmap uid parameter specifies the range of user ids that are allocated for use in mapping UNIX users to NT user SIDs. This range of ids should have no existing local or NIS users within it as strange conflicts can occur otherwise.
 
2426
.sp
 
2427
Default:
 
2428
\fB\fIidmap uid\fR = \fR
 
2429
.sp
 
2430
Example:
 
2431
\fB\fIidmap uid\fR = 10000-20000 \fR
 
2432
.TP 3n
1793
2433
include (G)
1794
 
This allows you to include one config file inside another\&. The file is included literally, as though typed in place\&.
1795
 
 
1796
 
It takes the standard substitutions, except \fI%u\fR,\fI%P\fR and \fI%S\fR\&.
1797
 
 
1798
 
Default: \fB\fIinclude\fR = \fR 
1799
 
 
1800
 
Example: \fB\fIinclude\fR = /usr/local/samba/lib/admin_smb\&.conf \fR 
1801
 
 
1802
 
.TP
 
2434
This allows you to include one config file inside another. The file is included literally, as though typed in place.
 
2435
.sp
 
2436
It takes the standard substitutions, except
 
2437
\fI%u\fR,
 
2438
\fI%P\fR
 
2439
and
 
2440
\fI%S\fR.
 
2441
.sp
 
2442
Default:
 
2443
\fB\fIinclude\fR = \fR
 
2444
.sp
 
2445
Example:
 
2446
\fB\fIinclude\fR = /usr/local/samba/lib/admin_smb.conf \fR
 
2447
.TP 3n
1803
2448
inherit acls (S)
1804
 
This parameter can be used to ensure that if default acls exist on parent directories, they are always honored when creating a subdirectory\&. The default behavior is to use the mode specified when creating the directory\&. Enabling this option sets the mode to 0777, thus guaranteeing that default directory acls are propagated\&.
1805
 
 
1806
 
Default: \fB\fIinherit acls\fR = no \fR 
1807
 
 
1808
 
.TP
 
2449
This parameter can be used to ensure that if default acls exist on parent directories, they are always honored when creating a subdirectory. The default behavior is to use the mode specified when creating the directory. Enabling this option sets the mode to 0777, thus guaranteeing that default directory acls are propagated.
 
2450
.sp
 
2451
Default:
 
2452
\fB\fIinherit acls\fR = no \fR
 
2453
.TP 3n
1809
2454
inherit owner (S)
1810
 
The ownership of new files and directories is normally governed by effective uid of the connected user\&. This option allows the Samba administrator to specify that the ownership for new files and directories should be controlled by the ownership of the parent directory\&.
1811
 
 
1812
 
Common scenarios where this behavior is useful is in implementing drop\-boxes where users can create and edit files but not delete them and to ensure that newly create files in a user's roaming profile directory are actually owner by the user\&.
1813
 
 
1814
 
Default: \fB\fIinherit owner\fR = no \fR 
1815
 
 
1816
 
.TP
 
2455
The ownership of new files and directories is normally governed by effective uid of the connected user. This option allows the Samba administrator to specify that the ownership for new files and directories should be controlled by the ownership of the parent directory.
 
2456
.sp
 
2457
Common scenarios where this behavior is useful is in implementing drop-boxes where users can create and edit files but not delete them and to ensure that newly create files in a user's roaming profile directory are actually owner by the user.
 
2458
.sp
 
2459
Default:
 
2460
\fB\fIinherit owner\fR = no \fR
 
2461
.TP 3n
1817
2462
inherit permissions (S)
1818
 
The permissions on new files and directories are normally governed by create mask,directory mask, force create mode and force directory mode but the boolean inherit permissions parameter overrides this\&.
1819
 
 
1820
 
New directories inherit the mode of the parent directory, including bits such as setgid\&.
1821
 
 
1822
 
New files inherit their read/write bits from the parent directory\&. Their execute bits continue to be determined by map archive, map hidden and map system as usual\&.
1823
 
 
1824
 
Note that the setuid bit is \fBnever\fR set via inheritance (the code explicitly prohibits this)\&.
1825
 
 
1826
 
This can be particularly useful on large systems with many users, perhaps several thousand, to allow a single [homes] share to be used flexibly by each user\&.
1827
 
 
1828
 
Default: \fB\fIinherit permissions\fR = no \fR 
1829
 
 
1830
 
.TP
 
2463
The permissions on new files and directories are normally governed by
 
2464
create mask,
 
2465
directory mask,
 
2466
force create mode and
 
2467
force directory mode but the boolean inherit permissions parameter overrides this.
 
2468
.sp
 
2469
New directories inherit the mode of the parent directory, including bits such as setgid.
 
2470
.sp
 
2471
New files inherit their read/write bits from the parent directory. Their execute bits continue to be determined by
 
2472
map archive,
 
2473
map hidden and
 
2474
map system as usual.
 
2475
.sp
 
2476
Note that the setuid bit is
 
2477
\fBnever\fR
 
2478
set via inheritance (the code explicitly prohibits this).
 
2479
.sp
 
2480
This can be particularly useful on large systems with many users, perhaps several thousand, to allow a single [homes] share to be used flexibly by each user.
 
2481
.sp
 
2482
Default:
 
2483
\fB\fIinherit permissions\fR = no \fR
 
2484
.TP 3n
1831
2485
interfaces (G)
1832
 
This option allows you to override the default network interfaces list that Samba will use for browsing, name registration and other NBT traffic\&. By default Samba will query the kernel for the list of all active interfaces and use any interfaces except 127\&.0\&.0\&.1 that are broadcast capable\&.
1833
 
 
1834
 
The option takes a list of interface strings\&. Each string can be in any of the following forms:
1835
 
 
1836
 
 
1837
 
.RS
1838
 
.TP 3
1839
 
\(bu
1840
 
a network interface name (such as eth0)\&. This may include shell\-like wildcards so eth* will match any interface starting with the substring "eth"
1841
 
.TP
1842
 
\(bu
1843
 
an IP address\&. In this case the netmask is determined from the list of interfaces obtained from the kernel
1844
 
.TP
1845
 
\(bu
1846
 
an IP/mask pair\&.
1847
 
.TP
1848
 
\(bu
1849
 
a broadcast/mask pair\&.
1850
 
.LP
 
2486
This option allows you to override the default network interfaces list that Samba will use for browsing, name registration and other NBT traffic. By default Samba will query the kernel for the list of all active interfaces and use any interfaces except 127.0.0.1 that are broadcast capable.
 
2487
.sp
 
2488
The option takes a list of interface strings. Each string can be in any of the following forms:
 
2489
.RS 3n
 
2490
.TP 3n
 
2491
&#8226;
 
2492
a network interface name (such as eth0). This may include shell-like wildcards so eth* will match any interface starting with the substring "eth"
 
2493
.TP 3n
 
2494
&#8226;
 
2495
an IP address. In this case the netmask is determined from the list of interfaces obtained from the kernel
 
2496
.TP 3n
 
2497
&#8226;
 
2498
an IP/mask pair.
 
2499
.TP 3n
 
2500
&#8226;
 
2501
a broadcast/mask pair.
1851
2502
.RE
1852
 
.IP
1853
 
The "mask" parameters can either be a bit length (such as 24 for a C class network) or a full netmask in dotted decimal form\&.
1854
 
 
1855
 
The "IP" parameters above can either be a full dotted decimal IP address or a hostname which will be looked up via the OS's normal hostname resolution mechanisms\&.
1856
 
 
1857
 
By default Samba enables all active interfaces that are broadcast capable except the loopback adaptor (IP address 127\&.0\&.0\&.1)\&.
1858
 
 
1859
 
The example below configures three network interfaces corresponding to the eth0 device and IP addresses 192\&.168\&.2\&.10 and 192\&.168\&.3\&.10\&. The netmasks of the latter two interfaces would be set to 255\&.255\&.255\&.0\&.
1860
 
 
1861
 
Default: \fB\fIinterfaces\fR = \fR 
1862
 
 
1863
 
Example: \fB\fIinterfaces\fR = eth0 192\&.168\&.2\&.10/24 192\&.168\&.3\&.10/255\&.255\&.255\&.0 \fR 
1864
 
 
1865
 
.TP
 
2503
.IP "" 3n
 
2504
The "mask" parameters can either be a bit length (such as 24 for a C class network) or a full netmask in dotted decimal form.
 
2505
.sp
 
2506
The "IP" parameters above can either be a full dotted decimal IP address or a hostname which will be looked up via the OS's normal hostname resolution mechanisms.
 
2507
.sp
 
2508
By default Samba enables all active interfaces that are broadcast capable except the loopback adaptor (IP address 127.0.0.1).
 
2509
.sp
 
2510
The example below configures three network interfaces corresponding to the eth0 device and IP addresses 192.168.2.10 and 192.168.3.10. The netmasks of the latter two interfaces would be set to 255.255.255.0.
 
2511
.sp
 
2512
Default:
 
2513
\fB\fIinterfaces\fR = \fR
 
2514
.sp
 
2515
Example:
 
2516
\fB\fIinterfaces\fR = eth0 192.168.2.10/24 192.168.3.10/255.255.255.0 \fR
 
2517
.TP 3n
1866
2518
invalid users (S)
1867
 
This is a list of users that should not be allowed to login to this service\&. This is really a \fBparanoid\fR check to absolutely ensure an improper setting does not breach your security\&.
1868
 
 
1869
 
A name starting with a '@' is interpreted as an NIS netgroup first (if your system supports NIS), and then as a UNIX group if the name was not found in the NIS netgroup database\&.
1870
 
 
1871
 
A name starting with '+' is interpreted only by looking in the UNIX group database\&. A name starting with '&' is interpreted only by looking in the NIS netgroup database (this requires NIS to be working on your system)\&. The characters '+' and '&' may be used at the start of the name in either order so the value \fI+&group\fR means check the UNIX group database, followed by the NIS netgroup database, and the value \fI&+group\fR means check the NIS netgroup database, followed by the UNIX group database (the same as the '@' prefix)\&.
1872
 
 
1873
 
The current servicename is substituted for \fI%S\fR\&. This is useful in the [homes] section\&.
1874
 
 
1875
 
Default: \fB\fIinvalid users\fR = # no invalid users \fR 
1876
 
 
1877
 
Example: \fB\fIinvalid users\fR = root fred admin @wheel \fR 
1878
 
 
1879
 
.TP
 
2519
This is a list of users that should not be allowed to login to this service. This is really a
 
2520
\fBparanoid\fR
 
2521
check to absolutely ensure an improper setting does not breach your security.
 
2522
.sp
 
2523
A name starting with a '@' is interpreted as an NIS netgroup first (if your system supports NIS), and then as a UNIX group if the name was not found in the NIS netgroup database.
 
2524
.sp
 
2525
A name starting with '+' is interpreted only by looking in the UNIX group database. A name starting with '&' is interpreted only by looking in the NIS netgroup database (this requires NIS to be working on your system). The characters '+' and '&' may be used at the start of the name in either order so the value
 
2526
\fI+&group\fR
 
2527
means check the UNIX group database, followed by the NIS netgroup database, and the value
 
2528
\fI&+group\fR
 
2529
means check the NIS netgroup database, followed by the UNIX group database (the same as the '@' prefix).
 
2530
.sp
 
2531
The current servicename is substituted for
 
2532
\fI%S\fR. This is useful in the [homes] section.
 
2533
.sp
 
2534
Default:
 
2535
\fB\fIinvalid users\fR = # no invalid users \fR
 
2536
.sp
 
2537
Example:
 
2538
\fB\fIinvalid users\fR = root fred admin @wheel \fR
 
2539
.TP 3n
1880
2540
iprint server (G)
1881
 
This parameter is only applicable if printing is set to \fBiprint\fR\&.
1882
 
 
1883
 
If set, this option overrides the ServerName option in the CUPS \fIclient\&.conf\fR\&. This is necessary if you have virtual samba servers that connect to different CUPS daemons\&.
1884
 
 
1885
 
Default: \fB\fIiprint server\fR = "" \fR 
1886
 
 
1887
 
Example: \fB\fIiprint server\fR = MYCUPSSERVER \fR 
1888
 
 
1889
 
.TP
 
2541
This parameter is only applicable if
 
2542
printing is set to
 
2543
\fBiprint\fR.
 
2544
.sp
 
2545
If set, this option overrides the ServerName option in the CUPS
 
2546
\fIclient.conf\fR. This is necessary if you have virtual samba servers that connect to different CUPS daemons.
 
2547
.sp
 
2548
Default:
 
2549
\fB\fIiprint server\fR = "" \fR
 
2550
.sp
 
2551
Example:
 
2552
\fB\fIiprint server\fR = MYCUPSSERVER \fR
 
2553
.TP 3n
1890
2554
keepalive (G)
1891
 
The value of the parameter (an integer) represents the number of seconds between \fIkeepalive\fR packets\&. If this parameter is zero, no keepalive packets will be sent\&. Keepalive packets, if sent, allow the server to tell whether a client is still present and responding\&.
1892
 
 
1893
 
Keepalives should, in general, not be needed if the socket has the SO_KEEPALIVE attribute set on it by default\&. (see socket options)\&. Basically you should only use this option if you strike difficulties\&.
1894
 
 
1895
 
Default: \fB\fIkeepalive\fR = 300 \fR 
1896
 
 
1897
 
Example: \fB\fIkeepalive\fR = 600 \fR 
1898
 
 
1899
 
.TP
 
2555
The value of the parameter (an integer) represents the number of seconds between
 
2556
\fIkeepalive\fR
 
2557
packets. If this parameter is zero, no keepalive packets will be sent. Keepalive packets, if sent, allow the server to tell whether a client is still present and responding.
 
2558
.sp
 
2559
Keepalives should, in general, not be needed if the socket has the SO_KEEPALIVE attribute set on it by default. (see
 
2560
socket options). Basically you should only use this option if you strike difficulties.
 
2561
.sp
 
2562
Default:
 
2563
\fB\fIkeepalive\fR = 300 \fR
 
2564
.sp
 
2565
Example:
 
2566
\fB\fIkeepalive\fR = 600 \fR
 
2567
.TP 3n
1900
2568
kernel change notify (G)
1901
 
This parameter specifies whether Samba should ask the kernel for change notifications in directories so that SMB clients can refresh whenever the data on the server changes\&.
1902
 
 
1903
 
This parameter is only used when your kernel supports change notification to user programs, using the F_NOTIFY fcntl\&.
1904
 
 
1905
 
Default: \fB\fIkernel change notify\fR = yes \fR 
1906
 
 
1907
 
.TP
 
2569
This parameter specifies whether Samba should ask the kernel for change notifications in directories so that SMB clients can refresh whenever the data on the server changes.
 
2570
.sp
 
2571
This parameter is only used when your kernel supports change notification to user programs, using the F_NOTIFY fcntl.
 
2572
.sp
 
2573
Default:
 
2574
\fB\fIkernel change notify\fR = yes \fR
 
2575
.TP 3n
1908
2576
kernel oplocks (G)
1909
 
For UNIXes that support kernel based oplocks (currently only IRIX and the Linux 2\&.4 kernel), this parameter allows the use of them to be turned on or off\&.
1910
 
 
1911
 
Kernel oplocks support allows Samba \fIoplocks \fR to be broken whenever a local UNIX process or NFS operation accesses a file that \fBsmbd\fR(8) has oplocked\&. This allows complete data consistency between SMB/CIFS, NFS and local file access (and is a \fBvery\fR cool feature :\-)\&.
1912
 
 
1913
 
This parameter defaults to \fBon\fR, but is translated to a no\-op on systems that no not have the necessary kernel support\&. You should never need to touch this parameter\&.
1914
 
 
1915
 
Default: \fB\fIkernel oplocks\fR = yes \fR 
1916
 
 
1917
 
.TP
 
2577
For UNIXes that support kernel based
 
2578
oplocks (currently only IRIX and the Linux 2.4 kernel), this parameter allows the use of them to be turned on or off.
 
2579
.sp
 
2580
Kernel oplocks support allows Samba
 
2581
\fIoplocks \fR
 
2582
to be broken whenever a local UNIX process or NFS operation accesses a file that
 
2583
\fBsmbd\fR(8)
 
2584
has oplocked. This allows complete data consistency between SMB/CIFS, NFS and local file access (and is a
 
2585
\fBvery\fR
 
2586
cool feature :-).
 
2587
.sp
 
2588
This parameter defaults to
 
2589
\fBon\fR, but is translated to a no-op on systems that no not have the necessary kernel support. You should never need to touch this parameter.
 
2590
.sp
 
2591
Default:
 
2592
\fB\fIkernel oplocks\fR = yes \fR
 
2593
.TP 3n
1918
2594
lanman auth (G)
1919
 
This parameter determines whether or not \fBsmbd\fR(8) will attempt to authenticate users or permit password changes using the LANMAN password hash\&. If disabled, only clients which support NT password hashes (e\&.g\&. Windows NT/2000 clients, smbclient, but not Windows 95/98 or the MS DOS network client) will be able to connect to the Samba host\&.
1920
 
 
1921
 
The LANMAN encrypted response is easily broken, due to it's case\-insensitive nature, and the choice of algorithm\&. Servers without Windows 95/98/ME or MS DOS clients are advised to disable this option\&.
1922
 
 
1923
 
Unlike the \fBencypt passwords\fR option, this parameter cannot alter client behaviour, and the LANMAN response will still be sent over the network\&. See the \fBclient lanman auth\fR to disable this for Samba's clients (such as smbclient)
1924
 
 
1925
 
If this option, and \fBntlm auth\fR are both disabled, then only NTLMv2 logins will be permited\&. Not all clients support NTLMv2, and most will require special configuration to use it\&.
1926
 
 
1927
 
Default: \fB\fIlanman auth\fR = yes \fR 
1928
 
 
1929
 
.TP
 
2595
This parameter determines whether or not
 
2596
\fBsmbd\fR(8)
 
2597
will attempt to authenticate users or permit password changes using the LANMAN password hash. If disabled, only clients which support NT password hashes (e.g. Windows NT/2000 clients, smbclient, but not Windows 95/98 or the MS DOS network client) will be able to connect to the Samba host.
 
2598
.sp
 
2599
The LANMAN encrypted response is easily broken, due to it's case-insensitive nature, and the choice of algorithm. Servers without Windows 95/98/ME or MS DOS clients are advised to disable this option.
 
2600
.sp
 
2601
Unlike the
 
2602
\fBencypt passwords\fR
 
2603
option, this parameter cannot alter client behaviour, and the LANMAN response will still be sent over the network. See the
 
2604
\fBclient lanman auth\fR
 
2605
to disable this for Samba's clients (such as smbclient)
 
2606
.sp
 
2607
If this option, and
 
2608
\fBntlm auth\fR
 
2609
are both disabled, then only NTLMv2 logins will be permited. Not all clients support NTLMv2, and most will require special configuration to use it.
 
2610
.sp
 
2611
Default:
 
2612
\fB\fIlanman auth\fR = yes \fR
 
2613
.TP 3n
1930
2614
large readwrite (G)
1931
 
This parameter determines whether or not \fBsmbd\fR(8) supports the new 64k streaming read and write varient SMB requests introduced with Windows 2000\&. Note that due to Windows 2000 client redirector bugs this requires Samba to be running on a 64\-bit capable operating system such as IRIX, Solaris or a Linux 2\&.4 kernel\&. Can improve performance by 10% with Windows 2000 clients\&. Defaults to on\&. Not as tested as some other Samba code paths\&.
1932
 
 
1933
 
Default: \fB\fIlarge readwrite\fR = yes \fR 
1934
 
 
1935
 
.TP
 
2615
This parameter determines whether or not
 
2616
\fBsmbd\fR(8)
 
2617
supports the new 64k streaming read and write varient SMB requests introduced with Windows 2000. Note that due to Windows 2000 client redirector bugs this requires Samba to be running on a 64-bit capable operating system such as IRIX, Solaris or a Linux 2.4 kernel. Can improve performance by 10% with Windows 2000 clients. Defaults to on. Not as tested as some other Samba code paths.
 
2618
.sp
 
2619
Default:
 
2620
\fB\fIlarge readwrite\fR = yes \fR
 
2621
.TP 3n
1936
2622
ldap admin dn (G)
1937
 
The ldap admin dn defines the Distinguished Name (DN) name used by Samba to contact the ldap server when retreiving user account information\&. The ldap admin dn is used in conjunction with the admin dn password stored in the \fIprivate/secrets\&.tdb\fR file\&. See the \fBsmbpasswd\fR(8) man page for more information on how to accomplish this\&.
1938
 
 
1939
 
The ldap admin dn requires a fully specified DN\&. The ldap suffix is not appended to the ldap admin dn\&.
1940
 
 
 
2623
The
 
2624
ldap admin dn defines the Distinguished Name (DN) name used by Samba to contact the ldap server when retreiving user account information. The
 
2625
ldap admin dn is used in conjunction with the admin dn password stored in the
 
2626
\fIprivate/secrets.tdb\fR
 
2627
file. See the
 
2628
\fBsmbpasswd\fR(8)
 
2629
man page for more information on how to accomplish this.
 
2630
.sp
 
2631
The
 
2632
ldap admin dn requires a fully specified DN. The
 
2633
ldap suffix is not appended to the
 
2634
ldap admin dn.
 
2635
.sp
1941
2636
\fBNo default\fR
1942
 
 
1943
 
.TP
 
2637
.TP 3n
1944
2638
ldap delete dn (G)
1945
 
This parameter specifies whether a delete operation in the ldapsam deletes the complete entry or only the attributes specific to Samba\&.
1946
 
 
1947
 
Default: \fB\fIldap delete dn\fR = no \fR 
1948
 
 
1949
 
.TP
 
2639
This parameter specifies whether a delete operation in the ldapsam deletes the complete entry or only the attributes specific to Samba.
 
2640
.sp
 
2641
Default:
 
2642
\fB\fIldap delete dn\fR = no \fR
 
2643
.TP 3n
1950
2644
ldap group suffix (G)
1951
 
This parameters specifies the suffix that is used for groups when these are added to the LDAP directory\&. If this parameter is unset, the value of ldap suffix will be used instead\&. The suffix string is pre\-pended to the ldap suffix string so use a partial DN\&.
1952
 
 
1953
 
Default: \fB\fIldap group suffix\fR = \fR 
1954
 
 
1955
 
Example: \fB\fIldap group suffix\fR = ou=Groups \fR 
1956
 
 
1957
 
.TP
 
2645
This parameter specifies the suffix that is used for groups when these are added to the LDAP directory. If this parameter is unset, the value of
 
2646
ldap suffix will be used instead. The suffix string is pre-pended to the
 
2647
ldap suffix string so use a partial DN.
 
2648
.sp
 
2649
Default:
 
2650
\fB\fIldap group suffix\fR = \fR
 
2651
.sp
 
2652
Example:
 
2653
\fB\fIldap group suffix\fR = ou=Groups \fR
 
2654
.TP 3n
1958
2655
ldap idmap suffix (G)
1959
 
This parameters specifies the suffix that is used when storing idmap mappings\&. If this parameter is unset, the value of ldap suffix will be used instead\&. The suffix string is pre\-pended to the ldap suffix string so use a partial DN\&.
1960
 
 
1961
 
Default: \fB\fIldap idmap suffix\fR = \fR 
1962
 
 
1963
 
Example: \fB\fIldap idmap suffix\fR = ou=Idmap \fR 
1964
 
 
1965
 
.TP
 
2656
This parameters specifies the suffix that is used when storing idmap mappings. If this parameter is unset, the value of
 
2657
ldap suffix will be used instead. The suffix string is pre-pended to the
 
2658
ldap suffix string so use a partial DN.
 
2659
.sp
 
2660
Default:
 
2661
\fB\fIldap idmap suffix\fR = \fR
 
2662
.sp
 
2663
Example:
 
2664
\fB\fIldap idmap suffix\fR = ou=Idmap \fR
 
2665
.TP 3n
1966
2666
ldap machine suffix (G)
1967
 
It specifies where machines should be added to the ldap tree\&. If this parameter is unset, the value ofldap suffix will be used instead\&. The suffix string is pre\-pended to theldap suffix string so use a partial DN\&.
1968
 
 
1969
 
Default: \fB\fIldap machine suffix\fR = \fR 
1970
 
 
1971
 
Example: \fB\fIldap machine suffix\fR = ou=Computers \fR 
1972
 
 
1973
 
.TP
 
2667
It specifies where machines should be added to the ldap tree. If this parameter is unset, the value of
 
2668
ldap suffix will be used instead. The suffix string is pre-pended to the
 
2669
ldap suffix string so use a partial DN.
 
2670
.sp
 
2671
Default:
 
2672
\fB\fIldap machine suffix\fR = \fR
 
2673
.sp
 
2674
Example:
 
2675
\fB\fIldap machine suffix\fR = ou=Computers \fR
 
2676
.TP 3n
1974
2677
ldap passwd sync (G)
1975
 
This option is used to define whether or not Samba should sync the LDAP password with the NT and LM hashes for normal accounts (NOT for workstation, server or domain trusts) on a password change via SAMBA\&.
1976
 
 
1977
 
The ldap passwd sync can be set to one of three values:
1978
 
 
1979
 
 
1980
 
.RS
1981
 
.TP 3
1982
 
\(bu
1983
 
\fIYes\fR = Try to update the LDAP, NT and LM passwords and update the pwdLastSet time\&.
1984
 
.TP
1985
 
\(bu
1986
 
\fINo\fR = Update NT and LM passwords and update the pwdLastSet time\&.
1987
 
.TP
1988
 
\(bu
1989
 
\fIOnly\fR = Only update the LDAP password and let the LDAP server do the rest\&.
1990
 
.LP
 
2678
This option is used to define whether or not Samba should sync the LDAP password with the NT and LM hashes for normal accounts (NOT for workstation, server or domain trusts) on a password change via SAMBA.
 
2679
.sp
 
2680
The
 
2681
ldap passwd sync can be set to one of three values:
 
2682
.RS 3n
 
2683
.TP 3n
 
2684
&#8226;
 
2685
\fIYes\fR
 
2686
= Try to update the LDAP, NT and LM passwords and update the pwdLastSet time.
 
2687
.TP 3n
 
2688
&#8226;
 
2689
\fINo\fR
 
2690
= Update NT and LM passwords and update the pwdLastSet time.
 
2691
.TP 3n
 
2692
&#8226;
 
2693
\fIOnly\fR
 
2694
= Only update the LDAP password and let the LDAP server do the rest.
1991
2695
.RE
1992
 
.IP
1993
 
Default: \fB\fIldap passwd sync\fR = no \fR 
1994
 
 
1995
 
.TP
1996
 
ldap port (G)
1997
 
This parameter is only available if Samba has been configure to include the\fB\-\-with\-ldapsam\fR option at compile time\&.
1998
 
 
1999
 
This option is used to control the tcp port number used to contact theldap server\&. The default is to use the stand LDAPS port 636\&.
2000
 
 
2001
 
Default: \fB\fIldap port\fR = 636 # if ldap ssl = on \fR 
2002
 
 
2003
 
Default: \fB\fIldap port\fR = 389 # if ldap ssl = off \fR 
2004
 
 
2005
 
.TP
 
2696
.IP "" 3n
 
2697
Default:
 
2698
\fB\fIldap passwd sync\fR = no \fR
 
2699
.TP 3n
2006
2700
ldap replication sleep (G)
2007
 
When Samba is asked to write to a read\-only LDAP replica, we are redirected to talk to the read\-write master server\&. This server then replicates our changes back to the 'local' server, however the replication might take some seconds, especially over slow links\&. Certain client activities, particularly domain joins, can become confused by the 'success' that does not immediately change the LDAP back\-end's data\&.
2008
 
 
2009
 
This option simply causes Samba to wait a short time, to allow the LDAP server to catch up\&. If you have a particularly high\-latency network, you may wish to time the LDAP replication with a network sniffer, and increase this value accordingly\&. Be aware that no checking is performed that the data has actually replicated\&.
2010
 
 
2011
 
The value is specified in milliseconds, the maximum value is 5000 (5 seconds)\&.
2012
 
 
2013
 
Default: \fB\fIldap replication sleep\fR = 1000 \fR 
2014
 
 
2015
 
.TP
 
2701
When Samba is asked to write to a read-only LDAP replica, we are redirected to talk to the read-write master server. This server then replicates our changes back to the 'local' server, however the replication might take some seconds, especially over slow links. Certain client activities, particularly domain joins, can become confused by the 'success' that does not immediately change the LDAP back-end's data.
 
2702
.sp
 
2703
This option simply causes Samba to wait a short time, to allow the LDAP server to catch up. If you have a particularly high-latency network, you may wish to time the LDAP replication with a network sniffer, and increase this value accordingly. Be aware that no checking is performed that the data has actually replicated.
 
2704
.sp
 
2705
The value is specified in milliseconds, the maximum value is 5000 (5 seconds).
 
2706
.sp
 
2707
Default:
 
2708
\fB\fIldap replication sleep\fR = 1000 \fR
 
2709
.TP 3n
2016
2710
ldapsam:trusted (G)
2017
 
By default, Samba as a Domain Controller with an LDAP backend needs to use the Unix\-style NSS subsystem to access user and group information\&. Due to the way Unix stores user information in /etc/passwd and /etc/group this inevitably leads to inefficiencies\&. One important question a user needs to know is the list of groups he is member of\&. The plain UNIX model involves a complete enumeration of the file /etc/group and its NSS counterparts in LDAP\&. UNIX has optimized functions to enumerate group membership\&. Sadly, other functions that are used to deal with user and group attributes lack such optimization\&.
2018
 
 
2019
 
o make Samba scale well in large environments, the ldapsam:trusted = yes option assumes that the complete user and group database that is relevant to Samba is stored in LDAP with the standard posixAccount/posixGroup attributes\&. It further assumes that the Samba auxiliary object classes are stored together with the POSIX data in the same LDAP object\&. If these assumptions are met,ldapsam:trusted = yes can be activated and Samba can completely bypass the NSS system to query user information\&. Optimized LDAP queries can greatly speed up domain logon and administration tasks\&. Depending on the size of the LDAP database a factor of 100 or more for common queries is easily achieved\&.
2020
 
 
2021
 
Default: \fB\fIldapsam:trusted\fR = no \fR 
2022
 
 
2023
 
.TP
2024
 
ldap server (G)
2025
 
This parameter is only available if Samba has been configure to include the \fB\-\-with\-ldapsam\fR option at compile time\&.
2026
 
 
2027
 
This parameter should contain the FQDN of the ldap directory server which should be queried to locate user account information\&.
2028
 
 
2029
 
Default: \fB\fIldap server\fR = localhost \fR 
2030
 
 
2031
 
.TP
 
2711
By default, Samba as a Domain Controller with an LDAP backend needs to use the Unix-style NSS subsystem to access user and group information. Due to the way Unix stores user information in /etc/passwd and /etc/group this inevitably leads to inefficiencies. One important question a user needs to know is the list of groups he is member of. The plain UNIX model involves a complete enumeration of the file /etc/group and its NSS counterparts in LDAP. UNIX has optimized functions to enumerate group membership. Sadly, other functions that are used to deal with user and group attributes lack such optimization.
 
2712
.sp
 
2713
o make Samba scale well in large environments, the
 
2714
ldapsam:trusted = yes option assumes that the complete user and group database that is relevant to Samba is stored in LDAP with the standard posixAccount/posixGroup attributes. It further assumes that the Samba auxiliary object classes are stored together with the POSIX data in the same LDAP object. If these assumptions are met,
 
2715
ldapsam:trusted = yes can be activated and Samba can completely bypass the NSS system to query user information. Optimized LDAP queries can greatly speed up domain logon and administration tasks. Depending on the size of the LDAP database a factor of 100 or more for common queries is easily achieved.
 
2716
.sp
 
2717
Default:
 
2718
\fB\fIldapsam:trusted\fR = no \fR
 
2719
.TP 3n
2032
2720
ldap ssl (G)
2033
 
This option is used to define whether or not Samba should use SSL when connecting to the ldap server This is \fBNOT\fR related to Samba's previous SSL support which was enabled by specifying the\fB\-\-with\-ssl\fR option to the \fIconfigure\fR script\&.
2034
 
 
2035
 
The ldap ssl can be set to one of three values:
2036
 
 
2037
 
 
2038
 
.RS
2039
 
.TP 3
2040
 
\(bu
2041
 
\fIOff\fR = Never use SSL when querying the directory\&.
2042
 
.TP
2043
 
\(bu
2044
 
\fIStart_tls\fR = Use the LDAPv3 StartTLS extended operation (RFC2830) for communicating with the directory server\&.
2045
 
.TP
2046
 
\(bu
2047
 
\fIOn\fR = Use SSL on the ldaps port when contacting the \fIldap server\fR\&. Only available when the backwards\-compatiblity \fB\-\-with\-ldapsam\fR option is specified to configure\&. See passdb backend
2048
 
.LP
 
2721
This option is used to define whether or not Samba should use SSL when connecting to the ldap server This is
 
2722
\fBNOT\fR
 
2723
related to Samba's previous SSL support which was enabled by specifying the
 
2724
\fB--with-ssl\fR
 
2725
option to the
 
2726
\fIconfigure\fR
 
2727
script.
 
2728
.sp
 
2729
The
 
2730
ldap ssl can be set to one of three values:
 
2731
.RS 3n
 
2732
.TP 3n
 
2733
&#8226;
 
2734
\fIOff\fR
 
2735
= Never use SSL when querying the directory.
 
2736
.TP 3n
 
2737
&#8226;
 
2738
\fIStart_tls\fR
 
2739
= Use the LDAPv3 StartTLS extended operation (RFC2830) for communicating with the directory server.
 
2740
.TP 3n
 
2741
&#8226;
 
2742
\fIOn\fR
 
2743
= Use SSL on the ldaps port when contacting the
 
2744
\fIldap server\fR. Only available when the backwards-compatiblity
 
2745
\fB--with-ldapsam\fR
 
2746
option is specified to configure. See
 
2747
passdb backend
2049
2748
.RE
2050
 
.IP
2051
 
Default: \fB\fIldap ssl\fR = start_tls \fR 
2052
 
 
2053
 
.TP
 
2749
.IP "" 3n
 
2750
Default:
 
2751
\fB\fIldap ssl\fR = start_tls \fR
 
2752
.TP 3n
2054
2753
ldap suffix (G)
2055
 
Specifies the base for all ldap suffixes and for storing the sambaDomain object\&.
2056
 
 
2057
 
The ldap suffix will be appended to the values specified for the ldap user suffix,ldap group suffix, ldap machine suffix, and theldap idmap suffix\&. Each of these should be given only a DN relative to theldap suffix\&.
2058
 
 
2059
 
Default: \fB\fIldap suffix\fR = \fR 
2060
 
 
2061
 
Example: \fB\fIldap suffix\fR = dc=samba,dc=org \fR 
2062
 
 
2063
 
.TP
 
2754
Specifies the base for all ldap suffixes and for storing the sambaDomain object.
 
2755
.sp
 
2756
The ldap suffix will be appended to the values specified for the
 
2757
ldap user suffix,
 
2758
ldap group suffix,
 
2759
ldap machine suffix, and the
 
2760
ldap idmap suffix. Each of these should be given only a DN relative to the
 
2761
ldap suffix.
 
2762
.sp
 
2763
Default:
 
2764
\fB\fIldap suffix\fR = \fR
 
2765
.sp
 
2766
Example:
 
2767
\fB\fIldap suffix\fR = dc=samba,dc=org \fR
 
2768
.TP 3n
2064
2769
ldap timeout (G)
2065
 
When Samba connects to an ldap server that servermay be down or unreachable\&. To prevent Samba from hanging whilst waiting for the connection this parameter specifies in seconds how long Samba should wait before failing the connect\&. The default is to only wait fifteen seconds for the ldap server to respond to the connect request\&.
2066
 
 
2067
 
Default: \fB\fIldap timeout\fR = 15 \fR 
2068
 
 
2069
 
.TP
 
2770
When Samba connects to an ldap server that servermay be down or unreachable. To prevent Samba from hanging whilst waiting for the connection this parameter specifies in seconds how long Samba should wait before failing the connect. The default is to only wait fifteen seconds for the ldap server to respond to the connect request.
 
2771
.sp
 
2772
Default:
 
2773
\fB\fIldap timeout\fR = 15 \fR
 
2774
.TP 3n
2070
2775
ldap user suffix (G)
2071
 
This parameter specifies where users are added to the tree\&. If this parameter is unset, the value of ldap suffix will be used instead\&. The suffix string is pre\-pended to the ldap suffix string so use a partial DN\&.
2072
 
 
2073
 
Default: \fB\fIldap user suffix\fR = \fR 
2074
 
 
2075
 
Example: \fB\fIldap user suffix\fR = ou=people \fR 
2076
 
 
2077
 
.TP
 
2776
This parameter specifies where users are added to the tree. If this parameter is unset, the value of
 
2777
ldap suffix will be used instead. The suffix string is pre-pended to the
 
2778
ldap suffix string so use a partial DN.
 
2779
.sp
 
2780
Default:
 
2781
\fB\fIldap user suffix\fR = \fR
 
2782
.sp
 
2783
Example:
 
2784
\fB\fIldap user suffix\fR = ou=people \fR
 
2785
.TP 3n
2078
2786
level2 oplocks (S)
2079
 
This parameter controls whether Samba supports level2 (read\-only) oplocks on a share\&.
2080
 
 
2081
 
Level2, or read\-only oplocks allow Windows NT clients that have an oplock on a file to downgrade from a read\-write oplock to a read\-only oplock once a second client opens the file (instead of releasing all oplocks on a second open, as in traditional, exclusive oplocks)\&. This allows all openers of the file that support level2 oplocks to cache the file for read\-ahead only (ie\&. they may not cache writes or lock requests) and increases performance for many accesses of files that are not commonly written (such as application \&.EXE files)\&.
2082
 
 
2083
 
Once one of the clients which have a read\-only oplock writes to the file all clients are notified (no reply is needed or waited for) and told to break their oplocks to "none" and delete any read\-ahead caches\&.
2084
 
 
2085
 
It is recommended that this parameter be turned on to speed access to shared executables\&.
2086
 
 
2087
 
For more discussions on level2 oplocks see the CIFS spec\&.
2088
 
 
2089
 
Currently, if kernel oplocks are supported then level2 oplocks are not granted (even if this parameter is set to\fByes\fR)\&. Note also, the oplocks parameter must be set to \fByes\fR on this share in order for this parameter to have any effect\&.
2090
 
 
2091
 
Default: \fB\fIlevel2 oplocks\fR = yes \fR 
2092
 
 
2093
 
.TP
 
2787
This parameter controls whether Samba supports level2 (read-only) oplocks on a share.
 
2788
.sp
 
2789
Level2, or read-only oplocks allow Windows NT clients that have an oplock on a file to downgrade from a read-write oplock to a read-only oplock once a second client opens the file (instead of releasing all oplocks on a second open, as in traditional, exclusive oplocks). This allows all openers of the file that support level2 oplocks to cache the file for read-ahead only (ie. they may not cache writes or lock requests) and increases performance for many accesses of files that are not commonly written (such as application .EXE files).
 
2790
.sp
 
2791
Once one of the clients which have a read-only oplock writes to the file all clients are notified (no reply is needed or waited for) and told to break their oplocks to "none" and delete any read-ahead caches.
 
2792
.sp
 
2793
It is recommended that this parameter be turned on to speed access to shared executables.
 
2794
.sp
 
2795
For more discussions on level2 oplocks see the CIFS spec.
 
2796
.sp
 
2797
Currently, if
 
2798
kernel oplocks are supported then level2 oplocks are not granted (even if this parameter is set to
 
2799
\fByes\fR). Note also, the
 
2800
oplocks parameter must be set to
 
2801
\fByes\fR
 
2802
on this share in order for this parameter to have any effect.
 
2803
.sp
 
2804
Default:
 
2805
\fB\fIlevel2 oplocks\fR = yes \fR
 
2806
.TP 3n
2094
2807
lm announce (G)
2095
 
This parameter determines if \fBnmbd\fR(8) will produce Lanman announce broadcasts that are needed by OS/2 clients in order for them to see the Samba server in their browse list\&. This parameter can have three values, \fByes\fR, \fBno\fR, or\fBauto\fR\&. The default is \fBauto\fR\&. If set to \fBno\fR Samba will never produce these broadcasts\&. If set to \fByes\fR Samba will produce Lanman announce broadcasts at a frequency set by the parameterlm interval\&. If set to \fBauto\fR Samba will not send Lanman announce broadcasts by default but will listen for them\&. If it hears such a broadcast on the wire it will then start sending them at a frequency set by the parameterlm interval\&.
2096
 
 
2097
 
Default: \fB\fIlm announce\fR = auto \fR 
2098
 
 
2099
 
Example: \fB\fIlm announce\fR = yes \fR 
2100
 
 
2101
 
.TP
 
2808
This parameter determines if
 
2809
\fBnmbd\fR(8)
 
2810
will produce Lanman announce broadcasts that are needed by OS/2 clients in order for them to see the Samba server in their browse list. This parameter can have three values,
 
2811
\fByes\fR,
 
2812
\fBno\fR, or
 
2813
\fBauto\fR. The default is
 
2814
\fBauto\fR. If set to
 
2815
\fBno\fR
 
2816
Samba will never produce these broadcasts. If set to
 
2817
\fByes\fR
 
2818
Samba will produce Lanman announce broadcasts at a frequency set by the parameter
 
2819
lm interval. If set to
 
2820
\fBauto\fR
 
2821
Samba will not send Lanman announce broadcasts by default but will listen for them. If it hears such a broadcast on the wire it will then start sending them at a frequency set by the parameter
 
2822
lm interval.
 
2823
.sp
 
2824
Default:
 
2825
\fB\fIlm announce\fR = auto \fR
 
2826
.sp
 
2827
Example:
 
2828
\fB\fIlm announce\fR = yes \fR
 
2829
.TP 3n
2102
2830
lm interval (G)
2103
 
If Samba is set to produce Lanman announce broadcasts needed by OS/2 clients (see thelm announce parameter) then this parameter defines the frequency in seconds with which they will be made\&. If this is set to zero then no Lanman announcements will be made despite the setting of the lm announce parameter\&.
2104
 
 
2105
 
Default: \fB\fIlm interval\fR = 60 \fR 
2106
 
 
2107
 
Example: \fB\fIlm interval\fR = 120 \fR 
2108
 
 
2109
 
.TP
 
2831
If Samba is set to produce Lanman announce broadcasts needed by OS/2 clients (see the
 
2832
lm announce parameter) then this parameter defines the frequency in seconds with which they will be made. If this is set to zero then no Lanman announcements will be made despite the setting of the
 
2833
lm announce parameter.
 
2834
.sp
 
2835
Default:
 
2836
\fB\fIlm interval\fR = 60 \fR
 
2837
.sp
 
2838
Example:
 
2839
\fB\fIlm interval\fR = 120 \fR
 
2840
.TP 3n
2110
2841
load printers (G)
2111
 
A boolean variable that controls whether all printers in the printcap will be loaded for browsing by default\&. See the printers section for more details\&.
2112
 
 
2113
 
Default: \fB\fIload printers\fR = yes \fR 
2114
 
 
2115
 
.TP
 
2842
A boolean variable that controls whether all printers in the printcap will be loaded for browsing by default. See the
 
2843
printers section for more details.
 
2844
.sp
 
2845
Default:
 
2846
\fB\fIload printers\fR = yes \fR
 
2847
.TP 3n
2116
2848
local master (G)
2117
 
This option allows \fBnmbd\fR(8) to try and become a local master browser on a subnet\&. If set to \fBno\fR then \fB nmbd\fR will not attempt to become a local master browser on a subnet and will also lose in all browsing elections\&. By default this value is set to \fByes\fR\&. Setting this value to\fByes\fR doesn't mean that Samba will \fBbecome\fR the local master browser on a subnet, just that \fBnmbd\fR will \fBparticipate\fR in elections for local master browser\&.
2118
 
 
2119
 
Setting this value to \fBno\fR will cause \fBnmbd\fR  \fBnever\fR to become a local master browser\&.
2120
 
 
2121
 
Default: \fB\fIlocal master\fR = yes \fR 
2122
 
 
2123
 
.TP
 
2849
This option allows
 
2850
\fBnmbd\fR(8)
 
2851
to try and become a local master browser on a subnet. If set to
 
2852
\fBno\fR
 
2853
then
 
2854
\fB nmbd\fR
 
2855
will not attempt to become a local master browser on a subnet and will also lose in all browsing elections. By default this value is set to
 
2856
\fByes\fR. Setting this value to
 
2857
\fByes\fR
 
2858
doesn't mean that Samba will
 
2859
\fBbecome\fR
 
2860
the local master browser on a subnet, just that
 
2861
\fBnmbd\fR
 
2862
will
 
2863
\fBparticipate\fR
 
2864
in elections for local master browser.
 
2865
.sp
 
2866
Setting this value to
 
2867
\fBno\fR
 
2868
will cause
 
2869
\fBnmbd\fR
 
2870
\fBnever\fR
 
2871
to become a local master browser.
 
2872
.sp
 
2873
Default:
 
2874
\fB\fIlocal master\fR = yes \fR
 
2875
.TP 3n
2124
2876
lock dir
2125
 
This parameter is a synonym for lock directory\&.
2126
 
 
2127
 
.TP
 
2877
This parameter is a synonym for lock directory.
 
2878
.TP 3n
2128
2879
lock directory (G)
2129
 
This option specifies the directory where lock files will be placed\&. The lock files are used to implement themax connections option\&.
2130
 
 
2131
 
Default: \fB\fIlock directory\fR = ${prefix}/var/locks \fR 
2132
 
 
2133
 
Example: \fB\fIlock directory\fR = /var/run/samba/locks \fR 
2134
 
 
2135
 
.TP
 
2880
This option specifies the directory where lock files will be placed. The lock files are used to implement the
 
2881
max connections option.
 
2882
.sp
 
2883
Default:
 
2884
\fB\fIlock directory\fR = ${prefix}/var/locks \fR
 
2885
.sp
 
2886
Example:
 
2887
\fB\fIlock directory\fR = /var/run/samba/locks \fR
 
2888
.TP 3n
2136
2889
locking (S)
2137
 
This controls whether or not locking will be performed by the server in response to lock requests from the client\&.
2138
 
 
2139
 
If \fBlocking = no\fR, all lock and unlock requests will appear to succeed and all lock queries will report that the file in question is available for locking\&.
2140
 
 
2141
 
If \fBlocking = yes\fR, real locking will be performed by the server\&.
2142
 
 
2143
 
This option \fBmay\fR be useful for read\-only filesystems which \fBmay\fR not need locking (such as CDROM drives), although setting this parameter of \fBno\fR is not really recommended even in this case\&.
2144
 
 
2145
 
Be careful about disabling locking either globally or in a specific service, as lack of locking may result in data corruption\&. You should never need to set this parameter\&.
2146
 
 
 
2890
This controls whether or not locking will be performed by the server in response to lock requests from the client.
 
2891
.sp
 
2892
If
 
2893
\fBlocking = no\fR, all lock and unlock requests will appear to succeed and all lock queries will report that the file in question is available for locking.
 
2894
.sp
 
2895
If
 
2896
\fBlocking = yes\fR, real locking will be performed by the server.
 
2897
.sp
 
2898
This option
 
2899
\fBmay\fR
 
2900
be useful for read-only filesystems which
 
2901
\fBmay\fR
 
2902
not need locking (such as CDROM drives), although setting this parameter of
 
2903
\fBno\fR
 
2904
is not really recommended even in this case.
 
2905
.sp
 
2906
Be careful about disabling locking either globally or in a specific service, as lack of locking may result in data corruption. You should never need to set this parameter.
 
2907
.sp
2147
2908
\fBNo default\fR
2148
 
 
2149
 
.TP
 
2909
.TP 3n
2150
2910
lock spin count (G)
2151
 
This parameter controls the number of times that smbd should attempt to gain a byte range lock on the behalf of a client request\&. Experiments have shown that Windows 2k servers do not reply with a failure if the lock could not be immediately granted, but try a few more times in case the lock could later be acquired\&. This behavior is used to support PC database formats such as MS Access and FoxPro\&.
2152
 
 
2153
 
Default: \fB\fIlock spin count\fR = 3 \fR 
2154
 
 
2155
 
.TP
 
2911
This parameter has been made inoperative in Samba 3.0.24. The functionality it contolled is now controlled by the parameter
 
2912
lock spin time.
 
2913
.sp
 
2914
Default:
 
2915
\fB\fIlock spin count\fR = 0 \fR
 
2916
.TP 3n
2156
2917
lock spin time (G)
2157
 
The time in microseconds that smbd should pause before attempting to gain a failed lock\&. Seelock spin count for more details\&.
2158
 
 
2159
 
Default: \fB\fIlock spin time\fR = 10 \fR 
2160
 
 
2161
 
.TP
 
2918
The time in microseconds that smbd should keep waiting to see if a failed lock request can be granted. This parameter has changed in default value from Samba 3.0.23 from 10 to 200. The associated
 
2919
lock spin count parameter is no longer used in Samba 3.0.24. You should not need to change the value of this parameter.
 
2920
.sp
 
2921
Default:
 
2922
\fB\fIlock spin time\fR = 200 \fR
 
2923
.TP 3n
2162
2924
log file (G)
2163
 
This option allows you to override the name of the Samba log file (also known as the debug file)\&.
2164
 
 
2165
 
This option takes the standard substitutions, allowing you to have separate log files for each user or machine\&.
2166
 
 
 
2925
This option allows you to override the name of the Samba log file (also known as the debug file).
 
2926
.sp
 
2927
This option takes the standard substitutions, allowing you to have separate log files for each user or machine.
 
2928
.sp
2167
2929
\fBNo default\fR
2168
 
 
2169
 
Example: \fB\fIlog file\fR = /usr/local/samba/var/log\&.%m \fR 
2170
 
 
2171
 
.TP
 
2930
.sp
 
2931
Example:
 
2932
\fB\fIlog file\fR = /usr/local/samba/var/log.%m \fR
 
2933
.TP 3n
2172
2934
debuglevel
2173
 
This parameter is a synonym for log level\&.
2174
 
 
2175
 
.TP
 
2935
This parameter is a synonym for log level.
 
2936
.TP 3n
2176
2937
log level (G)
2177
 
The value of the parameter (a astring) allows the debug level (logging level) to be specified in the \fIsmb\&.conf\fR file\&. This parameter has been extended since the 2\&.2\&.x series, now it allow to specify the debug level for multiple debug classes\&. This is to give greater flexibility in the configuration of the system\&.
2178
 
 
2179
 
The default will be the log level specified on the command line or level zero if none was specified\&.
2180
 
 
 
2938
The value of the parameter (a astring) allows the debug level (logging level) to be specified in the
 
2939
\fIsmb.conf\fR
 
2940
file. This parameter has been extended since the 2.2.x series, now it allow to specify the debug level for multiple debug classes. This is to give greater flexibility in the configuration of the system.
 
2941
.sp
 
2942
The default will be the log level specified on the command line or level zero if none was specified.
 
2943
.sp
2181
2944
\fBNo default\fR
2182
 
 
2183
 
Example: \fB\fIlog level\fR = 3 passdb:5 auth:10 winbind:2 \fR 
2184
 
 
2185
 
.TP
 
2945
.sp
 
2946
Example:
 
2947
\fB\fIlog level\fR = 3 passdb:5 auth:10 winbind:2 \fR
 
2948
.TP 3n
2186
2949
logon drive (G)
2187
 
This parameter specifies the local path to which the home directory will be connected (see logon home) and is only used by NT Workstations\&.
2188
 
 
2189
 
Note that this option is only useful if Samba is set up as a logon server\&.
2190
 
 
2191
 
Default: \fB\fIlogon drive\fR = z: \fR 
2192
 
 
2193
 
Example: \fB\fIlogon drive\fR = h: \fR 
2194
 
 
2195
 
.TP
 
2950
This parameter specifies the local path to which the home directory will be connected (see
 
2951
logon home) and is only used by NT Workstations.
 
2952
.sp
 
2953
Note that this option is only useful if Samba is set up as a logon server.
 
2954
.sp
 
2955
Default:
 
2956
\fB\fIlogon drive\fR = \fR
 
2957
.sp
 
2958
Example:
 
2959
\fB\fIlogon drive\fR = h: \fR
 
2960
.TP 3n
2196
2961
logon home (G)
2197
 
This parameter specifies the home directory location when a Win95/98 or NT Workstation logs into a Samba PDC\&. It allows you to do
2198
 
 
2199
 
C:\\>\fBNET USE H: /HOME\fR 
2200
 
 
2201
 
from a command prompt, for example\&.
2202
 
 
2203
 
This option takes the standard substitutions, allowing you to have separate logon scripts for each user or machine\&.
2204
 
 
2205
 
This parameter can be used with Win9X workstations to ensure that roaming profiles are stored in a subdirectory of the user's home directory\&. This is done in the following way:
2206
 
 
2207
 
\fBlogon home = \\\\%N\\%U\\profile\fR 
2208
 
 
2209
 
This tells Samba to return the above string, with substitutions made when a client requests the info, generally in a NetUserGetInfo request\&. Win9X clients truncate the info to \\\\server\\share when a user does\fBnet use /home\fR but use the whole string when dealing with profiles\&.
2210
 
 
2211
 
Note that in prior versions of Samba, the logon path was returned rather than\fIlogon home\fR\&. This broke \fBnet use /home\fR but allowed profiles outside the home directory\&. The current implementation is correct, and can be used for profiles if you use the above trick\&.
2212
 
 
2213
 
Disable this feature by setting logon home = "" \- using the empty string\&.
2214
 
 
2215
 
This option is only useful if Samba is set up as a logon server\&.
2216
 
 
2217
 
Default: \fB\fIlogon home\fR = \\\\%N\\%U \fR 
2218
 
 
2219
 
Example: \fB\fIlogon home\fR = \\\\remote_smb_server\\%U \fR 
2220
 
 
2221
 
.TP
 
2962
This parameter specifies the home directory location when a Win95/98 or NT Workstation logs into a Samba PDC. It allows you to do
 
2963
.sp
 
2964
 
 
2965
C:\>\fBNET USE H: /HOME\fR
 
2966
.sp
 
2967
from a command prompt, for example.
 
2968
.sp
 
2969
This option takes the standard substitutions, allowing you to have separate logon scripts for each user or machine.
 
2970
.sp
 
2971
This parameter can be used with Win9X workstations to ensure that roaming profiles are stored in a subdirectory of the user's home directory. This is done in the following way:
 
2972
.sp
 
2973
 
 
2974
\fBlogon home = \\%N\%U\profile\fR
 
2975
.sp
 
2976
This tells Samba to return the above string, with substitutions made when a client requests the info, generally in a NetUserGetInfo request. Win9X clients truncate the info to \\server\share when a user does
 
2977
\fBnet use /home\fR
 
2978
but use the whole string when dealing with profiles.
 
2979
.sp
 
2980
Note that in prior versions of Samba, the
 
2981
logon path was returned rather than
 
2982
\fIlogon home\fR. This broke
 
2983
\fBnet use /home\fR
 
2984
but allowed profiles outside the home directory. The current implementation is correct, and can be used for profiles if you use the above trick.
 
2985
.sp
 
2986
Disable this feature by setting
 
2987
logon home = "" - using the empty string.
 
2988
.sp
 
2989
This option is only useful if Samba is set up as a logon server.
 
2990
.sp
 
2991
Default:
 
2992
\fB\fIlogon home\fR = \\%N\%U \fR
 
2993
.sp
 
2994
Example:
 
2995
\fB\fIlogon home\fR = \\remote_smb_server\%U \fR
 
2996
.TP 3n
2222
2997
logon path (G)
2223
 
This parameter specifies the directory where roaming profiles (Desktop, NTuser\&.dat, etc) are stored\&. Contrary to previous versions of these manual pages, it has nothing to do with Win 9X roaming profiles\&. To find out how to handle roaming profiles for Win 9X system, see thelogon home parameter\&.
2224
 
 
2225
 
This option takes the standard substitutions, allowing you to have separate logon scripts for each user or machine\&. It also specifies the directory from which the "Application Data", (\fIdesktop\fR, \fIstart menu\fR, \fInetwork neighborhood\fR, \fIprograms\fR and other folders, and their contents, are loaded and displayed on your Windows NT client\&.
2226
 
 
2227
 
The share and the path must be readable by the user for the preferences and directories to be loaded onto the Windows NT client\&. The share must be writeable when the user logs in for the first time, in order that the Windows NT client can create the NTuser\&.dat and other directories\&. Thereafter, the directories and any of the contents can, if required, be made read\-only\&. It is not advisable that the NTuser\&.dat file be made read\-only \- rename it to NTuser\&.man to achieve the desired effect (a\fBMAN\fRdatory profile)\&.
2228
 
 
2229
 
Windows clients can sometimes maintain a connection to the [homes] share, even though there is no user logged in\&. Therefore, it is vital that the logon path does not include a reference to the homes share (i\&.e\&. setting this parameter to \\\\%N\\homes\\profile_path will cause problems)\&.
2230
 
 
2231
 
This option takes the standard substitutions, allowing you to have separate logon scripts for each user or machine\&.
2232
 
 
2233
 
 
2234
 
.RS
2235
 
.Sh "Warning"
2236
 
Do not quote the value\&. Setting this as ``\\\\%N\\profile\\%U'' will break profile handling\&. Where the tdbsam or ldapsam passdb backend is used, at the time the user account is created the value configured for this parameter is written to the passdb backend and that value will over\-ride the parameter value present in the smb\&.conf file\&. Any error present in the passdb backend account record must be editted using the appropriate tool (pdbedit on the command\-line, or any other locally provided system tool\&.
2237
 
 
2238
 
.RE
2239
 
Note that this option is only useful if Samba is set up as a domain controller\&.
2240
 
 
2241
 
Disable the use of roaming profiles by setting the value of this parameter to the empty string\&. For example, logon path = ""\&. Take note that even if the default setting in the smb\&.conf file is the empty string, any value specified in the user account settings in the passdb backend will over\-ride the effect of setting this parameter to null\&. Disabling of all roaming profile use requires that the user account settings must also be blank\&.
2242
 
 
2243
 
An example of use is: 
 
2998
This parameter specifies the directory where roaming profiles (Desktop, NTuser.dat, etc) are stored. Contrary to previous versions of these manual pages, it has nothing to do with Win 9X roaming profiles. To find out how to handle roaming profiles for Win 9X system, see the
 
2999
logon home parameter.
 
3000
.sp
 
3001
This option takes the standard substitutions, allowing you to have separate logon scripts for each user or machine. It also specifies the directory from which the "Application Data", (\fIdesktop\fR,
 
3002
\fIstart menu\fR,
 
3003
\fInetwork neighborhood\fR,
 
3004
\fIprograms\fR
 
3005
and other folders, and their contents, are loaded and displayed on your Windows NT client.
 
3006
.sp
 
3007
The share and the path must be readable by the user for the preferences and directories to be loaded onto the Windows NT client. The share must be writeable when the user logs in for the first time, in order that the Windows NT client can create the NTuser.dat and other directories. Thereafter, the directories and any of the contents can, if required, be made read-only. It is not advisable that the NTuser.dat file be made read-only - rename it to NTuser.man to achieve the desired effect (a
 
3008
\fBMAN\fRdatory profile).
 
3009
.sp
 
3010
Windows clients can sometimes maintain a connection to the [homes] share, even though there is no user logged in. Therefore, it is vital that the logon path does not include a reference to the homes share (i.e. setting this parameter to \\%N\homes\profile_path will cause problems).
 
3011
.sp
 
3012
This option takes the standard substitutions, allowing you to have separate logon scripts for each user or machine.
 
3013
.sp
 
3014
.it 1 an-trap
 
3015
.nr an-no-space-flag 1
 
3016
.nr an-break-flag 1
 
3017
.br
 
3018
\fBWarning\fR
 
3019
Do not quote the value. Setting this as
 
3020
&#8220;\\%N\profile\%U&#8221;
 
3021
will break profile handling. Where the tdbsam or ldapsam passdb backend is used, at the time the user account is created the value configured for this parameter is written to the passdb backend and that value will over-ride the parameter value present in the smb.conf file. Any error present in the passdb backend account record must be editted using the appropriate tool (pdbedit on the command-line, or any other locally provided system tool.
 
3022
Note that this option is only useful if Samba is set up as a domain controller.
 
3023
.sp
 
3024
Disable the use of roaming profiles by setting the value of this parameter to the empty string. For example,
 
3025
logon path = "". Take note that even if the default setting in the smb.conf file is the empty string, any value specified in the user account settings in the passdb backend will over-ride the effect of setting this parameter to null. Disabling of all roaming profile use requires that the user account settings must also be blank.
 
3026
.sp
 
3027
An example of use is:
 
3028
 
 
3029
.sp
2244
3030
.nf
2245
3031
 
2246
 
logon path = \\\\PROFILESERVER\\PROFILE\\%U
 
3032
logon path = \\PROFILESERVER\PROFILE\%U
2247
3033
.fi
2248
 
 
2249
 
 
2250
 
Default: \fB\fIlogon path\fR = \\\\%N\\%U\\profile \fR 
2251
 
 
2252
 
.TP
 
3034
 
 
3035
.sp
 
3036
Default:
 
3037
\fB\fIlogon path\fR = \\%N\%U\profile \fR
 
3038
.TP 3n
2253
3039
logon script (G)
2254
 
This parameter specifies the batch file (\fI\&.bat\fR) or NT command file (\fI\&.cmd\fR) to be downloaded and run on a machine when a user successfully logs in\&. The file must contain the DOS style CR/LF line endings\&. Using a DOS\-style editor to create the file is recommended\&.
2255
 
 
2256
 
The script must be a relative path to the \fI[netlogon]\fR service\&. If the [netlogon] service specifies a path of \fI/usr/local/samba/netlogon\fR, and logon script = STARTUP\&.BAT, then the file that will be downloaded is: 
2257
 
.nf
2258
 
 
2259
 
        /usr/local/samba/netlogon/STARTUP\&.BAT
2260
 
.fi
2261
 
 
2262
 
 
2263
 
The contents of the batch file are entirely your choice\&. A suggested command would be to add \fBNET TIME \\\\SERVER /SET /YES\fR, to force every machine to synchronize clocks with the same time server\&. Another use would be to add \fBNET USE U: \\\\SERVER\\UTILS\fR for commonly used utilities, or 
2264
 
.nf
2265
 
 
2266
 
\fBNET USE Q: \\\\SERVER\\ISO9001_QA\fR
2267
 
.fi
2268
 
 for example\&.
2269
 
 
2270
 
Note that it is particularly important not to allow write access to the [netlogon] share, or to grant users write permission on the batch files in a secure environment, as this would allow the batch files to be arbitrarily modified and security to be breached\&.
2271
 
 
2272
 
This option takes the standard substitutions, allowing you to have separate logon scripts for each user or machine\&.
2273
 
 
2274
 
This option is only useful if Samba is set up as a logon server\&.
2275
 
 
2276
 
Default: \fB\fIlogon script\fR = \fR 
2277
 
 
2278
 
Example: \fB\fIlogon script\fR = scripts\\%U\&.bat \fR 
2279
 
 
2280
 
.TP
 
3040
This parameter specifies the batch file (\fI.bat\fR) or NT command file (\fI.cmd\fR) to be downloaded and run on a machine when a user successfully logs in. The file must contain the DOS style CR/LF line endings. Using a DOS-style editor to create the file is recommended.
 
3041
.sp
 
3042
The script must be a relative path to the
 
3043
\fI[netlogon]\fR
 
3044
service. If the [netlogon] service specifies a
 
3045
path of
 
3046
\fI/usr/local/samba/netlogon\fR, and
 
3047
logon script = STARTUP.BAT, then the file that will be downloaded is:
 
3048
 
 
3049
.sp
 
3050
.nf
 
3051
 
 
3052
        /usr/local/samba/netlogon/STARTUP.BAT
 
3053
.fi
 
3054
 
 
3055
.sp
 
3056
The contents of the batch file are entirely your choice. A suggested command would be to add
 
3057
\fBNET TIME \\SERVER /SET /YES\fR, to force every machine to synchronize clocks with the same time server. Another use would be to add
 
3058
\fBNET USE U: \\SERVER\UTILS\fR
 
3059
for commonly used utilities, or
 
3060
 
 
3061
.sp
 
3062
.nf
 
3063
 
 
3064
\fBNET USE Q: \\SERVER\ISO9001_QA\fR
 
3065
.fi
 
3066
for example.
 
3067
.sp
 
3068
Note that it is particularly important not to allow write access to the [netlogon] share, or to grant users write permission on the batch files in a secure environment, as this would allow the batch files to be arbitrarily modified and security to be breached.
 
3069
.sp
 
3070
This option takes the standard substitutions, allowing you to have separate logon scripts for each user or machine.
 
3071
.sp
 
3072
This option is only useful if Samba is set up as a logon server.
 
3073
.sp
 
3074
Default:
 
3075
\fB\fIlogon script\fR = \fR
 
3076
.sp
 
3077
Example:
 
3078
\fB\fIlogon script\fR = scripts\%U.bat \fR
 
3079
.TP 3n
2281
3080
lppause command (S)
2282
 
This parameter specifies the command to be executed on the server host in order to stop printing or spooling a specific print job\&.
2283
 
 
2284
 
This command should be a program or script which takes a printer name and job number to pause the print job\&. One way of implementing this is by using job priorities, where jobs having a too low priority won't be sent to the printer\&.
2285
 
 
2286
 
If a \fI%p\fR is given then the printer name is put in its place\&. A \fI%j\fR is replaced with the job number (an integer)\&. On HPUX (see \fIprinting=hpux \fR), if the \fI\-p%p\fR option is added to the lpq command, the job will show up with the correct status, i\&.e\&. if the job priority is lower than the set fence priority it will have the PAUSED status, whereas if the priority is equal or higher it will have the SPOOLED or PRINTING status\&.
2287
 
 
2288
 
Note that it is good practice to include the absolute path in the lppause command as the PATH may not be available to the server\&.
2289
 
 
2290
 
Default: \fB\fIlppause command\fR = # Currently no default value is given to this string, unless the value of the printing parameter is \fBSYSV\fR, in which case the default is : \fBlp \-i %p\-%j \-H hold\fR or if the value of the \fIprinting\fR parameter is \fBSOFTQ\fR, then the default is: \fBqstat \-s \-j%j \-h\fR\&. \fR 
2291
 
 
2292
 
Example: \fB\fIlppause command\fR = /usr/bin/lpalt %p\-%j \-p0 \fR 
2293
 
 
2294
 
.TP
 
3081
This parameter specifies the command to be executed on the server host in order to stop printing or spooling a specific print job.
 
3082
.sp
 
3083
This command should be a program or script which takes a printer name and job number to pause the print job. One way of implementing this is by using job priorities, where jobs having a too low priority won't be sent to the printer.
 
3084
.sp
 
3085
If a
 
3086
\fI%p\fR
 
3087
is given then the printer name is put in its place. A
 
3088
\fI%j\fR
 
3089
is replaced with the job number (an integer). On HPUX (see
 
3090
\fIprinting=hpux \fR), if the
 
3091
\fI-p%p\fR
 
3092
option is added to the lpq command, the job will show up with the correct status, i.e. if the job priority is lower than the set fence priority it will have the PAUSED status, whereas if the priority is equal or higher it will have the SPOOLED or PRINTING status.
 
3093
.sp
 
3094
Note that it is good practice to include the absolute path in the lppause command as the PATH may not be available to the server.
 
3095
.sp
 
3096
Default:
 
3097
\fB\fIlppause command\fR = # Currently no default value is given to this string, unless the value of the printing parameter is \fBSYSV\fR, in which case the default is : \fBlp -i %p-%j -H hold\fR or if the value of the \fIprinting\fR parameter is \fBSOFTQ\fR, then the default is: \fBqstat -s -j%j -h\fR. \fR
 
3098
.sp
 
3099
Example:
 
3100
\fB\fIlppause command\fR = /usr/bin/lpalt %p-%j -p0 \fR
 
3101
.TP 3n
2295
3102
lpq cache time (G)
2296
 
This controls how long lpq info will be cached for to prevent the \fBlpq\fR command being called too often\&. A separate cache is kept for each variation of the \fB lpq\fR command used by the system, so if you use different\fBlpq\fR commands for different users then they won't share cache information\&.
2297
 
 
2298
 
The cache files are stored in \fI/tmp/lpq\&.xxxx\fR where xxxx is a hash of the \fBlpq\fR command in use\&.
2299
 
 
2300
 
The default is 10 seconds, meaning that the cached results of a previous identical \fBlpq\fR command will be used if the cached data is less than 10 seconds old\&. A large value may be advisable if your \fBlpq\fR command is very slow\&.
2301
 
 
2302
 
A value of 0 will disable caching completely\&.
2303
 
 
2304
 
Default: \fB\fIlpq cache time\fR = 10 \fR 
2305
 
 
2306
 
Example: \fB\fIlpq cache time\fR = 30 \fR 
2307
 
 
2308
 
.TP
 
3103
This controls how long lpq info will be cached for to prevent the
 
3104
\fBlpq\fR
 
3105
command being called too often. A separate cache is kept for each variation of the
 
3106
\fB lpq\fR
 
3107
command used by the system, so if you use different
 
3108
\fBlpq\fR
 
3109
commands for different users then they won't share cache information.
 
3110
.sp
 
3111
The cache files are stored in
 
3112
\fI/tmp/lpq.xxxx\fR
 
3113
where xxxx is a hash of the
 
3114
\fBlpq\fR
 
3115
command in use.
 
3116
.sp
 
3117
The default is 10 seconds, meaning that the cached results of a previous identical
 
3118
\fBlpq\fR
 
3119
command will be used if the cached data is less than 10 seconds old. A large value may be advisable if your
 
3120
\fBlpq\fR
 
3121
command is very slow.
 
3122
.sp
 
3123
A value of 0 will disable caching completely.
 
3124
.sp
 
3125
Default:
 
3126
\fB\fIlpq cache time\fR = 10 \fR
 
3127
.sp
 
3128
Example:
 
3129
\fB\fIlpq cache time\fR = 30 \fR
 
3130
.TP 3n
2309
3131
lpq command (S)
2310
 
This parameter specifies the command to be executed on the server host in order to obtain \fBlpq \fR\-style printer status information\&.
2311
 
 
2312
 
This command should be a program or script which takes a printer name as its only parameter and outputs printer status information\&.
2313
 
 
2314
 
Currently nine styles of printer status information are supported; BSD, AIX, LPRNG, PLP, SYSV, HPUX, QNX, CUPS, and SOFTQ\&. This covers most UNIX systems\&. You control which type is expected using the \fIprinting =\fR option\&.
2315
 
 
2316
 
Some clients (notably Windows for Workgroups) may not correctly send the connection number for the printer they are requesting status information about\&. To get around this, the server reports on the first printer service connected to by the client\&. This only happens if the connection number sent is invalid\&.
2317
 
 
2318
 
If a \fI%p\fR is given then the printer name is put in its place\&. Otherwise it is placed at the end of the command\&.
2319
 
 
2320
 
Note that it is good practice to include the absolute path in the \fIlpq command\fR as the \fB$PATH \fR may not be available to the server\&. When compiled with the CUPS libraries, no \fIlpq command\fR is needed because smbd will make a library call to obtain the print queue listing\&.
2321
 
 
2322
 
Default: \fB\fIlpq command\fR = \fR 
2323
 
 
2324
 
Example: \fB\fIlpq command\fR = /usr/bin/lpq \-P%p \fR 
2325
 
 
2326
 
.TP
 
3132
This parameter specifies the command to be executed on the server host in order to obtain
 
3133
\fBlpq \fR-style printer status information.
 
3134
.sp
 
3135
This command should be a program or script which takes a printer name as its only parameter and outputs printer status information.
 
3136
.sp
 
3137
Currently nine styles of printer status information are supported; BSD, AIX, LPRNG, PLP, SYSV, HPUX, QNX, CUPS, and SOFTQ. This covers most UNIX systems. You control which type is expected using the
 
3138
\fIprinting =\fR
 
3139
option.
 
3140
.sp
 
3141
Some clients (notably Windows for Workgroups) may not correctly send the connection number for the printer they are requesting status information about. To get around this, the server reports on the first printer service connected to by the client. This only happens if the connection number sent is invalid.
 
3142
.sp
 
3143
If a
 
3144
\fI%p\fR
 
3145
is given then the printer name is put in its place. Otherwise it is placed at the end of the command.
 
3146
.sp
 
3147
Note that it is good practice to include the absolute path in the
 
3148
\fIlpq command\fR
 
3149
as the
 
3150
\fB$PATH \fR
 
3151
may not be available to the server. When compiled with the CUPS libraries, no
 
3152
\fIlpq command\fR
 
3153
is needed because smbd will make a library call to obtain the print queue listing.
 
3154
.sp
 
3155
Default:
 
3156
\fB\fIlpq command\fR = \fR
 
3157
.sp
 
3158
Example:
 
3159
\fB\fIlpq command\fR = /usr/bin/lpq -P%p \fR
 
3160
.TP 3n
2327
3161
lpresume command (S)
2328
 
This parameter specifies the command to be executed on the server host in order to restart or continue printing or spooling a specific print job\&.
2329
 
 
2330
 
This command should be a program or script which takes a printer name and job number to resume the print job\&. See also the lppause command parameter\&.
2331
 
 
2332
 
If a \fI%p\fR is given then the printer name is put in its place\&. A \fI%j\fR is replaced with the job number (an integer)\&.
2333
 
 
2334
 
Note that it is good practice to include the absolute path in the \fIlpresume command\fR as the PATH may not be available to the server\&.
2335
 
 
2336
 
See also the printing parameter\&.
2337
 
 
2338
 
Default: Currently no default value is given to this string, unless the value of the \fIprinting\fR parameter is \fBSYSV\fR, in which case the default is :
2339
 
 
2340
 
\fBlp \-i %p\-%j \-H resume\fR
2341
 
 
2342
 
or if the value of the \fIprinting\fR parameter is \fBSOFTQ\fR, then the default is:
2343
 
 
2344
 
\fBqstat \-s \-j%j \-r\fR
2345
 
 
2346
 
Default: \fB\fIlpresume command\fR = lpresume command = /usr/bin/lpalt %p\-%j \-p2 \fR 
2347
 
 
2348
 
.TP
 
3162
This parameter specifies the command to be executed on the server host in order to restart or continue printing or spooling a specific print job.
 
3163
.sp
 
3164
This command should be a program or script which takes a printer name and job number to resume the print job. See also the
 
3165
lppause command parameter.
 
3166
.sp
 
3167
If a
 
3168
\fI%p\fR
 
3169
is given then the printer name is put in its place. A
 
3170
\fI%j\fR
 
3171
is replaced with the job number (an integer).
 
3172
.sp
 
3173
Note that it is good practice to include the absolute path in the
 
3174
\fIlpresume command\fR
 
3175
as the PATH may not be available to the server.
 
3176
.sp
 
3177
See also the
 
3178
printing parameter.
 
3179
.sp
 
3180
Default: Currently no default value is given to this string, unless the value of the
 
3181
\fIprinting\fR
 
3182
parameter is
 
3183
\fBSYSV\fR, in which case the default is :
 
3184
.sp
 
3185
\fBlp -i %p-%j -H resume\fR
 
3186
.sp
 
3187
or if the value of the
 
3188
\fIprinting\fR
 
3189
parameter is
 
3190
\fBSOFTQ\fR, then the default is:
 
3191
.sp
 
3192
\fBqstat -s -j%j -r\fR
 
3193
.sp
 
3194
Default:
 
3195
\fB\fIlpresume command\fR = lpresume command = /usr/bin/lpalt %p-%j -p2 \fR
 
3196
.TP 3n
2349
3197
lprm command (S)
2350
 
This parameter specifies the command to be executed on the server host in order to delete a print job\&.
2351
 
 
2352
 
This command should be a program or script which takes a printer name and job number, and deletes the print job\&.
2353
 
 
2354
 
If a \fI%p\fR is given then the printer name is put in its place\&. A \fI%j\fR is replaced with the job number (an integer)\&.
2355
 
 
2356
 
Note that it is good practice to include the absolute path in the \fIlprm command\fR as the PATH may not be available to the server\&.
2357
 
 
2358
 
Examples of use are: 
 
3198
This parameter specifies the command to be executed on the server host in order to delete a print job.
 
3199
.sp
 
3200
This command should be a program or script which takes a printer name and job number, and deletes the print job.
 
3201
.sp
 
3202
If a
 
3203
\fI%p\fR
 
3204
is given then the printer name is put in its place. A
 
3205
\fI%j\fR
 
3206
is replaced with the job number (an integer).
 
3207
.sp
 
3208
Note that it is good practice to include the absolute path in the
 
3209
\fIlprm command\fR
 
3210
as the PATH may not be available to the server.
 
3211
.sp
 
3212
Examples of use are:
 
3213
 
 
3214
.sp
2359
3215
.nf
2360
3216
 
2361
 
lprm command = /usr/bin/lprm \-P%p %j
 
3217
lprm command = /usr/bin/lprm -P%p %j
2362
3218
 
2363
3219
or
2364
3220
 
2365
 
lprm command = /usr/bin/cancel %p\-%j
 
3221
lprm command = /usr/bin/cancel %p-%j
2366
3222
.fi
2367
 
 
2368
 
 
2369
 
Default: \fB\fIlprm command\fR = determined by printing parameter \fR 
2370
 
 
2371
 
.TP
 
3223
 
 
3224
.sp
 
3225
Default:
 
3226
\fB\fIlprm command\fR = determined by printing parameter \fR
 
3227
.TP 3n
2372
3228
machine password timeout (G)
2373
 
If a Samba server is a member of a Windows NT Domain (see the security = domain parameter) then periodically a running smbd process will try and change the MACHINE ACCOUNT PASSWORD stored in the TDB called \fIprivate/secrets\&.tdb \fR\&. This parameter specifies how often this password will be changed, in seconds\&. The default is one week (expressed in seconds), the same as a Windows NT Domain member server\&.
2374
 
 
2375
 
See also \fBsmbpasswd\fR(8), and the security = domain parameter\&.
2376
 
 
2377
 
Default: \fB\fImachine password timeout\fR = 604800 \fR 
2378
 
 
2379
 
.TP
 
3229
If a Samba server is a member of a Windows NT Domain (see the
 
3230
security = domain parameter) then periodically a running smbd process will try and change the MACHINE ACCOUNT PASSWORD stored in the TDB called
 
3231
\fIprivate/secrets.tdb \fR. This parameter specifies how often this password will be changed, in seconds. The default is one week (expressed in seconds), the same as a Windows NT Domain member server.
 
3232
.sp
 
3233
See also
 
3234
\fBsmbpasswd\fR(8), and the
 
3235
security = domain parameter.
 
3236
.sp
 
3237
Default:
 
3238
\fB\fImachine password timeout\fR = 604800 \fR
 
3239
.TP 3n
2380
3240
magic output (S)
2381
 
This parameter specifies the name of a file which will contain output created by a magic script (see themagic script parameter below)\&.
2382
 
 
2383
 
 
2384
 
.RS
2385
 
.Sh "Warning"
2386
 
If two clients use the same \fImagic script \fR in the same directory the output file content is undefined\&.
2387
 
 
2388
 
.RE
2389
 
Default: \fB\fImagic output\fR = <magic script name>\&.out \fR 
2390
 
 
2391
 
Example: \fB\fImagic output\fR = myfile\&.txt \fR 
2392
 
 
2393
 
.TP
 
3241
This parameter specifies the name of a file which will contain output created by a magic script (see the
 
3242
magic script parameter below).
 
3243
.sp
 
3244
.it 1 an-trap
 
3245
.nr an-no-space-flag 1
 
3246
.nr an-break-flag 1
 
3247
.br
 
3248
\fBWarning\fR
 
3249
If two clients use the same
 
3250
\fImagic script \fR
 
3251
in the same directory the output file content is undefined.
 
3252
Default:
 
3253
\fB\fImagic output\fR = <magic script name>.out \fR
 
3254
.sp
 
3255
Example:
 
3256
\fB\fImagic output\fR = myfile.txt \fR
 
3257
.TP 3n
2394
3258
magic script (S)
2395
 
This parameter specifies the name of a file which, if opened, will be executed by the server when the file is closed\&. This allows a UNIX script to be sent to the Samba host and executed on behalf of the connected user\&.
2396
 
 
2397
 
Scripts executed in this way will be deleted upon completion assuming that the user has the appropriate level of privilege and the file permissions allow the deletion\&.
2398
 
 
2399
 
If the script generates output, output will be sent to the file specified by the magic output parameter (see above)\&.
2400
 
 
2401
 
Note that some shells are unable to interpret scripts containing CR/LF instead of CR as the end\-of\-line marker\&. Magic scripts must be executable\fBas is\fR on the host, which for some hosts and some shells will require filtering at the DOS end\&.
2402
 
 
2403
 
Magic scripts are \fBEXPERIMENTAL\fR and should \fBNOT\fR be relied upon\&.
2404
 
 
2405
 
Default: \fB\fImagic script\fR = \fR 
2406
 
 
2407
 
Example: \fB\fImagic script\fR = user\&.csh \fR 
2408
 
 
2409
 
.TP
 
3259
This parameter specifies the name of a file which, if opened, will be executed by the server when the file is closed. This allows a UNIX script to be sent to the Samba host and executed on behalf of the connected user.
 
3260
.sp
 
3261
Scripts executed in this way will be deleted upon completion assuming that the user has the appropriate level of privilege and the file permissions allow the deletion.
 
3262
.sp
 
3263
If the script generates output, output will be sent to the file specified by the
 
3264
magic output parameter (see above).
 
3265
.sp
 
3266
Note that some shells are unable to interpret scripts containing CR/LF instead of CR as the end-of-line marker. Magic scripts must be executable
 
3267
\fBas is\fR
 
3268
on the host, which for some hosts and some shells will require filtering at the DOS end.
 
3269
.sp
 
3270
Magic scripts are
 
3271
\fBEXPERIMENTAL\fR
 
3272
and should
 
3273
\fBNOT\fR
 
3274
be relied upon.
 
3275
.sp
 
3276
Default:
 
3277
\fB\fImagic script\fR = \fR
 
3278
.sp
 
3279
Example:
 
3280
\fB\fImagic script\fR = user.csh \fR
 
3281
.TP 3n
2410
3282
mangled map (S)
2411
 
This is for those who want to directly map UNIX file names which cannot be represented on Windows/DOS\&. The mangling of names is not always what is needed\&. In particular you may have documents with file extensions that differ between DOS and UNIX\&. For example, under UNIX it is common to use \fI\&.html\fR for HTML files, whereas under Windows/DOS \fI\&.htm\fR is more commonly used\&.
2412
 
 
2413
 
So to map \fIhtml\fR to \fIhtm\fR you would use:
2414
 
 
2415
 
mangled map = (*\&.html *\&.htm)\&.
2416
 
 
2417
 
One very useful case is to remove the annoying \fI;1\fR off the ends of filenames on some CDROMs (only visible under some UNIXes)\&. To do this use a map of (*;1 *;)\&.
2418
 
 
2419
 
Default: \fB\fImangled map\fR = # no mangled map \fR 
2420
 
 
2421
 
Example: \fB\fImangled map\fR = (*;1 *;) \fR 
2422
 
 
2423
 
.TP
 
3283
This is for those who want to directly map UNIX file names which cannot be represented on Windows/DOS. The mangling of names is not always what is needed. In particular you may have documents with file extensions that differ between DOS and UNIX. For example, under UNIX it is common to use
 
3284
\fI.html\fR
 
3285
for HTML files, whereas under Windows/DOS
 
3286
\fI.htm\fR
 
3287
is more commonly used.
 
3288
.sp
 
3289
So to map
 
3290
\fIhtml\fR
 
3291
to
 
3292
\fIhtm\fR
 
3293
you would use:
 
3294
.sp
 
3295
 
 
3296
mangled map = (*.html *.htm).
 
3297
.sp
 
3298
One very useful case is to remove the annoying
 
3299
\fI;1\fR
 
3300
off the ends of filenames on some CDROMs (only visible under some UNIXes). To do this use a map of (*;1 *;).
 
3301
.sp
 
3302
Default:
 
3303
\fB\fImangled map\fR = # no mangled map \fR
 
3304
.sp
 
3305
Example:
 
3306
\fB\fImangled map\fR = (*;1 *;) \fR
 
3307
.TP 3n
2424
3308
mangled names (S)
2425
 
This controls whether non\-DOS names under UNIX should be mapped to DOS\-compatible names ("mangled") and made visible, or whether non\-DOS names should simply be ignored\&.
2426
 
 
2427
 
See the section on name mangling for details on how to control the mangling process\&.
2428
 
 
 
3309
This controls whether non-DOS names under UNIX should be mapped to DOS-compatible names ("mangled") and made visible, or whether non-DOS names should simply be ignored.
 
3310
.sp
 
3311
See the section on
 
3312
name mangling for details on how to control the mangling process.
 
3313
.sp
2429
3314
If mangling is used then the mangling algorithm is as follows:
2430
 
 
2431
 
 
2432
 
.RS
2433
 
.TP 3
2434
 
\(bu
2435
 
The first (up to) five alphanumeric characters before the rightmost dot of the filename are preserved, forced to upper case, and appear as the first (up to) five characters of the mangled name\&.
2436
 
.TP
2437
 
\(bu
2438
 
A tilde "~" is appended to the first part of the mangled name, followed by a two\-character unique sequence, based on the original root name (i\&.e\&., the original filename minus its final extension)\&. The final extension is included in the hash calculation only if it contains any upper case characters or is longer than three characters\&.
2439
 
 
2440
 
Note that the character to use may be specified using the mangling char option, if you don't like '~'\&.
2441
 
.TP
2442
 
\(bu
2443
 
Files whose UNIX name begins with a dot will be presented as DOS hidden files\&. The mangled name will be created as for other filenames, but with the leading dot removed and "___" as its extension regardless of actual original extension (that's three underscores)\&.
2444
 
.LP
 
3315
.RS 3n
 
3316
.TP 3n
 
3317
&#8226;
 
3318
The first (up to) five alphanumeric characters before the rightmost dot of the filename are preserved, forced to upper case, and appear as the first (up to) five characters of the mangled name.
 
3319
.TP 3n
 
3320
&#8226;
 
3321
A tilde "~" is appended to the first part of the mangled name, followed by a two-character unique sequence, based on the original root name (i.e., the original filename minus its final extension). The final extension is included in the hash calculation only if it contains any upper case characters or is longer than three characters.
 
3322
.sp
 
3323
Note that the character to use may be specified using the
 
3324
mangling char option, if you don't like '~'.
 
3325
.TP 3n
 
3326
&#8226;
 
3327
Files whose UNIX name begins with a dot will be presented as DOS hidden files. The mangled name will be created as for other filenames, but with the leading dot removed and "___" as its extension regardless of actual original extension (that's three underscores).
2445
3328
.RE
2446
 
.IP
2447
 
The two\-digit hash value consists of upper case alphanumeric characters\&.
2448
 
 
2449
 
This algorithm can cause name collisions only if files in a directory share the same first five alphanumeric characters\&. The probability of such a clash is 1/1300\&.
2450
 
 
2451
 
The name mangling (if enabled) allows a file to be copied between UNIX directories from Windows/DOS while retaining the long UNIX filename\&. UNIX files can be renamed to a new extension from Windows/DOS and will retain the same basename\&. Mangled names do not change between sessions\&.
2452
 
 
2453
 
Default: \fB\fImangled names\fR = yes \fR 
2454
 
 
2455
 
.TP
 
3329
.IP "" 3n
 
3330
The two-digit hash value consists of upper case alphanumeric characters.
 
3331
.sp
 
3332
This algorithm can cause name collisions only if files in a directory share the same first five alphanumeric characters. The probability of such a clash is 1/1300.
 
3333
.sp
 
3334
The name mangling (if enabled) allows a file to be copied between UNIX directories from Windows/DOS while retaining the long UNIX filename. UNIX files can be renamed to a new extension from Windows/DOS and will retain the same basename. Mangled names do not change between sessions.
 
3335
.sp
 
3336
Default:
 
3337
\fB\fImangled names\fR = yes \fR
 
3338
.TP 3n
2456
3339
mangle prefix (G)
2457
 
controls the number of prefix characters from the original name used when generating the mangled names\&. A larger value will give a weaker hash and therefore more name collisions\&. The minimum value is 1 and the maximum value is 6\&.
2458
 
 
2459
 
mangle prefix is effective only when mangling method is hash2\&.
2460
 
 
2461
 
Default: \fB\fImangle prefix\fR = 1 \fR 
2462
 
 
2463
 
Example: \fB\fImangle prefix\fR = 4 \fR 
2464
 
 
2465
 
.TP
 
3340
controls the number of prefix characters from the original name used when generating the mangled names. A larger value will give a weaker hash and therefore more name collisions. The minimum value is 1 and the maximum value is 6.
 
3341
.sp
 
3342
mangle prefix is effective only when mangling method is hash2.
 
3343
.sp
 
3344
Default:
 
3345
\fB\fImangle prefix\fR = 1 \fR
 
3346
.sp
 
3347
Example:
 
3348
\fB\fImangle prefix\fR = 4 \fR
 
3349
.TP 3n
2466
3350
mangling char (S)
2467
 
This controls what character is used as the \fBmagic\fR character in name mangling\&. The default is a '~' but this may interfere with some software\&. Use this option to set it to whatever you prefer\&. This is effective only when mangling method is hash\&.
2468
 
 
2469
 
Default: \fB\fImangling char\fR = ~ \fR 
2470
 
 
2471
 
Example: \fB\fImangling char\fR = ^ \fR 
2472
 
 
2473
 
.TP
 
3351
This controls what character is used as the
 
3352
\fBmagic\fR
 
3353
character in
 
3354
name mangling. The default is a '~' but this may interfere with some software. Use this option to set it to whatever you prefer. This is effective only when mangling method is hash.
 
3355
.sp
 
3356
Default:
 
3357
\fB\fImangling char\fR = ~ \fR
 
3358
.sp
 
3359
Example:
 
3360
\fB\fImangling char\fR = ^ \fR
 
3361
.TP 3n
2474
3362
mangling method (G)
2475
 
controls the algorithm used for the generating the mangled names\&. Can take two different values, "hash" and "hash2"\&. "hash" is the algorithm that was used used in Samba for many years and was the default in Samba 2\&.2\&.x "hash2" is now the default and is newer and considered a better algorithm (generates less collisions) in the names\&. Many Win32 applications store the mangled names and so changing to algorithms must not be done lightly as these applications may break unless reinstalled\&.
2476
 
 
2477
 
Default: \fB\fImangling method\fR = hash2 \fR 
2478
 
 
2479
 
Example: \fB\fImangling method\fR = hash \fR 
2480
 
 
2481
 
.TP
 
3363
controls the algorithm used for the generating the mangled names. Can take two different values, "hash" and "hash2". "hash" is the algorithm that was used used in Samba for many years and was the default in Samba 2.2.x "hash2" is now the default and is newer and considered a better algorithm (generates less collisions) in the names. Many Win32 applications store the mangled names and so changing to algorithms must not be done lightly as these applications may break unless reinstalled.
 
3364
.sp
 
3365
Default:
 
3366
\fB\fImangling method\fR = hash2 \fR
 
3367
.sp
 
3368
Example:
 
3369
\fB\fImangling method\fR = hash \fR
 
3370
.TP 3n
2482
3371
map acl inherit (S)
2483
 
This boolean parameter controls whether \fBsmbd\fR(8) will attempt to map the 'inherit' and 'protected' access control entry flags stored in Windows ACLs into an extended attribute called user\&.SAMBA_PAI\&. This parameter only takes effect if Samba is being run on a platform that supports extended attributes (Linux and IRIX so far) and allows the Windows 2000 ACL editor to correctly use inheritance with the Samba POSIX ACL mapping code\&.
2484
 
 
2485
 
Default: \fB\fImap acl inherit\fR = no \fR 
2486
 
 
2487
 
.TP
 
3372
This boolean parameter controls whether
 
3373
\fBsmbd\fR(8)
 
3374
will attempt to map the 'inherit' and 'protected' access control entry flags stored in Windows ACLs into an extended attribute called user.SAMBA_PAI. This parameter only takes effect if Samba is being run on a platform that supports extended attributes (Linux and IRIX so far) and allows the Windows 2000 ACL editor to correctly use inheritance with the Samba POSIX ACL mapping code.
 
3375
.sp
 
3376
Default:
 
3377
\fB\fImap acl inherit\fR = no \fR
 
3378
.TP 3n
2488
3379
map archive (S)
2489
 
This controls whether the DOS archive attribute should be mapped to the UNIX owner execute bit\&. The DOS archive bit is set when a file has been modified since its last backup\&. One motivation for this option it to keep Samba/your PC from making any file it touches from becoming executable under UNIX\&. This can be quite annoying for shared source code, documents, etc\&.\&.\&.
2490
 
 
2491
 
Note that this requires the create mask parameter to be set such that owner execute bit is not masked out (i\&.e\&. it must include 100)\&. See the parametercreate mask for details\&.
2492
 
 
2493
 
Default: \fB\fImap archive\fR = yes \fR 
2494
 
 
2495
 
.TP
 
3380
This controls whether the DOS archive attribute should be mapped to the UNIX owner execute bit. The DOS archive bit is set when a file has been modified since its last backup. One motivation for this option it to keep Samba/your PC from making any file it touches from becoming executable under UNIX. This can be quite annoying for shared source code, documents, etc...
 
3381
.sp
 
3382
Note that this requires the
 
3383
create mask parameter to be set such that owner execute bit is not masked out (i.e. it must include 100). See the parameter
 
3384
create mask for details.
 
3385
.sp
 
3386
Default:
 
3387
\fB\fImap archive\fR = yes \fR
 
3388
.TP 3n
2496
3389
map hidden (S)
2497
 
This controls whether DOS style hidden files should be mapped to the UNIX world execute bit\&.
2498
 
 
2499
 
Note that this requires the create mask to be set such that the world execute bit is not masked out (i\&.e\&. it must include 001)\&. See the parameter create mask for details\&.
2500
 
 
 
3390
This controls whether DOS style hidden files should be mapped to the UNIX world execute bit.
 
3391
.sp
 
3392
Note that this requires the
 
3393
create mask to be set such that the world execute bit is not masked out (i.e. it must include 001). See the parameter
 
3394
create mask for details.
 
3395
.sp
2501
3396
\fBNo default\fR
2502
 
 
2503
 
.TP
 
3397
.TP 3n
2504
3398
map read only (S)
2505
 
This controls how the DOS read only attribute should be mapped from a UNIX filesystem\&.
2506
 
 
2507
 
This parameter can take three different values, which tell \fBsmbd\fR(8) how to display the read only attribute on files, where eitherstore dos attributes is set to \fBNo\fR, or no extended attribute is present\&. If store dos attributes is set to \fByes\fR then this parameter is \fBignored\fR\&. This is a new parameter introduced in Samba version 3\&.0\&.21\&.
2508
 
 
 
3399
This controls how the DOS read only attribute should be mapped from a UNIX filesystem.
 
3400
.sp
 
3401
This parameter can take three different values, which tell
 
3402
\fBsmbd\fR(8)
 
3403
how to display the read only attribute on files, where either
 
3404
store dos attributes is set to
 
3405
\fBNo\fR, or no extended attribute is present. If
 
3406
store dos attributes is set to
 
3407
\fByes\fR
 
3408
then this parameter is
 
3409
\fBignored\fR. This is a new parameter introduced in Samba version 3.0.21.
 
3410
.sp
2509
3411
The three settings are :
2510
 
 
2511
 
 
2512
 
.RS
2513
 
.TP 3
2514
 
\(bu
2515
 
\fBYes\fR \- The read only DOS attribute is mapped to the inverse of the user or owner write bit in the unix permission mode set\&. If the owner write bit is not set, the read only attribute is reported as being set on the file\&.
2516
 
.TP
2517
 
\(bu
2518
 
\fBPermissions\fR \- The read only DOS attribute is mapped to the effective permissions of the connecting user, as evaluated by \fBsmbd\fR(8) by reading the unix permissions and POSIX ACL (if present)\&. If the connecting user does not have permission to modify the file, the read only attribute is reported as being set on the file\&.
2519
 
.TP
2520
 
\(bu
2521
 
\fBNo\fR \- The read only DOS attribute is unaffected by permissions, and can only be set by the store dos attributes method\&. This may be useful for exporting mounted CDs\&.
2522
 
.LP
 
3412
.RS 3n
 
3413
.TP 3n
 
3414
&#8226;
 
3415
 
 
3416
\fBYes\fR
 
3417
- The read only DOS attribute is mapped to the inverse of the user or owner write bit in the unix permission mode set. If the owner write bit is not set, the read only attribute is reported as being set on the file.
 
3418
.TP 3n
 
3419
&#8226;
 
3420
 
 
3421
\fBPermissions\fR
 
3422
- The read only DOS attribute is mapped to the effective permissions of the connecting user, as evaluated by
 
3423
\fBsmbd\fR(8)
 
3424
by reading the unix permissions and POSIX ACL (if present). If the connecting user does not have permission to modify the file, the read only attribute is reported as being set on the file.
 
3425
.TP 3n
 
3426
&#8226;
 
3427
 
 
3428
\fBNo\fR
 
3429
- The read only DOS attribute is unaffected by permissions, and can only be set by the
 
3430
store dos attributes method. This may be useful for exporting mounted CDs.
2523
3431
.RE
2524
 
.IP
2525
 
Default: \fB\fImap read only\fR = yes \fR 
2526
 
 
2527
 
.TP
 
3432
.IP "" 3n
 
3433
Default:
 
3434
\fB\fImap read only\fR = yes \fR
 
3435
.TP 3n
2528
3436
map system (S)
2529
 
This controls whether DOS style system files should be mapped to the UNIX group execute bit\&.
2530
 
 
2531
 
Note that this requires the create mask to be set such that the group execute bit is not masked out (i\&.e\&. it must include 010)\&. See the parametercreate mask for details\&.
2532
 
 
2533
 
Default: \fB\fImap system\fR = no \fR 
2534
 
 
2535
 
.TP
 
3437
This controls whether DOS style system files should be mapped to the UNIX group execute bit.
 
3438
.sp
 
3439
Note that this requires the
 
3440
create mask to be set such that the group execute bit is not masked out (i.e. it must include 010). See the parameter
 
3441
create mask for details.
 
3442
.sp
 
3443
Default:
 
3444
\fB\fImap system\fR = no \fR
 
3445
.TP 3n
2536
3446
map to guest (G)
2537
 
This parameter is only useful in SECURITY = security modes other than \fIsecurity = share\fR \- i\&.e\&. \fBuser\fR, \fBserver\fR, and \fBdomain\fR\&.
2538
 
 
2539
 
This parameter can take four different values, which tell \fBsmbd\fR(8) what to do with user login requests that don't match a valid UNIX user in some way\&.
2540
 
 
 
3447
This parameter is only useful in
 
3448
SECURITY = security modes other than
 
3449
\fIsecurity = share\fR
 
3450
- i.e.
 
3451
\fBuser\fR,
 
3452
\fBserver\fR, and
 
3453
\fBdomain\fR.
 
3454
.sp
 
3455
This parameter can take four different values, which tell
 
3456
\fBsmbd\fR(8)
 
3457
what to do with user login requests that don't match a valid UNIX user in some way.
 
3458
.sp
2541
3459
The four settings are :
2542
 
 
2543
 
 
2544
 
.RS
2545
 
.TP 3
2546
 
\(bu
2547
 
\fBNever\fR \- Means user login requests with an invalid password are rejected\&. This is the default\&.
2548
 
.TP
2549
 
\(bu
2550
 
\fBBad User\fR \- Means user logins with an invalid password are rejected, unless the username does not exist, in which case it is treated as a guest login and mapped into the guest account\&.
2551
 
.TP
2552
 
\(bu
2553
 
\fBBad Password\fR \- Means user logins with an invalid password are treated as a guest login and mapped into the guest account\&. Note that this can cause problems as it means that any user incorrectly typing their password will be silently logged on as "guest" \- and will not know the reason they cannot access files they think they should \- there will have been no message given to them that they got their password wrong\&. Helpdesk services will \fBhate\fR you if you set the \fImap to guest\fR parameter this way :\-)\&.
2554
 
.TP
2555
 
\(bu
2556
 
\fBBad Uid\fR \- Is only applicable when Samba is configured in some type of domain mode security (security = {domain|ads}) and means that user logins which are successfully authenticated but which have no valid Unix user account (and smbd is unable to create one) should be mapped to the defined guest account\&. This was the default behavior of Samba 2\&.x releases\&. Note that if a member server is running winbindd, this option should never be required because the nss_winbind library will export the Windows domain users and groups to the underlying OS via the Name Service Switch interface\&.
2557
 
.LP
 
3460
.RS 3n
 
3461
.TP 3n
 
3462
&#8226;
 
3463
\fBNever\fR
 
3464
- Means user login requests with an invalid password are rejected. This is the default.
 
3465
.TP 3n
 
3466
&#8226;
 
3467
\fBBad User\fR
 
3468
- Means user logins with an invalid password are rejected, unless the username does not exist, in which case it is treated as a guest login and mapped into the
 
3469
guest account.
 
3470
.TP 3n
 
3471
&#8226;
 
3472
\fBBad Password\fR
 
3473
- Means user logins with an invalid password are treated as a guest login and mapped into the
 
3474
guest account. Note that this can cause problems as it means that any user incorrectly typing their password will be silently logged on as "guest" - and will not know the reason they cannot access files they think they should - there will have been no message given to them that they got their password wrong. Helpdesk services will
 
3475
\fBhate\fR
 
3476
you if you set the
 
3477
\fImap to guest\fR
 
3478
parameter this way :-).
 
3479
.TP 3n
 
3480
&#8226;
 
3481
\fBBad Uid\fR
 
3482
- Is only applicable when Samba is configured in some type of domain mode security (security = {domain|ads}) and means that user logins which are successfully authenticated but which have no valid Unix user account (and smbd is unable to create one) should be mapped to the defined guest account. This was the default behavior of Samba 2.x releases. Note that if a member server is running winbindd, this option should never be required because the nss_winbind library will export the Windows domain users and groups to the underlying OS via the Name Service Switch interface.
2558
3483
.RE
2559
 
.IP
2560
 
Note that this parameter is needed to set up "Guest" share services when using \fIsecurity\fR modes other than share\&. This is because in these modes the name of the resource being requested is \fBnot\fR sent to the server until after the server has successfully authenticated the client so the server cannot make authentication decisions at the correct time (connection to the share) for "Guest" shares\&.
2561
 
 
2562
 
For people familiar with the older Samba releases, this parameter maps to the old compile\-time setting of the \fB GUEST_SESSSETUP\fR value in local\&.h\&.
2563
 
 
2564
 
Default: \fB\fImap to guest\fR = Never \fR 
2565
 
 
2566
 
Example: \fB\fImap to guest\fR = Bad User \fR 
2567
 
 
2568
 
.TP
 
3484
.IP "" 3n
 
3485
Note that this parameter is needed to set up "Guest" share services when using
 
3486
\fIsecurity\fR
 
3487
modes other than share. This is because in these modes the name of the resource being requested is
 
3488
\fBnot\fR
 
3489
sent to the server until after the server has successfully authenticated the client so the server cannot make authentication decisions at the correct time (connection to the share) for "Guest" shares.
 
3490
.sp
 
3491
For people familiar with the older Samba releases, this parameter maps to the old compile-time setting of the
 
3492
\fB GUEST_SESSSETUP\fR
 
3493
value in local.h.
 
3494
.sp
 
3495
Default:
 
3496
\fB\fImap to guest\fR = Never \fR
 
3497
.sp
 
3498
Example:
 
3499
\fB\fImap to guest\fR = Bad User \fR
 
3500
.TP 3n
2569
3501
max connections (S)
2570
 
This option allows the number of simultaneous connections to a service to be limited\&. If \fImax connections\fR is greater than 0 then connections will be refused if this number of connections to the service are already open\&. A value of zero mean an unlimited number of connections may be made\&.
2571
 
 
2572
 
Record lock files are used to implement this feature\&. The lock files will be stored in the directory specified by the lock directory option\&.
2573
 
 
2574
 
Default: \fB\fImax connections\fR = 0 \fR 
2575
 
 
2576
 
Example: \fB\fImax connections\fR = 10 \fR 
2577
 
 
2578
 
.TP
 
3502
This option allows the number of simultaneous connections to a service to be limited. If
 
3503
\fImax connections\fR
 
3504
is greater than 0 then connections will be refused if this number of connections to the service are already open. A value of zero mean an unlimited number of connections may be made.
 
3505
.sp
 
3506
Record lock files are used to implement this feature. The lock files will be stored in the directory specified by the
 
3507
lock directory option.
 
3508
.sp
 
3509
Default:
 
3510
\fB\fImax connections\fR = 0 \fR
 
3511
.sp
 
3512
Example:
 
3513
\fB\fImax connections\fR = 10 \fR
 
3514
.TP 3n
2579
3515
max disk size (G)
2580
 
This option allows you to put an upper limit on the apparent size of disks\&. If you set this option to 100 then all shares will appear to be not larger than 100 MB in size\&.
2581
 
 
2582
 
Note that this option does not limit the amount of data you can put on the disk\&. In the above case you could still store much more than 100 MB on the disk, but if a client ever asks for the amount of free disk space or the total disk size then the result will be bounded by the amount specified in \fImax disk size\fR\&.
2583
 
 
2584
 
This option is primarily useful to work around bugs in some pieces of software that can't handle very large disks, particularly disks over 1GB in size\&.
2585
 
 
2586
 
A \fImax disk size\fR of 0 means no limit\&.
2587
 
 
2588
 
Default: \fB\fImax disk size\fR = 0 \fR 
2589
 
 
2590
 
Example: \fB\fImax disk size\fR = 1000 \fR 
2591
 
 
2592
 
.TP
 
3516
This option allows you to put an upper limit on the apparent size of disks. If you set this option to 100 then all shares will appear to be not larger than 100 MB in size.
 
3517
.sp
 
3518
Note that this option does not limit the amount of data you can put on the disk. In the above case you could still store much more than 100 MB on the disk, but if a client ever asks for the amount of free disk space or the total disk size then the result will be bounded by the amount specified in
 
3519
\fImax disk size\fR.
 
3520
.sp
 
3521
This option is primarily useful to work around bugs in some pieces of software that can't handle very large disks, particularly disks over 1GB in size.
 
3522
.sp
 
3523
A
 
3524
\fImax disk size\fR
 
3525
of 0 means no limit.
 
3526
.sp
 
3527
Default:
 
3528
\fB\fImax disk size\fR = 0 \fR
 
3529
.sp
 
3530
Example:
 
3531
\fB\fImax disk size\fR = 1000 \fR
 
3532
.TP 3n
2593
3533
max log size (G)
2594
 
This option (an integer in kilobytes) specifies the max size the log file should grow to\&. Samba periodically checks the size and if it is exceeded it will rename the file, adding a \fI\&.old\fR extension\&.
2595
 
 
2596
 
A size of 0 means no limit\&.
2597
 
 
2598
 
Default: \fB\fImax log size\fR = 5000 \fR 
2599
 
 
2600
 
Default: \fB\fImax log size\fR = 1000 \fR 
2601
 
 
2602
 
.TP
 
3534
This option (an integer in kilobytes) specifies the max size the log file should grow to. Samba periodically checks the size and if it is exceeded it will rename the file, adding a
 
3535
\fI.old\fR
 
3536
extension.
 
3537
.sp
 
3538
A size of 0 means no limit.
 
3539
.sp
 
3540
Default:
 
3541
\fB\fImax log size\fR = 5000 \fR
 
3542
.sp
 
3543
Default:
 
3544
\fB\fImax log size\fR = 1000 \fR
 
3545
.TP 3n
2603
3546
max mux (G)
2604
 
This option controls the maximum number of outstanding simultaneous SMB operations that Samba tells the client it will allow\&. You should never need to set this parameter\&.
2605
 
 
2606
 
Default: \fB\fImax mux\fR = 50 \fR 
2607
 
 
2608
 
.TP
 
3547
This option controls the maximum number of outstanding simultaneous SMB operations that Samba tells the client it will allow. You should never need to set this parameter.
 
3548
.sp
 
3549
Default:
 
3550
\fB\fImax mux\fR = 50 \fR
 
3551
.TP 3n
2609
3552
max open files (G)
2610
 
This parameter limits the maximum number of open files that one \fBsmbd\fR(8) file serving process may have open for a client at any one time\&. The default for this parameter is set very high (10,000) as Samba uses only one bit per unopened file\&.
2611
 
 
2612
 
The limit of the number of open files is usually set by the UNIX per\-process file descriptor limit rather than this parameter so you should never need to touch this parameter\&.
2613
 
 
2614
 
Default: \fB\fImax open files\fR = 10000 \fR 
2615
 
 
2616
 
.TP
 
3553
This parameter limits the maximum number of open files that one
 
3554
\fBsmbd\fR(8)
 
3555
file serving process may have open for a client at any one time. The default for this parameter is set very high (10,000) as Samba uses only one bit per unopened file.
 
3556
.sp
 
3557
The limit of the number of open files is usually set by the UNIX per-process file descriptor limit rather than this parameter so you should never need to touch this parameter.
 
3558
.sp
 
3559
Default:
 
3560
\fB\fImax open files\fR = 10000 \fR
 
3561
.TP 3n
2617
3562
max print jobs (S)
2618
 
This parameter limits the maximum number of jobs allowable in a Samba printer queue at any given moment\&. If this number is exceeded, \fBsmbd\fR(8) will remote "Out of Space" to the client\&.
2619
 
 
2620
 
Default: \fB\fImax print jobs\fR = 1000 \fR 
2621
 
 
2622
 
Example: \fB\fImax print jobs\fR = 5000 \fR 
2623
 
 
2624
 
.TP
 
3563
This parameter limits the maximum number of jobs allowable in a Samba printer queue at any given moment. If this number is exceeded,
 
3564
\fBsmbd\fR(8)
 
3565
will remote "Out of Space" to the client.
 
3566
.sp
 
3567
Default:
 
3568
\fB\fImax print jobs\fR = 1000 \fR
 
3569
.sp
 
3570
Example:
 
3571
\fB\fImax print jobs\fR = 5000 \fR
 
3572
.TP 3n
2625
3573
protocol
2626
 
This parameter is a synonym for max protocol\&.
2627
 
 
2628
 
.TP
 
3574
This parameter is a synonym for max protocol.
 
3575
.TP 3n
2629
3576
max protocol (G)
2630
 
The value of the parameter (a string) is the highest protocol level that will be supported by the server\&.
2631
 
 
 
3577
The value of the parameter (a string) is the highest protocol level that will be supported by the server.
 
3578
.sp
2632
3579
Possible values are :
2633
 
 
2634
 
 
2635
 
.RS
2636
 
.TP 3
2637
 
\(bu
2638
 
\fBCORE\fR: Earliest version\&. No concept of user names\&.
2639
 
.TP
2640
 
\(bu
2641
 
\fBCOREPLUS\fR: Slight improvements on CORE for efficiency\&.
2642
 
.TP
2643
 
\(bu
2644
 
\fBLANMAN1\fR: First \fB modern\fR version of the protocol\&. Long filename support\&.
2645
 
.TP
2646
 
\(bu
2647
 
\fBLANMAN2\fR: Updates to Lanman1 protocol\&.
2648
 
.TP
2649
 
\(bu
2650
 
\fBNT1\fR: Current up to date version of the protocol\&. Used by Windows NT\&. Known as CIFS\&.
2651
 
.LP
 
3580
.RS 3n
 
3581
.TP 3n
 
3582
&#8226;
 
3583
\fBCORE\fR: Earliest version. No concept of user names.
 
3584
.TP 3n
 
3585
&#8226;
 
3586
\fBCOREPLUS\fR: Slight improvements on CORE for efficiency.
 
3587
.TP 3n
 
3588
&#8226;
 
3589
\fBLANMAN1\fR: First
 
3590
\fB modern\fR
 
3591
version of the protocol. Long filename support.
 
3592
.TP 3n
 
3593
&#8226;
 
3594
\fBLANMAN2\fR: Updates to Lanman1 protocol.
 
3595
.TP 3n
 
3596
&#8226;
 
3597
\fBNT1\fR: Current up to date version of the protocol. Used by Windows NT. Known as CIFS.
2652
3598
.RE
2653
 
.IP
2654
 
Normally this option should not be set as the automatic negotiation phase in the SMB protocol takes care of choosing the appropriate protocol\&.
2655
 
 
2656
 
Default: \fB\fImax protocol\fR = NT1 \fR 
2657
 
 
2658
 
Example: \fB\fImax protocol\fR = LANMAN1 \fR 
2659
 
 
2660
 
.TP
 
3599
.IP "" 3n
 
3600
Normally this option should not be set as the automatic negotiation phase in the SMB protocol takes care of choosing the appropriate protocol.
 
3601
.sp
 
3602
Default:
 
3603
\fB\fImax protocol\fR = NT1 \fR
 
3604
.sp
 
3605
Example:
 
3606
\fB\fImax protocol\fR = LANMAN1 \fR
 
3607
.TP 3n
2661
3608
max reported print jobs (S)
2662
 
This parameter limits the maximum number of jobs displayed in a port monitor for Samba printer queue at any given moment\&. If this number is exceeded, the excess jobs will not be shown\&. A value of zero means there is no limit on the number of print jobs reported\&.
2663
 
 
2664
 
Default: \fB\fImax reported print jobs\fR = 0 \fR 
2665
 
 
2666
 
Example: \fB\fImax reported print jobs\fR = 1000 \fR 
2667
 
 
2668
 
.TP
 
3609
This parameter limits the maximum number of jobs displayed in a port monitor for Samba printer queue at any given moment. If this number is exceeded, the excess jobs will not be shown. A value of zero means there is no limit on the number of print jobs reported.
 
3610
.sp
 
3611
Default:
 
3612
\fB\fImax reported print jobs\fR = 0 \fR
 
3613
.sp
 
3614
Example:
 
3615
\fB\fImax reported print jobs\fR = 1000 \fR
 
3616
.TP 3n
2669
3617
max smbd processes (G)
2670
 
This parameter limits the maximum number of \fBsmbd\fR(8) processes concurrently running on a system and is intended as a stopgap to prevent degrading service to clients in the event that the server has insufficient resources to handle more than this number of connections\&. Remember that under normal operating conditions, each user will have an \fBsmbd\fR(8) associated with him or her to handle connections to all shares from a given host\&.
2671
 
 
2672
 
Default: \fB\fImax smbd processes\fR = 0 \fR 
2673
 
 
2674
 
Example: \fB\fImax smbd processes\fR = 1000 \fR 
2675
 
 
2676
 
.TP
 
3618
This parameter limits the maximum number of
 
3619
\fBsmbd\fR(8)
 
3620
processes concurrently running on a system and is intended as a stopgap to prevent degrading service to clients in the event that the server has insufficient resources to handle more than this number of connections. Remember that under normal operating conditions, each user will have an
 
3621
\fBsmbd\fR(8)
 
3622
associated with him or her to handle connections to all shares from a given host.
 
3623
.sp
 
3624
Default:
 
3625
\fB\fImax smbd processes\fR = 0 \fR
 
3626
.sp
 
3627
Example:
 
3628
\fB\fImax smbd processes\fR = 1000 \fR
 
3629
.TP 3n
2677
3630
max stat cache size (G)
2678
 
This parameter limits the size in memory of any \fIstat cache\fR being used to speed up case insensitive name mappings\&. This parameter is the number of kilobyte (1024) units the stat cache can use\&. The default is zero, which means unlimited\&. You should not need to change this parameter\&.
2679
 
 
2680
 
Default: \fB\fImax stat cache size\fR = 0 \fR 
2681
 
 
2682
 
Example: \fB\fImax stat cache size\fR = 1024 \fR 
2683
 
 
2684
 
.TP
 
3631
This parameter limits the size in memory of any
 
3632
\fIstat cache\fR
 
3633
being used to speed up case insensitive name mappings. This parameter is the number of kilobyte (1024) units the stat cache can use. The default is zero, which means unlimited. You should not need to change this parameter.
 
3634
.sp
 
3635
Default:
 
3636
\fB\fImax stat cache size\fR = 0 \fR
 
3637
.sp
 
3638
Example:
 
3639
\fB\fImax stat cache size\fR = 1024 \fR
 
3640
.TP 3n
2685
3641
max ttl (G)
2686
 
This option tells \fBnmbd\fR(8) what the default 'time to live' of NetBIOS names should be (in seconds) when \fBnmbd\fR is requesting a name using either a broadcast packet or from a WINS server\&. You should never need to change this parameter\&. The default is 3 days\&.
2687
 
 
2688
 
Default: \fB\fImax ttl\fR = 259200 \fR 
2689
 
 
2690
 
.TP
 
3642
This option tells
 
3643
\fBnmbd\fR(8)
 
3644
what the default 'time to live' of NetBIOS names should be (in seconds) when
 
3645
\fBnmbd\fR
 
3646
is requesting a name using either a broadcast packet or from a WINS server. You should never need to change this parameter. The default is 3 days.
 
3647
.sp
 
3648
Default:
 
3649
\fB\fImax ttl\fR = 259200 \fR
 
3650
.TP 3n
2691
3651
max wins ttl (G)
2692
 
This option tells \fBsmbd\fR(8) when acting as a WINS server (wins support = yes) what the maximum 'time to live' of NetBIOS names that \fBnmbd\fR will grant will be (in seconds)\&. You should never need to change this parameter\&. The default is 6 days (518400 seconds)\&.
2693
 
 
2694
 
Default: \fB\fImax wins ttl\fR = 518400 \fR 
2695
 
 
2696
 
.TP
 
3652
This option tells
 
3653
\fBsmbd\fR(8)
 
3654
when acting as a WINS server (wins support = yes) what the maximum 'time to live' of NetBIOS names that
 
3655
\fBnmbd\fR
 
3656
will grant will be (in seconds). You should never need to change this parameter. The default is 6 days (518400 seconds).
 
3657
.sp
 
3658
Default:
 
3659
\fB\fImax wins ttl\fR = 518400 \fR
 
3660
.TP 3n
2697
3661
max xmit (G)
2698
 
This option controls the maximum packet size that will be negotiated by Samba\&. The default is 65535, which is the maximum\&. In some cases you may find you get better performance with a smaller value\&. A value below 2048 is likely to cause problems\&.
2699
 
 
2700
 
Default: \fB\fImax xmit\fR = 65535 \fR 
2701
 
 
2702
 
Example: \fB\fImax xmit\fR = 8192 \fR 
2703
 
 
2704
 
.TP
 
3662
This option controls the maximum packet size that will be negotiated by Samba. The default is 16644, which matches the behavior of Windows 2000. A value below 2048 is likely to cause problems. You should never need to change this parameter from its default value.
 
3663
.sp
 
3664
Default:
 
3665
\fB\fImax xmit\fR = 16644 \fR
 
3666
.sp
 
3667
Example:
 
3668
\fB\fImax xmit\fR = 8192 \fR
 
3669
.TP 3n
2705
3670
message command (G)
2706
 
This specifies what command to run when the server receives a WinPopup style message\&.
2707
 
 
2708
 
This would normally be a command that would deliver the message somehow\&. How this is to be done is up to your imagination\&.
2709
 
 
2710
 
An example is: 
 
3671
This specifies what command to run when the server receives a WinPopup style message.
 
3672
.sp
 
3673
This would normally be a command that would deliver the message somehow. How this is to be done is up to your imagination.
 
3674
.sp
 
3675
An example is:
 
3676
 
 
3677
.sp
2711
3678
.nf
2712
3679
 
2713
 
\fBmessage command = csh \-c 'xedit %s;rm %s' &\fR
 
3680
\fBmessage command = csh -c 'xedit %s;rm %s' &\fR
2714
3681
.fi
2715
 
 
2716
 
 
2717
 
This delivers the message using \fBxedit\fR, then removes it afterwards\&. \fBNOTE THAT IT IS VERY IMPORTANT THAT THIS COMMAND RETURN IMMEDIATELY\fR\&. That's why I have the '&' on the end\&. If it doesn't return immediately then your PCs may freeze when sending messages (they should recover after 30 seconds, hopefully)\&.
2718
 
 
2719
 
All messages are delivered as the global guest user\&. The command takes the standard substitutions, although \fI %u\fR won't work (\fI%U\fR may be better in this case)\&.
2720
 
 
2721
 
Apart from the standard substitutions, some additional ones apply\&. In particular:
2722
 
 
2723
 
 
2724
 
.RS
2725
 
.TP 3
2726
 
\(bu
2727
 
\fI%s\fR = the filename containing the message\&.
2728
 
.TP
2729
 
\(bu
2730
 
\fI%t\fR = the destination that the message was sent to (probably the server name)\&.
2731
 
.TP
2732
 
\(bu
2733
 
\fI%f\fR = who the message is from\&.
2734
 
.LP
 
3682
 
 
3683
.sp
 
3684
This delivers the message using
 
3685
\fBxedit\fR, then removes it afterwards.
 
3686
\fBNOTE THAT IT IS VERY IMPORTANT THAT THIS COMMAND RETURN IMMEDIATELY\fR. That's why I have the '&' on the end. If it doesn't return immediately then your PCs may freeze when sending messages (they should recover after 30 seconds, hopefully).
 
3687
.sp
 
3688
All messages are delivered as the global guest user. The command takes the standard substitutions, although
 
3689
\fI %u\fR
 
3690
won't work (\fI%U\fR
 
3691
may be better in this case).
 
3692
.sp
 
3693
Apart from the standard substitutions, some additional ones apply. In particular:
 
3694
.RS 3n
 
3695
.TP 3n
 
3696
&#8226;
 
3697
\fI%s\fR
 
3698
= the filename containing the message.
 
3699
.TP 3n
 
3700
&#8226;
 
3701
\fI%t\fR
 
3702
= the destination that the message was sent to (probably the server name).
 
3703
.TP 3n
 
3704
&#8226;
 
3705
\fI%f\fR
 
3706
= who the message is from.
2735
3707
.RE
2736
 
.IP
2737
 
You could make this command send mail, or whatever else takes your fancy\&. Please let us know of any really interesting ideas you have\&.
 
3708
.IP "" 3n
 
3709
You could make this command send mail, or whatever else takes your fancy. Please let us know of any really interesting ideas you have.
 
3710
.sp
 
3711
Here's a way of sending the messages as mail to root:
2738
3712
 
2739
 
Here's a way of sending the messages as mail to root: 
 
3713
.sp
2740
3714
.nf
2741
3715
 
2742
 
\fBmessage command = /bin/mail \-s 'message from %f on %m' root < %s; rm %s\fR
 
3716
\fBmessage command = /bin/mail -s 'message from %f on %m' root < %s; rm %s\fR
2743
3717
.fi
2744
 
 
2745
 
 
2746
 
If you don't have a message command then the message won't be delivered and Samba will tell the sender there was an error\&. Unfortunately WfWg totally ignores the error code and carries on regardless, saying that the message was delivered\&.
2747
 
 
2748
 
If you want to silently delete it then try: 
 
3718
 
 
3719
.sp
 
3720
If you don't have a message command then the message won't be delivered and Samba will tell the sender there was an error. Unfortunately WfWg totally ignores the error code and carries on regardless, saying that the message was delivered.
 
3721
.sp
 
3722
If you want to silently delete it then try:
 
3723
 
 
3724
.sp
2749
3725
.nf
2750
3726
 
2751
3727
\fBmessage command = rm %s\fR
2752
3728
.fi
2753
 
 
2754
 
 
2755
 
Default: \fB\fImessage command\fR = \fR 
2756
 
 
2757
 
Example: \fB\fImessage command\fR = csh \-c 'xedit %s; rm %s' & \fR 
2758
 
 
2759
 
.TP
 
3729
 
 
3730
.sp
 
3731
Default:
 
3732
\fB\fImessage command\fR = \fR
 
3733
.sp
 
3734
Example:
 
3735
\fB\fImessage command\fR = csh -c 'xedit %s; rm %s' & \fR
 
3736
.TP 3n
2760
3737
min print space (S)
2761
 
This sets the minimum amount of free disk space that must be available before a user will be able to spool a print job\&. It is specified in kilobytes\&. The default is 0, which means a user can always spool a print job\&.
2762
 
 
2763
 
Default: \fB\fImin print space\fR = 0 \fR 
2764
 
 
2765
 
Example: \fB\fImin print space\fR = 2000 \fR 
2766
 
 
2767
 
.TP
 
3738
This sets the minimum amount of free disk space that must be available before a user will be able to spool a print job. It is specified in kilobytes. The default is 0, which means a user can always spool a print job.
 
3739
.sp
 
3740
Default:
 
3741
\fB\fImin print space\fR = 0 \fR
 
3742
.sp
 
3743
Example:
 
3744
\fB\fImin print space\fR = 2000 \fR
 
3745
.TP 3n
2768
3746
min protocol (G)
2769
 
The value of the parameter (a string) is the lowest SMB protocol dialect than Samba will support\&. Please refer to the max protocol parameter for a list of valid protocol names and a brief description of each\&. You may also wish to refer to the C source code in \fIsource/smbd/negprot\&.c\fR for a listing of known protocol dialects supported by clients\&.
2770
 
 
2771
 
If you are viewing this parameter as a security measure, you should also refer to the lanman auth parameter\&. Otherwise, you should never need to change this parameter\&.
2772
 
 
2773
 
Default: \fB\fImin protocol\fR = CORE \fR 
2774
 
 
2775
 
Example: \fB\fImin protocol\fR = NT1 \fR 
2776
 
 
2777
 
.TP
 
3747
The value of the parameter (a string) is the lowest SMB protocol dialect than Samba will support. Please refer to the
 
3748
max protocol parameter for a list of valid protocol names and a brief description of each. You may also wish to refer to the C source code in
 
3749
\fIsource/smbd/negprot.c\fR
 
3750
for a listing of known protocol dialects supported by clients.
 
3751
.sp
 
3752
If you are viewing this parameter as a security measure, you should also refer to the
 
3753
lanman auth parameter. Otherwise, you should never need to change this parameter.
 
3754
.sp
 
3755
Default:
 
3756
\fB\fImin protocol\fR = CORE \fR
 
3757
.sp
 
3758
Example:
 
3759
\fB\fImin protocol\fR = NT1 \fR
 
3760
.TP 3n
2778
3761
min wins ttl (G)
2779
 
This option tells \fBnmbd\fR(8) when acting as a WINS server (wins support = yes) what the minimum 'time to live' of NetBIOS names that \fBnmbd\fR will grant will be (in seconds)\&. You should never need to change this parameter\&. The default is 6 hours (21600 seconds)\&.
2780
 
 
2781
 
Default: \fB\fImin wins ttl\fR = 21600 \fR 
2782
 
 
2783
 
.TP
 
3762
This option tells
 
3763
\fBnmbd\fR(8)
 
3764
when acting as a WINS server (wins support = yes) what the minimum 'time to live' of NetBIOS names that
 
3765
\fBnmbd\fR
 
3766
will grant will be (in seconds). You should never need to change this parameter. The default is 6 hours (21600 seconds).
 
3767
.sp
 
3768
Default:
 
3769
\fB\fImin wins ttl\fR = 21600 \fR
 
3770
.TP 3n
2784
3771
msdfs proxy (S)
2785
 
This parameter indicates that the share is a stand\-in for another CIFS share whose location is specified by the value of the parameter\&. When clients attempt to connect to this share, they are redirected to the proxied share using the SMB\-Dfs protocol\&.
2786
 
 
2787
 
Only Dfs roots can act as proxy shares\&. Take a look at themsdfs root and host msdfs options to find out how to set up a Dfs root share\&.
2788
 
 
 
3772
This parameter indicates that the share is a stand-in for another CIFS share whose location is specified by the value of the parameter. When clients attempt to connect to this share, they are redirected to the proxied share using the SMB-Dfs protocol.
 
3773
.sp
 
3774
Only Dfs roots can act as proxy shares. Take a look at the
 
3775
msdfs root and
 
3776
host msdfs options to find out how to set up a Dfs root share.
 
3777
.sp
2789
3778
\fBNo default\fR
2790
 
 
2791
 
Example: \fB\fImsdfs proxy\fR = \\otherserver\\someshare \fR 
2792
 
 
2793
 
.TP
 
3779
.sp
 
3780
Example:
 
3781
\fB\fImsdfs proxy\fR = \otherserver\someshare \fR
 
3782
.TP 3n
2794
3783
msdfs root (S)
2795
 
If set to \fByes\fR, Samba treats the share as a Dfs root and allows clients to browse the distributed file system tree rooted at the share directory\&. Dfs links are specified in the share directory by symbolic links of the form \fImsdfs:serverA\\\\shareA,serverB\\\\shareB\fR and so on\&. For more information on setting up a Dfs tree on Samba, refer to the MSDFS chapter in the Samba3\-HOWTO book\&.
2796
 
 
2797
 
Default: \fB\fImsdfs root\fR = no \fR 
2798
 
 
2799
 
.TP
 
3784
If set to
 
3785
\fByes\fR, Samba treats the share as a Dfs root and allows clients to browse the distributed file system tree rooted at the share directory. Dfs links are specified in the share directory by symbolic links of the form
 
3786
\fImsdfs:serverA\\shareA,serverB\\shareB\fR
 
3787
and so on. For more information on setting up a Dfs tree on Samba, refer to the MSDFS chapter in the Samba3-HOWTO book.
 
3788
.sp
 
3789
Default:
 
3790
\fB\fImsdfs root\fR = yes \fR
 
3791
.TP 3n
2800
3792
name cache timeout (G)
2801
 
Specifies the number of seconds it takes before entries in samba's hostname resolve cache time out\&. If the timeout is set to 0\&. the caching is disabled\&.
2802
 
 
2803
 
Default: \fB\fIname cache timeout\fR = 660 \fR 
2804
 
 
2805
 
Example: \fB\fIname cache timeout\fR = 0 \fR 
2806
 
 
2807
 
.TP
 
3793
Specifies the number of seconds it takes before entries in samba's hostname resolve cache time out. If the timeout is set to 0. the caching is disabled.
 
3794
.sp
 
3795
Default:
 
3796
\fB\fIname cache timeout\fR = 660 \fR
 
3797
.sp
 
3798
Example:
 
3799
\fB\fIname cache timeout\fR = 0 \fR
 
3800
.TP 3n
2808
3801
name resolve order (G)
2809
 
This option is used by the programs in the Samba suite to determine what naming services to use and in what order to resolve host names to IP addresses\&. Its main purpose to is to control how netbios name resolution is performed\&. The option takes a space separated string of name resolution options\&.
2810
 
 
2811
 
The options are: "lmhosts", "host", "wins" and "bcast"\&. They cause names to be resolved as follows:
2812
 
 
2813
 
 
2814
 
.RS
2815
 
.TP 3
2816
 
\(bu
2817
 
\fBlmhosts\fR : Lookup an IP address in the Samba lmhosts file\&. If the line in lmhosts has no name type attached to the NetBIOS name (see the manpage for lmhosts for details) then any name type matches for lookup\&.
2818
 
.TP
2819
 
\(bu
2820
 
\fBhost\fR : Do a standard host name to IP address resolution, using the system\fI/etc/hosts \fR, NIS, or DNS lookups\&. This method of name resolution is operating system depended for instance on IRIX or Solaris this may be controlled by the \fI/etc/nsswitch\&.conf\fR file\&. Note that this method is used only if the NetBIOS name type being queried is the 0x20 (server) name type or 0x1c (domain controllers)\&. The latter case is only useful for active directory domains and results in a DNS query for the SRV RR entry matching _ldap\&._tcp\&.domain\&.
2821
 
.TP
2822
 
\(bu
2823
 
\fBwins\fR : Query a name with the IP address listed in the WINSSERVER parameter\&. If no WINS server has been specified this method will be ignored\&.
2824
 
.TP
2825
 
\(bu
2826
 
\fBbcast\fR : Do a broadcast on each of the known local interfaces listed in the interfaces parameter\&. This is the least reliable of the name resolution methods as it depends on the target host being on a locally connected subnet\&.
2827
 
.LP
 
3802
This option is used by the programs in the Samba suite to determine what naming services to use and in what order to resolve host names to IP addresses. Its main purpose to is to control how netbios name resolution is performed. The option takes a space separated string of name resolution options.
 
3803
.sp
 
3804
The options are: "lmhosts", "host", "wins" and "bcast". They cause names to be resolved as follows:
 
3805
.RS 3n
 
3806
.TP 3n
 
3807
&#8226;
 
3808
 
 
3809
\fBlmhosts\fR
 
3810
: Lookup an IP address in the Samba lmhosts file. If the line in lmhosts has no name type attached to the NetBIOS name (see the manpage for lmhosts for details) then any name type matches for lookup.
 
3811
.TP 3n
 
3812
&#8226;
 
3813
 
 
3814
\fBhost\fR
 
3815
: Do a standard host name to IP address resolution, using the system
 
3816
\fI/etc/hosts \fR, NIS, or DNS lookups. This method of name resolution is operating system depended for instance on IRIX or Solaris this may be controlled by the
 
3817
\fI/etc/nsswitch.conf\fR
 
3818
file. Note that this method is used only if the NetBIOS name type being queried is the 0x20 (server) name type or 0x1c (domain controllers). The latter case is only useful for active directory domains and results in a DNS query for the SRV RR entry matching _ldap._tcp.domain.
 
3819
.TP 3n
 
3820
&#8226;
 
3821
\fBwins\fR
 
3822
: Query a name with the IP address listed in the
 
3823
WINSSERVER parameter. If no WINS server has been specified this method will be ignored.
 
3824
.TP 3n
 
3825
&#8226;
 
3826
\fBbcast\fR
 
3827
: Do a broadcast on each of the known local interfaces listed in the
 
3828
interfaces parameter. This is the least reliable of the name resolution methods as it depends on the target host being on a locally connected subnet.
2828
3829
.RE
2829
 
.IP
2830
 
The example below will cause the local lmhosts file to be examined first, followed by a broadcast attempt, followed by a normal system hostname lookup\&.
2831
 
 
2832
 
When Samba is functioning in ADS security mode (\fBsecurity = ads\fR) it is advised to use following settings for \fIname resolve order\fR:
2833
 
 
 
3830
.IP "" 3n
 
3831
The example below will cause the local lmhosts file to be examined first, followed by a broadcast attempt, followed by a normal system hostname lookup.
 
3832
.sp
 
3833
When Samba is functioning in ADS security mode (\fBsecurity = ads\fR) it is advised to use following settings for
 
3834
\fIname resolve order\fR:
 
3835
.sp
2834
3836
\fBname resolve order = wins bcast\fR
2835
 
 
2836
 
DC lookups will still be done via DNS, but fallbacks to netbios names will not inundate your DNS servers with needless querys for DOMAIN<0x1c> lookups\&.
2837
 
 
2838
 
Default: \fB\fIname resolve order\fR = lmhosts host wins bcast \fR 
2839
 
 
2840
 
Example: \fB\fIname resolve order\fR = lmhosts bcast host \fR 
2841
 
 
2842
 
.TP
 
3837
.sp
 
3838
DC lookups will still be done via DNS, but fallbacks to netbios names will not inundate your DNS servers with needless querys for DOMAIN<0x1c> lookups.
 
3839
.sp
 
3840
Default:
 
3841
\fB\fIname resolve order\fR = lmhosts host wins bcast \fR
 
3842
.sp
 
3843
Example:
 
3844
\fB\fIname resolve order\fR = lmhosts bcast host \fR
 
3845
.TP 3n
2843
3846
netbios aliases (G)
2844
 
This is a list of NetBIOS names that nmbd will advertise as additional names by which the Samba server is known\&. This allows one machine to appear in browse lists under multiple names\&. If a machine is acting as a browse server or logon server none of these names will be advertised as either browse server or logon servers, only the primary name of the machine will be advertised with these capabilities\&.
2845
 
 
2846
 
Default: \fB\fInetbios aliases\fR = # empty string (no additional names) \fR 
2847
 
 
2848
 
Example: \fB\fInetbios aliases\fR = TEST TEST1 TEST2 \fR 
2849
 
 
2850
 
.TP
 
3847
This is a list of NetBIOS names that nmbd will advertise as additional names by which the Samba server is known. This allows one machine to appear in browse lists under multiple names. If a machine is acting as a browse server or logon server none of these names will be advertised as either browse server or logon servers, only the primary name of the machine will be advertised with these capabilities.
 
3848
.sp
 
3849
Default:
 
3850
\fB\fInetbios aliases\fR = # empty string (no additional names) \fR
 
3851
.sp
 
3852
Example:
 
3853
\fB\fInetbios aliases\fR = TEST TEST1 TEST2 \fR
 
3854
.TP 3n
2851
3855
netbios name (G)
2852
 
This sets the NetBIOS name by which a Samba server is known\&. By default it is the same as the first component of the host's DNS name\&. If a machine is a browse server or logon server this name (or the first component of the hosts DNS name) will be the name that these services are advertised under\&.
2853
 
 
2854
 
There is a bug in Samba\-3 that breaks operation of browsing and access to shares if the netbios name is set to the literal name PIPE\&. To avoid this problem, do not name your Samba\-3 server PIPE\&.
2855
 
 
2856
 
Default: \fB\fInetbios name\fR = # machine DNS name \fR 
2857
 
 
2858
 
Example: \fB\fInetbios name\fR = MYNAME \fR 
2859
 
 
2860
 
.TP
 
3856
This sets the NetBIOS name by which a Samba server is known. By default it is the same as the first component of the host's DNS name. If a machine is a browse server or logon server this name (or the first component of the hosts DNS name) will be the name that these services are advertised under.
 
3857
.sp
 
3858
There is a bug in Samba-3 that breaks operation of browsing and access to shares if the netbios name is set to the literal name
 
3859
PIPE. To avoid this problem, do not name your Samba-3 server
 
3860
PIPE.
 
3861
.sp
 
3862
Default:
 
3863
\fB\fInetbios name\fR = # machine DNS name \fR
 
3864
.sp
 
3865
Example:
 
3866
\fB\fInetbios name\fR = MYNAME \fR
 
3867
.TP 3n
2861
3868
netbios scope (G)
2862
 
This sets the NetBIOS scope that Samba will operate under\&. This should not be set unless every machine on your LAN also sets this value\&.
2863
 
 
2864
 
Default: \fB\fInetbios scope\fR = \fR 
2865
 
 
2866
 
.TP
 
3869
This sets the NetBIOS scope that Samba will operate under. This should not be set unless every machine on your LAN also sets this value.
 
3870
.sp
 
3871
Default:
 
3872
\fB\fInetbios scope\fR = \fR
 
3873
.TP 3n
2867
3874
nis homedir (G)
2868
 
Get the home share server from a NIS map\&. For UNIX systems that use an automounter, the user's home directory will often be mounted on a workstation on demand from a remote server\&.
2869
 
 
2870
 
When the Samba logon server is not the actual home directory server, but is mounting the home directories via NFS then two network hops would be required to access the users home directory if the logon server told the client to use itself as the SMB server for home directories (one over SMB and one over NFS)\&. This can be very slow\&.
2871
 
 
2872
 
This option allows Samba to return the home share as being on a different server to the logon server and as long as a Samba daemon is running on the home directory server, it will be mounted on the Samba client directly from the directory server\&. When Samba is returning the home share to the client, it will consult the NIS map specified inhomedir map and return the server listed there\&.
2873
 
 
2874
 
Note that for this option to work there must be a working NIS system and the Samba server with this option must also be a logon server\&.
2875
 
 
2876
 
Default: \fB\fInis homedir\fR = no \fR 
2877
 
 
2878
 
.TP
 
3875
Get the home share server from a NIS map. For UNIX systems that use an automounter, the user's home directory will often be mounted on a workstation on demand from a remote server.
 
3876
.sp
 
3877
When the Samba logon server is not the actual home directory server, but is mounting the home directories via NFS then two network hops would be required to access the users home directory if the logon server told the client to use itself as the SMB server for home directories (one over SMB and one over NFS). This can be very slow.
 
3878
.sp
 
3879
This option allows Samba to return the home share as being on a different server to the logon server and as long as a Samba daemon is running on the home directory server, it will be mounted on the Samba client directly from the directory server. When Samba is returning the home share to the client, it will consult the NIS map specified in
 
3880
homedir map and return the server listed there.
 
3881
.sp
 
3882
Note that for this option to work there must be a working NIS system and the Samba server with this option must also be a logon server.
 
3883
.sp
 
3884
Default:
 
3885
\fB\fInis homedir\fR = no \fR
 
3886
.TP 3n
2879
3887
nt acl support (S)
2880
 
This boolean parameter controls whether \fBsmbd\fR(8) will attempt to map UNIX permissions into Windows NT access control lists\&. This parameter was formally a global parameter in releases prior to 2\&.2\&.2\&.
2881
 
 
2882
 
Default: \fB\fInt acl support\fR = yes \fR 
2883
 
 
2884
 
.TP
 
3888
This boolean parameter controls whether
 
3889
\fBsmbd\fR(8)
 
3890
will attempt to map UNIX permissions into Windows NT access control lists. The UNIX permissions considered are the the traditional UNIX owner and group permissions, as well as POSIX ACLs set on any files or directories. This parameter was formally a global parameter in releases prior to 2.2.2.
 
3891
.sp
 
3892
Default:
 
3893
\fB\fInt acl support\fR = yes \fR
 
3894
.TP 3n
2885
3895
ntlm auth (G)
2886
 
This parameter determines whether or not \fBsmbd\fR(8) will attempt to authenticate users using the NTLM encrypted password response\&. If disabled, either the lanman password hash or an NTLMv2 response will need to be sent by the client\&.
2887
 
 
2888
 
If this option, and \fBlanman auth\fR are both disabled, then only NTLMv2 logins will be permited\&. Not all clients support NTLMv2, and most will require special configuration to us it\&.
2889
 
 
2890
 
Default: \fB\fIntlm auth\fR = yes \fR 
2891
 
 
2892
 
.TP
 
3896
This parameter determines whether or not
 
3897
\fBsmbd\fR(8)
 
3898
will attempt to authenticate users using the NTLM encrypted password response. If disabled, either the lanman password hash or an NTLMv2 response will need to be sent by the client.
 
3899
.sp
 
3900
If this option, and
 
3901
\fBlanman auth\fR
 
3902
are both disabled, then only NTLMv2 logins will be permited. Not all clients support NTLMv2, and most will require special configuration to us it.
 
3903
.sp
 
3904
Default:
 
3905
\fB\fIntlm auth\fR = yes \fR
 
3906
.TP 3n
2893
3907
nt pipe support (G)
2894
 
This boolean parameter controls whether \fBsmbd\fR(8) will allow Windows NT clients to connect to the NT SMB specific \fBIPC$\fR pipes\&. This is a developer debugging option and can be left alone\&.
2895
 
 
2896
 
Default: \fB\fInt pipe support\fR = yes \fR 
2897
 
 
2898
 
.TP
 
3908
This boolean parameter controls whether
 
3909
\fBsmbd\fR(8)
 
3910
will allow Windows NT clients to connect to the NT SMB specific
 
3911
\fBIPC$\fR
 
3912
pipes. This is a developer debugging option and can be left alone.
 
3913
.sp
 
3914
Default:
 
3915
\fB\fInt pipe support\fR = yes \fR
 
3916
.TP 3n
2899
3917
nt status support (G)
2900
 
This boolean parameter controls whether \fBsmbd\fR(8) will negotiate NT specific status support with Windows NT/2k/XP clients\&. This is a developer debugging option and should be left alone\&. If this option is set to \fBno\fR then Samba offers exactly the same DOS error codes that versions prior to Samba 2\&.2\&.3 reported\&.
2901
 
 
2902
 
You should not need to ever disable this parameter\&.
2903
 
 
2904
 
Default: \fB\fInt status support\fR = yes \fR 
2905
 
 
2906
 
.TP
 
3918
This boolean parameter controls whether
 
3919
\fBsmbd\fR(8)
 
3920
will negotiate NT specific status support with Windows NT/2k/XP clients. This is a developer debugging option and should be left alone. If this option is set to
 
3921
\fBno\fR
 
3922
then Samba offers exactly the same DOS error codes that versions prior to Samba 2.2.3 reported.
 
3923
.sp
 
3924
You should not need to ever disable this parameter.
 
3925
.sp
 
3926
Default:
 
3927
\fB\fInt status support\fR = yes \fR
 
3928
.TP 3n
2907
3929
null passwords (G)
2908
 
Allow or disallow client access to accounts that have null passwords\&.
2909
 
 
2910
 
See also \fBsmbpasswd\fR(5)\&.
2911
 
 
2912
 
Default: \fB\fInull passwords\fR = no \fR 
2913
 
 
2914
 
.TP
 
3930
Allow or disallow client access to accounts that have null passwords.
 
3931
.sp
 
3932
See also
 
3933
\fBsmbpasswd\fR(5).
 
3934
.sp
 
3935
Default:
 
3936
\fB\fInull passwords\fR = no \fR
 
3937
.TP 3n
2915
3938
obey pam restrictions (G)
2916
 
When Samba 3\&.0 is configured to enable PAM support (i\&.e\&. \-\-with\-pam), this parameter will control whether or not Samba should obey PAM's account and session management directives\&. The default behavior is to use PAM for clear text authentication only and to ignore any account or session management\&. Note that Samba always ignores PAM for authentication in the case of encrypt passwords = yes\&. The reason is that PAM modules cannot support the challenge/response authentication mechanism needed in the presence of SMB password encryption\&.
2917
 
 
2918
 
Default: \fB\fIobey pam restrictions\fR = no \fR 
2919
 
 
2920
 
.TP
 
3939
When Samba 3.0 is configured to enable PAM support (i.e. --with-pam), this parameter will control whether or not Samba should obey PAM's account and session management directives. The default behavior is to use PAM for clear text authentication only and to ignore any account or session management. Note that Samba always ignores PAM for authentication in the case of
 
3940
encrypt passwords = yes. The reason is that PAM modules cannot support the challenge/response authentication mechanism needed in the presence of SMB password encryption.
 
3941
.sp
 
3942
Default:
 
3943
\fB\fIobey pam restrictions\fR = no \fR
 
3944
.TP 3n
2921
3945
only user (S)
2922
 
This is a boolean option that controls whether connections with usernames not in the \fIuser\fR list will be allowed\&. By default this option is disabled so that a client can supply a username to be used by the server\&. Enabling this parameter will force the server to only use the login names from the \fIuser\fR list and is only really useful in security = share level security\&.
2923
 
 
2924
 
Note that this also means Samba won't try to deduce usernames from the service name\&. This can be annoying for the [homes] section\&. To get around this you could use \fBuser = %S\fR which means your \fIuser\fR list will be just the service name, which for home directories is the name of the user\&.
2925
 
 
2926
 
Default: \fB\fIonly user\fR = no \fR 
2927
 
 
2928
 
.TP
 
3946
This is a boolean option that controls whether connections with usernames not in the
 
3947
\fIuser\fR
 
3948
list will be allowed. By default this option is disabled so that a client can supply a username to be used by the server. Enabling this parameter will force the server to only use the login names from the
 
3949
\fIuser\fR
 
3950
list and is only really useful in
 
3951
security = share level security.
 
3952
.sp
 
3953
Note that this also means Samba won't try to deduce usernames from the service name. This can be annoying for the [homes] section. To get around this you could use
 
3954
\fBuser = %S\fR
 
3955
which means your
 
3956
\fIuser\fR
 
3957
list will be just the service name, which for home directories is the name of the user.
 
3958
.sp
 
3959
Default:
 
3960
\fB\fIonly user\fR = no \fR
 
3961
.TP 3n
 
3962
open files database hash size (G)
 
3963
This parameter was added in Samba 3.0.23. This is an internal tuning parameter that sets the hash size of the tdb used for the open file databases. The presence of this parameter allows tuning of the system for very large (thousands of concurrent users) Samba setups. The default setting of this parameter should be sufficient for most normal environments. It is advised not to change this parameter unless advised to by a Samba Team member.
 
3964
.sp
 
3965
Default:
 
3966
\fB\fIopen files database hash size\fR = 10007 \fR
 
3967
.sp
 
3968
Example:
 
3969
\fB\fIopen files database hash size\fR = 1338457 \fR
 
3970
.TP 3n
2929
3971
oplock break wait time (G)
2930
 
This is a tuning parameter added due to bugs in both Windows 9x and WinNT\&. If Samba responds to a client too quickly when that client issues an SMB that can cause an oplock break request, then the network client can fail and not respond to the break request\&. This tuning parameter (which is set in milliseconds) is the amount of time Samba will wait before sending an oplock break request to such (broken) clients\&.
2931
 
 
2932
 
 
2933
 
.RS
2934
 
.Sh "Warning"
2935
 
DO NOT CHANGE THIS PARAMETER UNLESS YOU HAVE READ AND UNDERSTOOD THE SAMBA OPLOCK CODE\&.
2936
 
 
2937
 
.RE
2938
 
Default: \fB\fIoplock break wait time\fR = 0 \fR 
2939
 
 
2940
 
.TP
 
3972
This is a tuning parameter added due to bugs in both Windows 9x and WinNT. If Samba responds to a client too quickly when that client issues an SMB that can cause an oplock break request, then the network client can fail and not respond to the break request. This tuning parameter (which is set in milliseconds) is the amount of time Samba will wait before sending an oplock break request to such (broken) clients.
 
3973
.sp
 
3974
.it 1 an-trap
 
3975
.nr an-no-space-flag 1
 
3976
.nr an-break-flag 1
 
3977
.br
 
3978
\fBWarning\fR
 
3979
DO NOT CHANGE THIS PARAMETER UNLESS YOU HAVE READ AND UNDERSTOOD THE SAMBA OPLOCK CODE.
 
3980
Default:
 
3981
\fB\fIoplock break wait time\fR = 0 \fR
 
3982
.TP 3n
2941
3983
oplock contention limit (S)
2942
 
This is a \fBvery\fR advanced \fBsmbd\fR(8) tuning option to improve the efficiency of the granting of oplocks under multiple client contention for the same file\&.
2943
 
 
2944
 
In brief it specifies a number, which causes \fBsmbd\fR(8)not to grant an oplock even when requested if the approximate number of clients contending for an oplock on the same file goes over this limit\&. This causes \fBsmbd\fR to behave in a similar way to Windows NT\&.
2945
 
 
2946
 
 
2947
 
.RS
2948
 
.Sh "Warning"
2949
 
DO NOT CHANGE THIS PARAMETER UNLESS YOU HAVE READ AND UNDERSTOOD THE SAMBA OPLOCK CODE\&.
2950
 
 
2951
 
.RE
2952
 
Default: \fB\fIoplock contention limit\fR = 2 \fR 
2953
 
 
2954
 
.TP
 
3984
This is a
 
3985
\fBvery\fR
 
3986
advanced
 
3987
\fBsmbd\fR(8)
 
3988
tuning option to improve the efficiency of the granting of oplocks under multiple client contention for the same file.
 
3989
.sp
 
3990
In brief it specifies a number, which causes
 
3991
\fBsmbd\fR(8)not to grant an oplock even when requested if the approximate number of clients contending for an oplock on the same file goes over this limit. This causes
 
3992
\fBsmbd\fR
 
3993
to behave in a similar way to Windows NT.
 
3994
.sp
 
3995
.it 1 an-trap
 
3996
.nr an-no-space-flag 1
 
3997
.nr an-break-flag 1
 
3998
.br
 
3999
\fBWarning\fR
 
4000
DO NOT CHANGE THIS PARAMETER UNLESS YOU HAVE READ AND UNDERSTOOD THE SAMBA OPLOCK CODE.
 
4001
Default:
 
4002
\fB\fIoplock contention limit\fR = 2 \fR
 
4003
.TP 3n
2955
4004
oplocks (S)
2956
 
This boolean option tells \fBsmbd\fR whether to issue oplocks (opportunistic locks) to file open requests on this share\&. The oplock code can dramatically (approx\&. 30% or more) improve the speed of access to files on Samba servers\&. It allows the clients to aggressively cache files locally and you may want to disable this option for unreliable network environments (it is turned on by default in Windows NT Servers)\&. For more information see the file\fISpeed\&.txt\fR in the Samba\fIdocs/\fR directory\&.
2957
 
 
2958
 
Oplocks may be selectively turned off on certain files with a share\&. See the veto oplock files parameter\&. On some systems oplocks are recognized by the underlying operating system\&. This allows data synchronization between all access to oplocked files, whether it be via Samba or NFS or a local UNIX process\&. See thekernel oplocks parameter for details\&.
2959
 
 
2960
 
Default: \fB\fIoplocks\fR = yes \fR 
2961
 
 
2962
 
.TP
 
4005
This boolean option tells
 
4006
\fBsmbd\fR
 
4007
whether to issue oplocks (opportunistic locks) to file open requests on this share. The oplock code can dramatically (approx. 30% or more) improve the speed of access to files on Samba servers. It allows the clients to aggressively cache files locally and you may want to disable this option for unreliable network environments (it is turned on by default in Windows NT Servers). For more information see the file
 
4008
\fISpeed.txt\fR
 
4009
in the Samba
 
4010
\fIdocs/\fR
 
4011
directory.
 
4012
.sp
 
4013
Oplocks may be selectively turned off on certain files with a share. See the
 
4014
veto oplock files parameter. On some systems oplocks are recognized by the underlying operating system. This allows data synchronization between all access to oplocked files, whether it be via Samba or NFS or a local UNIX process. See the
 
4015
kernel oplocks parameter for details.
 
4016
.sp
 
4017
Default:
 
4018
\fB\fIoplocks\fR = yes \fR
 
4019
.TP 3n
2963
4020
os2 driver map (G)
2964
 
The parameter is used to define the absolute path to a file containing a mapping of Windows NT printer driver names to OS/2 printer driver names\&. The format is:
2965
 
 
2966
 
<nt driver name> = <os2 driver name>\&.<device name>
2967
 
 
2968
 
For example, a valid entry using the HP LaserJet 5 printer driver would appear as \fBHP LaserJet 5L = LASERJET\&.HP LaserJet 5L\fR\&.
2969
 
 
2970
 
The need for the file is due to the printer driver namespace problem described in the chapter on Classical Printing in the Samba3\-HOWTO book\&. For more details on OS/2 clients, please refer to chapter on other clients in the Samba3\-HOWTO book\&.
2971
 
 
2972
 
Default: \fB\fIos2 driver map\fR = \fR 
2973
 
 
2974
 
.TP
 
4021
The parameter is used to define the absolute path to a file containing a mapping of Windows NT printer driver names to OS/2 printer driver names. The format is:
 
4022
.sp
 
4023
<nt driver name> = <os2 driver name>.<device name>
 
4024
.sp
 
4025
For example, a valid entry using the HP LaserJet 5 printer driver would appear as
 
4026
\fBHP LaserJet 5L = LASERJET.HP LaserJet 5L\fR.
 
4027
.sp
 
4028
The need for the file is due to the printer driver namespace problem described in the chapter on Classical Printing in the Samba3-HOWTO book. For more details on OS/2 clients, please refer to chapter on other clients in the Samba3-HOWTO book.
 
4029
.sp
 
4030
Default:
 
4031
\fB\fIos2 driver map\fR = \fR
 
4032
.TP 3n
2975
4033
os level (G)
2976
 
This integer value controls what level Samba advertises itself as for browse elections\&. The value of this parameter determines whether \fBnmbd\fR(8) has a chance of becoming a local master browser for the workgroup in the local broadcast area\&.
2977
 
 
2978
 
\fB Note :\fRBy default, Samba will win a local master browsing election over all Microsoft operating systems except a Windows NT 4\&.0/2000 Domain Controller\&. This means that a misconfigured Samba host can effectively isolate a subnet for browsing purposes\&. This parameter is largely auto\-configured in the Samba\-3 release series and it is seldom necessary to manually over\-ride the default setting\&. Please refer to chapter 9 of the Samba\-3 HOWTO document for further information regarding the use of this parameter\&.
2979
 
 
2980
 
Default: \fB\fIos level\fR = 20 \fR 
2981
 
 
2982
 
Example: \fB\fIos level\fR = 65 \fR 
2983
 
 
2984
 
.TP
 
4034
This integer value controls what level Samba advertises itself as for browse elections. The value of this parameter determines whether
 
4035
\fBnmbd\fR(8)
 
4036
has a chance of becoming a local master browser for the
 
4037
workgroup in the local broadcast area.
 
4038
.sp
 
4039
\fB Note :\fRBy default, Samba will win a local master browsing election over all Microsoft operating systems except a Windows NT 4.0/2000 Domain Controller. This means that a misconfigured Samba host can effectively isolate a subnet for browsing purposes. This parameter is largely auto-configured in the Samba-3 release series and it is seldom necessary to manually over-ride the default setting. Please refer to chapter 9 of the Samba-3 HOWTO document for further information regarding the use of this parameter.
 
4040
.sp
 
4041
Default:
 
4042
\fB\fIos level\fR = 20 \fR
 
4043
.sp
 
4044
Example:
 
4045
\fB\fIos level\fR = 65 \fR
 
4046
.TP 3n
2985
4047
pam password change (G)
2986
 
With the addition of better PAM support in Samba 2\&.2, this parameter, it is possible to use PAM's password change control flag for Samba\&. If enabled, then PAM will be used for password changes when requested by an SMB client instead of the program listed in passwd program\&. It should be possible to enable this without changing your passwd chat parameter for most setups\&.
2987
 
 
2988
 
Default: \fB\fIpam password change\fR = no \fR 
2989
 
 
2990
 
.TP
 
4048
With the addition of better PAM support in Samba 2.2, this parameter, it is possible to use PAM's password change control flag for Samba. If enabled, then PAM will be used for password changes when requested by an SMB client instead of the program listed in
 
4049
passwd program. It should be possible to enable this without changing your
 
4050
passwd chat parameter for most setups.
 
4051
.sp
 
4052
Default:
 
4053
\fB\fIpam password change\fR = no \fR
 
4054
.TP 3n
2991
4055
panic action (G)
2992
 
This is a Samba developer option that allows a system command to be called when either \fBsmbd\fR(8) or \fBsmbd\fR(8)crashes\&. This is usually used to draw attention to the fact that a problem occurred\&.
2993
 
 
2994
 
Default: \fB\fIpanic action\fR = \fR 
2995
 
 
2996
 
Example: \fB\fIpanic action\fR = "/bin/sleep 90000" \fR 
2997
 
 
2998
 
.TP
 
4056
This is a Samba developer option that allows a system command to be called when either
 
4057
\fBsmbd\fR(8)
 
4058
or
 
4059
\fBsmbd\fR(8)
 
4060
crashes. This is usually used to draw attention to the fact that a problem occurred.
 
4061
.sp
 
4062
Default:
 
4063
\fB\fIpanic action\fR = \fR
 
4064
.sp
 
4065
Example:
 
4066
\fB\fIpanic action\fR = "/bin/sleep 90000" \fR
 
4067
.TP 3n
2999
4068
paranoid server security (G)
3000
 
Some version of NT 4\&.x allow non\-guest users with a bad passowrd\&. When this option is enabled, samba will not use a broken NT 4\&.x server as password server, but instead complain to the logs and exit\&.
3001
 
 
3002
 
Disabling this option prevents Samba from making this check, which involves deliberatly attempting a bad logon to the remote server\&.
3003
 
 
3004
 
Default: \fB\fIparanoid server security\fR = yes \fR 
3005
 
 
3006
 
.TP
 
4069
Some version of NT 4.x allow non-guest users with a bad passowrd. When this option is enabled, samba will not use a broken NT 4.x server as password server, but instead complain to the logs and exit.
 
4070
.sp
 
4071
Disabling this option prevents Samba from making this check, which involves deliberatly attempting a bad logon to the remote server.
 
4072
.sp
 
4073
Default:
 
4074
\fB\fIparanoid server security\fR = yes \fR
 
4075
.TP 3n
3007
4076
passdb backend (G)
3008
 
This option allows the administrator to chose which backends to retrieve and store passwords with\&. This allows (for example) both smbpasswd and tdbsam to be used without a recompile\&. Multiple backends can be specified, separated by spaces\&. The backends will be searched in the order they are specified\&. New users are always added to the first backend specified\&.
3009
 
 
3010
 
This parameter is in two parts, the backend's name, and a 'location' string that has meaning only to that particular backed\&. These are separated by a : character\&.
3011
 
 
 
4077
This option allows the administrator to chose which backend will be used for storing user and possibly group information. This allows you to swap between dfferent storage mechanisms without recompile.
 
4078
.sp
 
4079
The parameter value is divided into two parts, the backend's name, and a 'location' string that has meaning only to that particular backed. These are separated by a : character.
 
4080
.sp
3012
4081
Available backends can include:
3013
 
 
3014
 
.RS
3015
 
.TP 3
3016
 
\(bu
3017
 
\fBsmbpasswd\fR \- The default smbpasswd backend\&. Takes a path to the smbpasswd file as an optional argument\&.
3018
 
.TP
3019
 
\(bu
3020
 
\fBtdbsam\fR \- The TDB based password storage backend\&. Takes a path to the TDB as an optional argument (defaults to passdb\&.tdb in the private dir directory\&.
3021
 
.TP
3022
 
\(bu
3023
 
\fBldapsam\fR \- The LDAP based passdb backend\&. Takes an LDAP URL as an optional argument (defaults to \fBldap://localhost\fR)
3024
 
 
3025
 
LDAP connections should be secured where possible\&. This may be done using either Start\-TLS (see ldap ssl) or by specifying \fIldaps://\fR in the URL argument\&.
3026
 
 
3027
 
Multiple servers may also be specified in double\-quotes, if your LDAP libraries supports the LDAP URL notation\&. (OpenLDAP does)\&.
3028
 
.TP
3029
 
\(bu
3030
 
\fBnisplussam\fR \- The NIS+ based passdb backend\&. Takes name NIS domain as an optional argument\&. Only works with sun NIS+ servers\&.
3031
 
.TP
3032
 
\(bu
3033
 
\fBmysql\fR \- The MySQL based passdb backend\&. Takes an identifier as argument\&. Read the Samba HOWTO Collection for configuration details\&.
3034
 
.LP
 
4082
.RS 3n
 
4083
.TP 3n
 
4084
&#8226;
 
4085
\fBsmbpasswd\fR
 
4086
- The default smbpasswd backend. Takes a path to the smbpasswd file as an optional argument.
 
4087
.TP 3n
 
4088
&#8226;
 
4089
\fBtdbsam\fR
 
4090
- The TDB based password storage backend. Takes a path to the TDB as an optional argument (defaults to passdb.tdb in the
 
4091
private dir directory.
 
4092
.TP 3n
 
4093
&#8226;
 
4094
\fBldapsam\fR
 
4095
- The LDAP based passdb backend. Takes an LDAP URL as an optional argument (defaults to
 
4096
\fBldap://localhost\fR)
 
4097
.sp
 
4098
LDAP connections should be secured where possible. This may be done using either Start-TLS (see
 
4099
ldap ssl) or by specifying
 
4100
\fIldaps://\fR
 
4101
in the URL argument.
 
4102
.sp
 
4103
Multiple servers may also be specified in double-quotes, if your LDAP libraries supports the LDAP URL notation. (OpenLDAP does).
3035
4104
.RE
3036
 
.IP
3037
 
 
 
4105
.IP "" 3n
3038
4106
 
3039
4107
 
3040
4108
        Examples of use are:
3041
4109
.nf
3042
4110
 
3043
 
passdb backend = tdbsam:/etc/samba/private/passdb\&.tdb \\
3044
 
    smbpasswd:/etc/samba/smbpasswd
3045
 
 
3046
 
or
3047
 
 
3048
 
passdb backend = ldapsam:ldaps://ldap\&.example\&.com
3049
 
 
3050
 
or
3051
 
 
3052
 
passdb backend = ldapsam:"ldap://ldap\-1\&.example\&.com \\
3053
 
    ldap://ldap\-2\&.example\&.com"
3054
 
 
3055
 
or
3056
 
 
3057
 
passdb backend = mysql:my_plugin_args tdbsam
 
4111
passdb backend = tdbsam:/etc/samba/private/passdb.tdb 
 
4112
 
 
4113
or
 
4114
 
 
4115
passdb backend = ldapsam:"ldap://ldap-1.example.com ldap://ldap-2.example.com"
3058
4116
.fi
3059
 
Default: \fB\fIpassdb backend\fR = smbpasswd \fR 
3060
 
 
3061
 
.TP
 
4117
Default:
 
4118
\fB\fIpassdb backend\fR = smbpasswd \fR
 
4119
.TP 3n
3062
4120
passdb expand explicit (G)
3063
 
This parameter controls whether Samba substitutes %\-macros in the passdb fields if they are explicitly set\&. We used to expand macros here, but this turned out to be a bug because the Windows client can expand a variable %G_osver% in which %G would have been substituted by the user's primary group\&.
3064
 
 
3065
 
This parameter is set to "yes" by default, but this is about to change in the future\&.
3066
 
 
3067
 
Default: \fB\fIpassdb expand explicit\fR = yes \fR 
3068
 
 
3069
 
.TP
 
4121
This parameter controls whether Samba substitutes %-macros in the passdb fields if they are explicitly set. We used to expand macros here, but this turned out to be a bug because the Windows client can expand a variable %G_osver% in which %G would have been substituted by the user's primary group.
 
4122
.sp
 
4123
Default:
 
4124
\fB\fIpassdb expand explicit\fR = no \fR
 
4125
.TP 3n
3070
4126
passwd chat (G)
3071
 
This string controls the \fB"chat"\fR conversation that takes places between \fBsmbd\fR(8) and the local password changing program to change the user's password\&. The string describes a sequence of response\-receive pairs that \fBsmbd\fR(8) uses to determine what to send to the passwd program and what to expect back\&. If the expected output is not received then the password is not changed\&.
3072
 
 
3073
 
This chat sequence is often quite site specific, depending on what local methods are used for password control (such as NIS etc)\&.
3074
 
 
3075
 
Note that this parameter only is only used if the unix password sync parameter is set to \fByes\fR\&. This sequence is then called \fBAS ROOT\fR when the SMB password in the smbpasswd file is being changed, without access to the old password cleartext\&. This means that root must be able to reset the user's password without knowing the text of the previous password\&. In the presence of NIS/YP, this means that the passwd program must be executed on the NIS master\&.
3076
 
 
3077
 
The string can contain the macro \fI%n\fR which is substituted for the new password\&. The chat sequence can also contain the standard macros \\n, \\r, \\t and \\s to give line\-feed, carriage\-return, tab and space\&. The chat sequence string can also contain a '*' which matches any sequence of characters\&. Double quotes can be used to collect strings with spaces in them into a single string\&.
3078
 
 
3079
 
If the send string in any part of the chat sequence is a full stop "\&.", then no string is sent\&. Similarly, if the expect string is a full stop then no string is expected\&.
3080
 
 
3081
 
If the pam password change parameter is set to \fByes\fR, the chat pairs may be matched in any order, and success is determined by the PAM result, not any particular output\&. The \\n macro is ignored for PAM conversions\&.
3082
 
 
3083
 
Default: \fB\fIpasswd chat\fR = *new*password* %n\\n*new*password* %n\\n *changed* \fR 
3084
 
 
3085
 
Example: \fB\fIpasswd chat\fR = "*Enter OLD password*" %o\\n "*Enter NEW password*" %n\\n "*Reenter NEW password*" %n\\n "*Password changed*" \fR 
3086
 
 
3087
 
.TP
 
4127
This string controls the
 
4128
\fB"chat"\fR
 
4129
conversation that takes places between
 
4130
\fBsmbd\fR(8)
 
4131
and the local password changing program to change the user's password. The string describes a sequence of response-receive pairs that
 
4132
\fBsmbd\fR(8)
 
4133
uses to determine what to send to the
 
4134
passwd program and what to expect back. If the expected output is not received then the password is not changed.
 
4135
.sp
 
4136
This chat sequence is often quite site specific, depending on what local methods are used for password control (such as NIS etc).
 
4137
.sp
 
4138
Note that this parameter only is only used if the
 
4139
unix password sync parameter is set to
 
4140
\fByes\fR. This sequence is then called
 
4141
\fBAS ROOT\fR
 
4142
when the SMB password in the smbpasswd file is being changed, without access to the old password cleartext. This means that root must be able to reset the user's password without knowing the text of the previous password. In the presence of NIS/YP, this means that the
 
4143
passwd program must be executed on the NIS master.
 
4144
.sp
 
4145
The string can contain the macro
 
4146
\fI%n\fR
 
4147
which is substituted for the new password. The chat sequence can also contain the standard macros \n, \r, \t and \s to give line-feed, carriage-return, tab and space. The chat sequence string can also contain a '*' which matches any sequence of characters. Double quotes can be used to collect strings with spaces in them into a single string.
 
4148
.sp
 
4149
If the send string in any part of the chat sequence is a full stop ".", then no string is sent. Similarly, if the expect string is a full stop then no string is expected.
 
4150
.sp
 
4151
If the
 
4152
pam password change parameter is set to
 
4153
\fByes\fR, the chat pairs may be matched in any order, and success is determined by the PAM result, not any particular output. The \n macro is ignored for PAM conversions.
 
4154
.sp
 
4155
Default:
 
4156
\fB\fIpasswd chat\fR = *new*password* %n\n*new*password* %n\n *changed* \fR
 
4157
.sp
 
4158
Example:
 
4159
\fB\fIpasswd chat\fR = "*Enter OLD password*" %o\n "*Enter NEW password*" %n\n "*Reenter NEW password*" %n\n "*Password changed*" \fR
 
4160
.TP 3n
3088
4161
passwd chat debug (G)
3089
 
This boolean specifies if the passwd chat script parameter is run in \fBdebug\fR mode\&. In this mode the strings passed to and received from the passwd chat are printed in the \fBsmbd\fR(8) log with a debug level of 100\&. This is a dangerous option as it will allow plaintext passwords to be seen in the \fBsmbd\fR log\&. It is available to help Samba admins debug their \fIpasswd chat\fR scripts when calling the \fIpasswd program\fR and should be turned off after this has been done\&. This option has no effect if the pam password change paramter is set\&. This parameter is off by default\&.
3090
 
 
3091
 
Default: \fB\fIpasswd chat debug\fR = no \fR 
3092
 
 
3093
 
.TP
 
4162
This boolean specifies if the passwd chat script parameter is run in
 
4163
\fBdebug\fR
 
4164
mode. In this mode the strings passed to and received from the passwd chat are printed in the
 
4165
\fBsmbd\fR(8)
 
4166
log with a
 
4167
debug level of 100. This is a dangerous option as it will allow plaintext passwords to be seen in the
 
4168
\fBsmbd\fR
 
4169
log. It is available to help Samba admins debug their
 
4170
\fIpasswd chat\fR
 
4171
scripts when calling the
 
4172
\fIpasswd program\fR
 
4173
and should be turned off after this has been done. This option has no effect if the
 
4174
pam password change paramter is set. This parameter is off by default.
 
4175
.sp
 
4176
Default:
 
4177
\fB\fIpasswd chat debug\fR = no \fR
 
4178
.TP 3n
3094
4179
passwd chat timeout (G)
3095
 
This integer specifies the number of seconds smbd will wait for an initial answer from a passwd chat script being run\&. Once the initial answer is received the subsequent answers must be received in one tenth of this time\&. The default it two seconds\&.
3096
 
 
3097
 
Default: \fB\fIpasswd chat timeout\fR = 2 \fR 
3098
 
 
3099
 
.TP
 
4180
This integer specifies the number of seconds smbd will wait for an initial answer from a passwd chat script being run. Once the initial answer is received the subsequent answers must be received in one tenth of this time. The default it two seconds.
 
4181
.sp
 
4182
Default:
 
4183
\fB\fIpasswd chat timeout\fR = 2 \fR
 
4184
.TP 3n
3100
4185
passwd program (G)
3101
 
The name of a program that can be used to set UNIX user passwords\&. Any occurrences of \fI%u\fR will be replaced with the user name\&. The user name is checked for existence before calling the password changing program\&.
3102
 
 
3103
 
Also note that many passwd programs insist in \fBreasonable \fR passwords, such as a minimum length, or the inclusion of mixed case chars and digits\&. This can pose a problem as some clients (such as Windows for Workgroups) uppercase the password before sending it\&.
3104
 
 
3105
 
\fBNote\fR that if the \fIunix password sync\fR parameter is set to \fByes \fR then this program is called \fBAS ROOT\fR before the SMB password in the smbpasswd file is changed\&. If this UNIX password change fails, then \fBsmbd\fR will fail to change the SMB password also (this is by design)\&.
3106
 
 
3107
 
If the \fIunix password sync\fR parameter is set this parameter \fBMUST USE ABSOLUTE PATHS\fR for \fBALL\fR programs called, and must be examined for security implications\&. Note that by default \fIunix password sync\fR is set to \fBno\fR\&.
3108
 
 
3109
 
Default: \fB\fIpasswd program\fR = \fR 
3110
 
 
3111
 
Example: \fB\fIpasswd program\fR = /bin/passwd %u \fR 
3112
 
 
3113
 
.TP
 
4186
The name of a program that can be used to set UNIX user passwords. Any occurrences of
 
4187
\fI%u\fR
 
4188
will be replaced with the user name. The user name is checked for existence before calling the password changing program.
 
4189
.sp
 
4190
Also note that many passwd programs insist in
 
4191
\fBreasonable \fR
 
4192
passwords, such as a minimum length, or the inclusion of mixed case chars and digits. This can pose a problem as some clients (such as Windows for Workgroups) uppercase the password before sending it.
 
4193
.sp
 
4194
\fBNote\fR
 
4195
that if the
 
4196
\fIunix password sync\fR
 
4197
parameter is set to
 
4198
\fByes \fR
 
4199
then this program is called
 
4200
\fBAS ROOT\fR
 
4201
before the SMB password in the smbpasswd file is changed. If this UNIX password change fails, then
 
4202
\fBsmbd\fR
 
4203
will fail to change the SMB password also (this is by design).
 
4204
.sp
 
4205
If the
 
4206
\fIunix password sync\fR
 
4207
parameter is set this parameter
 
4208
\fBMUST USE ABSOLUTE PATHS\fR
 
4209
for
 
4210
\fBALL\fR
 
4211
programs called, and must be examined for security implications. Note that by default
 
4212
\fIunix password sync\fR
 
4213
is set to
 
4214
\fBno\fR.
 
4215
.sp
 
4216
Default:
 
4217
\fB\fIpasswd program\fR = \fR
 
4218
.sp
 
4219
Example:
 
4220
\fB\fIpasswd program\fR = /bin/passwd %u \fR
 
4221
.TP 3n
3114
4222
password level (G)
3115
 
Some client/server combinations have difficulty with mixed\-case passwords\&. One offending client is Windows for Workgroups, which for some reason forces passwords to upper case when using the LANMAN1 protocol, but leaves them alone when using COREPLUS! Another problem child is the Windows 95/98 family of operating systems\&. These clients upper case clear text passwords even when NT LM 0\&.12 selected by the protocol negotiation request/response\&.
3116
 
 
3117
 
This parameter defines the maximum number of characters that may be upper case in passwords\&.
3118
 
 
3119
 
For example, say the password given was "FRED"\&. If \fI password level\fR is set to 1, the following combinations would be tried if "FRED" failed:
3120
 
 
 
4223
Some client/server combinations have difficulty with mixed-case passwords. One offending client is Windows for Workgroups, which for some reason forces passwords to upper case when using the LANMAN1 protocol, but leaves them alone when using COREPLUS! Another problem child is the Windows 95/98 family of operating systems. These clients upper case clear text passwords even when NT LM 0.12 selected by the protocol negotiation request/response.
 
4224
.sp
 
4225
This parameter defines the maximum number of characters that may be upper case in passwords.
 
4226
.sp
 
4227
For example, say the password given was "FRED". If
 
4228
\fI password level\fR
 
4229
is set to 1, the following combinations would be tried if "FRED" failed:
 
4230
.sp
3121
4231
"Fred", "fred", "fRed", "frEd","freD"
3122
 
 
3123
 
If \fIpassword level\fR was set to 2, the following combinations would also be tried:
3124
 
 
3125
 
"FRed", "FrEd", "FreD", "fREd", "fReD", "frED", \&.\&.
3126
 
 
3127
 
And so on\&.
3128
 
 
3129
 
The higher value this parameter is set to the more likely it is that a mixed case password will be matched against a single case password\&. However, you should be aware that use of this parameter reduces security and increases the time taken to process a new connection\&.
3130
 
 
3131
 
A value of zero will cause only two attempts to be made \- the password as is and the password in all\-lower case\&.
3132
 
 
3133
 
This parameter is used only when using plain\-text passwords\&. It is not at all used when encrypted passwords as in use (that is the default since samba\-3\&.0\&.0)\&. Use this only when encrypt passwords = No\&.
3134
 
 
3135
 
Default: \fB\fIpassword level\fR = 0 \fR 
3136
 
 
3137
 
Example: \fB\fIpassword level\fR = 4 \fR 
3138
 
 
3139
 
.TP
 
4232
.sp
 
4233
If
 
4234
\fIpassword level\fR
 
4235
was set to 2, the following combinations would also be tried:
 
4236
.sp
 
4237
"FRed", "FrEd", "FreD", "fREd", "fReD", "frED", ..
 
4238
.sp
 
4239
And so on.
 
4240
.sp
 
4241
The higher value this parameter is set to the more likely it is that a mixed case password will be matched against a single case password. However, you should be aware that use of this parameter reduces security and increases the time taken to process a new connection.
 
4242
.sp
 
4243
A value of zero will cause only two attempts to be made - the password as is and the password in all-lower case.
 
4244
.sp
 
4245
This parameter is used only when using plain-text passwords. It is not at all used when encrypted passwords as in use (that is the default since samba-3.0.0). Use this only when
 
4246
encrypt passwords = No.
 
4247
.sp
 
4248
Default:
 
4249
\fB\fIpassword level\fR = 0 \fR
 
4250
.sp
 
4251
Example:
 
4252
\fB\fIpassword level\fR = 4 \fR
 
4253
.TP 3n
3140
4254
password server (G)
3141
 
By specifying the name of another SMB server or Active Directory domain controller with this option, and using \fBsecurity = [ads|domain|server]\fR it is possible to get Samba to to do all its username/password validation using a specific remote server\&.
3142
 
 
3143
 
This option sets the name or IP address of the password server to use\&. New syntax has been added to support defining the port to use when connecting to the server the case of an ADS realm\&. To define a port other than the default LDAP port of 389, add the port number using a colon after the name or IP address (e\&.g\&. 192\&.168\&.1\&.100:389)\&. If you do not specify a port, Samba will use the standard LDAP port of tcp/389\&. Note that port numbers have no effect on password servers for Windows NT 4\&.0 domains or netbios connections\&.
3144
 
 
3145
 
If parameter is a name, it is looked up using the parameter name resolve order and so may resolved by any method and order described in that parameter\&.
3146
 
 
3147
 
The password server must be a machine capable of using the "LM1\&.2X002" or the "NT LM 0\&.12" protocol, and it must be in user level security mode\&.
3148
 
 
3149
 
 
3150
 
.RS
3151
 
.Sh "Note"
3152
 
Using a password server means your UNIX box (running Samba) is only as secure as your password server\&. \fBDO NOT CHOOSE A PASSWORD SERVER THAT YOU DON'T COMPLETELY TRUST\fR\&.
3153
 
 
3154
 
.RE
3155
 
Never point a Samba server at itself for password serving\&. This will cause a loop and could lock up your Samba server!
3156
 
 
3157
 
The name of the password server takes the standard substitutions, but probably the only useful one is \fI%m \fR, which means the Samba server will use the incoming client as the password server\&. If you use this then you better trust your clients, and you had better restrict them with hosts allow!
3158
 
 
3159
 
If the \fIsecurity\fR parameter is set to \fBdomain\fR or \fBads\fR, then the list of machines in this option must be a list of Primary or Backup Domain controllers for the Domain or the character '*', as the Samba server is effectively in that domain, and will use cryptographically authenticated RPC calls to authenticate the user logging on\&. The advantage of using \fB security = domain\fR is that if you list several hosts in the \fIpassword server\fR option then \fBsmbd \fR will try each in turn till it finds one that responds\&. This is useful in case your primary server goes down\&.
3160
 
 
3161
 
If the \fIpassword server\fR option is set to the character '*', then Samba will attempt to auto\-locate the Primary or Backup Domain controllers to authenticate against by doing a query for the name \fBWORKGROUP<1C>\fR and then contacting each server returned in the list of IP addresses from the name resolution source\&.
3162
 
 
3163
 
If the list of servers contains both names/IP's and the '*' character, the list is treated as a list of preferred domain controllers, but an auto lookup of all remaining DC's will be added to the list as well\&. Samba will not attempt to optimize this list by locating the closest DC\&.
3164
 
 
3165
 
If the \fIsecurity\fR parameter is set to \fBserver\fR, then there are different restrictions that \fBsecurity = domain\fR doesn't suffer from:
3166
 
 
3167
 
 
3168
 
.RS
3169
 
.TP 3
3170
 
\(bu
3171
 
You may list several password servers in the \fIpassword server\fR parameter, however if an \fBsmbd\fR makes a connection to a password server, and then the password server fails, no more users will be able to be authenticated from this \fBsmbd\fR\&. This is a restriction of the SMB/CIFS protocol when in \fBsecurity = server \fR mode and cannot be fixed in Samba\&.
3172
 
.TP
3173
 
\(bu
3174
 
If you are using a Windows NT server as your password server then you will have to ensure that your users are able to login from the Samba server, as when in \fB security = server\fR mode the network logon will appear to come from there rather than from the users workstation\&.
3175
 
.LP
3176
 
.RE
3177
 
.IP
3178
 
Default: \fB\fIpassword server\fR = \fR 
3179
 
 
3180
 
Example: \fB\fIpassword server\fR = NT\-PDC, NT\-BDC1, NT\-BDC2, * \fR 
3181
 
 
3182
 
Example: \fB\fIpassword server\fR = windc\&.mydomain\&.com:389 192\&.168\&.1\&.101 * \fR 
3183
 
 
3184
 
Example: \fB\fIpassword server\fR = * \fR 
3185
 
 
3186
 
.TP
 
4255
By specifying the name of another SMB server or Active Directory domain controller with this option, and using
 
4256
\fBsecurity = [ads|domain|server]\fR
 
4257
it is possible to get Samba to to do all its username/password validation using a specific remote server.
 
4258
.sp
 
4259
This option sets the name or IP address of the password server to use. New syntax has been added to support defining the port to use when connecting to the server the case of an ADS realm. To define a port other than the default LDAP port of 389, add the port number using a colon after the name or IP address (e.g. 192.168.1.100:389). If you do not specify a port, Samba will use the standard LDAP port of tcp/389. Note that port numbers have no effect on password servers for Windows NT 4.0 domains or netbios connections.
 
4260
.sp
 
4261
If parameter is a name, it is looked up using the parameter
 
4262
name resolve order and so may resolved by any method and order described in that parameter.
 
4263
.sp
 
4264
The password server must be a machine capable of using the "LM1.2X002" or the "NT LM 0.12" protocol, and it must be in user level security mode.
 
4265
.sp
 
4266
.it 1 an-trap
 
4267
.nr an-no-space-flag 1
 
4268
.nr an-break-flag 1
 
4269
.br
 
4270
\fBNote\fR
 
4271
Using a password server means your UNIX box (running Samba) is only as secure as your password server.
 
4272
\fBDO NOT CHOOSE A PASSWORD SERVER THAT YOU DON'T COMPLETELY TRUST\fR.
 
4273
Never point a Samba server at itself for password serving. This will cause a loop and could lock up your Samba server!
 
4274
.sp
 
4275
The name of the password server takes the standard substitutions, but probably the only useful one is
 
4276
\fI%m \fR, which means the Samba server will use the incoming client as the password server. If you use this then you better trust your clients, and you had better restrict them with hosts allow!
 
4277
.sp
 
4278
If the
 
4279
\fIsecurity\fR
 
4280
parameter is set to
 
4281
\fBdomain\fR
 
4282
or
 
4283
\fBads\fR, then the list of machines in this option must be a list of Primary or Backup Domain controllers for the Domain or the character '*', as the Samba server is effectively in that domain, and will use cryptographically authenticated RPC calls to authenticate the user logging on. The advantage of using
 
4284
\fB security = domain\fR
 
4285
is that if you list several hosts in the
 
4286
\fIpassword server\fR
 
4287
option then
 
4288
\fBsmbd \fR
 
4289
will try each in turn till it finds one that responds. This is useful in case your primary server goes down.
 
4290
.sp
 
4291
If the
 
4292
\fIpassword server\fR
 
4293
option is set to the character '*', then Samba will attempt to auto-locate the Primary or Backup Domain controllers to authenticate against by doing a query for the name
 
4294
\fBWORKGROUP<1C>\fR
 
4295
and then contacting each server returned in the list of IP addresses from the name resolution source.
 
4296
.sp
 
4297
If the list of servers contains both names/IP's and the '*' character, the list is treated as a list of preferred domain controllers, but an auto lookup of all remaining DC's will be added to the list as well. Samba will not attempt to optimize this list by locating the closest DC.
 
4298
.sp
 
4299
If the
 
4300
\fIsecurity\fR
 
4301
parameter is set to
 
4302
\fBserver\fR, then there are different restrictions that
 
4303
\fBsecurity = domain\fR
 
4304
doesn't suffer from:
 
4305
.RS 3n
 
4306
.TP 3n
 
4307
&#8226;
 
4308
You may list several password servers in the
 
4309
\fIpassword server\fR
 
4310
parameter, however if an
 
4311
\fBsmbd\fR
 
4312
makes a connection to a password server, and then the password server fails, no more users will be able to be authenticated from this
 
4313
\fBsmbd\fR. This is a restriction of the SMB/CIFS protocol when in
 
4314
\fBsecurity = server \fR
 
4315
mode and cannot be fixed in Samba.
 
4316
.TP 3n
 
4317
&#8226;
 
4318
If you are using a Windows NT server as your password server then you will have to ensure that your users are able to login from the Samba server, as when in
 
4319
\fB security = server\fR
 
4320
mode the network logon will appear to come from there rather than from the users workstation.
 
4321
.RE
 
4322
.IP "" 3n
 
4323
Default:
 
4324
\fB\fIpassword server\fR = \fR
 
4325
.sp
 
4326
Example:
 
4327
\fB\fIpassword server\fR = NT-PDC, NT-BDC1, NT-BDC2, * \fR
 
4328
.sp
 
4329
Example:
 
4330
\fB\fIpassword server\fR = windc.mydomain.com:389 192.168.1.101 * \fR
 
4331
.sp
 
4332
Example:
 
4333
\fB\fIpassword server\fR = * \fR
 
4334
.TP 3n
3187
4335
directory
3188
 
This parameter is a synonym for path\&.
3189
 
 
3190
 
.TP
 
4336
This parameter is a synonym for path.
 
4337
.TP 3n
3191
4338
path (S)
3192
 
This parameter specifies a directory to which the user of the service is to be given access\&. In the case of printable services, this is where print data will spool prior to being submitted to the host for printing\&.
3193
 
 
3194
 
For a printable service offering guest access, the service should be readonly and the path should be world\-writeable and have the sticky bit set\&. This is not mandatory of course, but you probably won't get the results you expect if you do otherwise\&.
3195
 
 
3196
 
Any occurrences of \fI%u\fR in the path will be replaced with the UNIX username that the client is using on this connection\&. Any occurrences of \fI%m\fR will be replaced by the NetBIOS name of the machine they are connecting from\&. These replacements are very useful for setting up pseudo home directories for users\&.
3197
 
 
3198
 
Note that this path will be based on root dir if one was specified\&.
3199
 
 
3200
 
Default: \fB\fIpath\fR = \fR 
3201
 
 
3202
 
Example: \fB\fIpath\fR = /home/fred \fR 
3203
 
 
3204
 
.TP
 
4339
This parameter specifies a directory to which the user of the service is to be given access. In the case of printable services, this is where print data will spool prior to being submitted to the host for printing.
 
4340
.sp
 
4341
For a printable service offering guest access, the service should be readonly and the path should be world-writeable and have the sticky bit set. This is not mandatory of course, but you probably won't get the results you expect if you do otherwise.
 
4342
.sp
 
4343
Any occurrences of
 
4344
\fI%u\fR
 
4345
in the path will be replaced with the UNIX username that the client is using on this connection. Any occurrences of
 
4346
\fI%m\fR
 
4347
will be replaced by the NetBIOS name of the machine they are connecting from. These replacements are very useful for setting up pseudo home directories for users.
 
4348
.sp
 
4349
Note that this path will be based on
 
4350
root dir if one was specified.
 
4351
.sp
 
4352
Default:
 
4353
\fB\fIpath\fR = \fR
 
4354
.sp
 
4355
Example:
 
4356
\fB\fIpath\fR = /home/fred \fR
 
4357
.TP 3n
3205
4358
pid directory (G)
3206
 
This option specifies the directory where pid files will be placed\&.
3207
 
 
3208
 
Default: \fB\fIpid directory\fR = ${prefix}/var/locks \fR 
3209
 
 
3210
 
Example: \fB\fIpid directory\fR = pid directory = /var/run/ \fR 
3211
 
 
3212
 
.TP
 
4359
This option specifies the directory where pid files will be placed.
 
4360
.sp
 
4361
Default:
 
4362
\fB\fIpid directory\fR = ${prefix}/var/locks \fR
 
4363
.sp
 
4364
Example:
 
4365
\fB\fIpid directory\fR = pid directory = /var/run/ \fR
 
4366
.TP 3n
3213
4367
posix locking (S)
3214
 
The \fBsmbd\fR(8) daemon maintains an database of file locks obtained by SMB clients\&. The default behavior is to map this internal database to POSIX locks\&. This means that file locks obtained by SMB clients are consistent with those seen by POSIX compliant applications accessing the files via a non\-SMB method (e\&.g\&. NFS or local file access)\&. You should never need to disable this parameter\&.
3215
 
 
3216
 
Default: \fB\fIposix locking\fR = yes \fR 
3217
 
 
3218
 
.TP
 
4368
The
 
4369
\fBsmbd\fR(8)
 
4370
daemon maintains an database of file locks obtained by SMB clients. The default behavior is to map this internal database to POSIX locks. This means that file locks obtained by SMB clients are consistent with those seen by POSIX compliant applications accessing the files via a non-SMB method (e.g. NFS or local file access). You should never need to disable this parameter.
 
4371
.sp
 
4372
Default:
 
4373
\fB\fIposix locking\fR = yes \fR
 
4374
.TP 3n
3219
4375
postexec (S)
3220
 
This option specifies a command to be run whenever the service is disconnected\&. It takes the usual substitutions\&. The command may be run as the root on some systems\&.
3221
 
 
 
4376
This option specifies a command to be run whenever the service is disconnected. It takes the usual substitutions. The command may be run as the root on some systems.
 
4377
.sp
3222
4378
An interesting example may be to unmount server resources:
3223
 
 
 
4379
.sp
3224
4380
\fBpostexec = /etc/umount /cdrom\fR
3225
 
 
3226
 
Default: \fB\fIpostexec\fR = \fR 
3227
 
 
3228
 
Example: \fB\fIpostexec\fR = echo \\"%u disconnected from %S from %m (%I)\\" >> /tmp/log \fR 
3229
 
 
3230
 
.TP
 
4381
.sp
 
4382
Default:
 
4383
\fB\fIpostexec\fR = \fR
 
4384
.sp
 
4385
Example:
 
4386
\fB\fIpostexec\fR = echo \"%u disconnected from %S from %m (%I)\" >> /tmp/log \fR
 
4387
.TP 3n
3231
4388
exec
3232
 
This parameter is a synonym for preexec\&.
3233
 
 
3234
 
.TP
 
4389
This parameter is a synonym for preexec.
 
4390
.TP 3n
3235
4391
preexec (S)
3236
 
This option specifies a command to be run whenever the service is connected to\&. It takes the usual substitutions\&.
3237
 
 
3238
 
An interesting example is to send the users a welcome message every time they log in\&. Maybe a message of the day? Here is an example:
3239
 
 
3240
 
\fBpreexec = csh \-c 'echo \\"Welcome to %S!\\" | /usr/local/samba/bin/smbclient \-M %m \-I %I' & \fR 
3241
 
 
3242
 
Of course, this could get annoying after a while :\-)
3243
 
 
3244
 
See also preexec close and postexec\&.
3245
 
 
3246
 
Default: \fB\fIpreexec\fR = \fR 
3247
 
 
3248
 
Example: \fB\fIpreexec\fR = echo \\"%u connected to %S from %m (%I)\\" >> /tmp/log \fR 
3249
 
 
3250
 
.TP
 
4392
This option specifies a command to be run whenever the service is connected to. It takes the usual substitutions.
 
4393
.sp
 
4394
An interesting example is to send the users a welcome message every time they log in. Maybe a message of the day? Here is an example:
 
4395
.sp
 
4396
 
 
4397
\fBpreexec = csh -c 'echo \"Welcome to %S!\" | /usr/local/samba/bin/smbclient -M %m -I %I' & \fR
 
4398
.sp
 
4399
Of course, this could get annoying after a while :-)
 
4400
.sp
 
4401
See also
 
4402
preexec close and
 
4403
postexec.
 
4404
.sp
 
4405
Default:
 
4406
\fB\fIpreexec\fR = \fR
 
4407
.sp
 
4408
Example:
 
4409
\fB\fIpreexec\fR = echo \"%u connected to %S from %m (%I)\" >> /tmp/log \fR
 
4410
.TP 3n
3251
4411
preexec close (S)
3252
 
This boolean option controls whether a non\-zero return code from preexec should close the service being connected to\&.
3253
 
 
3254
 
Default: \fB\fIpreexec close\fR = no \fR 
3255
 
 
3256
 
.TP
 
4412
This boolean option controls whether a non-zero return code from
 
4413
preexec should close the service being connected to.
 
4414
.sp
 
4415
Default:
 
4416
\fB\fIpreexec close\fR = no \fR
 
4417
.TP 3n
3257
4418
prefered master
3258
 
This parameter is a synonym for preferred master\&.
3259
 
 
3260
 
.TP
 
4419
This parameter is a synonym for preferred master.
 
4420
.TP 3n
3261
4421
preferred master (G)
3262
 
This boolean parameter controls if \fBnmbd\fR(8) is a preferred master browser for its workgroup\&.
3263
 
 
3264
 
If this is set to \fByes\fR, on startup, \fBnmbd\fR will force an election, and it will have a slight advantage in winning the election\&. It is recommended that this parameter is used in conjunction with domain master = yes, so that\fBnmbd\fR can guarantee becoming a domain master\&.
3265
 
 
3266
 
Use this option with caution, because if there are several hosts (whether Samba servers, Windows 95 or NT) that are preferred master browsers on the same subnet, they will each periodically and continuously attempt to become the local master browser\&. This will result in unnecessary broadcast traffic and reduced browsing capabilities\&.
3267
 
 
3268
 
Default: \fB\fIpreferred master\fR = auto \fR 
3269
 
 
3270
 
.TP
 
4422
This boolean parameter controls if
 
4423
\fBnmbd\fR(8)
 
4424
is a preferred master browser for its workgroup.
 
4425
.sp
 
4426
If this is set to
 
4427
\fByes\fR, on startup,
 
4428
\fBnmbd\fR
 
4429
will force an election, and it will have a slight advantage in winning the election. It is recommended that this parameter is used in conjunction with
 
4430
domain master = yes, so that
 
4431
\fBnmbd\fR
 
4432
can guarantee becoming a domain master.
 
4433
.sp
 
4434
Use this option with caution, because if there are several hosts (whether Samba servers, Windows 95 or NT) that are preferred master browsers on the same subnet, they will each periodically and continuously attempt to become the local master browser. This will result in unnecessary broadcast traffic and reduced browsing capabilities.
 
4435
.sp
 
4436
Default:
 
4437
\fB\fIpreferred master\fR = auto \fR
 
4438
.TP 3n
3271
4439
auto services
3272
 
This parameter is a synonym for preload\&.
3273
 
 
3274
 
.TP
 
4440
This parameter is a synonym for preload.
 
4441
.TP 3n
3275
4442
preload (G)
3276
 
This is a list of services that you want to be automatically added to the browse lists\&. This is most useful for homes and printers services that would otherwise not be visible\&.
3277
 
 
3278
 
Note that if you just want all printers in your printcap file loaded then the load printers option is easier\&.
3279
 
 
3280
 
Default: \fB\fIpreload\fR = \fR 
3281
 
 
3282
 
Example: \fB\fIpreload\fR = fred lp colorlp \fR 
3283
 
 
3284
 
.TP
 
4443
This is a list of services that you want to be automatically added to the browse lists. This is most useful for homes and printers services that would otherwise not be visible.
 
4444
.sp
 
4445
Note that if you just want all printers in your printcap file loaded then the
 
4446
load printers option is easier.
 
4447
.sp
 
4448
Default:
 
4449
\fB\fIpreload\fR = \fR
 
4450
.sp
 
4451
Example:
 
4452
\fB\fIpreload\fR = fred lp colorlp \fR
 
4453
.TP 3n
3285
4454
preload modules (G)
3286
 
This is a list of paths to modules that should be loaded into smbd before a client connects\&. This improves the speed of smbd when reacting to new connections somewhat\&.
3287
 
 
3288
 
Default: \fB\fIpreload modules\fR = \fR 
3289
 
 
3290
 
Example: \fB\fIpreload modules\fR = /usr/lib/samba/passdb/mysql\&.so \fR 
3291
 
 
3292
 
.TP
 
4455
This is a list of paths to modules that should be loaded into smbd before a client connects. This improves the speed of smbd when reacting to new connections somewhat.
 
4456
.sp
 
4457
Default:
 
4458
\fB\fIpreload modules\fR = \fR
 
4459
.sp
 
4460
Example:
 
4461
\fB\fIpreload modules\fR = /usr/lib/samba/passdb/mysql.so \fR
 
4462
.TP 3n
3293
4463
preserve case (S)
3294
 
This controls if new filenames are created with the case that the client passes, or if they are forced to be the default case\&.
3295
 
 
3296
 
See the section on NAME MANGLING for a fuller discussion\&.
3297
 
 
3298
 
Default: \fB\fIpreserve case\fR = yes \fR 
3299
 
 
3300
 
.TP
 
4464
This controls if new filenames are created with the case that the client passes, or if they are forced to be the
 
4465
default case.
 
4466
.sp
 
4467
See the section on
 
4468
NAME MANGLING
 
4469
for a fuller discussion.
 
4470
.sp
 
4471
Default:
 
4472
\fB\fIpreserve case\fR = yes \fR
 
4473
.TP 3n
3301
4474
print ok
3302
 
This parameter is a synonym for printable\&.
3303
 
 
3304
 
.TP
 
4475
This parameter is a synonym for printable.
 
4476
.TP 3n
3305
4477
printable (S)
3306
 
If this parameter is \fByes\fR, then clients may open, write to and submit spool files on the directory specified for the service\&.
3307
 
 
3308
 
Note that a printable service will ALWAYS allow writing to the service path (user privileges permitting) via the spooling of print data\&. The read only parameter controls only non\-printing access to the resource\&.
3309
 
 
3310
 
Default: \fB\fIprintable\fR = no \fR 
3311
 
 
3312
 
.TP
 
4478
If this parameter is
 
4479
\fByes\fR, then clients may open, write to and submit spool files on the directory specified for the service.
 
4480
.sp
 
4481
Note that a printable service will ALWAYS allow writing to the service path (user privileges permitting) via the spooling of print data. The
 
4482
read only parameter controls only non-printing access to the resource.
 
4483
.sp
 
4484
Default:
 
4485
\fB\fIprintable\fR = no \fR
 
4486
.TP 3n
3313
4487
printcap cache time (G)
3314
 
This option specifies the number of seconds before the printing subsystem is again asked for the known printers\&. If the value is greater than 60 the initial waiting time is set to 60 seconds to allow an earlier first rescan of the printing subsystem\&.
3315
 
 
3316
 
Setting this parameter to 0 (the default) disables any rescanning for new or removed printers after the initial startup\&.
3317
 
 
3318
 
Default: \fB\fIprintcap cache time\fR = 0 \fR 
3319
 
 
3320
 
Example: \fB\fIprintcap cache time\fR = 600 \fR 
3321
 
 
3322
 
.TP
 
4488
This option specifies the number of seconds before the printing subsystem is again asked for the known printers. If the value is greater than 60 the initial waiting time is set to 60 seconds to allow an earlier first rescan of the printing subsystem.
 
4489
.sp
 
4490
Setting this parameter to 0 (the default) disables any rescanning for new or removed printers after the initial startup.
 
4491
.sp
 
4492
Default:
 
4493
\fB\fIprintcap cache time\fR = 0 \fR
 
4494
.sp
 
4495
Example:
 
4496
\fB\fIprintcap cache time\fR = 600 \fR
 
4497
.TP 3n
3323
4498
printcap
3324
 
This parameter is a synonym for printcap name\&.
3325
 
 
3326
 
.TP
 
4499
This parameter is a synonym for printcap name.
 
4500
.TP 3n
3327
4501
printcap name (S)
3328
 
This parameter may be used to override the compiled\-in default printcap name used by the server (usually\fI /etc/printcap\fR)\&. See the discussion of the [printers] section above for reasons why you might want to do this\&.
3329
 
 
3330
 
To use the CUPS printing interface set \fBprintcap name = cups \fR\&. This should be supplemented by an addtional setting printing = cups in the [global] section\&. \fBprintcap name = cups\fR will use the "dummy" printcap created by CUPS, as specified in your CUPS configuration file\&.
3331
 
 
3332
 
On System V systems that use \fBlpstat\fR to list available printers you can use \fBprintcap name = lpstat \fR to automatically obtain lists of available printers\&. This is the default for systems that define SYSV at configure time in Samba (this includes most System V based systems)\&. If \fI printcap name\fR is set to \fBlpstat\fR on these systems then Samba will launch \fBlpstat \-v\fR and attempt to parse the output to obtain a printer list\&.
3333
 
 
3334
 
A minimal printcap file would look something like this: 
 
4502
This parameter may be used to override the compiled-in default printcap name used by the server (usually
 
4503
\fI /etc/printcap\fR). See the discussion of the
 
4504
[printers]
 
4505
section above for reasons why you might want to do this.
 
4506
.sp
 
4507
To use the CUPS printing interface set
 
4508
\fBprintcap name = cups \fR. This should be supplemented by an addtional setting
 
4509
printing = cups in the [global] section.
 
4510
\fBprintcap name = cups\fR
 
4511
will use the "dummy" printcap created by CUPS, as specified in your CUPS configuration file.
 
4512
.sp
 
4513
On System V systems that use
 
4514
\fBlpstat\fR
 
4515
to list available printers you can use
 
4516
\fBprintcap name = lpstat \fR
 
4517
to automatically obtain lists of available printers. This is the default for systems that define SYSV at configure time in Samba (this includes most System V based systems). If
 
4518
\fI printcap name\fR
 
4519
is set to
 
4520
\fBlpstat\fR
 
4521
on these systems then Samba will launch
 
4522
\fBlpstat -v\fR
 
4523
and attempt to parse the output to obtain a printer list.
 
4524
.sp
 
4525
A minimal printcap file would look something like this:
 
4526
 
 
4527
.sp
3335
4528
.nf
3336
4529
 
3337
4530
print1|My Printer 1
3340
4533
print4|My Printer 4
3341
4534
print5|My Printer 5
3342
4535
.fi
3343
 
 where the '|' separates aliases of a printer\&. The fact that the second alias has a space in it gives a hint to Samba that it's a comment\&.
3344
 
 
3345
 
 
3346
 
.RS
3347
 
.Sh "Note"
3348
 
Under AIX the default printcap name is \fI/etc/qconfig\fR\&. Samba will assume the file is in AIX \fIqconfig\fR format if the string \fIqconfig\fR appears in the printcap filename\&.
3349
 
 
3350
 
.RE
3351
 
Default: \fB\fIprintcap name\fR = /etc/printcap \fR 
3352
 
 
3353
 
Example: \fB\fIprintcap name\fR = /etc/myprintcap \fR 
3354
 
 
3355
 
.TP
 
4536
where the '|' separates aliases of a printer. The fact that the second alias has a space in it gives a hint to Samba that it's a comment.
 
4537
.sp
 
4538
.it 1 an-trap
 
4539
.nr an-no-space-flag 1
 
4540
.nr an-break-flag 1
 
4541
.br
 
4542
\fBNote\fR
 
4543
Under AIX the default printcap name is
 
4544
\fI/etc/qconfig\fR. Samba will assume the file is in AIX
 
4545
\fIqconfig\fR
 
4546
format if the string
 
4547
\fIqconfig\fR
 
4548
appears in the printcap filename.
 
4549
Default:
 
4550
\fB\fIprintcap name\fR = /etc/printcap \fR
 
4551
.sp
 
4552
Example:
 
4553
\fB\fIprintcap name\fR = /etc/myprintcap \fR
 
4554
.TP 3n
3356
4555
print command (S)
3357
 
After a print job has finished spooling to a service, this command will be used via a \fBsystem()\fR call to process the spool file\&. Typically the command specified will submit the spool file to the host's printing subsystem, but there is no requirement that this be the case\&. The server will not remove the spool file, so whatever command you specify should remove the spool file when it has been processed, otherwise you will need to manually remove old spool files\&.
3358
 
 
3359
 
The print command is simply a text string\&. It will be used verbatim after macro substitutions have been made:
3360
 
 
3361
 
%s, %f \- the path to the spool file name
3362
 
 
3363
 
%p \- the appropriate printer name
3364
 
 
3365
 
%J \- the job name as transmitted by the client\&.
3366
 
 
3367
 
%c \- The number of printed pages of the spooled job (if known)\&.
3368
 
 
3369
 
%z \- the size of the spooled print job (in bytes)
3370
 
 
3371
 
The print command \fBMUST\fR contain at least one occurrence of \fI%s\fR or \fI%f \fR \- the \fI%p\fR is optional\&. At the time a job is submitted, if no printer name is supplied the \fI%p \fR will be silently removed from the printer command\&.
3372
 
 
3373
 
If specified in the [global] section, the print command given will be used for any printable service that does not have its own print command specified\&.
3374
 
 
3375
 
If there is neither a specified print command for a printable service nor a global print command, spool files will be created but not processed and (most importantly) not removed\&.
3376
 
 
3377
 
Note that printing may fail on some UNIXes from the \fBnobody\fR account\&. If this happens then create an alternative guest account that can print and set the guest account in the [global] section\&.
3378
 
 
3379
 
You can form quite complex print commands by realizing that they are just passed to a shell\&. For example the following will log a print job, print the file, then remove it\&. Note that ';' is the usual separator for command in shell scripts\&.
3380
 
 
3381
 
\fBprint command = echo Printing %s >> /tmp/print\&.log; lpr \-P %p %s; rm %s\fR
3382
 
 
3383
 
You may have to vary this command considerably depending on how you normally print files on your system\&. The default for the parameter varies depending on the setting of the printing parameter\&.
3384
 
 
3385
 
Default: For \fBprinting = BSD, AIX, QNX, LPRNG or PLP :\fR
3386
 
 
3387
 
\fBprint command = lpr \-r \-P%p %s\fR
3388
 
 
3389
 
For \fBprinting = SYSV or HPUX :\fR
3390
 
 
3391
 
\fBprint command = lp \-c \-d%p %s; rm %s\fR
3392
 
 
3393
 
For \fBprinting = SOFTQ :\fR
3394
 
 
3395
 
\fBprint command = lp \-d%p \-s %s; rm %s\fR
3396
 
 
3397
 
For printing = CUPS : If SAMBA is compiled against libcups, then printcap = cups uses the CUPS API to submit jobs, etc\&. Otherwise it maps to the System V commands with the \-oraw option for printing, i\&.e\&. it uses \fBlp \-c \-d%p \-oraw; rm %s\fR\&. With \fBprinting = cups\fR, and if SAMBA is compiled against libcups, any manually set print command will be ignored\&.
3398
 
 
 
4556
After a print job has finished spooling to a service, this command will be used via a
 
4557
\fBsystem()\fR
 
4558
call to process the spool file. Typically the command specified will submit the spool file to the host's printing subsystem, but there is no requirement that this be the case. The server will not remove the spool file, so whatever command you specify should remove the spool file when it has been processed, otherwise you will need to manually remove old spool files.
 
4559
.sp
 
4560
The print command is simply a text string. It will be used verbatim after macro substitutions have been made:
 
4561
.sp
 
4562
%s, %f - the path to the spool file name
 
4563
.sp
 
4564
%p - the appropriate printer name
 
4565
.sp
 
4566
%J - the job name as transmitted by the client.
 
4567
.sp
 
4568
%c - The number of printed pages of the spooled job (if known).
 
4569
.sp
 
4570
%z - the size of the spooled print job (in bytes)
 
4571
.sp
 
4572
The print command
 
4573
\fBMUST\fR
 
4574
contain at least one occurrence of
 
4575
\fI%s\fR
 
4576
or
 
4577
\fI%f \fR
 
4578
- the
 
4579
\fI%p\fR
 
4580
is optional. At the time a job is submitted, if no printer name is supplied the
 
4581
\fI%p \fR
 
4582
will be silently removed from the printer command.
 
4583
.sp
 
4584
If specified in the [global] section, the print command given will be used for any printable service that does not have its own print command specified.
 
4585
.sp
 
4586
If there is neither a specified print command for a printable service nor a global print command, spool files will be created but not processed and (most importantly) not removed.
 
4587
.sp
 
4588
Note that printing may fail on some UNIXes from the
 
4589
\fBnobody\fR
 
4590
account. If this happens then create an alternative guest account that can print and set the
 
4591
guest account in the [global] section.
 
4592
.sp
 
4593
You can form quite complex print commands by realizing that they are just passed to a shell. For example the following will log a print job, print the file, then remove it. Note that ';' is the usual separator for command in shell scripts.
 
4594
.sp
 
4595
\fBprint command = echo Printing %s >> /tmp/print.log; lpr -P %p %s; rm %s\fR
 
4596
.sp
 
4597
You may have to vary this command considerably depending on how you normally print files on your system. The default for the parameter varies depending on the setting of the
 
4598
printing parameter.
 
4599
.sp
 
4600
Default: For
 
4601
\fBprinting = BSD, AIX, QNX, LPRNG or PLP :\fR
 
4602
.sp
 
4603
\fBprint command = lpr -r -P%p %s\fR
 
4604
.sp
 
4605
For
 
4606
\fBprinting = SYSV or HPUX :\fR
 
4607
.sp
 
4608
\fBprint command = lp -c -d%p %s; rm %s\fR
 
4609
.sp
 
4610
For
 
4611
\fBprinting = SOFTQ :\fR
 
4612
.sp
 
4613
\fBprint command = lp -d%p -s %s; rm %s\fR
 
4614
.sp
 
4615
For printing = CUPS : If SAMBA is compiled against libcups, then
 
4616
printcap = cups uses the CUPS API to submit jobs, etc. Otherwise it maps to the System V commands with the -oraw option for printing, i.e. it uses
 
4617
\fBlp -c -d%p -oraw; rm %s\fR. With
 
4618
\fBprinting = cups\fR, and if SAMBA is compiled against libcups, any manually set print command will be ignored.
 
4619
.sp
3399
4620
\fBNo default\fR
3400
 
 
3401
 
Example: \fB\fIprint command\fR = /usr/local/samba/bin/myprintscript %p %s \fR 
3402
 
 
3403
 
.TP
 
4621
.sp
 
4622
Example:
 
4623
\fB\fIprint command\fR = /usr/local/samba/bin/myprintscript %p %s \fR
 
4624
.TP 3n
3404
4625
printer admin (S)
3405
 
This lists users who can do anything to printers via the remote administration interfaces offered by MS\-RPC (usually using a NT workstation)\&. This parameter can be set per\-share or globally\&. Note: The root user always has admin rights\&. Use caution with use in the global stanza as this can cause side effects\&.
3406
 
 
3407
 
This parameter has been marked deprecated in favor of using the SePrintOperatorPrivilege and individual print security descriptors\&. It will be removed in a future release\&.
3408
 
 
3409
 
Default: \fB\fIprinter admin\fR = \fR 
3410
 
 
3411
 
Example: \fB\fIprinter admin\fR = admin, @staff \fR 
3412
 
 
3413
 
.TP
 
4626
This lists users who can do anything to printers via the remote administration interfaces offered by MS-RPC (usually using a NT workstation). This parameter can be set per-share or globally. Note: The root user always has admin rights. Use caution with use in the global stanza as this can cause side effects.
 
4627
.sp
 
4628
This parameter has been marked deprecated in favor of using the SePrintOperatorPrivilege and individual print security descriptors. It will be removed in a future release.
 
4629
.sp
 
4630
Default:
 
4631
\fB\fIprinter admin\fR = \fR
 
4632
.sp
 
4633
Example:
 
4634
\fB\fIprinter admin\fR = admin, @staff \fR
 
4635
.TP 3n
3414
4636
printer
3415
 
This parameter is a synonym for printer name\&.
3416
 
 
3417
 
.TP
 
4637
This parameter is a synonym for printer name.
 
4638
.TP 3n
3418
4639
printer name (S)
3419
 
This parameter specifies the name of the printer to which print jobs spooled through a printable service will be sent\&.
3420
 
 
3421
 
If specified in the [global] section, the printer name given will be used for any printable service that does not have its own printer name specified\&.
3422
 
 
3423
 
The default value of the printer name may be lp on many systems\&.
3424
 
 
3425
 
Default: \fB\fIprinter name\fR = none \fR 
3426
 
 
3427
 
Example: \fB\fIprinter name\fR = laserwriter \fR 
3428
 
 
3429
 
.TP
 
4640
This parameter specifies the name of the printer to which print jobs spooled through a printable service will be sent.
 
4641
.sp
 
4642
If specified in the [global] section, the printer name given will be used for any printable service that does not have its own printer name specified.
 
4643
.sp
 
4644
The default value of the
 
4645
printer name may be
 
4646
lp
 
4647
on many systems.
 
4648
.sp
 
4649
Default:
 
4650
\fB\fIprinter name\fR = none \fR
 
4651
.sp
 
4652
Example:
 
4653
\fB\fIprinter name\fR = laserwriter \fR
 
4654
.TP 3n
3430
4655
printing (S)
3431
 
This parameters controls how printer status information is interpreted on your system\&. It also affects the default values for the \fIprint command\fR, \fIlpq command\fR, \fIlppause command \fR, \fIlpresume command\fR, and \fIlprm command\fR if specified in the [global] section\&.
3432
 
 
3433
 
Currently nine printing styles are supported\&. They are \fBBSD\fR, \fBAIX\fR, \fBLPRNG\fR, \fBPLP\fR, \fBSYSV\fR, \fBHPUX\fR, \fBQNX\fR, \fBSOFTQ\fR, and \fBCUPS\fR\&.
3434
 
 
3435
 
To see what the defaults are for the other print commands when using the various options use the \fBtestparm\fR(1) program\&.
3436
 
 
3437
 
This option can be set on a per printer basis\&. Please be aware however, that you must place any of the various printing commands (e\&.g\&. print command, lpq command, etc\&.\&.\&.) after defining the value for the \fIprinting\fR option since it will reset the printing commands to default values\&.
3438
 
 
3439
 
See also the discussion in the [printers] section\&.
3440
 
 
 
4656
This parameters controls how printer status information is interpreted on your system. It also affects the default values for the
 
4657
\fIprint command\fR,
 
4658
\fIlpq command\fR,
 
4659
\fIlppause command \fR,
 
4660
\fIlpresume command\fR, and
 
4661
\fIlprm command\fR
 
4662
if specified in the [global] section.
 
4663
.sp
 
4664
Currently nine printing styles are supported. They are
 
4665
\fBBSD\fR,
 
4666
\fBAIX\fR,
 
4667
\fBLPRNG\fR,
 
4668
\fBPLP\fR,
 
4669
\fBSYSV\fR,
 
4670
\fBHPUX\fR,
 
4671
\fBQNX\fR,
 
4672
\fBSOFTQ\fR, and
 
4673
\fBCUPS\fR.
 
4674
.sp
 
4675
To see what the defaults are for the other print commands when using the various options use the
 
4676
\fBtestparm\fR(1)
 
4677
program.
 
4678
.sp
 
4679
This option can be set on a per printer basis. Please be aware however, that you must place any of the various printing commands (e.g. print command, lpq command, etc...) after defining the value for the
 
4680
\fIprinting\fR
 
4681
option since it will reset the printing commands to default values.
 
4682
.sp
 
4683
See also the discussion in the
 
4684
[printers]
 
4685
section.
 
4686
.sp
3441
4687
\fBNo default\fR
3442
 
 
3443
 
.TP
 
4688
.TP 3n
3444
4689
private dir (G)
3445
 
This parameters defines the directory smbd will use for storing such files as \fIsmbpasswd\fR and \fIsecrets\&.tdb\fR\&.
3446
 
 
3447
 
Default: \fB\fIprivate dir\fR = ${prefix}/private \fR 
3448
 
 
3449
 
.TP
 
4690
This parameters defines the directory smbd will use for storing such files as
 
4691
\fIsmbpasswd\fR
 
4692
and
 
4693
\fIsecrets.tdb\fR.
 
4694
.sp
 
4695
Default:
 
4696
\fB\fIprivate dir\fR = ${prefix}/private \fR
 
4697
.TP 3n
3450
4698
profile acls (S)
3451
 
This boolean parameter was added to fix the problems that people have been having with storing user profiles on Samba shares from Windows 2000 or Windows XP clients\&. New versions of Windows 2000 or Windows XP service packs do security ACL checking on the owner and ability to write of the profile directory stored on a local workstation when copied from a Samba share\&.
3452
 
 
3453
 
When not in domain mode with winbindd then the security info copied onto the local workstation has no meaning to the logged in user (SID) on that workstation so the profile storing fails\&. Adding this parameter onto a share used for profile storage changes two things about the returned Windows ACL\&. Firstly it changes the owner and group owner of all reported files and directories to be BUILTIN\\\\Administrators, BUILTIN\\\\Users respectively (SIDs S\-1\-5\-32\-544, S\-1\-5\-32\-545)\&. Secondly it adds an ACE entry of "Full Control" to the SID BUILTIN\\\\Users to every returned ACL\&. This will allow any Windows 2000 or XP workstation user to access the profile\&.
3454
 
 
3455
 
Note that if you have multiple users logging on to a workstation then in order to prevent them from being able to access each others profiles you must remove the "Bypass traverse checking" advanced user right\&. This will prevent access to other users profile directories as the top level profile directory (named after the user) is created by the workstation profile code and has an ACL restricting entry to the directory tree to the owning user\&.
3456
 
 
3457
 
Default: \fB\fIprofile acls\fR = no \fR 
3458
 
 
3459
 
.TP
 
4699
This boolean parameter was added to fix the problems that people have been having with storing user profiles on Samba shares from Windows 2000 or Windows XP clients. New versions of Windows 2000 or Windows XP service packs do security ACL checking on the owner and ability to write of the profile directory stored on a local workstation when copied from a Samba share.
 
4700
.sp
 
4701
When not in domain mode with winbindd then the security info copied onto the local workstation has no meaning to the logged in user (SID) on that workstation so the profile storing fails. Adding this parameter onto a share used for profile storage changes two things about the returned Windows ACL. Firstly it changes the owner and group owner of all reported files and directories to be BUILTIN\\Administrators, BUILTIN\\Users respectively (SIDs S-1-5-32-544, S-1-5-32-545). Secondly it adds an ACE entry of "Full Control" to the SID BUILTIN\\Users to every returned ACL. This will allow any Windows 2000 or XP workstation user to access the profile.
 
4702
.sp
 
4703
Note that if you have multiple users logging on to a workstation then in order to prevent them from being able to access each others profiles you must remove the "Bypass traverse checking" advanced user right. This will prevent access to other users profile directories as the top level profile directory (named after the user) is created by the workstation profile code and has an ACL restricting entry to the directory tree to the owning user.
 
4704
.sp
 
4705
Default:
 
4706
\fB\fIprofile acls\fR = no \fR
 
4707
.TP 3n
3460
4708
queuepause command (S)
3461
 
This parameter specifies the command to be executed on the server host in order to pause the printer queue\&.
3462
 
 
3463
 
This command should be a program or script which takes a printer name as its only parameter and stops the printer queue, such that no longer jobs are submitted to the printer\&.
3464
 
 
3465
 
This command is not supported by Windows for Workgroups, but can be issued from the Printers window under Windows 95 and NT\&.
3466
 
 
3467
 
If a \fI%p\fR is given then the printer name is put in its place\&. Otherwise it is placed at the end of the command\&.
3468
 
 
3469
 
Note that it is good practice to include the absolute path in the command as the PATH may not be available to the server\&.
3470
 
 
 
4709
This parameter specifies the command to be executed on the server host in order to pause the printer queue.
 
4710
.sp
 
4711
This command should be a program or script which takes a printer name as its only parameter and stops the printer queue, such that no longer jobs are submitted to the printer.
 
4712
.sp
 
4713
This command is not supported by Windows for Workgroups, but can be issued from the Printers window under Windows 95 and NT.
 
4714
.sp
 
4715
If a
 
4716
\fI%p\fR
 
4717
is given then the printer name is put in its place. Otherwise it is placed at the end of the command.
 
4718
.sp
 
4719
Note that it is good practice to include the absolute path in the command as the PATH may not be available to the server.
 
4720
.sp
3471
4721
\fBNo default\fR
3472
 
 
3473
 
Example: \fB\fIqueuepause command\fR = disable %p \fR 
3474
 
 
3475
 
.TP
 
4722
.sp
 
4723
Example:
 
4724
\fB\fIqueuepause command\fR = disable %p \fR
 
4725
.TP 3n
3476
4726
queueresume command (S)
3477
 
This parameter specifies the command to be executed on the server host in order to resume the printer queue\&. It is the command to undo the behavior that is caused by the previous parameter (queuepause command)\&.
3478
 
 
3479
 
This command should be a program or script which takes a printer name as its only parameter and resumes the printer queue, such that queued jobs are resubmitted to the printer\&.
3480
 
 
3481
 
This command is not supported by Windows for Workgroups, but can be issued from the Printers window under Windows 95 and NT\&.
3482
 
 
3483
 
If a \fI%p\fR is given then the printer name is put in its place\&. Otherwise it is placed at the end of the command\&.
3484
 
 
3485
 
Note that it is good practice to include the absolute path in the command as the PATH may not be available to the server\&.
3486
 
 
3487
 
Default: \fB\fIqueueresume command\fR = \fR 
3488
 
 
3489
 
Example: \fB\fIqueueresume command\fR = enable %p \fR 
3490
 
 
3491
 
.TP
 
4727
This parameter specifies the command to be executed on the server host in order to resume the printer queue. It is the command to undo the behavior that is caused by the previous parameter (queuepause command).
 
4728
.sp
 
4729
This command should be a program or script which takes a printer name as its only parameter and resumes the printer queue, such that queued jobs are resubmitted to the printer.
 
4730
.sp
 
4731
This command is not supported by Windows for Workgroups, but can be issued from the Printers window under Windows 95 and NT.
 
4732
.sp
 
4733
If a
 
4734
\fI%p\fR
 
4735
is given then the printer name is put in its place. Otherwise it is placed at the end of the command.
 
4736
.sp
 
4737
Note that it is good practice to include the absolute path in the command as the PATH may not be available to the server.
 
4738
.sp
 
4739
Default:
 
4740
\fB\fIqueueresume command\fR = \fR
 
4741
.sp
 
4742
Example:
 
4743
\fB\fIqueueresume command\fR = enable %p \fR
 
4744
.TP 3n
3492
4745
read bmpx (G)
3493
 
This boolean parameter controls whether \fBsmbd\fR(8) will support the "Read Block Multiplex" SMB\&. This is now rarely used and defaults to \fBno\fR\&. You should never need to set this parameter\&.
3494
 
 
3495
 
Default: \fB\fIread bmpx\fR = no \fR 
3496
 
 
3497
 
.TP
 
4746
This boolean parameter controls whether
 
4747
\fBsmbd\fR(8)
 
4748
will support the "Read Block Multiplex" SMB. This is now rarely used and defaults to
 
4749
\fBno\fR. You should never need to set this parameter.
 
4750
.sp
 
4751
Default:
 
4752
\fB\fIread bmpx\fR = no \fR
 
4753
.TP 3n
3498
4754
read list (S)
3499
 
This is a list of users that are given read\-only access to a service\&. If the connecting user is in this list then they will not be given write access, no matter what the read only option is set to\&. The list can include group names using the syntax described in the invalid users parameter\&.
3500
 
 
3501
 
This parameter will not work with the security = share in Samba 3\&.0\&. This is by design\&.
3502
 
 
3503
 
Default: \fB\fIread list\fR = \fR 
3504
 
 
3505
 
Example: \fB\fIread list\fR = mary, @students \fR 
3506
 
 
3507
 
.TP
 
4755
This is a list of users that are given read-only access to a service. If the connecting user is in this list then they will not be given write access, no matter what the
 
4756
read only option is set to. The list can include group names using the syntax described in the
 
4757
invalid users parameter.
 
4758
.sp
 
4759
This parameter will not work with the
 
4760
security = share in Samba 3.0. This is by design.
 
4761
.sp
 
4762
Default:
 
4763
\fB\fIread list\fR = \fR
 
4764
.sp
 
4765
Example:
 
4766
\fB\fIread list\fR = mary, @students \fR
 
4767
.TP 3n
3508
4768
read only (S)
3509
 
An inverted synonym is writeable\&.
3510
 
 
3511
 
If this parameter is \fByes\fR, then users of a service may not create or modify files in the service's directory\&.
3512
 
 
3513
 
Note that a printable service (\fBprintable = yes\fR) will \fBALWAYS\fR allow writing to the directory (user privileges permitting), but only via spooling operations\&.
3514
 
 
3515
 
Default: \fB\fIread only\fR = yes \fR 
3516
 
 
3517
 
.TP
 
4769
An inverted synonym is
 
4770
writeable.
 
4771
.sp
 
4772
If this parameter is
 
4773
\fByes\fR, then users of a service may not create or modify files in the service's directory.
 
4774
.sp
 
4775
Note that a printable service (\fBprintable = yes\fR) will
 
4776
\fBALWAYS\fR
 
4777
allow writing to the directory (user privileges permitting), but only via spooling operations.
 
4778
.sp
 
4779
Default:
 
4780
\fB\fIread only\fR = yes \fR
 
4781
.TP 3n
3518
4782
read raw (G)
3519
 
This parameter controls whether or not the server will support the raw read SMB requests when transferring data to clients\&.
3520
 
 
3521
 
If enabled, raw reads allow reads of 65535 bytes in one packet\&. This typically provides a major performance benefit\&.
3522
 
 
3523
 
However, some clients either negotiate the allowable block size incorrectly or are incapable of supporting larger block sizes, and for these clients you may need to disable raw reads\&.
3524
 
 
3525
 
In general this parameter should be viewed as a system tuning tool and left severely alone\&.
3526
 
 
3527
 
Default: \fB\fIread raw\fR = yes \fR 
3528
 
 
3529
 
.TP
 
4783
This parameter controls whether or not the server will support the raw read SMB requests when transferring data to clients.
 
4784
.sp
 
4785
If enabled, raw reads allow reads of 65535 bytes in one packet. This typically provides a major performance benefit.
 
4786
.sp
 
4787
However, some clients either negotiate the allowable block size incorrectly or are incapable of supporting larger block sizes, and for these clients you may need to disable raw reads.
 
4788
.sp
 
4789
In general this parameter should be viewed as a system tuning tool and left severely alone.
 
4790
.sp
 
4791
Default:
 
4792
\fB\fIread raw\fR = yes \fR
 
4793
.TP 3n
3530
4794
realm (G)
3531
 
This option specifies the kerberos realm to use\&. The realm is used as the ADS equivalent of the NT4 \fBdomain\fR\&. It is usually set to the DNS name of the kerberos server\&.
3532
 
 
3533
 
Default: \fB\fIrealm\fR = \fR 
3534
 
 
3535
 
Example: \fB\fIrealm\fR = mysambabox\&.mycompany\&.com \fR 
3536
 
 
3537
 
.TP
 
4795
This option specifies the kerberos realm to use. The realm is used as the ADS equivalent of the NT4
 
4796
\fBdomain\fR. It is usually set to the DNS name of the kerberos server.
 
4797
.sp
 
4798
Default:
 
4799
\fB\fIrealm\fR = \fR
 
4800
.sp
 
4801
Example:
 
4802
\fB\fIrealm\fR = mysambabox.mycompany.com \fR
 
4803
.TP 3n
3538
4804
remote announce (G)
3539
 
This option allows you to setup \fBnmbd\fR(8)to periodically announce itself to arbitrary IP addresses with an arbitrary workgroup name\&.
3540
 
 
3541
 
This is useful if you want your Samba server to appear in a remote workgroup for which the normal browse propagation rules don't work\&. The remote workgroup can be anywhere that you can send IP packets to\&.
3542
 
 
3543
 
For example: 
 
4805
This option allows you to setup
 
4806
\fBnmbd\fR(8)to periodically announce itself to arbitrary IP addresses with an arbitrary workgroup name.
 
4807
.sp
 
4808
This is useful if you want your Samba server to appear in a remote workgroup for which the normal browse propagation rules don't work. The remote workgroup can be anywhere that you can send IP packets to.
 
4809
.sp
 
4810
For example:
 
4811
 
 
4812
.sp
3544
4813
.nf
3545
4814
 
3546
 
\fBremote announce = 192\&.168\&.2\&.255/SERVERS 192\&.168\&.4\&.255/STAFF\fR
 
4815
\fBremote announce = 192.168.2.255/SERVERS 192.168.4.255/STAFF\fR
3547
4816
.fi
3548
 
 the above line would cause \fBnmbd\fR to announce itself to the two given IP addresses using the given workgroup names\&. If you leave out the workgroup name then the one given in the workgroup parameter is used instead\&.
3549
 
 
3550
 
The IP addresses you choose would normally be the broadcast addresses of the remote networks, but can also be the IP addresses of known browse masters if your network config is that stable\&.
3551
 
 
3552
 
See the chapter on Network Browsing in the Samba\-HOWTO book\&.
3553
 
 
3554
 
Default: \fB\fIremote announce\fR = \fR 
3555
 
 
3556
 
.TP
 
4817
the above line would cause
 
4818
\fBnmbd\fR
 
4819
to announce itself to the two given IP addresses using the given workgroup names. If you leave out the workgroup name then the one given in the
 
4820
workgroup parameter is used instead.
 
4821
.sp
 
4822
The IP addresses you choose would normally be the broadcast addresses of the remote networks, but can also be the IP addresses of known browse masters if your network config is that stable.
 
4823
.sp
 
4824
See the chapter on Network Browsing in the Samba-HOWTO book.
 
4825
.sp
 
4826
Default:
 
4827
\fB\fIremote announce\fR = \fR
 
4828
.TP 3n
3557
4829
remote browse sync (G)
3558
 
This option allows you to setup \fBnmbd\fR(8) to periodically request synchronization of browse lists with the master browser of a Samba server that is on a remote segment\&. This option will allow you to gain browse lists for multiple workgroups across routed networks\&. This is done in a manner that does not work with any non\-Samba servers\&.
3559
 
 
3560
 
This is useful if you want your Samba server and all local clients to appear in a remote workgroup for which the normal browse propagation rules don't work\&. The remote workgroup can be anywhere that you can send IP packets to\&.
3561
 
 
3562
 
For example: 
 
4830
This option allows you to setup
 
4831
\fBnmbd\fR(8)
 
4832
to periodically request synchronization of browse lists with the master browser of a Samba server that is on a remote segment. This option will allow you to gain browse lists for multiple workgroups across routed networks. This is done in a manner that does not work with any non-Samba servers.
 
4833
.sp
 
4834
This is useful if you want your Samba server and all local clients to appear in a remote workgroup for which the normal browse propagation rules don't work. The remote workgroup can be anywhere that you can send IP packets to.
 
4835
.sp
 
4836
For example:
 
4837
 
 
4838
.sp
3563
4839
.nf
3564
4840
 
3565
 
\fIremote browse sync = 192\&.168\&.2\&.255 192\&.168\&.4\&.255\fR
 
4841
\fIremote browse sync = 192.168.2.255 192.168.4.255\fR
3566
4842
.fi
3567
 
 the above line would cause \fBnmbd\fR to request the master browser on the specified subnets or addresses to synchronize their browse lists with the local server\&.
3568
 
 
3569
 
The IP addresses you choose would normally be the broadcast addresses of the remote networks, but can also be the IP addresses of known browse masters if your network config is that stable\&. If a machine IP address is given Samba makes NO attempt to validate that the remote machine is available, is listening, nor that it is in fact the browse master on its segment\&.
3570
 
 
3571
 
The remote browse sync may be used on networks where there is no WINS server, and may be used on disjoint networks where each network has its own WINS server\&.
3572
 
 
3573
 
Default: \fB\fIremote browse sync\fR = \fR 
3574
 
 
3575
 
.TP
 
4843
the above line would cause
 
4844
\fBnmbd\fR
 
4845
to request the master browser on the specified subnets or addresses to synchronize their browse lists with the local server.
 
4846
.sp
 
4847
The IP addresses you choose would normally be the broadcast addresses of the remote networks, but can also be the IP addresses of known browse masters if your network config is that stable. If a machine IP address is given Samba makes NO attempt to validate that the remote machine is available, is listening, nor that it is in fact the browse master on its segment.
 
4848
.sp
 
4849
The
 
4850
remote browse sync may be used on networks where there is no WINS server, and may be used on disjoint networks where each network has its own WINS server.
 
4851
.sp
 
4852
Default:
 
4853
\fB\fIremote browse sync\fR = \fR
 
4854
.TP 3n
3576
4855
rename user script (G)
3577
 
This is the full pathname to a script that will be run as root by \fBsmbd\fR(8) under special circumstances described below\&.
3578
 
 
3579
 
When a user with admin authority or SeAddUserPrivilege rights renames a user (e\&.g\&.: from the NT4 User Manager for Domains), this script will be run to rename the POSIX user\&. Two variables, %uold and%unew, will be substituted with the old and new usernames, respectively\&. The script should return 0 upon successful completion, and nonzero otherwise\&.
3580
 
 
3581
 
 
3582
 
.RS
3583
 
.Sh "Note"
3584
 
The script has all responsibility to rename all the necessary data that is accessible in this posix method\&. This can mean different requirements for different backends\&. The tdbsam and smbpasswd backends will take care of the contents of their respective files, so the script is responsible only for changing the POSIX username, and other data that may required for your circumstances, such as home directory\&. Please also consider whether or not you need to rename the actual home directories themselves\&. The ldapsam backend will not make any changes, because of the potential issues with renaming the LDAP naming attribute\&. In this case the script is responsible for changing the attribute that samba uses (uid) for locating users, as well as any data that needs to change for other applications using the same directory\&.
3585
 
 
3586
 
.RE
3587
 
Default: \fB\fIrename user script\fR = no \fR 
3588
 
 
3589
 
.TP
 
4856
This is the full pathname to a script that will be run as root by
 
4857
\fBsmbd\fR(8)
 
4858
under special circumstances described below.
 
4859
.sp
 
4860
When a user with admin authority or SeAddUserPrivilege rights renames a user (e.g.: from the NT4 User Manager for Domains), this script will be run to rename the POSIX user. Two variables,
 
4861
%uold
 
4862
and
 
4863
%unew, will be substituted with the old and new usernames, respectively. The script should return 0 upon successful completion, and nonzero otherwise.
 
4864
.sp
 
4865
.it 1 an-trap
 
4866
.nr an-no-space-flag 1
 
4867
.nr an-break-flag 1
 
4868
.br
 
4869
\fBNote\fR
 
4870
The script has all responsibility to rename all the necessary data that is accessible in this posix method. This can mean different requirements for different backends. The tdbsam and smbpasswd backends will take care of the contents of their respective files, so the script is responsible only for changing the POSIX username, and other data that may required for your circumstances, such as home directory. Please also consider whether or not you need to rename the actual home directories themselves. The ldapsam backend will not make any changes, because of the potential issues with renaming the LDAP naming attribute. In this case the script is responsible for changing the attribute that samba uses (uid) for locating users, as well as any data that needs to change for other applications using the same directory.
 
4871
Default:
 
4872
\fB\fIrename user script\fR = no \fR
 
4873
.TP 3n
3590
4874
reset on zero vc (S)
3591
 
This boolean option controls whether an incoming session setup should kill other connections coming from the same IP\&. This matches the default Windows 2003 behaviour\&. Setting this parameter to yes becomes necessary when you have a flaky network and windows decides to reconnect while the old connection still has files with share modes open\&. These files become inaccessible over the new connection\&. The client sends a zero VC on the new connection, and Windows 2003 kills all other connections coming from the same IP\&. This way the locked files are accessible again\&. Please be aware that enabling this option will kill connections behind a masquerading router\&.
3592
 
 
3593
 
Default: \fB\fIreset on zero vc\fR = no \fR 
3594
 
 
3595
 
.TP
 
4875
This boolean option controls whether an incoming session setup should kill other connections coming from the same IP. This matches the default Windows 2003 behaviour. Setting this parameter to yes becomes necessary when you have a flaky network and windows decides to reconnect while the old connection still has files with share modes open. These files become inaccessible over the new connection. The client sends a zero VC on the new connection, and Windows 2003 kills all other connections coming from the same IP. This way the locked files are accessible again. Please be aware that enabling this option will kill connections behind a masquerading router.
 
4876
.sp
 
4877
Default:
 
4878
\fB\fIreset on zero vc\fR = no \fR
 
4879
.TP 3n
3596
4880
restrict anonymous (G)
3597
 
The setting of this parameter determines whether user and group list information is returned for an anonymous connection\&. and mirrors the effects of the 
 
4881
The setting of this parameter determines whether user and group list information is returned for an anonymous connection. and mirrors the effects of the
 
4882
 
 
4883
.sp
3598
4884
.nf
3599
4885
 
3600
 
HKEY_LOCAL_MACHINE\\SYSTEM\\CurrentControlSet\\
3601
 
           Control\\LSA\\RestrictAnonymous
 
4886
HKEY_LOCAL_MACHINE\SYSTEM\CurrentControlSet\
 
4887
           Control\LSA\RestrictAnonymous
3602
4888
.fi
3603
 
 registry key in Windows 2000 and Windows NT\&. When set to 0, user and group list information is returned to anyone who asks\&. When set to 1, only an authenticated user can retrive user and group list information\&. For the value 2, supported by Windows 2000/XP and Samba, no anonymous connections are allowed at all\&. This can break third party and Microsoft applications which expect to be allowed to perform operations anonymously\&.
3604
 
 
3605
 
The security advantage of using restrict anonymous = 1 is dubious, as user and group list information can be obtained using other means\&.
3606
 
 
3607
 
 
3608
 
.RS
3609
 
.Sh "Note"
3610
 
The security advantage of using restrict anonymous = 2 is removed by setting guest ok = yes on any share\&.
3611
 
 
3612
 
.RE
3613
 
Default: \fB\fIrestrict anonymous\fR = 0 \fR 
3614
 
 
3615
 
.TP
 
4889
registry key in Windows 2000 and Windows NT. When set to 0, user and group list information is returned to anyone who asks. When set to 1, only an authenticated user can retrive user and group list information. For the value 2, supported by Windows 2000/XP and Samba, no anonymous connections are allowed at all. This can break third party and Microsoft applications which expect to be allowed to perform operations anonymously.
 
4890
.sp
 
4891
The security advantage of using restrict anonymous = 1 is dubious, as user and group list information can be obtained using other means.
 
4892
.sp
 
4893
.it 1 an-trap
 
4894
.nr an-no-space-flag 1
 
4895
.nr an-break-flag 1
 
4896
.br
 
4897
\fBNote\fR
 
4898
The security advantage of using restrict anonymous = 2 is removed by setting
 
4899
guest ok = yes on any share.
 
4900
Default:
 
4901
\fB\fIrestrict anonymous\fR = 0 \fR
 
4902
.TP 3n
3616
4903
root
3617
 
This parameter is a synonym for root directory\&.
3618
 
 
3619
 
.TP
 
4904
This parameter is a synonym for root directory.
 
4905
.TP 3n
3620
4906
root dir
3621
 
This parameter is a synonym for root directory\&.
3622
 
 
3623
 
.TP
 
4907
This parameter is a synonym for root directory.
 
4908
.TP 3n
3624
4909
root directory (G)
3625
 
The server will \fBchroot()\fR (i\&.e\&. Change its root directory) to this directory on startup\&. This is not strictly necessary for secure operation\&. Even without it the server will deny access to files not in one of the service entries\&. It may also check for, and deny access to, soft links to other parts of the filesystem, or attempts to use "\&.\&." in file names to access other directories (depending on the setting of thewide smbconfoptions parameter)\&.
3626
 
 
3627
 
Adding a \fIroot directory\fR entry other than "/" adds an extra level of security, but at a price\&. It absolutely ensures that no access is given to files not in the sub\-tree specified in the \fIroot directory\fR option, \fBincluding\fR some files needed for complete operation of the server\&. To maintain full operability of the server you will need to mirror some system files into the \fIroot directory\fR tree\&. In particular you will need to mirror \fI/etc/passwd\fR (or a subset of it), and any binaries or configuration files needed for printing (if required)\&. The set of files that must be mirrored is operating system dependent\&.
3628
 
 
3629
 
Default: \fB\fIroot directory\fR = / \fR 
3630
 
 
3631
 
Example: \fB\fIroot directory\fR = /homes/smb \fR 
3632
 
 
3633
 
.TP
 
4910
The server will
 
4911
\fBchroot()\fR
 
4912
(i.e. Change its root directory) to this directory on startup. This is not strictly necessary for secure operation. Even without it the server will deny access to files not in one of the service entries. It may also check for, and deny access to, soft links to other parts of the filesystem, or attempts to use ".." in file names to access other directories (depending on the setting of the
 
4913
wide smbconfoptions parameter).
 
4914
.sp
 
4915
Adding a
 
4916
\fIroot directory\fR
 
4917
entry other than "/" adds an extra level of security, but at a price. It absolutely ensures that no access is given to files not in the sub-tree specified in the
 
4918
\fIroot directory\fR
 
4919
option,
 
4920
\fBincluding\fR
 
4921
some files needed for complete operation of the server. To maintain full operability of the server you will need to mirror some system files into the
 
4922
\fIroot directory\fR
 
4923
tree. In particular you will need to mirror
 
4924
\fI/etc/passwd\fR
 
4925
(or a subset of it), and any binaries or configuration files needed for printing (if required). The set of files that must be mirrored is operating system dependent.
 
4926
.sp
 
4927
Default:
 
4928
\fB\fIroot directory\fR = / \fR
 
4929
.sp
 
4930
Example:
 
4931
\fB\fIroot directory\fR = /homes/smb \fR
 
4932
.TP 3n
3634
4933
root postexec (S)
3635
 
This is the same as the \fIpostexec\fR parameter except that the command is run as root\&. This is useful for unmounting filesystems (such as CDROMs) after a connection is closed\&.
3636
 
 
3637
 
Default: \fB\fIroot postexec\fR = \fR 
3638
 
 
3639
 
.TP
 
4934
This is the same as the
 
4935
\fIpostexec\fR
 
4936
parameter except that the command is run as root. This is useful for unmounting filesystems (such as CDROMs) after a connection is closed.
 
4937
.sp
 
4938
Default:
 
4939
\fB\fIroot postexec\fR = \fR
 
4940
.TP 3n
3640
4941
root preexec (S)
3641
 
This is the same as the \fIpreexec\fR parameter except that the command is run as root\&. This is useful for mounting filesystems (such as CDROMs) when a connection is opened\&.
3642
 
 
3643
 
Default: \fB\fIroot preexec\fR = \fR 
3644
 
 
3645
 
.TP
 
4942
This is the same as the
 
4943
\fIpreexec\fR
 
4944
parameter except that the command is run as root. This is useful for mounting filesystems (such as CDROMs) when a connection is opened.
 
4945
.sp
 
4946
Default:
 
4947
\fB\fIroot preexec\fR = \fR
 
4948
.TP 3n
3646
4949
root preexec close (S)
3647
 
This is the same as the \fIpreexec close \fR parameter except that the command is run as root\&.
3648
 
 
3649
 
Default: \fB\fIroot preexec close\fR = no \fR 
3650
 
 
3651
 
.TP
 
4950
This is the same as the
 
4951
\fIpreexec close \fR
 
4952
parameter except that the command is run as root.
 
4953
.sp
 
4954
Default:
 
4955
\fB\fIroot preexec close\fR = no \fR
 
4956
.TP 3n
3652
4957
security (G)
3653
 
This option affects how clients respond to Samba and is one of the most important settings in the \fI smb\&.conf\fR file\&.
3654
 
 
3655
 
The option sets the "security mode bit" in replies to protocol negotiations with \fBsmbd\fR(8) to turn share level security on or off\&. Clients decide based on this bit whether (and how) to transfer user and password information to the server\&.
3656
 
 
3657
 
The default is \fBsecurity = user\fR, as this is the most common setting needed when talking to Windows 98 and Windows NT\&.
3658
 
 
3659
 
The alternatives are \fBsecurity = share\fR, \fBsecurity = server\fR or \fBsecurity = domain \fR\&.
3660
 
 
3661
 
In versions of Samba prior to 2\&.0\&.0, the default was \fBsecurity = share\fR mainly because that was the only option at one stage\&.
3662
 
 
3663
 
There is a bug in WfWg that has relevance to this setting\&. When in user or server level security a WfWg client will totally ignore the password you type in the "connect drive" dialog box\&. This makes it very difficult (if not impossible) to connect to a Samba service as anyone except the user that you are logged into WfWg as\&.
3664
 
 
3665
 
If your PCs use usernames that are the same as their usernames on the UNIX machine then you will want to use \fBsecurity = user\fR\&. If you mostly use usernames that don't exist on the UNIX box then use \fBsecurity = share\fR\&.
3666
 
 
3667
 
You should also use \fBsecurity = share\fR if you want to mainly setup shares without a password (guest shares)\&. This is commonly used for a shared printer server\&. It is more difficult to setup guest shares with \fBsecurity = user\fR, see the map to guestparameter for details\&.
3668
 
 
3669
 
It is possible to use \fBsmbd\fR in a \fB hybrid mode\fR where it is offers both user and share level security under different NetBIOS aliases\&.
3670
 
 
3671
 
The different settings will now be explained\&.
3672
 
 
 
4958
This option affects how clients respond to Samba and is one of the most important settings in the
 
4959
\fI smb.conf\fR
 
4960
file.
 
4961
.sp
 
4962
The option sets the "security mode bit" in replies to protocol negotiations with
 
4963
\fBsmbd\fR(8)
 
4964
to turn share level security on or off. Clients decide based on this bit whether (and how) to transfer user and password information to the server.
 
4965
.sp
 
4966
The default is
 
4967
\fBsecurity = user\fR, as this is the most common setting needed when talking to Windows 98 and Windows NT.
 
4968
.sp
 
4969
The alternatives are
 
4970
\fBsecurity = share\fR,
 
4971
\fBsecurity = server\fR
 
4972
or
 
4973
\fBsecurity = domain \fR.
 
4974
.sp
 
4975
In versions of Samba prior to 2.0.0, the default was
 
4976
\fBsecurity = share\fR
 
4977
mainly because that was the only option at one stage.
 
4978
.sp
 
4979
There is a bug in WfWg that has relevance to this setting. When in user or server level security a WfWg client will totally ignore the password you type in the "connect drive" dialog box. This makes it very difficult (if not impossible) to connect to a Samba service as anyone except the user that you are logged into WfWg as.
 
4980
.sp
 
4981
If your PCs use usernames that are the same as their usernames on the UNIX machine then you will want to use
 
4982
\fBsecurity = user\fR. If you mostly use usernames that don't exist on the UNIX box then use
 
4983
\fBsecurity = share\fR.
 
4984
.sp
 
4985
You should also use
 
4986
\fBsecurity = share\fR
 
4987
if you want to mainly setup shares without a password (guest shares). This is commonly used for a shared printer server. It is more difficult to setup guest shares with
 
4988
\fBsecurity = user\fR, see the
 
4989
map to guestparameter for details.
 
4990
.sp
 
4991
It is possible to use
 
4992
\fBsmbd\fR
 
4993
in a
 
4994
\fB hybrid mode\fR
 
4995
where it is offers both user and share level security under different
 
4996
NetBIOS aliases.
 
4997
.sp
 
4998
The different settings will now be explained.
 
4999
.sp
3673
5000
\fBSECURITY = SHARE\fR
3674
 
 
3675
 
When clients connect to a share level security server they need not log onto the server with a valid username and password before attempting to connect to a shared resource (although modern clients such as Windows 95/98 and Windows NT will send a logon request with a username but no password when talking to a \fBsecurity = share \fR server)\&. Instead, the clients send authentication information (passwords) on a per\-share basis, at the time they attempt to connect to that share\&.
3676
 
 
3677
 
Note that \fBsmbd\fR  \fBALWAYS\fR uses a valid UNIX user to act on behalf of the client, even in \fBsecurity = share\fR level security\&.
3678
 
 
3679
 
As clients are not required to send a username to the server in share level security, \fBsmbd\fR uses several techniques to determine the correct UNIX user to use on behalf of the client\&.
3680
 
 
 
5001
.sp
 
5002
When clients connect to a share level security server they need not log onto the server with a valid username and password before attempting to connect to a shared resource (although modern clients such as Windows 95/98 and Windows NT will send a logon request with a username but no password when talking to a
 
5003
\fBsecurity = share \fR
 
5004
server). Instead, the clients send authentication information (passwords) on a per-share basis, at the time they attempt to connect to that share.
 
5005
.sp
 
5006
Note that
 
5007
\fBsmbd\fR
 
5008
\fBALWAYS\fR
 
5009
uses a valid UNIX user to act on behalf of the client, even in
 
5010
\fBsecurity = share\fR
 
5011
level security.
 
5012
.sp
 
5013
As clients are not required to send a username to the server in share level security,
 
5014
\fBsmbd\fR
 
5015
uses several techniques to determine the correct UNIX user to use on behalf of the client.
 
5016
.sp
3681
5017
A list of possible UNIX usernames to match with the given client password is constructed using the following methods :
3682
 
 
3683
 
 
3684
 
.RS
3685
 
.TP 3
3686
 
\(bu
3687
 
If the guest only parameter is set, then all the other stages are missed and only the guest account username is checked\&.
3688
 
.TP
3689
 
\(bu
3690
 
Is a username is sent with the share connection request, then this username (after mapping \- see username map), is added as a potential username\&.
3691
 
.TP
3692
 
\(bu
3693
 
If the client did a previous \fBlogon \fR request (the SessionSetup SMB call) then the username sent in this SMB will be added as a potential username\&.
3694
 
.TP
3695
 
\(bu
3696
 
The name of the service the client requested is added as a potential username\&.
3697
 
.TP
3698
 
\(bu
3699
 
The NetBIOS name of the client is added to the list as a potential username\&.
3700
 
.TP
3701
 
\(bu
3702
 
Any users on the user list are added as potential usernames\&.
3703
 
.LP
 
5018
.RS 3n
 
5019
.TP 3n
 
5020
&#8226;
 
5021
If the
 
5022
guest only parameter is set, then all the other stages are missed and only the
 
5023
guest account username is checked.
 
5024
.TP 3n
 
5025
&#8226;
 
5026
Is a username is sent with the share connection request, then this username (after mapping - see
 
5027
username map), is added as a potential username.
 
5028
.TP 3n
 
5029
&#8226;
 
5030
If the client did a previous
 
5031
\fBlogon \fR
 
5032
request (the SessionSetup SMB call) then the username sent in this SMB will be added as a potential username.
 
5033
.TP 3n
 
5034
&#8226;
 
5035
The name of the service the client requested is added as a potential username.
 
5036
.TP 3n
 
5037
&#8226;
 
5038
The NetBIOS name of the client is added to the list as a potential username.
 
5039
.TP 3n
 
5040
&#8226;
 
5041
Any users on the
 
5042
user list are added as potential usernames.
3704
5043
.RE
3705
 
.IP
3706
 
If the \fIguest only\fR parameter is not set, then this list is then tried with the supplied password\&. The first user for whom the password matches will be used as the UNIX user\&.
3707
 
 
3708
 
If the \fIguest only\fR parameter is set, or no username can be determined then if the share is marked as available to the \fIguest account\fR, then this guest user will be used, otherwise access is denied\&.
3709
 
 
3710
 
Note that it can be \fBvery\fR confusing in share\-level security as to which UNIX username will eventually be used in granting access\&.
3711
 
 
3712
 
See also the section NOTE ABOUT USERNAME/PASSWORD VALIDATION\&.
3713
 
 
 
5044
.IP "" 3n
 
5045
If the
 
5046
\fIguest only\fR
 
5047
parameter is not set, then this list is then tried with the supplied password. The first user for whom the password matches will be used as the UNIX user.
 
5048
.sp
 
5049
If the
 
5050
\fIguest only\fR
 
5051
parameter is set, or no username can be determined then if the share is marked as available to the
 
5052
\fIguest account\fR, then this guest user will be used, otherwise access is denied.
 
5053
.sp
 
5054
Note that it can be
 
5055
\fBvery\fR
 
5056
confusing in share-level security as to which UNIX username will eventually be used in granting access.
 
5057
.sp
 
5058
See also the section
 
5059
NOTE ABOUT USERNAME/PASSWORD VALIDATION.
 
5060
.sp
3714
5061
\fBSECURITY = USER\fR
3715
 
 
3716
 
This is the default security setting in Samba 3\&.0\&. With user\-level security a client must first "log\-on" with a valid username and password (which can be mapped using the username map parameter)\&. Encrypted passwords (see the encrypted passwords parameter) can also be used in this security mode\&. Parameters such as user and guest only if set are then applied and may change the UNIX user to use on this connection, but only after the user has been successfully authenticated\&.
3717
 
 
3718
 
\fBNote\fR that the name of the resource being requested is \fBnot\fR sent to the server until after the server has successfully authenticated the client\&. This is why guest shares don't work in user level security without allowing the server to automatically map unknown users into the guest account\&. See the map to guest parameter for details on doing this\&.
3719
 
 
3720
 
See also the section NOTE ABOUT USERNAME/PASSWORD VALIDATION\&.
3721
 
 
 
5062
.sp
 
5063
This is the default security setting in Samba 3.0. With user-level security a client must first "log-on" with a valid username and password (which can be mapped using the
 
5064
username map parameter). Encrypted passwords (see the
 
5065
encrypted passwords parameter) can also be used in this security mode. Parameters such as
 
5066
user and
 
5067
guest only if set are then applied and may change the UNIX user to use on this connection, but only after the user has been successfully authenticated.
 
5068
.sp
 
5069
\fBNote\fR
 
5070
that the name of the resource being requested is
 
5071
\fBnot\fR
 
5072
sent to the server until after the server has successfully authenticated the client. This is why guest shares don't work in user level security without allowing the server to automatically map unknown users into the
 
5073
guest account. See the
 
5074
map to guest parameter for details on doing this.
 
5075
.sp
 
5076
See also the section
 
5077
NOTE ABOUT USERNAME/PASSWORD VALIDATION.
 
5078
.sp
3722
5079
\fBSECURITY = DOMAIN\fR
3723
 
 
3724
 
This mode will only work correctly if \fBnet\fR(8) has been used to add this machine into a Windows NT Domain\&. It expects the encrypted passwords parameter to be set to \fByes\fR\&. In this mode Samba will try to validate the username/password by passing it to a Windows NT Primary or Backup Domain Controller, in exactly the same way that a Windows NT Server would do\&.
3725
 
 
3726
 
\fBNote\fR that a valid UNIX user must still exist as well as the account on the Domain Controller to allow Samba to have a valid UNIX account to map file access to\&.
3727
 
 
3728
 
\fBNote\fR that from the client's point of view \fBsecurity = domain\fR is the same as \fBsecurity = user\fR\&. It only affects how the server deals with the authentication, it does not in any way affect what the client sees\&.
3729
 
 
3730
 
\fBNote\fR that the name of the resource being requested is \fBnot\fR sent to the server until after the server has successfully authenticated the client\&. This is why guest shares don't work in user level security without allowing the server to automatically map unknown users into the guest account\&. See the map to guest parameter for details on doing this\&.
3731
 
 
3732
 
See also the section NOTE ABOUT USERNAME/PASSWORD VALIDATION\&.
3733
 
 
3734
 
See also the password server parameter and the encrypted passwords parameter\&.
3735
 
 
 
5080
.sp
 
5081
This mode will only work correctly if
 
5082
\fBnet\fR(8)
 
5083
has been used to add this machine into a Windows NT Domain. It expects the
 
5084
encrypted passwords parameter to be set to
 
5085
\fByes\fR. In this mode Samba will try to validate the username/password by passing it to a Windows NT Primary or Backup Domain Controller, in exactly the same way that a Windows NT Server would do.
 
5086
.sp
 
5087
\fBNote\fR
 
5088
that a valid UNIX user must still exist as well as the account on the Domain Controller to allow Samba to have a valid UNIX account to map file access to.
 
5089
.sp
 
5090
\fBNote\fR
 
5091
that from the client's point of view
 
5092
\fBsecurity = domain\fR
 
5093
is the same as
 
5094
\fBsecurity = user\fR. It only affects how the server deals with the authentication, it does not in any way affect what the client sees.
 
5095
.sp
 
5096
\fBNote\fR
 
5097
that the name of the resource being requested is
 
5098
\fBnot\fR
 
5099
sent to the server until after the server has successfully authenticated the client. This is why guest shares don't work in user level security without allowing the server to automatically map unknown users into the
 
5100
guest account. See the
 
5101
map to guest parameter for details on doing this.
 
5102
.sp
 
5103
See also the section
 
5104
NOTE ABOUT USERNAME/PASSWORD VALIDATION.
 
5105
.sp
 
5106
See also the
 
5107
password server parameter and the
 
5108
encrypted passwords parameter.
 
5109
.sp
3736
5110
\fBSECURITY = SERVER\fR
3737
 
 
3738
 
In this mode Samba will try to validate the username/password by passing it to another SMB server, such as an NT box\&. If this fails it will revert to \fBsecurity = user\fR\&. It expects theencrypted passwords parameter to be set to \fByes\fR, unless the remote server does not support them\&. However note that if encrypted passwords have been negotiated then Samba cannot revert back to checking the UNIX password file, it must have a valid \fIsmbpasswd\fR file to check users against\&. See the chapter about the User Database in the Samba HOWTO Collection for details on how to set this up\&.
3739
 
 
3740
 
 
3741
 
.RS
3742
 
.Sh "Note"
3743
 
This mode of operation has significant pitfalls, due to the fact that is activly initiates a man\-in\-the\-middle attack on the remote SMB server\&. In particular, this mode of operation can cause significant resource consuption on the PDC, as it must maintain an active connection for the duration of the user's session\&. Furthermore, if this connection is lost, there is no way to reestablish it, and futher authenticaions to the Samba server may fail\&. (From a single client, till it disconnects)\&.
3744
 
 
3745
 
.RE
3746
 
 
3747
 
.RS
3748
 
.Sh "Note"
3749
 
From the client's point of view \fBsecurity = server\fR is the same as \fBsecurity = user\fR\&. It only affects how the server deals with the authentication, it does not in any way affect what the client sees\&.
3750
 
 
3751
 
.RE
3752
 
\fBNote\fR that the name of the resource being requested is \fBnot\fR sent to the server until after the server has successfully authenticated the client\&. This is why guest shares don't work in user level security without allowing the server to automatically map unknown users into the guest account\&. See the map to guest parameter for details on doing this\&.
3753
 
 
3754
 
See also the section NOTE ABOUT USERNAME/PASSWORD VALIDATION\&.
3755
 
 
3756
 
See also the password server parameter and theencrypted passwords parameter\&.
3757
 
 
 
5111
.sp
 
5112
In this mode Samba will try to validate the username/password by passing it to another SMB server, such as an NT box. If this fails it will revert to
 
5113
\fBsecurity = user\fR. It expects the
 
5114
encrypted passwords parameter to be set to
 
5115
\fByes\fR, unless the remote server does not support them. However note that if encrypted passwords have been negotiated then Samba cannot revert back to checking the UNIX password file, it must have a valid
 
5116
\fIsmbpasswd\fR
 
5117
file to check users against. See the chapter about the User Database in the Samba HOWTO Collection for details on how to set this up.
 
5118
.sp
 
5119
.it 1 an-trap
 
5120
.nr an-no-space-flag 1
 
5121
.nr an-break-flag 1
 
5122
.br
 
5123
\fBNote\fR
 
5124
This mode of operation has significant pitfalls since it is more vulnerable to man-in-the-middle attacks and server impersonation. In particular, this mode of operation can cause significant resource consuption on the PDC, as it must maintain an active connection for the duration of the user's session. Furthermore, if this connection is lost, there is no way to reestablish it, and futher authentications to the Samba server may fail (from a single client, till it disconnects).
 
5125
.sp
 
5126
.it 1 an-trap
 
5127
.nr an-no-space-flag 1
 
5128
.nr an-break-flag 1
 
5129
.br
 
5130
\fBNote\fR
 
5131
From the client's point of view
 
5132
\fBsecurity = server\fR
 
5133
is the same as
 
5134
\fBsecurity = user\fR. It only affects how the server deals with the authentication, it does not in any way affect what the client sees.
 
5135
\fBNote\fR
 
5136
that the name of the resource being requested is
 
5137
\fBnot\fR
 
5138
sent to the server until after the server has successfully authenticated the client. This is why guest shares don't work in user level security without allowing the server to automatically map unknown users into the
 
5139
guest account. See the
 
5140
map to guest parameter for details on doing this.
 
5141
.sp
 
5142
See also the section
 
5143
NOTE ABOUT USERNAME/PASSWORD VALIDATION.
 
5144
.sp
 
5145
See also the
 
5146
password server parameter and the
 
5147
encrypted passwords parameter.
 
5148
.sp
3758
5149
\fBSECURITY = ADS\fR
3759
 
 
3760
 
In this mode, Samba will act as a domain member in an ADS realm\&. To operate in this mode, the machine running Samba will need to have Kerberos installed and configured and Samba will need to be joined to the ADS realm using the net utility\&.
3761
 
 
3762
 
Note that this mode does NOT make Samba operate as a Active Directory Domain Controller\&.
3763
 
 
3764
 
Read the chapter about Domain Membership in the HOWTO for details\&.
3765
 
 
3766
 
Default: \fB\fIsecurity\fR = USER \fR 
3767
 
 
3768
 
Example: \fB\fIsecurity\fR = DOMAIN \fR 
3769
 
 
3770
 
.TP
 
5150
.sp
 
5151
In this mode, Samba will act as a domain member in an ADS realm. To operate in this mode, the machine running Samba will need to have Kerberos installed and configured and Samba will need to be joined to the ADS realm using the net utility.
 
5152
.sp
 
5153
Note that this mode does NOT make Samba operate as a Active Directory Domain Controller.
 
5154
.sp
 
5155
Read the chapter about Domain Membership in the HOWTO for details.
 
5156
.sp
 
5157
Default:
 
5158
\fB\fIsecurity\fR = USER \fR
 
5159
.sp
 
5160
Example:
 
5161
\fB\fIsecurity\fR = DOMAIN \fR
 
5162
.TP 3n
3771
5163
security mask (S)
3772
 
This parameter controls what UNIX permission bits can be modified when a Windows NT client is manipulating the UNIX permission on a file using the native NT security dialog box\&.
3773
 
 
3774
 
This parameter is applied as a mask (AND'ed with) to the changed permission bits, thus preventing any bits not in this mask from being modified\&. Make sure not to mix up this parameter with force security mode, which works in a manner similar to this one but uses a logical OR instead of an AND\&.
3775
 
 
3776
 
Essentially, zero bits in this mask may be treated as a set of bits the user is not allowed to change\&.
3777
 
 
3778
 
If not set explicitly this parameter is 0777, allowing a user to modify all the user/group/world permissions on a file\&.
3779
 
 
3780
 
\fB Note\fR that users who can access the Samba server through other means can easily bypass this restriction, so it is primarily useful for standalone "appliance" systems\&. Administrators of most normal systems will probably want to leave it set to \fB0777\fR\&.
3781
 
 
3782
 
Default: \fB\fIsecurity mask\fR = 0777 \fR 
3783
 
 
3784
 
Example: \fB\fIsecurity mask\fR = 0770 \fR 
3785
 
 
3786
 
.TP
 
5164
This parameter controls what UNIX permission bits can be modified when a Windows NT client is manipulating the UNIX permission on a file using the native NT security dialog box.
 
5165
.sp
 
5166
This parameter is applied as a mask (AND'ed with) to the changed permission bits, thus preventing any bits not in this mask from being modified. Make sure not to mix up this parameter with
 
5167
force security mode, which works in a manner similar to this one but uses a logical OR instead of an AND.
 
5168
.sp
 
5169
Essentially, zero bits in this mask may be treated as a set of bits the user is not allowed to change.
 
5170
.sp
 
5171
If not set explicitly this parameter is 0777, allowing a user to modify all the user/group/world permissions on a file.
 
5172
.sp
 
5173
\fB Note\fR
 
5174
that users who can access the Samba server through other means can easily bypass this restriction, so it is primarily useful for standalone "appliance" systems. Administrators of most normal systems will probably want to leave it set to
 
5175
\fB0777\fR.
 
5176
.sp
 
5177
Default:
 
5178
\fB\fIsecurity mask\fR = 0777 \fR
 
5179
.sp
 
5180
Example:
 
5181
\fB\fIsecurity mask\fR = 0770 \fR
 
5182
.TP 3n
3787
5183
server schannel (G)
3788
 
This controls whether the server offers or even demands the use of the netlogon schannel\&.server schannel = no does not offer the schannel, server schannel = auto offers the schannel but does not enforce it, and server schannel = yes denies access if the client is not able to speak netlogon schannel\&. This is only the case for Windows NT4 before SP4\&.
3789
 
 
3790
 
Please note that with this set to no you will have to apply the WindowsXP\fIWinXP_SignOrSeal\&.reg\fR registry patch found in the docs/registry subdirectory of the Samba distribution tarball\&.
3791
 
 
3792
 
Default: \fB\fIserver schannel\fR = auto \fR 
3793
 
 
3794
 
Example: \fB\fIserver schannel\fR = yes \fR 
3795
 
 
3796
 
.TP
 
5184
This controls whether the server offers or even demands the use of the netlogon schannel.
 
5185
server schannel = no does not offer the schannel,
 
5186
server schannel = auto offers the schannel but does not enforce it, and
 
5187
server schannel = yes denies access if the client is not able to speak netlogon schannel. This is only the case for Windows NT4 before SP4.
 
5188
.sp
 
5189
Please note that with this set to
 
5190
no
 
5191
you will have to apply the WindowsXP
 
5192
\fIWinXP_SignOrSeal.reg\fR
 
5193
registry patch found in the docs/registry subdirectory of the Samba distribution tarball.
 
5194
.sp
 
5195
Default:
 
5196
\fB\fIserver schannel\fR = auto \fR
 
5197
.sp
 
5198
Example:
 
5199
\fB\fIserver schannel\fR = yes \fR
 
5200
.TP 3n
3797
5201
server signing (G)
3798
 
This controls whether the server offers or requires the client it talks to to use SMB signing\&. Possible values are \fBauto\fR, \fBmandatory\fR and \fBdisabled\fR\&.
3799
 
 
3800
 
When set to auto, SMB signing is offered, but not enforced\&. When set to mandatory, SMB signing is required and if set to disabled, SMB signing is not offered either\&.
3801
 
 
3802
 
Default: \fB\fIserver signing\fR = Disabled \fR 
3803
 
 
3804
 
.TP
 
5202
This controls whether the server offers or requires the client it talks to to use SMB signing. Possible values are
 
5203
\fBauto\fR,
 
5204
\fBmandatory\fR
 
5205
and
 
5206
\fBdisabled\fR.
 
5207
.sp
 
5208
When set to auto, SMB signing is offered, but not enforced. When set to mandatory, SMB signing is required and if set to disabled, SMB signing is not offered either.
 
5209
.sp
 
5210
Default:
 
5211
\fB\fIserver signing\fR = Disabled \fR
 
5212
.TP 3n
3805
5213
server string (G)
3806
 
This controls what string will show up in the printer comment box in print manager and next to the IPC connection in \fBnet view\fR\&. It can be any string that you wish to show to your users\&.
3807
 
 
3808
 
It also sets what will appear in browse lists next to the machine name\&.
3809
 
 
3810
 
A \fI%v\fR will be replaced with the Samba version number\&.
3811
 
 
3812
 
A \fI%h\fR will be replaced with the hostname\&.
3813
 
 
3814
 
Default: \fB\fIserver string\fR = Samba %v \fR 
3815
 
 
3816
 
Example: \fB\fIserver string\fR = University of GNUs Samba Server \fR 
3817
 
 
3818
 
.TP
 
5214
This controls what string will show up in the printer comment box in print manager and next to the IPC connection in
 
5215
\fBnet view\fR. It can be any string that you wish to show to your users.
 
5216
.sp
 
5217
It also sets what will appear in browse lists next to the machine name.
 
5218
.sp
 
5219
A
 
5220
\fI%v\fR
 
5221
will be replaced with the Samba version number.
 
5222
.sp
 
5223
A
 
5224
\fI%h\fR
 
5225
will be replaced with the hostname.
 
5226
.sp
 
5227
Default:
 
5228
\fB\fIserver string\fR = Samba %v \fR
 
5229
.sp
 
5230
Example:
 
5231
\fB\fIserver string\fR = University of GNUs Samba Server \fR
 
5232
.TP 3n
3819
5233
set directory (S)
3820
 
If \fBset directory = no\fR, then users of the service may not use the setdir command to change directory\&.
3821
 
 
3822
 
The \fBsetdir\fR command is only implemented in the Digital Pathworks client\&. See the Pathworks documentation for details\&.
3823
 
 
3824
 
Default: \fB\fIset directory\fR = no \fR 
3825
 
 
3826
 
.TP
 
5234
If
 
5235
\fBset directory = no\fR, then users of the service may not use the setdir command to change directory.
 
5236
.sp
 
5237
The
 
5238
\fBsetdir\fR
 
5239
command is only implemented in the Digital Pathworks client. See the Pathworks documentation for details.
 
5240
.sp
 
5241
Default:
 
5242
\fB\fIset directory\fR = no \fR
 
5243
.TP 3n
3827
5244
set primary group script (G)
3828
 
Thanks to the Posix subsystem in NT a Windows User has a primary group in addition to the auxiliary groups\&. This script sets the primary group in the unix userdatase when an administrator sets the primary group from the windows user manager or when fetching a SAM with \fBnet rpc vampire\fR\&. \fI%u\fR will be replaced with the user whose primary group is to be set\&.\fI%g\fR will be replaced with the group to set\&.
3829
 
 
3830
 
Default: \fB\fIset primary group script\fR = \fR 
3831
 
 
3832
 
Example: \fB\fIset primary group script\fR = /usr/sbin/usermod \-g '%g' '%u' \fR 
3833
 
 
3834
 
.TP
 
5245
Thanks to the Posix subsystem in NT a Windows User has a primary group in addition to the auxiliary groups. This script sets the primary group in the unix userdatase when an administrator sets the primary group from the windows user manager or when fetching a SAM with
 
5246
\fBnet rpc vampire\fR.
 
5247
\fI%u\fR
 
5248
will be replaced with the user whose primary group is to be set.
 
5249
\fI%g\fR
 
5250
will be replaced with the group to set.
 
5251
.sp
 
5252
Default:
 
5253
\fB\fIset primary group script\fR = \fR
 
5254
.sp
 
5255
Example:
 
5256
\fB\fIset primary group script\fR = /usr/sbin/usermod -g '%g' '%u' \fR
 
5257
.TP 3n
3835
5258
set quota command (G)
3836
 
The \fBset quota command\fR should only be used whenever there is no operating system API available from the OS that samba can use\&.
3837
 
 
3838
 
This option is only available if Samba was configured with the argument \fB\-\-with\-sys\-quotas\fR or on linux when \fB\&./configure \-\-with\-quotas\fR was used and a working quota api was found in the system\&. Most packages are configured with these options already\&.
3839
 
 
3840
 
This parameter should specify the path to a script that can set quota for the specified arguments\&.
3841
 
 
 
5259
The
 
5260
\fBset quota command\fR
 
5261
should only be used whenever there is no operating system API available from the OS that samba can use.
 
5262
.sp
 
5263
This option is only available if Samba was configured with the argument
 
5264
\fB--with-sys-quotas\fR
 
5265
or on linux when
 
5266
\fB./configure --with-quotas\fR
 
5267
was used and a working quota api was found in the system. Most packages are configured with these options already.
 
5268
.sp
 
5269
This parameter should specify the path to a script that can set quota for the specified arguments.
 
5270
.sp
3842
5271
The specified script should take the following arguments:
3843
 
 
3844
 
 
3845
 
.RS
3846
 
.TP 3
3847
 
\(bu
3848
 
1 \- quota type
3849
 
 
3850
 
.RS
3851
 
.TP 3
3852
 
\(bu
3853
 
1 \- user quotas
3854
 
.TP
3855
 
\(bu
3856
 
2 \- user default quotas (uid = \-1)
3857
 
.TP
3858
 
\(bu
3859
 
3 \- group quotas
3860
 
.TP
3861
 
\(bu
3862
 
4 \- group default quotas (gid = \-1)
3863
 
.LP
3864
 
.RE
3865
 
.IP
3866
 
 
3867
 
.TP
3868
 
\(bu
3869
 
2 \- id (uid for user, gid for group, \-1 if N/A)
3870
 
.TP
3871
 
\(bu
3872
 
3 \- quota state (0 = disable, 1 = enable, 2 = enable and enforce)
3873
 
.TP
3874
 
\(bu
3875
 
4 \- block softlimit
3876
 
.TP
3877
 
\(bu
3878
 
5 \- block hardlimit
3879
 
.TP
3880
 
\(bu
3881
 
6 \- inode softlimit
3882
 
.TP
3883
 
\(bu
3884
 
7 \- inode hardlimit
3885
 
.TP
3886
 
\(bu
3887
 
8(optional) \- block size, defaults to 1024
3888
 
.LP
3889
 
.RE
3890
 
.IP
3891
 
The script should output at least one line of data on success\&. And nothing on failure\&.
3892
 
 
3893
 
Default: \fB\fIset quota command\fR = \fR 
3894
 
 
3895
 
Example: \fB\fIset quota command\fR = /usr/local/sbin/set_quota \fR 
3896
 
 
3897
 
.TP
 
5272
.RS 3n
 
5273
.TP 3n
 
5274
&#8226;
 
5275
1 - quota type
 
5276
.RS 3n
 
5277
.TP 3n
 
5278
&#8226;
 
5279
1 - user quotas
 
5280
.TP 3n
 
5281
&#8226;
 
5282
2 - user default quotas (uid = -1)
 
5283
.TP 3n
 
5284
&#8226;
 
5285
3 - group quotas
 
5286
.TP 3n
 
5287
&#8226;
 
5288
4 - group default quotas (gid = -1)
 
5289
.RE
 
5290
.IP "" 3n
 
5291
 
 
5292
.TP 3n
 
5293
&#8226;
 
5294
2 - id (uid for user, gid for group, -1 if N/A)
 
5295
.TP 3n
 
5296
&#8226;
 
5297
3 - quota state (0 = disable, 1 = enable, 2 = enable and enforce)
 
5298
.TP 3n
 
5299
&#8226;
 
5300
4 - block softlimit
 
5301
.TP 3n
 
5302
&#8226;
 
5303
5 - block hardlimit
 
5304
.TP 3n
 
5305
&#8226;
 
5306
6 - inode softlimit
 
5307
.TP 3n
 
5308
&#8226;
 
5309
7 - inode hardlimit
 
5310
.TP 3n
 
5311
&#8226;
 
5312
8(optional) - block size, defaults to 1024
 
5313
.RE
 
5314
.IP "" 3n
 
5315
The script should output at least one line of data on success. And nothing on failure.
 
5316
.sp
 
5317
Default:
 
5318
\fB\fIset quota command\fR = \fR
 
5319
.sp
 
5320
Example:
 
5321
\fB\fIset quota command\fR = /usr/local/sbin/set_quota \fR
 
5322
.TP 3n
3898
5323
share modes (S)
3899
 
This enables or disables the honoring of the \fIshare modes\fR during a file open\&. These modes are used by clients to gain exclusive read or write access to a file\&.
3900
 
 
3901
 
These open modes are not directly supported by UNIX, so they are simulated using shared memory, or lock files if your UNIX doesn't support shared memory (almost all do)\&.
3902
 
 
3903
 
The share modes that are enabled by this option are\fBDENY_DOS\fR, \fBDENY_ALL\fR,\fBDENY_READ\fR, \fBDENY_WRITE\fR,\fBDENY_NONE\fR and \fBDENY_FCB\fR\&.
3904
 
 
3905
 
This option gives full share compatibility and enabled by default\&.
3906
 
 
3907
 
You should \fBNEVER\fR turn this parameter off as many Windows applications will break if you do so\&.
3908
 
 
3909
 
Default: \fB\fIshare modes\fR = yes \fR 
3910
 
 
3911
 
.TP
 
5324
This enables or disables the honoring of the
 
5325
\fIshare modes\fR
 
5326
during a file open. These modes are used by clients to gain exclusive read or write access to a file.
 
5327
.sp
 
5328
These open modes are not directly supported by UNIX, so they are simulated using shared memory, or lock files if your UNIX doesn't support shared memory (almost all do).
 
5329
.sp
 
5330
The share modes that are enabled by this option are
 
5331
\fBDENY_DOS\fR,
 
5332
\fBDENY_ALL\fR,
 
5333
\fBDENY_READ\fR,
 
5334
\fBDENY_WRITE\fR,
 
5335
\fBDENY_NONE\fR
 
5336
and
 
5337
\fBDENY_FCB\fR.
 
5338
.sp
 
5339
This option gives full share compatibility and enabled by default.
 
5340
.sp
 
5341
You should
 
5342
\fBNEVER\fR
 
5343
turn this parameter off as many Windows applications will break if you do so.
 
5344
.sp
 
5345
Default:
 
5346
\fB\fIshare modes\fR = yes \fR
 
5347
.TP 3n
3912
5348
short preserve case (S)
3913
 
This boolean parameter controls if new files which conform to 8\&.3 syntax, that is all in upper case and of suitable length, are created upper case, or if they are forced to be the default case \&. This option can be use with preserve case = yes to permit long filenames to retain their case, while short names are lowered\&.
3914
 
 
3915
 
See the section on NAME MANGLING\&.
3916
 
 
3917
 
Default: \fB\fIshort preserve case\fR = yes \fR 
3918
 
 
3919
 
.TP
 
5349
This boolean parameter controls if new files which conform to 8.3 syntax, that is all in upper case and of suitable length, are created upper case, or if they are forced to be the
 
5350
default case . This option can be use with
 
5351
preserve case = yes to permit long filenames to retain their case, while short names are lowered.
 
5352
.sp
 
5353
See the section on
 
5354
NAME MANGLING.
 
5355
.sp
 
5356
Default:
 
5357
\fB\fIshort preserve case\fR = yes \fR
 
5358
.TP 3n
3920
5359
show add printer wizard (G)
3921
 
With the introduction of MS\-RPC based printing support for Windows NT/2000 client in Samba 2\&.2, a "Printers\&.\&.\&." folder will appear on Samba hosts in the share listing\&. Normally this folder will contain an icon for the MS Add Printer Wizard (APW)\&. However, it is possible to disable this feature regardless of the level of privilege of the connected user\&.
3922
 
 
3923
 
Under normal circumstances, the Windows NT/2000 client will open a handle on the printer server with OpenPrinterEx() asking for Administrator privileges\&. If the user does not have administrative access on the print server (i\&.e is not root or a member of the \fIprinter admin\fR group), the OpenPrinterEx() call fails and the client makes another open call with a request for a lower privilege level\&. This should succeed, however the APW icon will not be displayed\&.
3924
 
 
3925
 
Disabling the \fIshow add printer wizard\fR parameter will always cause the OpenPrinterEx() on the server to fail\&. Thus the APW icon will never be displayed\&.
3926
 
 
3927
 
 
3928
 
.RS
3929
 
.Sh "Note"
3930
 
This does not prevent the same user from having administrative privilege on an individual printer\&.
3931
 
 
3932
 
.RE
3933
 
Default: \fB\fIshow add printer wizard\fR = yes \fR 
3934
 
 
3935
 
.TP
 
5360
With the introduction of MS-RPC based printing support for Windows NT/2000 client in Samba 2.2, a "Printers..." folder will appear on Samba hosts in the share listing. Normally this folder will contain an icon for the MS Add Printer Wizard (APW). However, it is possible to disable this feature regardless of the level of privilege of the connected user.
 
5361
.sp
 
5362
Under normal circumstances, the Windows NT/2000 client will open a handle on the printer server with OpenPrinterEx() asking for Administrator privileges. If the user does not have administrative access on the print server (i.e is not root or a member of the
 
5363
\fIprinter admin\fR
 
5364
group), the OpenPrinterEx() call fails and the client makes another open call with a request for a lower privilege level. This should succeed, however the APW icon will not be displayed.
 
5365
.sp
 
5366
Disabling the
 
5367
\fIshow add printer wizard\fR
 
5368
parameter will always cause the OpenPrinterEx() on the server to fail. Thus the APW icon will never be displayed.
 
5369
.sp
 
5370
.it 1 an-trap
 
5371
.nr an-no-space-flag 1
 
5372
.nr an-break-flag 1
 
5373
.br
 
5374
\fBNote\fR
 
5375
This does not prevent the same user from having administrative privilege on an individual printer.
 
5376
Default:
 
5377
\fB\fIshow add printer wizard\fR = yes \fR
 
5378
.TP 3n
3936
5379
shutdown script (G)
3937
 
This a full path name to a script called by\fBsmbd\fR(8) that should start a shutdown procedure\&.
3938
 
 
3939
 
If the connected user posseses the \fBSeRemoteShutdownPrivilege\fR, right, this command will be run as user\&.
3940
 
 
 
5380
This a full path name to a script called by
 
5381
\fBsmbd\fR(8)
 
5382
that should start a shutdown procedure.
 
5383
.sp
 
5384
If the connected user posseses the
 
5385
\fBSeRemoteShutdownPrivilege\fR, right, this command will be run as user.
 
5386
.sp
3941
5387
The %z %t %r %f variables are expanded as follows:
3942
 
 
3943
 
 
3944
 
.RS
3945
 
.TP 3
3946
 
\(bu
3947
 
\fI%z\fR will be substituted with the shutdown message sent to the server\&.
3948
 
.TP
3949
 
\(bu
3950
 
\fI%t\fR will be substituted with the number of seconds to wait before effectively starting the shutdown procedure\&.
3951
 
.TP
3952
 
\(bu
3953
 
\fI%r\fR will be substituted with the switch \fB\-r\fR\&. It means reboot after shutdown for NT\&.
3954
 
.TP
3955
 
\(bu
3956
 
\fI%f\fR will be substituted with the switch \fB\-f\fR\&. It means force the shutdown even if applications do not respond for NT\&.
3957
 
.LP
 
5388
.RS 3n
 
5389
.TP 3n
 
5390
&#8226;
 
5391
\fI%z\fR
 
5392
will be substituted with the shutdown message sent to the server.
 
5393
.TP 3n
 
5394
&#8226;
 
5395
\fI%t\fR
 
5396
will be substituted with the number of seconds to wait before effectively starting the shutdown procedure.
 
5397
.TP 3n
 
5398
&#8226;
 
5399
\fI%r\fR
 
5400
will be substituted with the switch
 
5401
\fB-r\fR. It means reboot after shutdown for NT.
 
5402
.TP 3n
 
5403
&#8226;
 
5404
\fI%f\fR
 
5405
will be substituted with the switch
 
5406
\fB-f\fR. It means force the shutdown even if applications do not respond for NT.
3958
5407
.RE
3959
 
.IP
3960
 
Shutdown script example: 
 
5408
.IP "" 3n
 
5409
Shutdown script example:
 
5410
 
 
5411
.sp
3961
5412
.nf
3962
5413
 
3963
5414
#!/bin/bash
3968
5419
 
3969
5420
/sbin/shutdown $3 $4 +$time $1 &
3970
5421
.fi
3971
 
 Shutdown does not return so we need to launch it in background\&.
3972
 
 
3973
 
Default: \fB\fIshutdown script\fR = \fR 
3974
 
 
3975
 
Example: \fB\fIshutdown script\fR = /usr/local/samba/sbin/shutdown %m %t %r %f \fR 
3976
 
 
3977
 
.TP
 
5422
Shutdown does not return so we need to launch it in background.
 
5423
.sp
 
5424
Default:
 
5425
\fB\fIshutdown script\fR = \fR
 
5426
.sp
 
5427
Example:
 
5428
\fB\fIshutdown script\fR = /usr/local/samba/sbin/shutdown %m %t %r %f \fR
 
5429
.TP 3n
3978
5430
smb passwd file (G)
3979
 
This option sets the path to the encrypted smbpasswd file\&. By default the path to the smbpasswd file is compiled into Samba\&.
 
5431
This option sets the path to the encrypted smbpasswd file. By default the path to the smbpasswd file is compiled into Samba.
 
5432
.sp
 
5433
An example of use is:
3980
5434
 
3981
 
An example of use is: 
 
5435
.sp
3982
5436
.nf
3983
5437
 
3984
5438
smb passwd file = /etc/samba/smbpasswd
3985
5439
.fi
3986
 
 
3987
 
 
3988
 
Default: \fB\fIsmb passwd file\fR = ${prefix}/private/smbpasswd \fR 
3989
 
 
3990
 
.TP
 
5440
 
 
5441
.sp
 
5442
Default:
 
5443
\fB\fIsmb passwd file\fR = ${prefix}/private/smbpasswd \fR
 
5444
.TP 3n
3991
5445
smb ports (G)
3992
 
Specifies which ports the server should listen on for SMB traffic\&.
3993
 
 
3994
 
Default: \fB\fIsmb ports\fR = 445 139 \fR 
3995
 
 
3996
 
.TP
 
5446
Specifies which ports the server should listen on for SMB traffic.
 
5447
.sp
 
5448
Default:
 
5449
\fB\fIsmb ports\fR = 445 139 \fR
 
5450
.TP 3n
3997
5451
socket address (G)
3998
 
This option allows you to control what address Samba will listen for connections on\&. This is used to support multiple virtual interfaces on the one server, each with a different configuration\&.
3999
 
 
4000
 
By default Samba will accept connections on any address\&.
4001
 
 
4002
 
Default: \fB\fIsocket address\fR = \fR 
4003
 
 
4004
 
Example: \fB\fIsocket address\fR = 192\&.168\&.2\&.20 \fR 
4005
 
 
4006
 
.TP
 
5452
This option allows you to control what address Samba will listen for connections on. This is used to support multiple virtual interfaces on the one server, each with a different configuration.
 
5453
.sp
 
5454
By default Samba will accept connections on any address.
 
5455
.sp
 
5456
Default:
 
5457
\fB\fIsocket address\fR = \fR
 
5458
.sp
 
5459
Example:
 
5460
\fB\fIsocket address\fR = 192.168.2.20 \fR
 
5461
.TP 3n
4007
5462
socket options (G)
4008
 
This option allows you to set socket options to be used when talking with the client\&.
4009
 
 
4010
 
Socket options are controls on the networking layer of the operating systems which allow the connection to be tuned\&.
4011
 
 
4012
 
This option will typically be used to tune your Samba server for optimal performance for your local network\&. There is no way that Samba can know what the optimal parameters are for your net, so you must experiment and choose them yourself\&. We strongly suggest you read the appropriate documentation for your operating system first (perhaps \fBman setsockopt\fR will help)\&.
4013
 
 
4014
 
You may find that on some systems Samba will say "Unknown socket option" when you supply an option\&. This means you either incorrectly typed it or you need to add an include file to includes\&.h for your OS\&. If the latter is the case please send the patch to samba\-technical@samba\&.org\&.
4015
 
 
4016
 
Any of the supported socket options may be combined in any way you like, as long as your OS allows it\&.
4017
 
 
 
5463
This option allows you to set socket options to be used when talking with the client.
 
5464
.sp
 
5465
Socket options are controls on the networking layer of the operating systems which allow the connection to be tuned.
 
5466
.sp
 
5467
This option will typically be used to tune your Samba server for optimal performance for your local network. There is no way that Samba can know what the optimal parameters are for your net, so you must experiment and choose them yourself. We strongly suggest you read the appropriate documentation for your operating system first (perhaps
 
5468
\fBman setsockopt\fR
 
5469
will help).
 
5470
.sp
 
5471
You may find that on some systems Samba will say "Unknown socket option" when you supply an option. This means you either incorrectly typed it or you need to add an include file to includes.h for your OS. If the latter is the case please send the patch to
 
5472
samba-technical@samba.org.
 
5473
.sp
 
5474
Any of the supported socket options may be combined in any way you like, as long as your OS allows it.
 
5475
.sp
4018
5476
This is the list of socket options currently settable using this option:
4019
 
 
4020
 
 
4021
 
.RS
4022
 
.TP 3
4023
 
\(bu
 
5477
.RS 3n
 
5478
.TP 3n
 
5479
&#8226;
4024
5480
SO_KEEPALIVE
4025
 
.TP
4026
 
\(bu
 
5481
.TP 3n
 
5482
&#8226;
4027
5483
SO_REUSEADDR
4028
 
.TP
4029
 
\(bu
 
5484
.TP 3n
 
5485
&#8226;
4030
5486
SO_BROADCAST
4031
 
.TP
4032
 
\(bu
 
5487
.TP 3n
 
5488
&#8226;
4033
5489
TCP_NODELAY
4034
 
.TP
4035
 
\(bu
 
5490
.TP 3n
 
5491
&#8226;
4036
5492
IPTOS_LOWDELAY
4037
 
.TP
4038
 
\(bu
 
5493
.TP 3n
 
5494
&#8226;
4039
5495
IPTOS_THROUGHPUT
4040
 
.TP
4041
 
\(bu
 
5496
.TP 3n
 
5497
&#8226;
4042
5498
SO_SNDBUF *
4043
 
.TP
4044
 
\(bu
 
5499
.TP 3n
 
5500
&#8226;
4045
5501
SO_RCVBUF *
4046
 
.TP
4047
 
\(bu
 
5502
.TP 3n
 
5503
&#8226;
4048
5504
SO_SNDLOWAT *
4049
 
.TP
4050
 
\(bu
 
5505
.TP 3n
 
5506
&#8226;
4051
5507
SO_RCVLOWAT *
4052
 
.LP
4053
5508
.RE
4054
 
.IP
4055
 
Those marked with a \fB'*'\fR take an integer argument\&. The others can optionally take a 1 or 0 argument to enable or disable the option, by default they will be enabled if you don't specify 1 or 0\&.
4056
 
 
4057
 
To specify an argument use the syntax SOME_OPTION = VALUE for example \fBSO_SNDBUF = 8192\fR\&. Note that you must not have any spaces before or after the = sign\&.
4058
 
 
 
5509
.IP "" 3n
 
5510
Those marked with a
 
5511
\fB'*'\fR
 
5512
take an integer argument. The others can optionally take a 1 or 0 argument to enable or disable the option, by default they will be enabled if you don't specify 1 or 0.
 
5513
.sp
 
5514
To specify an argument use the syntax SOME_OPTION = VALUE for example
 
5515
\fBSO_SNDBUF = 8192\fR. Note that you must not have any spaces before or after the = sign.
 
5516
.sp
4059
5517
If you are on a local network then a sensible option might be:
4060
 
 
 
5518
.sp
4061
5519
\fBsocket options = IPTOS_LOWDELAY\fR
4062
 
 
 
5520
.sp
4063
5521
If you have a local network then you could try:
4064
 
 
 
5522
.sp
4065
5523
\fBsocket options = IPTOS_LOWDELAY TCP_NODELAY\fR
4066
 
 
4067
 
If you are on a wide area network then perhaps try setting IPTOS_THROUGHPUT\&.
4068
 
 
4069
 
Note that several of the options may cause your Samba server to fail completely\&. Use these options with caution!
4070
 
 
4071
 
Default: \fB\fIsocket options\fR = TCP_NODELAY \fR 
4072
 
 
4073
 
Example: \fB\fIsocket options\fR = IPTOS_LOWDELAY \fR 
4074
 
 
4075
 
.TP
 
5524
.sp
 
5525
If you are on a wide area network then perhaps try setting IPTOS_THROUGHPUT.
 
5526
.sp
 
5527
Note that several of the options may cause your Samba server to fail completely. Use these options with caution!
 
5528
.sp
 
5529
Default:
 
5530
\fB\fIsocket options\fR = TCP_NODELAY \fR
 
5531
.sp
 
5532
Example:
 
5533
\fB\fIsocket options\fR = IPTOS_LOWDELAY \fR
 
5534
.TP 3n
4076
5535
stat cache (G)
4077
 
This parameter determines if \fBsmbd\fR(8) will use a cache in order to speed up case insensitive name mappings\&. You should never need to change this parameter\&.
4078
 
 
4079
 
Default: \fB\fIstat cache\fR = yes \fR 
4080
 
 
4081
 
.TP
 
5536
This parameter determines if
 
5537
\fBsmbd\fR(8)
 
5538
will use a cache in order to speed up case insensitive name mappings. You should never need to change this parameter.
 
5539
.sp
 
5540
Default:
 
5541
\fB\fIstat cache\fR = yes \fR
 
5542
.TP 3n
4082
5543
store dos attributes (S)
4083
 
If this parameter is set Samba attempts to first read DOS attributes (SYSTEM, HIDDEN, ARCHIVE or READ\-ONLY) from a filesystem extended attribute, before mapping DOS attributes to UNIX permission bits (such as occurs with map hidden and map readonly)\&. When set, DOS attributes will be stored onto an extended attribute in the UNIX filesystem, associated with the file or directory\&. For no other mapping to occur as a fall\-back, the parameters map hidden,map system, map archive and map readonly must be set to off\&. This parameter writes the DOS attributes as a string into the extended attribute named "user\&.DOSATTRIB"\&. This extended attribute is explicitly hidden from smbd clients requesting an EA list\&. On Linux the filesystem must have been mounted with the mount option user_xattr in order for extended attributes to work, also extended attributes must be compiled into the Linux kernel\&.
4084
 
 
4085
 
Default: \fB\fIstore dos attributes\fR = yes \fR 
4086
 
 
4087
 
.TP
 
5544
If this parameter is set Samba attempts to first read DOS attributes (SYSTEM, HIDDEN, ARCHIVE or READ-ONLY) from a filesystem extended attribute, before mapping DOS attributes to UNIX permission bits (such as occurs with
 
5545
map hidden and
 
5546
map readonly). When set, DOS attributes will be stored onto an extended attribute in the UNIX filesystem, associated with the file or directory. For no other mapping to occur as a fall-back, the parameters
 
5547
map hidden,
 
5548
map system,
 
5549
map archive and
 
5550
map readonly must be set to off. This parameter writes the DOS attributes as a string into the extended attribute named "user.DOSATTRIB". This extended attribute is explicitly hidden from smbd clients requesting an EA list. On Linux the filesystem must have been mounted with the mount option user_xattr in order for extended attributes to work, also extended attributes must be compiled into the Linux kernel.
 
5551
.sp
 
5552
Default:
 
5553
\fB\fIstore dos attributes\fR = yes \fR
 
5554
.TP 3n
4088
5555
strict allocate (S)
4089
 
This is a boolean that controls the handling of disk space allocation in the server\&. When this is set to \fByes\fR the server will change from UNIX behaviour of not committing real disk storage blocks when a file is extended to the Windows behaviour of actually forcing the disk system to allocate real storage blocks when a file is created or extended to be a given size\&. In UNIX terminology this means that Samba will stop creating sparse files\&. This can be slow on some systems\&.
4090
 
 
4091
 
When strict allocate is \fBno\fR the server does sparse disk block allocation when a file is extended\&.
4092
 
 
4093
 
Setting this to \fByes\fR can help Samba return out of quota messages on systems that are restricting the disk quota of users\&.
4094
 
 
4095
 
Default: \fB\fIstrict allocate\fR = no \fR 
4096
 
 
4097
 
.TP
 
5556
This is a boolean that controls the handling of disk space allocation in the server. When this is set to
 
5557
\fByes\fR
 
5558
the server will change from UNIX behaviour of not committing real disk storage blocks when a file is extended to the Windows behaviour of actually forcing the disk system to allocate real storage blocks when a file is created or extended to be a given size. In UNIX terminology this means that Samba will stop creating sparse files. This can be slow on some systems.
 
5559
.sp
 
5560
When strict allocate is
 
5561
\fBno\fR
 
5562
the server does sparse disk block allocation when a file is extended.
 
5563
.sp
 
5564
Setting this to
 
5565
\fByes\fR
 
5566
can help Samba return out of quota messages on systems that are restricting the disk quota of users.
 
5567
.sp
 
5568
Default:
 
5569
\fB\fIstrict allocate\fR = no \fR
 
5570
.TP 3n
4098
5571
strict locking (S)
4099
 
This is a boolean that controls the handling of file locking in the server\&. When this is set to \fByes\fR, the server will check every read and write access for file locks, and deny access if locks exist\&. This can be slow on some systems\&.
4100
 
 
4101
 
When strict locking is disabled, the server performs file lock checks only when the client explicitly asks for them\&.
4102
 
 
4103
 
Well\-behaved clients always ask for lock checks when it is important\&. So in the vast majority of cases,\fBstrict locking = no\fR is acceptable\&.
4104
 
 
4105
 
Default: \fB\fIstrict locking\fR = yes \fR 
4106
 
 
4107
 
.TP
 
5572
This is an enumerated type that controls the handling of file locking in the server. When this is set to
 
5573
\fByes\fR, the server will check every read and write access for file locks, and deny access if locks exist. This can be slow on some systems.
 
5574
.sp
 
5575
When strict locking is set to Auto (the default), the server performs file lock checks only on non-oplocked files. As most Windows redirectors perform file locking checks locally on oplocked files this is a good trade off for inproved performance.
 
5576
.sp
 
5577
When strict locking is disabled, the server performs file lock checks only when the client explicitly asks for them.
 
5578
.sp
 
5579
Well-behaved clients always ask for lock checks when it is important. So in the vast majority of cases,
 
5580
\fBstrict locking = Auto\fR
 
5581
or
 
5582
\fBstrict locking = no\fR
 
5583
is acceptable.
 
5584
.sp
 
5585
Default:
 
5586
\fB\fIstrict locking\fR = Auto \fR
 
5587
.TP 3n
4108
5588
strict sync (S)
4109
 
Many Windows applications (including the Windows 98 explorer shell) seem to confuse flushing buffer contents to disk with doing a sync to disk\&. Under UNIX, a sync call forces the process to be suspended until the kernel has ensured that all outstanding data in kernel disk buffers has been safely stored onto stable storage\&. This is very slow and should only be done rarely\&. Setting this parameter to \fBno\fR (the default) means that \fBsmbd\fR(8) ignores the Windows applications requests for a sync call\&. There is only a possibility of losing data if the operating system itself that Samba is running on crashes, so there is little danger in this default setting\&. In addition, this fixes many performance problems that people have reported with the new Windows98 explorer shell file copies\&.
4110
 
 
4111
 
Default: \fB\fIstrict sync\fR = no \fR 
4112
 
 
4113
 
.TP
 
5589
Many Windows applications (including the Windows 98 explorer shell) seem to confuse flushing buffer contents to disk with doing a sync to disk. Under UNIX, a sync call forces the process to be suspended until the kernel has ensured that all outstanding data in kernel disk buffers has been safely stored onto stable storage. This is very slow and should only be done rarely. Setting this parameter to
 
5590
\fBno\fR
 
5591
(the default) means that
 
5592
\fBsmbd\fR(8)
 
5593
ignores the Windows applications requests for a sync call. There is only a possibility of losing data if the operating system itself that Samba is running on crashes, so there is little danger in this default setting. In addition, this fixes many performance problems that people have reported with the new Windows98 explorer shell file copies.
 
5594
.sp
 
5595
Default:
 
5596
\fB\fIstrict sync\fR = no \fR
 
5597
.TP 3n
4114
5598
svcctl list (G)
4115
 
This option defines a list of init scripts that smbd will use for starting and stopping Unix services via the Win32 ServiceControl API\&. This allows Windows administrators to utilize the MS Management Console plug\-ins to manage a Unix server running Samba\&.
4116
 
 
4117
 
The administrator must create a directory name \fIsvcctl\fR in Samba's $(libdir) and create symbolic links to the init scripts in \fI/etc/init\&.d/\fR\&. The name of the links must match the names given as part of the \fIsvcctl list\fR\&.
4118
 
 
4119
 
Default: \fB\fIsvcctl list\fR = \fR 
4120
 
 
4121
 
Example: \fB\fIsvcctl list\fR = cups postfix portmap httpd \fR 
4122
 
 
4123
 
.TP
 
5599
This option defines a list of init scripts that smbd will use for starting and stopping Unix services via the Win32 ServiceControl API. This allows Windows administrators to utilize the MS Management Console plug-ins to manage a Unix server running Samba.
 
5600
.sp
 
5601
The administrator must create a directory name
 
5602
\fIsvcctl\fR
 
5603
in Samba's $(libdir) and create symbolic links to the init scripts in
 
5604
\fI/etc/init.d/\fR. The name of the links must match the names given as part of the
 
5605
\fIsvcctl list\fR.
 
5606
.sp
 
5607
Default:
 
5608
\fB\fIsvcctl list\fR = \fR
 
5609
.sp
 
5610
Example:
 
5611
\fB\fIsvcctl list\fR = cups postfix portmap httpd \fR
 
5612
.TP 3n
4124
5613
sync always (S)
4125
 
This is a boolean parameter that controls whether writes will always be written to stable storage before the write call returns\&. If this is \fBno\fR then the server will be guided by the client's request in each write call (clients can set a bit indicating that a particular write should be synchronous)\&. If this is \fByes\fR then every write will be followed by a \fBfsync() \fR call to ensure the data is written to disk\&. Note that the \fIstrict sync\fR parameter must be set to \fByes\fR in order for this parameter to have any affect\&.
4126
 
 
4127
 
Default: \fB\fIsync always\fR = no \fR 
4128
 
 
4129
 
.TP
 
5614
This is a boolean parameter that controls whether writes will always be written to stable storage before the write call returns. If this is
 
5615
\fBno\fR
 
5616
then the server will be guided by the client's request in each write call (clients can set a bit indicating that a particular write should be synchronous). If this is
 
5617
\fByes\fR
 
5618
then every write will be followed by a
 
5619
\fBfsync() \fR
 
5620
call to ensure the data is written to disk. Note that the
 
5621
\fIstrict sync\fR
 
5622
parameter must be set to
 
5623
\fByes\fR
 
5624
in order for this parameter to have any affect.
 
5625
.sp
 
5626
Default:
 
5627
\fB\fIsync always\fR = no \fR
 
5628
.TP 3n
4130
5629
syslog (G)
4131
 
This parameter maps how Samba debug messages are logged onto the system syslog logging levels\&. Samba debug level zero maps onto syslog \fBLOG_ERR\fR, debug level one maps onto \fBLOG_WARNING\fR, debug level two maps onto \fBLOG_NOTICE\fR, debug level three maps onto LOG_INFO\&. All higher levels are mapped to \fBLOG_DEBUG\fR\&.
4132
 
 
4133
 
This parameter sets the threshold for sending messages to syslog\&. Only messages with debug level less than this value will be sent to syslog\&.
4134
 
 
4135
 
Default: \fB\fIsyslog\fR = 1 \fR 
4136
 
 
4137
 
.TP
 
5630
This parameter maps how Samba debug messages are logged onto the system syslog logging levels. Samba debug level zero maps onto syslog
 
5631
\fBLOG_ERR\fR, debug level one maps onto
 
5632
\fBLOG_WARNING\fR, debug level two maps onto
 
5633
\fBLOG_NOTICE\fR, debug level three maps onto LOG_INFO. All higher levels are mapped to
 
5634
\fBLOG_DEBUG\fR.
 
5635
.sp
 
5636
This parameter sets the threshold for sending messages to syslog. Only messages with debug level less than this value will be sent to syslog.
 
5637
.sp
 
5638
Default:
 
5639
\fB\fIsyslog\fR = 1 \fR
 
5640
.TP 3n
4138
5641
syslog only (G)
4139
 
If this parameter is set then Samba debug messages are logged into the system syslog only, and not to the debug log files\&.
4140
 
 
4141
 
Default: \fB\fIsyslog only\fR = no \fR 
4142
 
 
4143
 
.TP
 
5642
If this parameter is set then Samba debug messages are logged into the system syslog only, and not to the debug log files.
 
5643
.sp
 
5644
Default:
 
5645
\fB\fIsyslog only\fR = no \fR
 
5646
.TP 3n
4144
5647
template homedir (G)
4145
 
When filling out the user information for a Windows NT user, the \fBwinbindd\fR(8) daemon uses this parameter to fill in the home directory for that user\&. If the string \fI%D\fR is present it is substituted with the user's Windows NT domain name\&. If the string \fI%U\fR is present it is substituted with the user's Windows NT user name\&.
4146
 
 
4147
 
Default: \fB\fItemplate homedir\fR = /home/%D/%U \fR 
4148
 
 
4149
 
.TP
 
5648
When filling out the user information for a Windows NT user, the
 
5649
\fBwinbindd\fR(8)
 
5650
daemon uses this parameter to fill in the home directory for that user. If the string
 
5651
\fI%D\fR
 
5652
is present it is substituted with the user's Windows NT domain name. If the string
 
5653
\fI%U\fR
 
5654
is present it is substituted with the user's Windows NT user name.
 
5655
.sp
 
5656
Default:
 
5657
\fB\fItemplate homedir\fR = /home/%D/%U \fR
 
5658
.TP 3n
4150
5659
template shell (G)
4151
 
When filling out the user information for a Windows NT user, the \fBwinbindd\fR(8) daemon uses this parameter to fill in the login shell for that user\&.
4152
 
 
 
5660
When filling out the user information for a Windows NT user, the
 
5661
\fBwinbindd\fR(8)
 
5662
daemon uses this parameter to fill in the login shell for that user.
 
5663
.sp
4153
5664
\fBNo default\fR
4154
 
 
4155
 
.TP
 
5665
.TP 3n
4156
5666
time offset (G)
4157
 
This parameter is a setting in minutes to add to the normal GMT to local time conversion\&. This is useful if you are serving a lot of PCs that have incorrect daylight saving time handling\&.
4158
 
 
4159
 
Default: \fB\fItime offset\fR = 0 \fR 
4160
 
 
4161
 
Example: \fB\fItime offset\fR = 60 \fR 
4162
 
 
4163
 
.TP
 
5667
This parameter is a setting in minutes to add to the normal GMT to local time conversion. This is useful if you are serving a lot of PCs that have incorrect daylight saving time handling.
 
5668
.sp
 
5669
Default:
 
5670
\fB\fItime offset\fR = 0 \fR
 
5671
.sp
 
5672
Example:
 
5673
\fB\fItime offset\fR = 60 \fR
 
5674
.TP 3n
4164
5675
time server (G)
4165
 
This parameter determines if \fBnmbd\fR(8) advertises itself as a time server to Windows clients\&.
4166
 
 
4167
 
Default: \fB\fItime server\fR = no \fR 
4168
 
 
4169
 
.TP
 
5676
This parameter determines if
 
5677
\fBnmbd\fR(8)
 
5678
advertises itself as a time server to Windows clients.
 
5679
.sp
 
5680
Default:
 
5681
\fB\fItime server\fR = no \fR
 
5682
.TP 3n
4170
5683
unix charset (G)
4171
 
Specifies the charset the unix machine Samba runs on uses\&. Samba needs to know this in order to be able to convert text to the charsets other SMB clients use\&.
4172
 
 
4173
 
This is also the charset Samba will use when specifying arguments to scripts that it invokes\&.
4174
 
 
4175
 
Default: \fB\fIunix charset\fR = UTF8 \fR 
4176
 
 
4177
 
Example: \fB\fIunix charset\fR = ASCII \fR 
4178
 
 
4179
 
.TP
 
5684
Specifies the charset the unix machine Samba runs on uses. Samba needs to know this in order to be able to convert text to the charsets other SMB clients use.
 
5685
.sp
 
5686
This is also the charset Samba will use when specifying arguments to scripts that it invokes.
 
5687
.sp
 
5688
Default:
 
5689
\fB\fIunix charset\fR = UTF8 \fR
 
5690
.sp
 
5691
Example:
 
5692
\fB\fIunix charset\fR = ASCII \fR
 
5693
.TP 3n
4180
5694
unix extensions (G)
4181
 
This boolean parameter controls whether Samba implments the CIFS UNIX extensions, as defined by HP\&. These extensions enable Samba to better serve UNIX CIFS clients by supporting features such as symbolic links, hard links, etc\&.\&.\&. These extensions require a similarly enabled client, and are of no current use to Windows clients\&.
4182
 
 
4183
 
Default: \fB\fIunix extensions\fR = yes \fR 
4184
 
 
4185
 
.TP
 
5695
This boolean parameter controls whether Samba implments the CIFS UNIX extensions, as defined by HP. These extensions enable Samba to better serve UNIX CIFS clients by supporting features such as symbolic links, hard links, etc... These extensions require a similarly enabled client, and are of no current use to Windows clients.
 
5696
.sp
 
5697
Default:
 
5698
\fB\fIunix extensions\fR = yes \fR
 
5699
.TP 3n
4186
5700
unix password sync (G)
4187
 
This boolean parameter controls whether Samba attempts to synchronize the UNIX password with the SMB password when the encrypted SMB password in the smbpasswd file is changed\&. If this is set to \fByes\fR the program specified in the \fIpasswd program\fRparameter is called \fBAS ROOT\fR \- to allow the new UNIX password to be set without access to the old UNIX password (as the SMB password change code has no access to the old password cleartext, only the new)\&.
4188
 
 
4189
 
Default: \fB\fIunix password sync\fR = no \fR 
4190
 
 
4191
 
.TP
 
5701
This boolean parameter controls whether Samba attempts to synchronize the UNIX password with the SMB password when the encrypted SMB password in the smbpasswd file is changed. If this is set to
 
5702
\fByes\fR
 
5703
the program specified in the
 
5704
\fIpasswd program\fRparameter is called
 
5705
\fBAS ROOT\fR
 
5706
- to allow the new UNIX password to be set without access to the old UNIX password (as the SMB password change code has no access to the old password cleartext, only the new).
 
5707
.sp
 
5708
Default:
 
5709
\fB\fIunix password sync\fR = no \fR
 
5710
.TP 3n
4192
5711
update encrypted (G)
4193
 
This boolean parameter allows a user logging on with a plaintext password to have their encrypted (hashed) password in the smbpasswd file to be updated automatically as they log on\&. This option allows a site to migrate from plaintext password authentication (users authenticate with plaintext password over the wire, and are checked against a UNIX account atabase) to encrypted password authentication (the SMB challenge/response authentication mechanism) without forcing all users to re\-enter their passwords via smbpasswd at the time the change is made\&. This is a convenience option to allow the change over to encrypted passwords to be made over a longer period\&. Once all users have encrypted representations of their passwords in the smbpasswd file this parameter should be set to \fBno\fR\&.
4194
 
 
4195
 
In order for this parameter to be operative the encrypt passwords parameter must be set to \fBno\fR\&. The default value of encrypt passwords = Yes\&. Note: This must be set to \fBno\fR for this update encrypted to work\&.
4196
 
 
4197
 
Note that even when this parameter is set a user authenticating to \fBsmbd\fR must still enter a valid password in order to connect correctly, and to update their hashed (smbpasswd) passwords\&.
4198
 
 
4199
 
Default: \fB\fIupdate encrypted\fR = no \fR 
4200
 
 
4201
 
.TP
 
5712
This boolean parameter allows a user logging on with a plaintext password to have their encrypted (hashed) password in the smbpasswd file to be updated automatically as they log on. This option allows a site to migrate from plaintext password authentication (users authenticate with plaintext password over the wire, and are checked against a UNIX account atabase) to encrypted password authentication (the SMB challenge/response authentication mechanism) without forcing all users to re-enter their passwords via smbpasswd at the time the change is made. This is a convenience option to allow the change over to encrypted passwords to be made over a longer period. Once all users have encrypted representations of their passwords in the smbpasswd file this parameter should be set to
 
5713
\fBno\fR.
 
5714
.sp
 
5715
In order for this parameter to be operative the
 
5716
encrypt passwords parameter must be set to
 
5717
\fBno\fR. The default value of
 
5718
encrypt passwords = Yes. Note: This must be set to
 
5719
\fBno\fR
 
5720
for this
 
5721
update encrypted to work.
 
5722
.sp
 
5723
Note that even when this parameter is set a user authenticating to
 
5724
\fBsmbd\fR
 
5725
must still enter a valid password in order to connect correctly, and to update their hashed (smbpasswd) passwords.
 
5726
.sp
 
5727
Default:
 
5728
\fB\fIupdate encrypted\fR = no \fR
 
5729
.TP 3n
4202
5730
use client driver (S)
4203
 
This parameter applies only to Windows NT/2000 clients\&. It has no effect on Windows 95/98/ME clients\&. When serving a printer to Windows NT/2000 clients without first installing a valid printer driver on the Samba host, the client will be required to install a local printer driver\&. From this point on, the client will treat the print as a local printer and not a network printer connection\&. This is much the same behavior that will occur when \fBdisable spoolss = yes\fR\&.
4204
 
 
4205
 
The differentiating factor is that under normal circumstances, the NT/2000 client will attempt to open the network printer using MS\-RPC\&. The problem is that because the client considers the printer to be local, it will attempt to issue the OpenPrinterEx() call requesting access rights associated with the logged on user\&. If the user possesses local administator rights but not root privilege on the Samba host (often the case), the OpenPrinterEx() call will fail\&. The result is that the client will now display an "Access Denied; Unable to connect" message in the printer queue window (even though jobs may successfully be printed)\&.
4206
 
 
4207
 
If this parameter is enabled for a printer, then any attempt to open the printer with the PRINTER_ACCESS_ADMINISTER right is mapped to PRINTER_ACCESS_USE instead\&. Thus allowing the OpenPrinterEx() call to succeed\&. \fBThis parameter MUST not be able enabled on a print share which has valid print driver installed on the Samba server\&.\fR
4208
 
 
4209
 
Default: \fB\fIuse client driver\fR = no \fR 
4210
 
 
4211
 
.TP
 
5731
This parameter applies only to Windows NT/2000 clients. It has no effect on Windows 95/98/ME clients. When serving a printer to Windows NT/2000 clients without first installing a valid printer driver on the Samba host, the client will be required to install a local printer driver. From this point on, the client will treat the print as a local printer and not a network printer connection. This is much the same behavior that will occur when
 
5732
\fBdisable spoolss = yes\fR.
 
5733
.sp
 
5734
The differentiating factor is that under normal circumstances, the NT/2000 client will attempt to open the network printer using MS-RPC. The problem is that because the client considers the printer to be local, it will attempt to issue the OpenPrinterEx() call requesting access rights associated with the logged on user. If the user possesses local administator rights but not root privilege on the Samba host (often the case), the OpenPrinterEx() call will fail. The result is that the client will now display an "Access Denied; Unable to connect" message in the printer queue window (even though jobs may successfully be printed).
 
5735
.sp
 
5736
If this parameter is enabled for a printer, then any attempt to open the printer with the PRINTER_ACCESS_ADMINISTER right is mapped to PRINTER_ACCESS_USE instead. Thus allowing the OpenPrinterEx() call to succeed.
 
5737
\fBThis parameter MUST not be able enabled on a print share which has valid print driver installed on the Samba server.\fR
 
5738
.sp
 
5739
Default:
 
5740
\fB\fIuse client driver\fR = no \fR
 
5741
.TP 3n
4212
5742
use kerberos keytab (G)
4213
 
Specifies whether Samba should attempt to maintain service principals in the systems keytab file for \fBhost/FQDN\fR and \fBcifs/FQDN\fR\&.
 
5743
Specifies whether Samba should attempt to maintain service principals in the systems keytab file for
 
5744
\fBhost/FQDN\fR
 
5745
and
 
5746
\fBcifs/FQDN\fR.
 
5747
.sp
 
5748
When you are using the heimdal Kerberos libraries, you must also specify the following in
 
5749
\fI/etc/krb5.conf\fR:
4214
5750
 
4215
 
When you are using the heimdal Kerberos libraries, you must also specify the following in\fI/etc/krb5\&.conf\fR: 
 
5751
.sp
4216
5752
.nf
4217
5753
 
4218
5754
[libdefaults]
4219
 
default_keytab_name = FILE:/etc/krb5\&.keytab
 
5755
default_keytab_name = FILE:/etc/krb5.keytab
4220
5756
.fi
4221
 
 
4222
 
 
4223
 
Default: \fB\fIuse kerberos keytab\fR = False \fR 
4224
 
 
4225
 
.TP
 
5757
 
 
5758
.sp
 
5759
Default:
 
5760
\fB\fIuse kerberos keytab\fR = False \fR
 
5761
.TP 3n
4226
5762
use mmap (G)
4227
 
This global parameter determines if the tdb internals of Samba can depend on mmap working correctly on the running system\&. Samba requires a coherent mmap/read\-write system memory cache\&. Currently only HPUX does not have such a coherent cache, and so this parameter is set to \fBno\fR by default on HPUX\&. On all other systems this parameter should be left alone\&. This parameter is provided to help the Samba developers track down problems with the tdb internal code\&.
4228
 
 
4229
 
Default: \fB\fIuse mmap\fR = yes \fR 
4230
 
 
4231
 
.TP
 
5763
This global parameter determines if the tdb internals of Samba can depend on mmap working correctly on the running system. Samba requires a coherent mmap/read-write system memory cache. Currently only HPUX does not have such a coherent cache, and so this parameter is set to
 
5764
\fBno\fR
 
5765
by default on HPUX. On all other systems this parameter should be left alone. This parameter is provided to help the Samba developers track down problems with the tdb internal code.
 
5766
.sp
 
5767
Default:
 
5768
\fB\fIuse mmap\fR = yes \fR
 
5769
.TP 3n
4232
5770
user
4233
 
This parameter is a synonym for username\&.
4234
 
 
4235
 
.TP
 
5771
This parameter is a synonym for username.
 
5772
.TP 3n
4236
5773
users
4237
 
This parameter is a synonym for username\&.
4238
 
 
4239
 
.TP
 
5774
This parameter is a synonym for username.
 
5775
.TP 3n
4240
5776
username (S)
4241
 
Multiple users may be specified in a comma\-delimited list, in which case the supplied password will be tested against each username in turn (left to right)\&.
4242
 
 
4243
 
The \fIusername\fR line is needed only when the PC is unable to supply its own username\&. This is the case for the COREPLUS protocol or where your users have different WfWg usernames to UNIX usernames\&. In both these cases you may also be better using the \\\\server\\share%user syntax instead\&.
4244
 
 
4245
 
The \fIusername\fR line is not a great solution in many cases as it means Samba will try to validate the supplied password against each of the usernames in the \fIusername\fR line in turn\&. This is slow and a bad idea for lots of users in case of duplicate passwords\&. You may get timeouts or security breaches using this parameter unwisely\&.
4246
 
 
4247
 
Samba relies on the underlying UNIX security\&. This parameter does not restrict who can login, it just offers hints to the Samba server as to what usernames might correspond to the supplied password\&. Users can login as whoever they please and they will be able to do no more damage than if they started a telnet session\&. The daemon runs as the user that they log in as, so they cannot do anything that user cannot do\&.
4248
 
 
4249
 
To restrict a service to a particular set of users you can use the valid users parameter\&.
4250
 
 
4251
 
If any of the usernames begin with a '@' then the name will be looked up first in the NIS netgroups list (if Samba is compiled with netgroup support), followed by a lookup in the UNIX groups database and will expand to a list of all users in the group of that name\&.
4252
 
 
4253
 
If any of the usernames begin with a '+' then the name will be looked up only in the UNIX groups database and will expand to a list of all users in the group of that name\&.
4254
 
 
4255
 
If any of the usernames begin with a '&' then the name will be looked up only in the NIS netgroups database (if Samba is compiled with netgroup support) and will expand to a list of all users in the netgroup group of that name\&.
4256
 
 
4257
 
Note that searching though a groups database can take quite some time, and some clients may time out during the search\&.
4258
 
 
4259
 
See the section NOTE ABOUT USERNAME/PASSWORD VALIDATION for more information on how this parameter determines access to the services\&.
4260
 
 
4261
 
Default: \fB\fIusername\fR = # The guest account if a guest service, else <empty string>\&. \fR 
4262
 
 
4263
 
Example: \fB\fIusername\fR = fred, mary, jack, jane, @users, @pcgroup \fR 
4264
 
 
4265
 
.TP
 
5777
Multiple users may be specified in a comma-delimited list, in which case the supplied password will be tested against each username in turn (left to right).
 
5778
.sp
 
5779
The
 
5780
\fIusername\fR
 
5781
line is needed only when the PC is unable to supply its own username. This is the case for the COREPLUS protocol or where your users have different WfWg usernames to UNIX usernames. In both these cases you may also be better using the \\server\share%user syntax instead.
 
5782
.sp
 
5783
The
 
5784
\fIusername\fR
 
5785
line is not a great solution in many cases as it means Samba will try to validate the supplied password against each of the usernames in the
 
5786
\fIusername\fR
 
5787
line in turn. This is slow and a bad idea for lots of users in case of duplicate passwords. You may get timeouts or security breaches using this parameter unwisely.
 
5788
.sp
 
5789
Samba relies on the underlying UNIX security. This parameter does not restrict who can login, it just offers hints to the Samba server as to what usernames might correspond to the supplied password. Users can login as whoever they please and they will be able to do no more damage than if they started a telnet session. The daemon runs as the user that they log in as, so they cannot do anything that user cannot do.
 
5790
.sp
 
5791
To restrict a service to a particular set of users you can use the
 
5792
valid users parameter.
 
5793
.sp
 
5794
If any of the usernames begin with a '@' then the name will be looked up first in the NIS netgroups list (if Samba is compiled with netgroup support), followed by a lookup in the UNIX groups database and will expand to a list of all users in the group of that name.
 
5795
.sp
 
5796
If any of the usernames begin with a '+' then the name will be looked up only in the UNIX groups database and will expand to a list of all users in the group of that name.
 
5797
.sp
 
5798
If any of the usernames begin with a '&' then the name will be looked up only in the NIS netgroups database (if Samba is compiled with netgroup support) and will expand to a list of all users in the netgroup group of that name.
 
5799
.sp
 
5800
Note that searching though a groups database can take quite some time, and some clients may time out during the search.
 
5801
.sp
 
5802
See the section
 
5803
NOTE ABOUT USERNAME/PASSWORD VALIDATION
 
5804
for more information on how this parameter determines access to the services.
 
5805
.sp
 
5806
Default:
 
5807
\fB\fIusername\fR = # The guest account if a guest service, else <empty string>. \fR
 
5808
.sp
 
5809
Example:
 
5810
\fB\fIusername\fR = fred, mary, jack, jane, @users, @pcgroup \fR
 
5811
.TP 3n
4266
5812
username level (G)
4267
 
This option helps Samba to try and 'guess' at the real UNIX username, as many DOS clients send an all\-uppercase username\&. By default Samba tries all lowercase, followed by the username with the first letter capitalized, and fails if the username is not found on the UNIX machine\&.
4268
 
 
4269
 
If this parameter is set to non\-zero the behavior changes\&. This parameter is a number that specifies the number of uppercase combinations to try while trying to determine the UNIX user name\&. The higher the number the more combinations will be tried, but the slower the discovery of usernames will be\&. Use this parameter when you have strange usernames on your UNIX machine, such as \fBAstrangeUser \fR\&.
4270
 
 
4271
 
This parameter is needed only on UNIX systems that have case sensitive usernames\&.
4272
 
 
4273
 
Default: \fB\fIusername level\fR = 0 \fR 
4274
 
 
4275
 
Example: \fB\fIusername level\fR = 5 \fR 
4276
 
 
4277
 
.TP
 
5813
This option helps Samba to try and 'guess' at the real UNIX username, as many DOS clients send an all-uppercase username. By default Samba tries all lowercase, followed by the username with the first letter capitalized, and fails if the username is not found on the UNIX machine.
 
5814
.sp
 
5815
If this parameter is set to non-zero the behavior changes. This parameter is a number that specifies the number of uppercase combinations to try while trying to determine the UNIX user name. The higher the number the more combinations will be tried, but the slower the discovery of usernames will be. Use this parameter when you have strange usernames on your UNIX machine, such as
 
5816
\fBAstrangeUser \fR.
 
5817
.sp
 
5818
This parameter is needed only on UNIX systems that have case sensitive usernames.
 
5819
.sp
 
5820
Default:
 
5821
\fB\fIusername level\fR = 0 \fR
 
5822
.sp
 
5823
Example:
 
5824
\fB\fIusername level\fR = 5 \fR
 
5825
.TP 3n
4278
5826
username map (G)
4279
 
This option allows you to specify a file containing a mapping of usernames from the clients to the server\&. This can be used for several purposes\&. The most common is to map usernames that users use on DOS or Windows machines to those that the UNIX box uses\&. The other is to map multiple users to a single username so that they can more easily share files\&.
4280
 
 
4281
 
Please note that for user or share mode security, the username map is applied prior to validating the user credentials\&. Domain member servers (domain or ads) apply the username map after the user has been successfully authenticated by the domain controller and require fully qualified enties in the map table (e\&.g\&. biddle = DOMAIN\\foo)\&.
4282
 
 
4283
 
The map file is parsed line by line\&. Each line should contain a single UNIX username on the left then a '=' followed by a list of usernames on the right\&. The list of usernames on the right may contain names of the form @group in which case they will match any UNIX username in that group\&. The special client name '*' is a wildcard and matches any name\&. Each line of the map file may be up to 1023 characters long\&.
4284
 
 
4285
 
The file is processed on each line by taking the supplied username and comparing it with each username on the right hand side of the '=' signs\&. If the supplied name matches any of the names on the right hand side then it is replaced with the name on the left\&. Processing then continues with the next line\&.
4286
 
 
4287
 
If any line begins with a '#' or a ';' then it is ignored\&.
4288
 
 
4289
 
If any line begins with an '!' then the processing will stop after that line if a mapping was done by the line\&. Otherwise mapping continues with every line being processed\&. Using '!' is most useful when you have a wildcard mapping line later in the file\&.
4290
 
 
4291
 
For example to map from the name \fBadmin\fR or \fBadministrator\fR to the UNIX name \fB root\fR you would use: 
 
5827
This option allows you to specify a file containing a mapping of usernames from the clients to the server. This can be used for several purposes. The most common is to map usernames that users use on DOS or Windows machines to those that the UNIX box uses. The other is to map multiple users to a single username so that they can more easily share files.
 
5828
.sp
 
5829
Please note that for user or share mode security, the username map is applied prior to validating the user credentials. Domain member servers (domain or ads) apply the username map after the user has been successfully authenticated by the domain controller and require fully qualified enties in the map table (e.g. biddle = DOMAIN\foo).
 
5830
.sp
 
5831
The map file is parsed line by line. Each line should contain a single UNIX username on the left then a '=' followed by a list of usernames on the right. The list of usernames on the right may contain names of the form @group in which case they will match any UNIX username in that group. The special client name '*' is a wildcard and matches any name. Each line of the map file may be up to 1023 characters long.
 
5832
.sp
 
5833
The file is processed on each line by taking the supplied username and comparing it with each username on the right hand side of the '=' signs. If the supplied name matches any of the names on the right hand side then it is replaced with the name on the left. Processing then continues with the next line.
 
5834
.sp
 
5835
If any line begins with a '#' or a ';' then it is ignored.
 
5836
.sp
 
5837
If any line begins with an '!' then the processing will stop after that line if a mapping was done by the line. Otherwise mapping continues with every line being processed. Using '!' is most useful when you have a wildcard mapping line later in the file.
 
5838
.sp
 
5839
For example to map from the name
 
5840
\fBadmin\fR
 
5841
or
 
5842
\fBadministrator\fR
 
5843
to the UNIX name
 
5844
\fB root\fR
 
5845
you would use:
 
5846
 
 
5847
.sp
4292
5848
.nf
4293
5849
 
4294
5850
\fBroot = admin administrator\fR
4295
5851
.fi
4296
 
 Or to map anyone in the UNIX group \fBsystem\fR to the UNIX name \fBsys\fR you would use: 
 
5852
Or to map anyone in the UNIX group
 
5853
\fBsystem\fR
 
5854
to the UNIX name
 
5855
\fBsys\fR
 
5856
you would use:
 
5857
 
 
5858
.sp
4297
5859
.nf
4298
5860
 
4299
5861
\fBsys = @system\fR
4300
5862
.fi
4301
 
 
4302
 
 
4303
 
You can have as many mappings as you like in a username map file\&.
4304
 
 
4305
 
If your system supports the NIS NETGROUP option then the netgroup database is checked before the \fI/etc/group \fR database for matching groups\&.
4306
 
 
4307
 
You can map Windows usernames that have spaces in them by using double quotes around the name\&. For example: 
 
5863
 
 
5864
.sp
 
5865
You can have as many mappings as you like in a username map file.
 
5866
.sp
 
5867
If your system supports the NIS NETGROUP option then the netgroup database is checked before the
 
5868
\fI/etc/group \fR
 
5869
database for matching groups.
 
5870
.sp
 
5871
You can map Windows usernames that have spaces in them by using double quotes around the name. For example:
 
5872
 
 
5873
.sp
4308
5874
.nf
4309
5875
 
4310
5876
\fBtridge = "Andrew Tridgell"\fR
4311
5877
.fi
4312
 
 would map the windows username "Andrew Tridgell" to the unix username "tridge"\&.
 
5878
would map the windows username "Andrew Tridgell" to the unix username "tridge".
 
5879
.sp
 
5880
The following example would map mary and fred to the unix user sys, and map the rest to guest. Note the use of the '!' to tell Samba to stop processing if it gets a match on that line:
4313
5881
 
4314
 
The following example would map mary and fred to the unix user sys, and map the rest to guest\&. Note the use of the '!' to tell Samba to stop processing if it gets a match on that line: 
 
5882
.sp
4315
5883
.nf
4316
5884
 
4317
5885
!sys = mary fred
4318
5886
guest = *
4319
5887
.fi
4320
 
 
4321
 
 
4322
 
Note that the remapping is applied to all occurrences of usernames\&. Thus if you connect to \\\\server\\fred and\fBfred\fR is remapped to \fBmary\fR then you will actually be connecting to \\\\server\\mary and will need to supply a password suitable for \fBmary\fR not\fBfred\fR\&. The only exception to this is the username passed to the password server (if you have one)\&. The password server will receive whatever username the client supplies without modification\&.
4323
 
 
4324
 
Also note that no reverse mapping is done\&. The main effect this has is with printing\&. Users who have been mapped may have trouble deleting print jobs as PrintManager under WfWg will think they don't own the print job\&.
4325
 
 
4326
 
Samba versions prior to 3\&.0\&.8 would only support reading the fully qualified username (e\&.g\&.: DOMAIN\\user) from the username map when performing a kerberos login from a client\&. However, when looking up a map entry for a user authenticated by NTLM[SSP], only the login name would be used for matches\&. This resulted in inconsistent behavior sometimes even on the same server\&.
4327
 
 
4328
 
The following functionality is obeyed in version 3\&.0\&.8 and later:
4329
 
 
4330
 
When performing local authentication, the username map is applied to the login name before attempting to authenticate the connection\&.
4331
 
 
4332
 
When relying upon a external domain controller for validating authentication requests, smbd will apply the username map to the fully qualified username (i\&.e\&. DOMAIN\\user) only after the user has been successfully authenticated\&.
4333
 
 
4334
 
An example of use is: 
 
5888
 
 
5889
.sp
 
5890
Note that the remapping is applied to all occurrences of usernames. Thus if you connect to \\server\fred and
 
5891
\fBfred\fR
 
5892
is remapped to
 
5893
\fBmary\fR
 
5894
then you will actually be connecting to \\server\mary and will need to supply a password suitable for
 
5895
\fBmary\fR
 
5896
not
 
5897
\fBfred\fR. The only exception to this is the username passed to the
 
5898
password server (if you have one). The password server will receive whatever username the client supplies without modification.
 
5899
.sp
 
5900
Also note that no reverse mapping is done. The main effect this has is with printing. Users who have been mapped may have trouble deleting print jobs as PrintManager under WfWg will think they don't own the print job.
 
5901
.sp
 
5902
Samba versions prior to 3.0.8 would only support reading the fully qualified username (e.g.: DOMAIN\user) from the username map when performing a kerberos login from a client. However, when looking up a map entry for a user authenticated by NTLM[SSP], only the login name would be used for matches. This resulted in inconsistent behavior sometimes even on the same server.
 
5903
.sp
 
5904
The following functionality is obeyed in version 3.0.8 and later:
 
5905
.sp
 
5906
When performing local authentication, the username map is applied to the login name before attempting to authenticate the connection.
 
5907
.sp
 
5908
When relying upon a external domain controller for validating authentication requests, smbd will apply the username map to the fully qualified username (i.e. DOMAIN\user) only after the user has been successfully authenticated.
 
5909
.sp
 
5910
An example of use is:
 
5911
 
 
5912
.sp
4335
5913
.nf
4336
5914
 
4337
 
username map = /usr/local/samba/lib/users\&.map
 
5915
username map = /usr/local/samba/lib/users.map
4338
5916
.fi
4339
 
 
4340
 
 
4341
 
Default: \fB\fIusername map\fR = # no username map \fR 
4342
 
 
4343
 
.TP
 
5917
 
 
5918
.sp
 
5919
Default:
 
5920
\fB\fIusername map\fR = # no username map \fR
 
5921
.TP 3n
4344
5922
username map script (G)
4345
 
This script is a mutually exclusive alternative to theusername map parameter\&. This parameter specifies and external program or script that must accept a single command line option (the username transmitted in the authentication request) and return a line line on standard output (the name to which the account should mapped)\&. In this way, it is possible to store username map tables in an LDAP or NIS directory services\&.
4346
 
 
4347
 
Default: \fB\fIusername map script\fR = \fR 
4348
 
 
4349
 
Example: \fB\fIusername map script\fR = /etc/samba/scripts/mapusers\&.sh \fR 
4350
 
 
4351
 
.TP
 
5923
This script is a mutually exclusive alternative to the
 
5924
username map parameter. This parameter specifies and external program or script that must accept a single command line option (the username transmitted in the authentication request) and return a line line on standard output (the name to which the account should mapped). In this way, it is possible to store username map tables in an LDAP or NIS directory services.
 
5925
.sp
 
5926
Default:
 
5927
\fB\fIusername map script\fR = \fR
 
5928
.sp
 
5929
Example:
 
5930
\fB\fIusername map script\fR = /etc/samba/scripts/mapusers.sh \fR
 
5931
.TP 3n
 
5932
usershare allow guests (G)
 
5933
This parameter controls whether user defined shares are allowed to be accessed by non-authenticated users or not. It is the equivalent of allowing people who can create a share the option of setting
 
5934
\fIguest ok = yes\fR
 
5935
in a share definition. Due to the security sensitive nature of this the default is set to off.
 
5936
.sp
 
5937
Default:
 
5938
\fB\fIusershare allow guests\fR = no \fR
 
5939
.TP 3n
 
5940
usershare max shares (G)
 
5941
This parameter specifies the number of user defined shares that are allowed to be created by users belonging to the group owning the usershare directory. If set to zero (the default) user defined shares are ignored.
 
5942
.sp
 
5943
Default:
 
5944
\fB\fIusershare max shares\fR = 0 \fR
 
5945
.TP 3n
 
5946
usershare owner only (G)
 
5947
This parameter controls whether the pathname exported by a user defined shares must be owned by the user creating the user defined share or not. If set to True (the default) then smbd checks that the directory path being shared is owned by the user who owns the usershare file defining this share and refuses to create the share if not. If set to False then no such check is performed and any directory path may be exported regardless of who owns it.
 
5948
.sp
 
5949
Default:
 
5950
\fB\fIusershare owner only\fR = True \fR
 
5951
.TP 3n
 
5952
usershare path (G)
 
5953
This parameter specifies the absolute path of the directory on the filesystem used to store the user defined share definition files. This directory must be owned by root, and have no access for other, and be writable only by the group owner. In addition the "sticky" bit must also be set, restricting rename and delete to owners of a file (in the same way the /tmp directory is usually configured). Members of the group owner of this directory are the users allowed to create usershares. If this parameter is undefined then no user defined shares are allowed.
 
5954
.sp
 
5955
For example, a valid usershare directory might be /usr/local/samba/lib/usershares, set up as follows.
 
5956
.sp
 
5957
 
 
5958
 
 
5959
.sp
 
5960
.nf
 
5961
 
 
5962
        ls -ld /usr/local/samba/lib/usershares/
 
5963
        drwxrwx--T  2 root power_users 4096 2006-05-05 12:27 /usr/local/samba/lib/usershares/
 
5964
        .fi
 
5965
 
 
5966
.sp
 
5967
In this case, only members of the group "power_users" can create user defined shares.
 
5968
.sp
 
5969
Default:
 
5970
\fB\fIusershare path\fR = NULL \fR
 
5971
.TP 3n
 
5972
usershare prefix allow list (G)
 
5973
This parameter specifies a list of absolute pathnames the root of which are allowed to be exported by user defined share definitions. If the pathname exported doesn't start with one of the strings in this list the user defined share will not be allowed. This allows the Samba administrator to restrict the directories on the system that can be exported by user defined shares.
 
5974
.sp
 
5975
If there is a "usershare prefix deny list" and also a "usershare prefix allow list" the deny list is processed first, followed by the allow list, thus leading to the most restrictive interpretation.
 
5976
.sp
 
5977
Default:
 
5978
\fB\fIusershare prefix allow list\fR = NULL \fR
 
5979
.sp
 
5980
Example:
 
5981
\fB\fIusershare prefix allow list\fR = /home /data /space \fR
 
5982
.TP 3n
 
5983
usershare prefix deny list (G)
 
5984
This parameter specifies a list of absolute pathnames the root of which are NOT allowed to be exported by user defined share definitions. If the pathname exported starts with one of the strings in this list the user defined share will not be allowed. Any pathname not starting with one of these strings will be allowed to be exported as a usershare. This allows the Samba administrator to restrict the directories on the system that can be exported by user defined shares.
 
5985
.sp
 
5986
If there is a "usershare prefix deny list" and also a "usershare prefix allow list" the deny list is processed first, followed by the allow list, thus leading to the most restrictive interpretation.
 
5987
.sp
 
5988
Default:
 
5989
\fB\fIusershare prefix deny list\fR = NULL \fR
 
5990
.sp
 
5991
Example:
 
5992
\fB\fIusershare prefix deny list\fR = /etc /dev /private \fR
 
5993
.TP 3n
 
5994
usershare template share (G)
 
5995
User defined shares only have limited possible parameters such as path, guest ok etc. This parameter allows usershares to "cloned" from an existing share. If "usershare template share" is set to the name of an existing share, then all usershares created have their defaults set from the parameters set on this share.
 
5996
.sp
 
5997
The target share may be set to be invalid for real file sharing by setting the parameter "-valid = False" on the template share definition. This causes it not to be seen as a real exported share but to be able to be used as a template for usershares.
 
5998
.sp
 
5999
Default:
 
6000
\fB\fIusershare template share\fR = NULL \fR
 
6001
.sp
 
6002
Example:
 
6003
\fB\fIusershare template share\fR = template_share \fR
 
6004
.TP 3n
4352
6005
use sendfile (S)
4353
 
If this parameter is \fByes\fR, and the \fBsendfile()\fR system call is supported by the underlying operating system, then some SMB read calls (mainly ReadAndX and ReadRaw) will use the more efficient sendfile system call for files that are exclusively oplocked\&. This may make more efficient use of the system CPU's and cause Samba to be faster\&. Samba automatically turns this off for clients that use protocol levels lower than NT LM 0\&.12 and when it detects a client is Windows 9x (using sendfile from Linux will cause these clients to fail)\&.
4354
 
 
4355
 
Default: \fB\fIuse sendfile\fR = false \fR 
4356
 
 
4357
 
.TP
 
6006
If this parameter is
 
6007
\fByes\fR, and the
 
6008
\fBsendfile()\fR
 
6009
system call is supported by the underlying operating system, then some SMB read calls (mainly ReadAndX and ReadRaw) will use the more efficient sendfile system call for files that are exclusively oplocked. This may make more efficient use of the system CPU's and cause Samba to be faster. Samba automatically turns this off for clients that use protocol levels lower than NT LM 0.12 and when it detects a client is Windows 9x (using sendfile from Linux will cause these clients to fail).
 
6010
.sp
 
6011
Default:
 
6012
\fB\fIuse sendfile\fR = false \fR
 
6013
.TP 3n
4358
6014
use spnego (G)
4359
 
This variable controls controls whether samba will try to use Simple and Protected NEGOciation (as specified by rfc2478) with WindowsXP and Windows2000 clients to agree upon an authentication mechanism\&.
4360
 
 
4361
 
Unless further issues are discovered with our SPNEGO implementation, there is no reason this should ever be disabled\&.
4362
 
 
4363
 
Default: \fB\fIuse spnego\fR = yes \fR 
4364
 
 
4365
 
.TP
 
6015
This variable controls controls whether samba will try to use Simple and Protected NEGOciation (as specified by rfc2478) with WindowsXP and Windows2000 clients to agree upon an authentication mechanism.
 
6016
.sp
 
6017
Unless further issues are discovered with our SPNEGO implementation, there is no reason this should ever be disabled.
 
6018
.sp
 
6019
Default:
 
6020
\fB\fIuse spnego\fR = yes \fR
 
6021
.TP 3n
4366
6022
utmp (G)
4367
 
This boolean parameter is only available if Samba has been configured and compiled with the option \fB\-\-with\-utmp\fR\&. If set to\fByes\fR then Samba will attempt to add utmp or utmpx records (depending on the UNIX system) whenever a connection is made to a Samba server\&. Sites may use this to record the user connecting to a Samba share\&.
4368
 
 
4369
 
Due to the requirements of the utmp record, we are required to create a unique identifier for the incoming user\&. Enabling this option creates an n^2 algorithm to find this number\&. This may impede performance on large installations\&.
4370
 
 
4371
 
Default: \fB\fIutmp\fR = no \fR 
4372
 
 
4373
 
.TP
 
6023
This boolean parameter is only available if Samba has been configured and compiled with the option
 
6024
\fB--with-utmp\fR. If set to
 
6025
\fByes\fR
 
6026
then Samba will attempt to add utmp or utmpx records (depending on the UNIX system) whenever a connection is made to a Samba server. Sites may use this to record the user connecting to a Samba share.
 
6027
.sp
 
6028
Due to the requirements of the utmp record, we are required to create a unique identifier for the incoming user. Enabling this option creates an n^2 algorithm to find this number. This may impede performance on large installations.
 
6029
.sp
 
6030
Default:
 
6031
\fB\fIutmp\fR = no \fR
 
6032
.TP 3n
4374
6033
utmp directory (G)
4375
 
This parameter is only available if Samba has been configured and compiled with the option \fB \-\-with\-utmp\fR\&. It specifies a directory pathname that is used to store the utmp or utmpx files (depending on the UNIX system) that record user connections to a Samba server\&. By default this is not set, meaning the system will use whatever utmp file the native system is set to use (usually\fI/var/run/utmp\fR on Linux)\&.
4376
 
 
4377
 
Default: \fB\fIutmp directory\fR = # Determined automatically \fR 
4378
 
 
4379
 
Example: \fB\fIutmp directory\fR = /var/run/utmp \fR 
4380
 
 
4381
 
.TP
4382
 
\-valid (S)
4383
 
This parameter indicates whether a share is valid and thus can be used\&. When this parameter is set to false, the share will be in no way visible nor accessible\&.
4384
 
 
4385
 
This option should not be used by regular users but might be of help to developers\&. Samba uses this option internally to mark shares as deleted\&.
4386
 
 
4387
 
Default: \fB\fI\-valid\fR = yes \fR 
4388
 
 
4389
 
.TP
 
6034
This parameter is only available if Samba has been configured and compiled with the option
 
6035
\fB --with-utmp\fR. It specifies a directory pathname that is used to store the utmp or utmpx files (depending on the UNIX system) that record user connections to a Samba server. By default this is not set, meaning the system will use whatever utmp file the native system is set to use (usually
 
6036
\fI/var/run/utmp\fR
 
6037
on Linux).
 
6038
.sp
 
6039
Default:
 
6040
\fB\fIutmp directory\fR = # Determined automatically \fR
 
6041
.sp
 
6042
Example:
 
6043
\fB\fIutmp directory\fR = /var/run/utmp \fR
 
6044
.TP 3n
 
6045
-valid (S)
 
6046
This parameter indicates whether a share is valid and thus can be used. When this parameter is set to false, the share will be in no way visible nor accessible.
 
6047
.sp
 
6048
This option should not be used by regular users but might be of help to developers. Samba uses this option internally to mark shares as deleted.
 
6049
.sp
 
6050
Default:
 
6051
\fB\fI-valid\fR = yes \fR
 
6052
.TP 3n
4390
6053
valid users (S)
4391
 
This is a list of users that should be allowed to login to this service\&. Names starting with '@', '+' and '&' are interpreted using the same rules as described in the \fIinvalid users\fR parameter\&.
4392
 
 
4393
 
If this is empty (the default) then any user can login\&. If a username is in both this list and the \fIinvalid users\fR list then access is denied for that user\&.
4394
 
 
4395
 
The current servicename is substituted for \fI%S\fR\&. This is useful in the [homes] section\&.
4396
 
 
4397
 
Default: \fB\fIvalid users\fR = # No valid users list (anyone can login) \fR 
4398
 
 
4399
 
Example: \fB\fIvalid users\fR = greg, @pcusers \fR 
4400
 
 
4401
 
.TP
 
6054
This is a list of users that should be allowed to login to this service. Names starting with '@', '+' and '&' are interpreted using the same rules as described in the
 
6055
\fIinvalid users\fR
 
6056
parameter.
 
6057
.sp
 
6058
If this is empty (the default) then any user can login. If a username is in both this list and the
 
6059
\fIinvalid users\fR
 
6060
list then access is denied for that user.
 
6061
.sp
 
6062
The current servicename is substituted for
 
6063
\fI%S\fR. This is useful in the [homes] section.
 
6064
.sp
 
6065
Default:
 
6066
\fB\fIvalid users\fR = # No valid users list (anyone can login) \fR
 
6067
.sp
 
6068
Example:
 
6069
\fB\fIvalid users\fR = greg, @pcusers \fR
 
6070
.TP 3n
4402
6071
veto files (S)
4403
 
This is a list of files and directories that are neither visible nor accessible\&. Each entry in the list must be separated by a '/', which allows spaces to be included in the entry\&. '*' and '?' can be used to specify multiple files or directories as in DOS wildcards\&.
4404
 
 
4405
 
Each entry must be a unix path, not a DOS path and must \fBnot\fR include the unix directory separator '/'\&.
4406
 
 
4407
 
Note that the case sensitive option is applicable in vetoing files\&.
4408
 
 
4409
 
One feature of the veto files parameter that it is important to be aware of is Samba's behaviour when trying to delete a directory\&. If a directory that is to be deleted contains nothing but veto files this deletion will \fBfail\fR unless you also set the delete veto files parameter to \fIyes\fR\&.
4410
 
 
4411
 
Setting this parameter will affect the performance of Samba, as it will be forced to check all files and directories for a match as they are scanned\&.
4412
 
 
4413
 
Examples of use include: 
 
6072
This is a list of files and directories that are neither visible nor accessible. Each entry in the list must be separated by a '/', which allows spaces to be included in the entry. '*' and '?' can be used to specify multiple files or directories as in DOS wildcards.
 
6073
.sp
 
6074
Each entry must be a unix path, not a DOS path and must
 
6075
\fBnot\fR
 
6076
include the unix directory separator '/'.
 
6077
.sp
 
6078
Note that the
 
6079
case sensitive option is applicable in vetoing files.
 
6080
.sp
 
6081
One feature of the veto files parameter that it is important to be aware of is Samba's behaviour when trying to delete a directory. If a directory that is to be deleted contains nothing but veto files this deletion will
 
6082
\fBfail\fR
 
6083
unless you also set the
 
6084
delete veto files parameter to
 
6085
\fIyes\fR.
 
6086
.sp
 
6087
Setting this parameter will affect the performance of Samba, as it will be forced to check all files and directories for a match as they are scanned.
 
6088
.sp
 
6089
Examples of use include:
 
6090
 
 
6091
.sp
4414
6092
.nf
4415
6093
 
4416
6094
; Veto any files containing the word Security,
4417
 
; any ending in \&.tmp, and any directory containing the
4418
 
; word root\&.
4419
 
veto files = /*Security*/*\&.tmp/*root*/
 
6095
; any ending in .tmp, and any directory containing the
 
6096
; word root.
 
6097
veto files = /*Security*/*.tmp/*root*/
4420
6098
 
4421
6099
; Veto the Apple specific files that a NetAtalk server
4422
 
; creates\&.
4423
 
veto files = /\&.AppleDouble/\&.bin/\&.AppleDesktop/Network Trash Folder/
 
6100
; creates.
 
6101
veto files = /.AppleDouble/.bin/.AppleDesktop/Network Trash Folder/
4424
6102
.fi
4425
 
 
4426
 
 
4427
 
Default: \fB\fIveto files\fR = No files or directories are vetoed\&. \fR 
4428
 
 
4429
 
.TP
 
6103
 
 
6104
.sp
 
6105
Default:
 
6106
\fB\fIveto files\fR = No files or directories are vetoed. \fR
 
6107
.TP 3n
4430
6108
veto oplock files (S)
4431
 
This parameter is only valid when the oplocks parameter is turned on for a share\&. It allows the Samba administrator to selectively turn off the granting of oplocks on selected files that match a wildcarded list, similar to the wildcarded list used in theveto files parameter\&.
4432
 
 
4433
 
You might want to do this on files that you know will be heavily contended for by clients\&. A good example of this is in the NetBench SMB benchmark program, which causes heavy client contention for files ending in\fI\&.SEM\fR\&. To cause Samba not to grant oplocks on these files you would use the line (either in the [global] section or in the section for the particular NetBench share\&.
4434
 
 
4435
 
An example of use is: 
 
6109
This parameter is only valid when the
 
6110
oplocks parameter is turned on for a share. It allows the Samba administrator to selectively turn off the granting of oplocks on selected files that match a wildcarded list, similar to the wildcarded list used in the
 
6111
veto files parameter.
 
6112
.sp
 
6113
You might want to do this on files that you know will be heavily contended for by clients. A good example of this is in the NetBench SMB benchmark program, which causes heavy client contention for files ending in
 
6114
\fI.SEM\fR. To cause Samba not to grant oplocks on these files you would use the line (either in the [global] section or in the section for the particular NetBench share.
 
6115
.sp
 
6116
An example of use is:
 
6117
 
 
6118
.sp
4436
6119
.nf
4437
6120
 
4438
 
veto oplock files = /\&.*SEM/
 
6121
veto oplock files = /.*SEM/
4439
6122
.fi
4440
 
 
4441
 
 
4442
 
Default: \fB\fIveto oplock files\fR = # No files are vetoed for oplock grants \fR 
4443
 
 
4444
 
.TP
 
6123
 
 
6124
.sp
 
6125
Default:
 
6126
\fB\fIveto oplock files\fR = # No files are vetoed for oplock grants \fR
 
6127
.TP 3n
4445
6128
vfs object
4446
 
This parameter is a synonym for vfs objects\&.
4447
 
 
4448
 
.TP
 
6129
This parameter is a synonym for vfs objects.
 
6130
.TP 3n
4449
6131
vfs objects (S)
4450
 
This parameter specifies the backend names which are used for Samba VFS I/O operations\&. By default, normal disk I/O operations are used but these can be overloaded with one or more VFS objects\&.
4451
 
 
4452
 
Default: \fB\fIvfs objects\fR = \fR 
4453
 
 
4454
 
Example: \fB\fIvfs objects\fR = extd_audit recycle \fR 
4455
 
 
4456
 
.TP
 
6132
This parameter specifies the backend names which are used for Samba VFS I/O operations. By default, normal disk I/O operations are used but these can be overloaded with one or more VFS objects.
 
6133
.sp
 
6134
Default:
 
6135
\fB\fIvfs objects\fR = \fR
 
6136
.sp
 
6137
Example:
 
6138
\fB\fIvfs objects\fR = extd_audit recycle \fR
 
6139
.TP 3n
4457
6140
volume (S)
4458
 
This allows you to override the volume label returned for a share\&. Useful for CDROMs with installation programs that insist on a particular volume label\&.
4459
 
 
4460
 
Default: \fB\fIvolume\fR = # the name of the share \fR 
4461
 
 
4462
 
.TP
 
6141
This allows you to override the volume label returned for a share. Useful for CDROMs with installation programs that insist on a particular volume label.
 
6142
.sp
 
6143
Default:
 
6144
\fB\fIvolume\fR = # the name of the share \fR
 
6145
.TP 3n
4463
6146
wide links (S)
4464
 
This parameter controls whether or not links in the UNIX file system may be followed by the server\&. Links that point to areas within the directory tree exported by the server are always allowed; this parameter controls access only to areas that are outside the directory tree being exported\&.
4465
 
 
4466
 
Note that setting this parameter can have a negative effect on your server performance due to the extra system calls that Samba has to do in order to perform the link checks\&.
4467
 
 
4468
 
Default: \fB\fIwide links\fR = yes \fR 
4469
 
 
4470
 
.TP
 
6147
This parameter controls whether or not links in the UNIX file system may be followed by the server. Links that point to areas within the directory tree exported by the server are always allowed; this parameter controls access only to areas that are outside the directory tree being exported.
 
6148
.sp
 
6149
Note that setting this parameter can have a negative effect on your server performance due to the extra system calls that Samba has to do in order to perform the link checks.
 
6150
.sp
 
6151
Default:
 
6152
\fB\fIwide links\fR = yes \fR
 
6153
.TP 3n
4471
6154
winbind cache time (G)
4472
 
This parameter specifies the number of seconds the \fBwinbindd\fR(8) daemon will cache user and group information before querying a Windows NT server again\&.
4473
 
 
4474
 
 
4475
 
.RS
4476
 
.Sh "Note"
4477
 
This does not apply to authentication requests, these are always evaluated in real time\&.
4478
 
 
4479
 
.RE
4480
 
Default: \fB\fIwinbind cache time\fR = 300 \fR 
4481
 
 
4482
 
.TP
 
6155
This parameter specifies the number of seconds the
 
6156
\fBwinbindd\fR(8)
 
6157
daemon will cache user and group information before querying a Windows NT server again.
 
6158
.sp
 
6159
.it 1 an-trap
 
6160
.nr an-no-space-flag 1
 
6161
.nr an-break-flag 1
 
6162
.br
 
6163
\fBNote\fR
 
6164
This does not apply to authentication requests, these are always evaluated in real time.
 
6165
Default:
 
6166
\fB\fIwinbind cache time\fR = 300 \fR
 
6167
.TP 3n
4483
6168
winbind enum groups (G)
4484
 
On large installations using \fBwinbindd\fR(8) it may be necessary to suppress the enumeration of groups through the \fBsetgrent()\fR,\fBgetgrent()\fR and\fBendgrent()\fR group of system calls\&. If the \fIwinbind enum groups\fR parameter is\fBno\fR, calls to the \fBgetgrent()\fR system call will not return any data\&.
4485
 
 
4486
 
 
4487
 
.RS
4488
 
.Sh "Warning"
4489
 
Turning off group enumeration may cause some programs to behave oddly\&.
4490
 
 
4491
 
.RE
4492
 
Default: \fB\fIwinbind enum groups\fR = yes \fR 
4493
 
 
4494
 
.TP
 
6169
On large installations using
 
6170
\fBwinbindd\fR(8)
 
6171
it may be necessary to suppress the enumeration of groups through the
 
6172
\fBsetgrent()\fR,
 
6173
\fBgetgrent()\fR
 
6174
and
 
6175
\fBendgrent()\fR
 
6176
group of system calls. If the
 
6177
\fIwinbind enum groups\fR
 
6178
parameter is
 
6179
\fBno\fR, calls to the
 
6180
\fBgetgrent()\fR
 
6181
system call will not return any data.
 
6182
.sp
 
6183
.it 1 an-trap
 
6184
.nr an-no-space-flag 1
 
6185
.nr an-break-flag 1
 
6186
.br
 
6187
\fBWarning\fR
 
6188
Turning off group enumeration may cause some programs to behave oddly.
 
6189
Default:
 
6190
\fB\fIwinbind enum groups\fR = no \fR
 
6191
.TP 3n
4495
6192
winbind enum users (G)
4496
 
On large installations using \fBwinbindd\fR(8) it may be necessary to suppress the enumeration of users through the \fBsetpwent()\fR,\fBgetpwent()\fR and\fBendpwent()\fR group of system calls\&. If the \fIwinbind enum users\fR parameter is\fBno\fR, calls to the \fBgetpwent\fR system call will not return any data\&.
4497
 
 
4498
 
 
4499
 
.RS
4500
 
.Sh "Warning"
4501
 
Turning off user enumeration may cause some programs to behave oddly\&. For example, the finger program relies on having access to the full user list when searching for matching usernames\&.
4502
 
 
4503
 
.RE
4504
 
Default: \fB\fIwinbind enum users\fR = yes \fR 
4505
 
 
4506
 
.TP
 
6193
On large installations using
 
6194
\fBwinbindd\fR(8)
 
6195
it may be necessary to suppress the enumeration of users through the
 
6196
\fBsetpwent()\fR,
 
6197
\fBgetpwent()\fR
 
6198
and
 
6199
\fBendpwent()\fR
 
6200
group of system calls. If the
 
6201
\fIwinbind enum users\fR
 
6202
parameter is
 
6203
\fBno\fR, calls to the
 
6204
\fBgetpwent\fR
 
6205
system call will not return any data.
 
6206
.sp
 
6207
.it 1 an-trap
 
6208
.nr an-no-space-flag 1
 
6209
.nr an-break-flag 1
 
6210
.br
 
6211
\fBWarning\fR
 
6212
Turning off user enumeration may cause some programs to behave oddly. For example, the finger program relies on having access to the full user list when searching for matching usernames.
 
6213
Default:
 
6214
\fB\fIwinbind enum users\fR = no \fR
 
6215
.TP 3n
4507
6216
winbind nested groups (G)
4508
 
If set to yes, this parameter activates the support for nested groups\&. Nested groups are also called local groups or aliases\&. They work like their counterparts in Windows: Nested groups are defined locally on any machine (they are shared between DC's through their SAM) and can contain users and global groups from any trusted SAM\&. To be able to use nested groups, you need to run nss_winbind\&.
4509
 
 
4510
 
Please note that per 3\&.0\&.3 this is a new feature, so handle with care\&.
4511
 
 
4512
 
Default: \fB\fIwinbind nested groups\fR = no \fR 
4513
 
 
4514
 
.TP
 
6217
If set to yes, this parameter activates the support for nested groups. Nested groups are also called local groups or aliases. They work like their counterparts in Windows: Nested groups are defined locally on any machine (they are shared between DC's through their SAM) and can contain users and global groups from any trusted SAM. To be able to use nested groups, you need to run nss_winbind.
 
6218
.sp
 
6219
Default:
 
6220
\fB\fIwinbind nested groups\fR = yes \fR
 
6221
.TP 3n
4515
6222
winbind nss info (G)
4516
 
This parameter is designed to control how Winbind retrieves Name Service Information to construct a user's home directory and login shell\&. Currently the following settings are available:
4517
 
 
4518
 
.RS
4519
 
.TP 3
4520
 
\(bu
4521
 
\fItemplate\fR \- The default, using the parameters of \fItemplate shell\fR and \fItemplate homedir\fR)
4522
 
.TP
4523
 
\(bu
4524
 
\fIsfu\fR \- When Samba is running in security = ads and your Active Directory Domain Controller does support the Microsoft "Services for Unix" (SFU) LDAP schema, winbind can retrieve the login shell and the home directory attributes directly from your Directory Server\&. Note that retrieving UID and GID from your ADS\-Server requires to use\fIidmap backend\fR = idmap_ad as well\&.
4525
 
.LP
 
6223
This parameter is designed to control how Winbind retrieves Name Service Information to construct a user's home directory and login shell. Currently the following settings are available:
 
6224
.RS 3n
 
6225
.TP 3n
 
6226
&#8226;
 
6227
\fItemplate\fR
 
6228
- The default, using the parameters of
 
6229
\fItemplate shell\fR
 
6230
and
 
6231
\fItemplate homedir\fR)
 
6232
.TP 3n
 
6233
&#8226;
 
6234
\fIsfu\fR
 
6235
- When Samba is running in security = ads and your Active Directory Domain Controller does support the Microsoft "Services for Unix" (SFU) LDAP schema, winbind can retrieve the login shell and the home directory attributes directly from your Directory Server. Note that retrieving UID and GID from your ADS-Server requires to use
 
6236
\fIidmap backend\fR
 
6237
= idmap_ad as well.
4526
6238
.RE
4527
 
.IP
4528
 
 
4529
 
 
4530
 
Default: \fB\fIwinbind nss info\fR = template \fR 
4531
 
 
4532
 
Example: \fB\fIwinbind nss info\fR = template sfu \fR 
4533
 
 
4534
 
.TP
 
6239
.IP "" 3n
 
6240
 
 
6241
.sp
 
6242
Default:
 
6243
\fB\fIwinbind nss info\fR = template \fR
 
6244
.sp
 
6245
Example:
 
6246
\fB\fIwinbind nss info\fR = template sfu \fR
 
6247
.TP 3n
 
6248
winbind offline logon (G)
 
6249
This parameter is designed to control whether Winbind should allow to login with the
 
6250
\fIpam_winbind\fR
 
6251
module using Cached Credentials. If enabled, winbindd will store user credentials from successful logins encrypted in a local cache.
 
6252
.sp
 
6253
Default:
 
6254
\fB\fIwinbind offline logon\fR = false \fR
 
6255
.sp
 
6256
Example:
 
6257
\fB\fIwinbind offline logon\fR = true \fR
 
6258
.TP 3n
 
6259
winbind refresh tickets (G)
 
6260
This parameter is designed to control whether Winbind should refresh Kerberos Tickets retrieved using the
 
6261
\fIpam_winbind\fR
 
6262
module.
 
6263
.sp
 
6264
Default:
 
6265
\fB\fIwinbind refresh tickets\fR = false \fR
 
6266
.sp
 
6267
Example:
 
6268
\fB\fIwinbind refresh tickets\fR = true \fR
 
6269
.TP 3n
4535
6270
winbind separator (G)
4536
 
This parameter allows an admin to define the character used when listing a username of the form of \fIDOMAIN \fR\\\fIuser\fR\&. This parameter is only applicable when using the \fIpam_winbind\&.so\fR and \fInss_winbind\&.so\fR modules for UNIX services\&.
4537
 
 
4538
 
Please note that setting this parameter to + causes problems with group membership at least on glibc systems, as the character + is used as a special character for NIS in /etc/group\&.
4539
 
 
4540
 
Default: \fB\fIwinbind separator\fR = '\\' \fR 
4541
 
 
4542
 
Example: \fB\fIwinbind separator\fR = + \fR 
4543
 
 
4544
 
.TP
 
6271
This parameter allows an admin to define the character used when listing a username of the form of
 
6272
\fIDOMAIN \fR\\fIuser\fR. This parameter is only applicable when using the
 
6273
\fIpam_winbind.so\fR
 
6274
and
 
6275
\fInss_winbind.so\fR
 
6276
modules for UNIX services.
 
6277
.sp
 
6278
Please note that setting this parameter to + causes problems with group membership at least on glibc systems, as the character + is used as a special character for NIS in /etc/group.
 
6279
.sp
 
6280
Default:
 
6281
\fB\fIwinbind separator\fR = '\' \fR
 
6282
.sp
 
6283
Example:
 
6284
\fB\fIwinbind separator\fR = + \fR
 
6285
.TP 3n
4545
6286
winbind trusted domains only (G)
4546
 
This parameter is designed to allow Samba servers that are members of a Samba controlled domain to use UNIX accounts distributed via NIS, rsync, or LDAP as the uid's for winbindd users in the hosts primary domain\&. Therefore, the user DOMAIN\\user1 would be mapped to the account user1 in /etc/passwd instead of allocating a new uid for him or her\&.
4547
 
 
4548
 
Default: \fB\fIwinbind trusted domains only\fR = no \fR 
4549
 
 
4550
 
.TP
 
6287
This parameter is designed to allow Samba servers that are members of a Samba controlled domain to use UNIX accounts distributed via NIS, rsync, or LDAP as the uid's for winbindd users in the hosts primary domain. Therefore, the user
 
6288
DOMAIN\user1
 
6289
would be mapped to the account user1 in /etc/passwd instead of allocating a new uid for him or her.
 
6290
.sp
 
6291
Default:
 
6292
\fB\fIwinbind trusted domains only\fR = no \fR
 
6293
.TP 3n
4551
6294
winbind use default domain (G)
4552
 
This parameter specifies whether the\fBwinbindd\fR(8) daemon should operate on users without domain component in their username\&. Users without a domain component are treated as is part of the winbindd server's own domain\&. While this does not benifit Windows users, it makes SSH, FTP and e\-mail function in a way much closer to the way they would in a native unix system\&.
4553
 
 
4554
 
Default: \fB\fIwinbind use default domain\fR = no \fR 
4555
 
 
4556
 
Example: \fB\fIwinbind use default domain\fR = yes \fR 
4557
 
 
4558
 
.TP
 
6295
This parameter specifies whether the
 
6296
\fBwinbindd\fR(8)
 
6297
daemon should operate on users without domain component in their username. Users without a domain component are treated as is part of the winbindd server's own domain. While this does not benifit Windows users, it makes SSH, FTP and e-mail function in a way much closer to the way they would in a native unix system.
 
6298
.sp
 
6299
Default:
 
6300
\fB\fIwinbind use default domain\fR = no \fR
 
6301
.sp
 
6302
Example:
 
6303
\fB\fIwinbind use default domain\fR = yes \fR
 
6304
.TP 3n
4559
6305
wins hook (G)
4560
 
When Samba is running as a WINS server this allows you to call an external program for all changes to the WINS database\&. The primary use for this option is to allow the dynamic update of external name resolution databases such as dynamic DNS\&.
4561
 
 
 
6306
When Samba is running as a WINS server this allows you to call an external program for all changes to the WINS database. The primary use for this option is to allow the dynamic update of external name resolution databases such as dynamic DNS.
 
6307
.sp
4562
6308
The wins hook parameter specifies the name of a script or executable that will be called as follows:
4563
 
 
 
6309
.sp
4564
6310
\fBwins_hook operation name nametype ttl IP_list\fR
4565
 
 
4566
 
 
4567
 
.RS
4568
 
.TP 3
4569
 
\(bu
4570
 
The first argument is the operation and is one of "add", "delete", or "refresh"\&. In most cases the operation can be ignored as the rest of the parameters provide sufficient information\&. Note that "refresh" may sometimes be called when the name has not previously been added, in that case it should be treated as an add\&.
4571
 
.TP
4572
 
\(bu
4573
 
The second argument is the NetBIOS name\&. If the name is not a legal name then the wins hook is not called\&. Legal names contain only letters, digits, hyphens, underscores and periods\&.
4574
 
.TP
4575
 
\(bu
4576
 
The third argument is the NetBIOS name type as a 2 digit hexadecimal number\&.
4577
 
.TP
4578
 
\(bu
4579
 
The fourth argument is the TTL (time to live) for the name in seconds\&.
4580
 
.TP
4581
 
\(bu
4582
 
The fifth and subsequent arguments are the IP addresses currently registered for that name\&. If this list is empty then the name should be deleted\&.
4583
 
.LP
 
6311
.RS 3n
 
6312
.TP 3n
 
6313
&#8226;
 
6314
The first argument is the operation and is one of "add", "delete", or "refresh". In most cases the operation can be ignored as the rest of the parameters provide sufficient information. Note that "refresh" may sometimes be called when the name has not previously been added, in that case it should be treated as an add.
 
6315
.TP 3n
 
6316
&#8226;
 
6317
The second argument is the NetBIOS name. If the name is not a legal name then the wins hook is not called. Legal names contain only letters, digits, hyphens, underscores and periods.
 
6318
.TP 3n
 
6319
&#8226;
 
6320
The third argument is the NetBIOS name type as a 2 digit hexadecimal number.
 
6321
.TP 3n
 
6322
&#8226;
 
6323
The fourth argument is the TTL (time to live) for the name in seconds.
 
6324
.TP 3n
 
6325
&#8226;
 
6326
The fifth and subsequent arguments are the IP addresses currently registered for that name. If this list is empty then the name should be deleted.
4584
6327
.RE
4585
 
.IP
4586
 
An example script that calls the BIND dynamic DNS update program \fBnsupdate\fR is provided in the examples directory of the Samba source code\&.
4587
 
 
 
6328
.IP "" 3n
 
6329
An example script that calls the BIND dynamic DNS update program
 
6330
\fBnsupdate\fR
 
6331
is provided in the examples directory of the Samba source code.
 
6332
.sp
4588
6333
\fBNo default\fR
4589
 
 
4590
 
.TP
 
6334
.TP 3n
4591
6335
wins proxy (G)
4592
 
This is a boolean that controls if \fBnmbd\fR(8) will respond to broadcast name queries on behalf of other hosts\&. You may need to set this to \fByes\fR for some older clients\&.
4593
 
 
4594
 
Default: \fB\fIwins proxy\fR = no \fR 
4595
 
 
4596
 
.TP
 
6336
This is a boolean that controls if
 
6337
\fBnmbd\fR(8)
 
6338
will respond to broadcast name queries on behalf of other hosts. You may need to set this to
 
6339
\fByes\fR
 
6340
for some older clients.
 
6341
.sp
 
6342
Default:
 
6343
\fB\fIwins proxy\fR = no \fR
 
6344
.TP 3n
4597
6345
wins server (G)
4598
 
This specifies the IP address (or DNS name: IP address for preference) of the WINS server that \fBnmbd\fR(8) should register with\&. If you have a WINS server on your network then you should set this to the WINS server's IP\&.
4599
 
 
4600
 
You should point this at your WINS server if you have a multi\-subnetted network\&.
4601
 
 
4602
 
If you want to work in multiple namespaces, you can give every wins server a 'tag'\&. For each tag, only one (working) server will be queried for a name\&. The tag should be separated from the ip address by a colon\&.
4603
 
 
4604
 
 
4605
 
.RS
4606
 
.Sh "Note"
4607
 
You need to set up Samba to point to a WINS server if you have multiple subnets and wish cross\-subnet browsing to work correctly\&.
4608
 
 
4609
 
.RE
4610
 
See the chapter in the Samba3\-HOWTO on Network Browsing\&.
4611
 
 
4612
 
Default: \fB\fIwins server\fR = \fR 
4613
 
 
4614
 
Example: \fB\fIwins server\fR = mary:192\&.9\&.200\&.1 fred:192\&.168\&.3\&.199 mary:192\&.168\&.2\&.61 # For this example when querying a certain name, 192\&.19\&.200\&.1 will be asked first and if that doesn't respond 192\&.168\&.2\&.61\&. If either of those doesn't know the name 192\&.168\&.3\&.199 will be queried\&. \fR 
4615
 
 
4616
 
Example: \fB\fIwins server\fR = 192\&.9\&.200\&.1 192\&.168\&.2\&.61 \fR 
4617
 
 
4618
 
.TP
 
6346
This specifies the IP address (or DNS name: IP address for preference) of the WINS server that
 
6347
\fBnmbd\fR(8)
 
6348
should register with. If you have a WINS server on your network then you should set this to the WINS server's IP.
 
6349
.sp
 
6350
You should point this at your WINS server if you have a multi-subnetted network.
 
6351
.sp
 
6352
If you want to work in multiple namespaces, you can give every wins server a 'tag'. For each tag, only one (working) server will be queried for a name. The tag should be separated from the ip address by a colon.
 
6353
.sp
 
6354
.it 1 an-trap
 
6355
.nr an-no-space-flag 1
 
6356
.nr an-break-flag 1
 
6357
.br
 
6358
\fBNote\fR
 
6359
You need to set up Samba to point to a WINS server if you have multiple subnets and wish cross-subnet browsing to work correctly.
 
6360
See the chapter in the Samba3-HOWTO on Network Browsing.
 
6361
.sp
 
6362
Default:
 
6363
\fB\fIwins server\fR = \fR
 
6364
.sp
 
6365
Example:
 
6366
\fB\fIwins server\fR = mary:192.9.200.1 fred:192.168.3.199 mary:192.168.2.61 # For this example when querying a certain name, 192.19.200.1 will be asked first and if that doesn't respond 192.168.2.61. If either of those doesn't know the name 192.168.3.199 will be queried. \fR
 
6367
.sp
 
6368
Example:
 
6369
\fB\fIwins server\fR = 192.9.200.1 192.168.2.61 \fR
 
6370
.TP 3n
4619
6371
wins support (G)
4620
 
This boolean controls if the \fBnmbd\fR(8) process in Samba will act as a WINS server\&. You should not set this to \fByes\fR unless you have a multi\-subnetted network and you wish a particular \fBnmbd\fR to be your WINS server\&. Note that you should \fBNEVER\fR set this to \fByes\fR on more than one machine in your network\&.
4621
 
 
4622
 
Default: \fB\fIwins support\fR = no \fR 
4623
 
 
4624
 
.TP
 
6372
This boolean controls if the
 
6373
\fBnmbd\fR(8)
 
6374
process in Samba will act as a WINS server. You should not set this to
 
6375
\fByes\fR
 
6376
unless you have a multi-subnetted network and you wish a particular
 
6377
\fBnmbd\fR
 
6378
to be your WINS server. Note that you should
 
6379
\fBNEVER\fR
 
6380
set this to
 
6381
\fByes\fR
 
6382
on more than one machine in your network.
 
6383
.sp
 
6384
Default:
 
6385
\fB\fIwins support\fR = no \fR
 
6386
.TP 3n
4625
6387
workgroup (G)
4626
 
This controls what workgroup your server will appear to be in when queried by clients\&. Note that this parameter also controls the Domain name used with the security = domain setting\&.
4627
 
 
4628
 
Default: \fB\fIworkgroup\fR = WORKGROUP \fR 
4629
 
 
4630
 
Example: \fB\fIworkgroup\fR = MYGROUP \fR 
4631
 
 
4632
 
.TP
 
6388
This controls what workgroup your server will appear to be in when queried by clients. Note that this parameter also controls the Domain name used with the
 
6389
security = domain setting.
 
6390
.sp
 
6391
Default:
 
6392
\fB\fIworkgroup\fR = WORKGROUP \fR
 
6393
.sp
 
6394
Example:
 
6395
\fB\fIworkgroup\fR = MYGROUP \fR
 
6396
.TP 3n
4633
6397
writable
4634
 
This parameter is a synonym for writeable\&.
4635
 
 
4636
 
.TP
 
6398
This parameter is a synonym for writeable.
 
6399
.TP 3n
4637
6400
writeable (S)
4638
 
Inverted synonym for read only\&.
4639
 
 
 
6401
Inverted synonym for
 
6402
read only.
 
6403
.sp
4640
6404
\fBNo default\fR
4641
 
 
4642
 
.TP
 
6405
.TP 3n
4643
6406
write cache size (S)
4644
 
If this integer parameter is set to non\-zero value, Samba will create an in\-memory cache for each oplocked file (it does \fBnot\fR do this for non\-oplocked files)\&. All writes that the client does not request to be flushed directly to disk will be stored in this cache if possible\&. The cache is flushed onto disk when a write comes in whose offset would not fit into the cache or when the file is closed by the client\&. Reads for the file are also served from this cache if the data is stored within it\&.
4645
 
 
4646
 
This cache allows Samba to batch client writes into a more efficient write size for RAID disks (i\&.e\&. writes may be tuned to be the RAID stripe size) and can improve performance on systems where the disk subsystem is a bottleneck but there is free memory for userspace programs\&.
4647
 
 
4648
 
The integer parameter specifies the size of this cache (per oplocked file) in bytes\&.
4649
 
 
4650
 
Default: \fB\fIwrite cache size\fR = 0 \fR 
4651
 
 
4652
 
Example: \fB\fIwrite cache size\fR = 262144 # for a 256k cache size per file \fR 
4653
 
 
4654
 
.TP
 
6407
If this integer parameter is set to non-zero value, Samba will create an in-memory cache for each oplocked file (it does
 
6408
\fBnot\fR
 
6409
do this for non-oplocked files). All writes that the client does not request to be flushed directly to disk will be stored in this cache if possible. The cache is flushed onto disk when a write comes in whose offset would not fit into the cache or when the file is closed by the client. Reads for the file are also served from this cache if the data is stored within it.
 
6410
.sp
 
6411
This cache allows Samba to batch client writes into a more efficient write size for RAID disks (i.e. writes may be tuned to be the RAID stripe size) and can improve performance on systems where the disk subsystem is a bottleneck but there is free memory for userspace programs.
 
6412
.sp
 
6413
The integer parameter specifies the size of this cache (per oplocked file) in bytes.
 
6414
.sp
 
6415
Default:
 
6416
\fB\fIwrite cache size\fR = 0 \fR
 
6417
.sp
 
6418
Example:
 
6419
\fB\fIwrite cache size\fR = 262144 # for a 256k cache size per file \fR
 
6420
.TP 3n
4655
6421
write list (S)
4656
 
This is a list of users that are given read\-write access to a service\&. If the connecting user is in this list then they will be given write access, no matter what the read only option is set to\&. The list can include group names using the @group syntax\&.
4657
 
 
4658
 
Note that if a user is in both the read list and the write list then they will be given write access\&.
4659
 
 
4660
 
By design, this parameter will not work with the security = share in Samba 3\&.0\&.
4661
 
 
4662
 
Default: \fB\fIwrite list\fR = \fR 
4663
 
 
4664
 
Example: \fB\fIwrite list\fR = admin, root, @staff \fR 
4665
 
 
4666
 
.TP
 
6422
This is a list of users that are given read-write access to a service. If the connecting user is in this list then they will be given write access, no matter what the
 
6423
read only option is set to. The list can include group names using the @group syntax.
 
6424
.sp
 
6425
Note that if a user is in both the read list and the write list then they will be given write access.
 
6426
.sp
 
6427
By design, this parameter will not work with the
 
6428
security = share in Samba 3.0.
 
6429
.sp
 
6430
Default:
 
6431
\fB\fIwrite list\fR = \fR
 
6432
.sp
 
6433
Example:
 
6434
\fB\fIwrite list\fR = admin, root, @staff \fR
 
6435
.TP 3n
4667
6436
write raw (G)
4668
 
This parameter controls whether or not the server will support raw write SMB's when transferring data from clients\&. You should never need to change this parameter\&.
4669
 
 
4670
 
Default: \fB\fIwrite raw\fR = yes \fR 
4671
 
 
4672
 
.TP
 
6437
This parameter controls whether or not the server will support raw write SMB's when transferring data from clients. You should never need to change this parameter.
 
6438
.sp
 
6439
Default:
 
6440
\fB\fIwrite raw\fR = yes \fR
 
6441
.TP 3n
4673
6442
wtmp directory (G)
4674
 
This parameter is only available if Samba has been configured and compiled with the option \fB \-\-with\-utmp\fR\&. It specifies a directory pathname that is used to store the wtmp or wtmpx files (depending on the UNIX system) that record user connections to a Samba server\&. The difference with the utmp directory is the fact that user info is kept after a user has logged out\&.
4675
 
 
4676
 
By default this is not set, meaning the system will use whatever utmp file the native system is set to use (usually\fI/var/run/wtmp\fR on Linux)\&.
4677
 
 
4678
 
Default: \fB\fIwtmp directory\fR = \fR 
4679
 
 
4680
 
Example: \fB\fIwtmp directory\fR = /var/log/wtmp \fR 
4681
 
 
 
6443
This parameter is only available if Samba has been configured and compiled with the option
 
6444
\fB --with-utmp\fR. It specifies a directory pathname that is used to store the wtmp or wtmpx files (depending on the UNIX system) that record user connections to a Samba server. The difference with the utmp directory is the fact that user info is kept after a user has logged out.
 
6445
.sp
 
6446
By default this is not set, meaning the system will use whatever utmp file the native system is set to use (usually
 
6447
\fI/var/run/wtmp\fR
 
6448
on Linux).
 
6449
.sp
 
6450
Default:
 
6451
\fB\fIwtmp directory\fR = \fR
 
6452
.sp
 
6453
Example:
 
6454
\fB\fIwtmp directory\fR = /var/log/wtmp \fR
4682
6455
.SH "WARNINGS"
4683
 
 
4684
 
.PP
4685
 
Although the configuration file permits service names to contain spaces, your client software may not\&. Spaces will be ignored in comparisons anyway, so it shouldn't be a problem \- but be aware of the possibility\&.
4686
 
 
4687
 
.PP
4688
 
On a similar note, many clients \- especially DOS clients \- limit service names to eight characters\&.\fBsmbd\fR(8) has no such limitation, but attempts to connect from such clients will fail if they truncate the service names\&. For this reason you should probably keep your service names down to eight characters in length\&.
4689
 
 
4690
 
.PP
4691
 
Use of the [homes] and [printers] special sections make life for an administrator easy, but the various combinations of default attributes can be tricky\&. Take extreme care when designing these sections\&. In particular, ensure that the permissions on spool directories are correct\&.
4692
 
 
 
6456
.PP
 
6457
Although the configuration file permits service names to contain spaces, your client software may not. Spaces will be ignored in comparisons anyway, so it shouldn't be a problem - but be aware of the possibility.
 
6458
.PP
 
6459
On a similar note, many clients - especially DOS clients - limit service names to eight characters.
 
6460
\fBsmbd\fR(8)
 
6461
has no such limitation, but attempts to connect from such clients will fail if they truncate the service names. For this reason you should probably keep your service names down to eight characters in length.
 
6462
.PP
 
6463
Use of the
 
6464
[homes]
 
6465
and
 
6466
[printers]
 
6467
special sections make life for an administrator easy, but the various combinations of default attributes can be tricky. Take extreme care when designing these sections. In particular, ensure that the permissions on spool directories are correct.
4693
6468
.SH "VERSION"
4694
 
 
4695
6469
.PP
4696
 
This man page is correct for version 3\&.0 of the Samba suite\&.
4697
 
 
 
6470
This man page is correct for version 3.0 of the Samba suite.
4698
6471
.SH "SEE ALSO"
4699
 
 
4700
6472
.PP
4701
 
\fBsamba\fR(7), \fBsmbpasswd\fR(8), \fBswat\fR(8), \fBsmbd\fR(8), \fBnmbd\fR(8), \fBsmbclient\fR(1), \fBnmblookup\fR(1), \fBtestparm\fR(1), \fBtestprns\fR(1)\&.
4702
6473
 
 
6474
\fBsamba\fR(7),
 
6475
\fBsmbpasswd\fR(8),
 
6476
\fBswat\fR(8),
 
6477
\fBsmbd\fR(8),
 
6478
\fBnmbd\fR(8),
 
6479
\fBsmbclient\fR(1),
 
6480
\fBnmblookup\fR(1),
 
6481
\fBtestparm\fR(1),
 
6482
\fBtestprns\fR(1).
4703
6483
.SH "AUTHOR"
4704
 
 
4705
 
.PP
4706
 
The original Samba software and related utilities were created by Andrew Tridgell\&. Samba is now developed by the Samba Team as an Open Source project similar to the way the Linux kernel is developed\&.
4707
 
 
4708
 
.PP
4709
 
The original Samba man pages were written by Karl Auer\&. The man page sources were converted to YODL format (another excellent piece of Open Source software, available at ftp://ftp\&.icce\&.rug\&.nl/pub/unix/) and updated for the Samba 2\&.0 release by Jeremy Allison\&. The conversion to DocBook for Samba 2\&.2 was done by Gerald Carter\&. The conversion to DocBook XML 4\&.2 for Samba 3\&.0 was done by Alexander Bokovoy\&.
 
6484
.PP
 
6485
The original Samba software and related utilities were created by Andrew Tridgell. Samba is now developed by the Samba Team as an Open Source project similar to the way the Linux kernel is developed.
 
6486
.PP
 
6487
The original Samba man pages were written by Karl Auer. The man page sources were converted to YODL format (another excellent piece of Open Source software, available at
 
6488
ftp://ftp.icce.rug.nl/pub/unix/) and updated for the Samba 2.0 release by Jeremy Allison. The conversion to DocBook for Samba 2.2 was done by Gerald Carter. The conversion to DocBook XML 4.2 for Samba 3.0 was done by Alexander Bokovoy.
4710
6489