Split "clobber" function and variables into its own file before it
[jra/samba/.git] / docs / htmldocs / smbmount.8.html
1 <!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.01 Transitional//EN">
2 <HTML
3 ><HEAD
4 ><TITLE
5 >smbmount</TITLE
6 ><META
7 NAME="GENERATOR"
8 CONTENT="Modular DocBook HTML Stylesheet Version 1.77+"></HEAD
9 ><BODY
10 CLASS="REFENTRY"
11 BGCOLOR="#FFFFFF"
12 TEXT="#000000"
13 LINK="#0000FF"
14 VLINK="#840084"
15 ALINK="#0000FF"
16 ><H1
17 ><A
18 NAME="SMBMOUNT.8"
19 ></A
20 >smbmount</H1
21 ><DIV
22 CLASS="REFNAMEDIV"
23 ><A
24 NAME="AEN5"
25 ></A
26 ><H2
27 >Name</H2
28 >smbmount&nbsp;--&nbsp;mount an smbfs filesystem</DIV
29 ><DIV
30 CLASS="REFSYNOPSISDIV"
31 ><A
32 NAME="AEN8"
33 ></A
34 ><H2
35 >Synopsis</H2
36 ><P
37 ><B
38 CLASS="COMMAND"
39 >smbmount</B
40 >  {service} {mount-point} [-o options]</P
41 ></DIV
42 ><DIV
43 CLASS="REFSECT1"
44 ><A
45 NAME="AEN14"
46 ></A
47 ><H2
48 >DESCRIPTION</H2
49 ><P
50 ><B
51 CLASS="COMMAND"
52 >smbmount</B
53 > mounts a Linux SMB filesystem. It 
54         is usually invoked as <B
55 CLASS="COMMAND"
56 >mount.smbfs</B
57 > by
58         the <SPAN
59 CLASS="CITEREFENTRY"
60 ><SPAN
61 CLASS="REFENTRYTITLE"
62 >mount</SPAN
63 >(8)</SPAN
64 > command when using the 
65         "-t smbfs" option. This command only works in Linux, and the kernel must
66         support the smbfs filesystem. </P
67 ><P
68 >Options to <B
69 CLASS="COMMAND"
70 >smbmount</B
71 > are specified as a comma-separated
72         list of key=value pairs. It is possible to send options other
73         than those listed here, assuming that smbfs supports them. If
74         you get mount failures, check your kernel log for errors on
75         unknown options.</P
76 ><P
77 ><B
78 CLASS="COMMAND"
79 >smbmount</B
80 > is a daemon. After mounting it keeps running until
81         the mounted smbfs is umounted. It will log things that happen
82         when in daemon mode using the "machine name" smbmount, so
83         typically this output will end up in <TT
84 CLASS="FILENAME"
85 >log.smbmount</TT
86 >. The <B
87 CLASS="COMMAND"
88 >       smbmount</B
89 > process may also be called mount.smbfs.</P
90 ><P
91 ><SPAN
92 CLASS="emphasis"
93 ><I
94 CLASS="EMPHASIS"
95 >NOTE:</I
96 ></SPAN
97 > <B
98 CLASS="COMMAND"
99 >smbmount</B
100
101         calls <SPAN
102 CLASS="CITEREFENTRY"
103 ><SPAN
104 CLASS="REFENTRYTITLE"
105 >smbmnt</SPAN
106 >(8)</SPAN
107 > to do the actual mount. You 
108         must make sure that <B
109 CLASS="COMMAND"
110 >smbmnt</B
111 > is in the path so 
112         that it can be found. </P
113 ></DIV
114 ><DIV
115 CLASS="REFSECT1"
116 ><A
117 NAME="AEN35"
118 ></A
119 ><H2
120 >OPTIONS</H2
121 ><P
122 ></P
123 ><DIV
124 CLASS="VARIABLELIST"
125 ><DL
126 ><DT
127 >username=&lt;arg&gt;</DT
128 ><DD
129 ><P
130 >specifies the username to connect as. If
131                 this is not given, then the environment variable <TT
132 CLASS="ENVAR"
133 >               USER</TT
134 > is used. This option can also take the
135                 form "user%password" or "user/workgroup" or
136                 "user/workgroup%password" to allow the password and workgroup
137                 to be specified as part of the username.</P
138 ></DD
139 ><DT
140 >password=&lt;arg&gt;</DT
141 ><DD
142 ><P
143 >specifies the SMB password. If this
144                 option is not given then the environment variable
145                 <TT
146 CLASS="ENVAR"
147 >PASSWD</TT
148 > is used. If it can find
149                 no password <B
150 CLASS="COMMAND"
151 >smbmount</B
152 > will prompt
153                 for a passeword, unless the guest option is
154                 given. </P
155 ><P
156 >               Note that passwords which contain the argument delimiter
157                 character (i.e. a comma ',') will failed to be parsed correctly
158                 on the command line.  However, the same password defined
159                 in the PASSWD environment variable or a credentials file (see
160                 below) will be read correctly.
161                 </P
162 ></DD
163 ><DT
164 >credentials=&lt;filename&gt;</DT
165 ><DD
166 ><P
167 >specifies a file that contains a username and/or password. 
168 The format of the file is:
169 <PRE
170 CLASS="PROGRAMLISTING"
171 >username = &lt;value&gt;
172 password = &lt;value&gt;</PRE
173 ></P
174 ><P
175 >This is preferred over having passwords in plaintext in a
176                 shared file, such as <TT
177 CLASS="FILENAME"
178 >/etc/fstab</TT
179 >. Be sure to protect any
180                 credentials file properly.
181                 </P
182 ></DD
183 ><DT
184 >netbiosname=&lt;arg&gt;</DT
185 ><DD
186 ><P
187 >sets the source NetBIOS name. It defaults 
188                 to the local hostname. </P
189 ></DD
190 ><DT
191 >uid=&lt;arg&gt;</DT
192 ><DD
193 ><P
194 >sets the uid that will own all files on
195                 the mounted filesystem.
196                 It may be specified as either a username or a numeric uid.
197                 </P
198 ></DD
199 ><DT
200 >gid=&lt;arg&gt;</DT
201 ><DD
202 ><P
203 >sets the gid that will own all files on
204                 the mounted filesystem.
205                 It may be specified as either a groupname or a numeric 
206                 gid. </P
207 ></DD
208 ><DT
209 >port=&lt;arg&gt;</DT
210 ><DD
211 ><P
212 >sets the remote SMB port number. The default 
213                 is 139. </P
214 ></DD
215 ><DT
216 >fmask=&lt;arg&gt;</DT
217 ><DD
218 ><P
219 >sets the file mask. This determines the 
220                 permissions that remote files have in the local filesystem. 
221                 The default is based on the current umask. </P
222 ></DD
223 ><DT
224 >dmask=&lt;arg&gt;</DT
225 ><DD
226 ><P
227 >sets the directory mask. This determines the 
228                 permissions that remote directories have in the local filesystem. 
229                 The default is based on the current umask. </P
230 ></DD
231 ><DT
232 >debug=&lt;arg&gt;</DT
233 ><DD
234 ><P
235 >sets the debug level. This is useful for 
236                 tracking down SMB connection problems. A suggested value to
237                 start with is 4. If set too high there will be a lot of
238                 output, possibly hiding the useful output.</P
239 ></DD
240 ><DT
241 >ip=&lt;arg&gt;</DT
242 ><DD
243 ><P
244 >sets the destination host or IP address.
245                 </P
246 ></DD
247 ><DT
248 >workgroup=&lt;arg&gt;</DT
249 ><DD
250 ><P
251 >sets the workgroup on the destination </P
252 ></DD
253 ><DT
254 >sockopt=&lt;arg&gt;</DT
255 ><DD
256 ><P
257 >sets the TCP socket options. See the <A
258 HREF="smb.conf.5.html#SOCKETOPTIONS"
259 TARGET="_top"
260 ><SPAN
261 CLASS="CITEREFENTRY"
262 ><SPAN
263 CLASS="REFENTRYTITLE"
264 >smb.conf</SPAN
265 >(5)</SPAN
266 ></A
267 > <TT
268 CLASS="PARAMETER"
269 ><I
270 >socket options</I
271 ></TT
272 > option.
273                 </P
274 ></DD
275 ><DT
276 >scope=&lt;arg&gt;</DT
277 ><DD
278 ><P
279 >sets the NetBIOS scope </P
280 ></DD
281 ><DT
282 >guest</DT
283 ><DD
284 ><P
285 >don't prompt for a password </P
286 ></DD
287 ><DT
288 >ro</DT
289 ><DD
290 ><P
291 >mount read-only </P
292 ></DD
293 ><DT
294 >rw</DT
295 ><DD
296 ><P
297 >mount read-write </P
298 ></DD
299 ><DT
300 >iocharset=&lt;arg&gt;</DT
301 ><DD
302 ><P
303 >               sets the charset used by the Linux side for codepage
304                 to charset translations (NLS). Argument should be the
305                 name of a charset, like iso8859-1. (Note: only kernel
306                 2.4.0 or later)
307                 </P
308 ></DD
309 ><DT
310 >codepage=&lt;arg&gt;</DT
311 ><DD
312 ><P
313 >               sets the codepage the server uses. See the iocharset
314                 option. Example value cp850. (Note: only kernel 2.4.0
315                 or later)
316                 </P
317 ></DD
318 ><DT
319 >ttl=&lt;arg&gt;</DT
320 ><DD
321 ><P
322 >               sets how long a directory listing is cached in milliseconds
323                 (also affects visibility of file size and date
324                 changes). A higher value means that changes on the
325                 server take longer to be noticed but it can give
326                 better performance on large directories, especially
327                 over long distances. Default is 1000ms but something
328                 like 10000ms (10 seconds) is probably more reasonable
329                 in many cases.
330                 (Note: only kernel 2.4.2 or later)
331                 </P
332 ></DD
333 ></DL
334 ></DIV
335 ></DIV
336 ><DIV
337 CLASS="REFSECT1"
338 ><A
339 NAME="AEN130"
340 ></A
341 ><H2
342 >ENVIRONMENT VARIABLES</H2
343 ><P
344 >The variable <TT
345 CLASS="ENVAR"
346 >USER</TT
347 > may contain the username of the
348         person using the client.  This information is used only if the
349         protocol level is high enough to support session-level
350         passwords. The variable can be used to set both username and
351         password by using the format username%password.</P
352 ><P
353 >The variable <TT
354 CLASS="ENVAR"
355 >PASSWD</TT
356 > may contain the password of the
357         person using the client.  This information is used only if the
358         protocol level is high enough to support session-level
359         passwords.</P
360 ><P
361 >The variable <TT
362 CLASS="ENVAR"
363 >PASSWD_FILE</TT
364 > may contain the pathname
365         of a file to read the password from. A single line of input is
366         read and used as the password.</P
367 ></DIV
368 ><DIV
369 CLASS="REFSECT1"
370 ><A
371 NAME="AEN138"
372 ></A
373 ><H2
374 >BUGS</H2
375 ><P
376 >Passwords and other options containing , can not be handled.
377         For passwords an alternative way of passing them is in a credentials
378         file or in the PASSWD environment.</P
379 ><P
380 >The credentials file does not handle usernames or passwords with
381         leading space.</P
382 ><P
383 >One smbfs bug is important enough to mention here, even if it
384         is a bit misplaced:</P
385 ><P
386 ></P
387 ><UL
388 ><LI
389 ><P
390 >Mounts sometimes stop working. This is usually
391         caused by smbmount terminating. Since smbfs needs smbmount to
392         reconnect when the server disconnects, the mount will eventually go
393         dead. An umount/mount normally fixes this. At least 2 ways to
394         trigger this bug are known.</P
395 ></LI
396 ></UL
397 ><P
398 >Note that the typical response to a bug report is suggestion
399         to try the latest version first. So please try doing that first,
400         and always include which versions you use of relevant software
401         when reporting bugs (minimum: samba, kernel, distribution)</P
402 ></DIV
403 ><DIV
404 CLASS="REFSECT1"
405 ><A
406 NAME="AEN147"
407 ></A
408 ><H2
409 >SEE ALSO</H2
410 ><P
411 >Documentation/filesystems/smbfs.txt in the linux kernel
412         source tree may contain additional options and information.</P
413 ><P
414 >FreeBSD also has a smbfs, but it is not related to smbmount</P
415 ><P
416 >For Solaris, HP-UX and others you may want to look at <SPAN
417 CLASS="CITEREFENTRY"
418 ><SPAN
419 CLASS="REFENTRYTITLE"
420 >smbsh</SPAN
421 >(1)</SPAN
422 > or at other solutions, such as 
423         Sharity or perhaps replacing the SMB server with a NFS server.</P
424 ></DIV
425 ><DIV
426 CLASS="REFSECT1"
427 ><A
428 NAME="AEN155"
429 ></A
430 ><H2
431 >AUTHOR</H2
432 ><P
433 >Volker Lendecke, Andrew Tridgell, Michael H. Warfield 
434         and others.</P
435 ><P
436 >The current maintainer of smbfs and the userspace
437         tools <B
438 CLASS="COMMAND"
439 >smbmount</B
440 >, <B
441 CLASS="COMMAND"
442 >smbumount</B
443 >,
444         and <B
445 CLASS="COMMAND"
446 >smbmnt</B
447 > is <A
448 HREF="mailto:urban@teststation.com"
449 TARGET="_top"
450 >Urban Widmark</A
451 >.
452         The <A
453 HREF="mailto:samba@samba.org"
454 TARGET="_top"
455 >SAMBA Mailing list</A
456 >
457         is the preferred place to ask questions regarding these programs.
458         </P
459 ><P
460 >The conversion of this manpage for Samba 2.2 was performed 
461         by Gerald Carter. The conversion to DocBook XML 4.2 for Samba 3.0
462         was done by Alexander Bokovoy.</P
463 ></DIV
464 ></BODY
465 ></HTML
466 >