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