This commit was manufactured by cvs2svn to create branch 'SAMBA_3_0'.
[ira/wip.git] / docs / docbook / manpages / smbmount.8.sgml
1 <!DOCTYPE refentry PUBLIC "-//OASIS//DTD DocBook V4.1//EN">
2 <refentry id="smbmount">
3
4 <refmeta>
5         <refentrytitle>smbmount</refentrytitle>
6         <manvolnum>8</manvolnum>
7 </refmeta>
8
9
10 <refnamediv>
11         <refname>smbmount</refname>
12         <refpurpose>mount an smbfs filesystem</refpurpose>
13 </refnamediv>
14
15 <refsynopsisdiv>
16         <cmdsynopsis>
17                 <command>smbmount</command>
18                 <arg choice="req">service</arg>
19                 <arg choice="req">mount-point</arg>
20                 <arg choice="opt">-o options</arg>
21         </cmdsynopsis>
22 </refsynopsisdiv>
23
24 <refsect1>
25         <title>DESCRIPTION</title>
26
27         <para><command>smbmount</command> mounts a Linux SMB filesystem. It 
28         is usually invoked as <command>mount.smbfs</command> by
29         the <command>mount(8)</command> command when using the 
30         "-t smbfs" option. This command only works in Linux, and the kernel must
31         support the smbfs filesystem. </para>
32
33         <para>Options to <command>smbmount</command> are specified as a comma-separated
34         list of key=value pairs. It is possible to send options other
35         than those listed here, assuming that smbfs supports them. If
36         you get mount failures, check your kernel log for errors on
37         unknown options.</para>
38
39         <para><command>smbmount</command> is a daemon. After mounting it keeps running until
40         the mounted smbfs is umounted. It will log things that happen
41         when in daemon mode using the "machine name" smbmount, so
42         typically this output will end up in <filename>log.smbmount</filename>. The
43         <command>smbmount</command> process may also be called mount.smbfs.</para>
44
45         <para><emphasis>NOTE:</emphasis> <command>smbmount</command> 
46         calls <command>smbmnt(8)</command> to do the actual mount. You 
47         must make sure that <command>smbmnt</command> is in the path so 
48         that it can be found. </para>
49         
50 </refsect1>
51
52 <refsect1>
53         <title>OPTIONS</title>
54
55         <variablelist>
56                 <varlistentry>
57                 <term>username=&lt;arg&gt;</term>
58                 <listitem><para>specifies the username to connect as. If
59                 this is not given, then the environment variable <envar>
60                 USER</envar> is used. This option can also take the
61                 form "user%password" or "user/workgroup" or
62                 "user/workgroup%password" to allow the password and workgroup
63                 to be specified as part of the username.</para></listitem>
64                 </varlistentry>
65
66                 <varlistentry>
67                 <term>password=&lt;arg&gt;</term>
68                 <listitem><para>specifies the SMB password. If this
69                 option is not given then the environment variable
70                 <envar>PASSWD</envar> is used. If it can find
71                 no password <command>smbmount</command> will prompt
72                 for a passeword, unless the guest option is
73                 given. </para>
74
75                 <para>
76                 Note that passwords which contain the argument delimiter
77                 character (i.e. a comma ',') will failed to be parsed correctly
78                 on the command line.  However, the same password defined
79                 in the PASSWD environment variable or a credentials file (see
80                 below) will be read correctly.
81                 </para>
82                 </listitem>
83                 </varlistentry>
84
85                 <varlistentry>
86                 <term>credentials=&lt;filename&gt;</term>
87                 <listitem><para>specifies a file that contains a username
88                 and/or password. The format of the file is:</para>
89
90                 <para>
91                 <programlisting>
92                 username = &lt;value&gt;
93                 password = &lt;value&gt;
94                 </programlisting>
95                 </para>
96
97                 <para>This is preferred over having passwords in plaintext in a
98                 shared file, such as <filename>/etc/fstab</filename>. Be sure to protect any
99                 credentials file properly.
100                 </para></listitem>
101                 </varlistentry>
102
103                 <varlistentry>
104                 <term>netbiosname=&lt;arg&gt;</term>
105                 <listitem><para>sets the source NetBIOS name. It defaults 
106                 to the local hostname. </para></listitem>
107                 </varlistentry>
108
109                 <varlistentry>
110                 <term>uid=&lt;arg&gt;</term>
111                 <listitem><para>sets the uid that will own all files on
112                 the mounted filesystem.
113                 It may be specified as either a username or a numeric uid.
114                 </para></listitem>
115                 </varlistentry>
116                 
117                 
118                 <varlistentry>
119                 <term>gid=&lt;arg&gt;</term>
120                 <listitem><para>sets the gid that will own all files on
121                 the mounted filesystem.
122                 It may be specified as either a groupname or a numeric 
123                 gid. </para></listitem>         
124                 </varlistentry>
125                 
126                 
127                 <varlistentry>
128                 <term>port=&lt;arg&gt;</term>
129                 <listitem><para>sets the remote SMB port number. The default 
130                 is 139. </para></listitem>
131                 </varlistentry>
132                 
133                 
134                 <varlistentry>
135                 <term>fmask=&lt;arg&gt;</term>
136                 <listitem><para>sets the file mask. This determines the 
137                 permissions that remote files have in the local filesystem. 
138                 The default is based on the current umask. </para></listitem>
139                 </varlistentry>
140                 
141
142                 <varlistentry>
143                 <term>dmask=&lt;arg&gt;</term>
144                 <listitem><para>sets the directory mask. This determines the 
145                 permissions that remote directories have in the local filesystem. 
146                 The default is based on the current umask. </para></listitem>
147                 </varlistentry>
148                 
149                 
150                 <varlistentry>
151                 <term>debug=&lt;arg&gt;</term>
152                 <listitem><para>sets the debug level. This is useful for 
153                 tracking down SMB connection problems. A suggested value to
154                 start with is 4. If set too high there will be a lot of
155                 output, possibly hiding the useful output.</para></listitem>
156                 </varlistentry>
157                 
158                 
159                 <varlistentry>
160                 <term>ip=&lt;arg&gt;</term>
161                 <listitem><para>sets the destination host or IP address.
162                 </para></listitem>
163                 </varlistentry>
164
165
166
167                 <varlistentry>
168                 <term>workgroup=&lt;arg&gt;</term>
169                 <listitem><para>sets the workgroup on the destination </para>
170                 </listitem>
171                 </varlistentry>
172
173
174                 <varlistentry>
175                 <term>sockopt=&lt;arg&gt;</term>
176                 <listitem><para>sets the TCP socket options. See the <ulink
177                 url="smb.conf.5.html#SOCKETOPTIONS"><filename>smb.conf
178                 </filename></ulink> <parameter>socket options</parameter> option.
179                 </para></listitem>
180                 </varlistentry>
181
182
183                 <varlistentry>
184                 <term>scope=&lt;arg&gt;</term>
185                 <listitem><para>sets the NetBIOS scope </para></listitem>
186                 </varlistentry>
187
188                 <varlistentry>
189                 <term>guest</term>
190                 <listitem><para>don't prompt for a password </para></listitem>
191                 </varlistentry>
192
193
194                 <varlistentry>
195                 <term>ro</term>
196                 <listitem><para>mount read-only </para></listitem>
197                 </varlistentry>
198
199                 <varlistentry>
200                 <term>rw</term><listitem><para>mount read-write </para></listitem>
201                 </varlistentry>
202
203                 <varlistentry>
204                 <term>iocharset=&lt;arg&gt;</term>
205                 <listitem><para>
206                 sets the charset used by the Linux side for codepage
207                 to charset translations (NLS). Argument should be the
208                 name of a charset, like iso8859-1. (Note: only kernel
209                 2.4.0 or later)
210                 </para></listitem>
211                 </varlistentry>
212
213                 <varlistentry>
214                 <term>codepage=&lt;arg&gt;</term>
215                 <listitem><para>
216                 sets the codepage the server uses. See the iocharset
217                 option. Example value cp850. (Note: only kernel 2.4.0
218                 or later)
219                 </para></listitem>
220                 </varlistentry>
221
222                 <varlistentry>
223                 <term>ttl=&lt;arg&gt;</term>
224                 <listitem><para>
225                 sets how long a directory listing is cached in milliseconds
226                 (also affects visibility of file size and date
227                 changes). A higher value means that changes on the
228                 server take longer to be noticed but it can give
229                 better performance on large directories, especially
230                 over long distances. Default is 1000ms but something
231                 like 10000ms (10 seconds) is probably more reasonable
232                 in many cases.
233                 (Note: only kernel 2.4.2 or later)
234                 </para></listitem>
235                 </varlistentry>
236
237         </variablelist>
238
239
240 </refsect1>
241
242 <refsect1>
243         <title>ENVIRONMENT VARIABLES</title>
244
245         <para>The variable <envar>USER</envar> may contain the username of the
246         person using the client.  This information is used only if the
247         protocol level is high enough to support session-level
248         passwords. The variable can be used to set both username and
249         password by using the format username%password.</para>
250
251         <para>The variable <envar>PASSWD</envar> may contain the password of the
252         person using the client.  This information is used only if the
253         protocol level is high enough to support session-level
254         passwords.</para>
255
256         <para>The variable <envar>PASSWD_FILE</envar> may contain the pathname
257         of a file to read the password from. A single line of input is
258         read and used as the password.</para>
259 </refsect1>
260
261
262 <refsect1>
263         <title>BUGS</title>
264
265         <para>Passwords and other options containing , can not be handled.
266         For passwords an alternative way of passing them is in a credentials
267         file or in the PASSWD environment.</para>
268
269         <para>The credentials file does not handle usernames or passwords with
270         leading space.</para>
271
272         <para>One smbfs bug is important enough to mention here, even if it
273         is a bit misplaced:</para>
274
275         <itemizedlist>
276
277         <listitem><para>Mounts sometimes stop working. This is usually
278         caused by smbmount terminating. Since smbfs needs smbmount to
279         reconnect when the server disconnects, the mount will eventually go
280         dead. An umount/mount normally fixes this. At least 2 ways to
281         trigger this bug are known.</para></listitem>
282
283         </itemizedlist>
284
285         <para>Note that the typical response to a bug report is suggestion
286         to try the latest version first. So please try doing that first,
287         and always include which versions you use of relevant software
288         when reporting bugs (minimum: samba, kernel, distribution)</para>
289
290 </refsect1>
291
292
293 <refsect1>
294         <title>SEE ALSO</title>
295
296         <para>Documentation/filesystems/smbfs.txt in the linux kernel
297         source tree may contain additional options and information.</para>
298
299         <para>FreeBSD also has a smbfs, but it is not related to smbmount</para>
300
301         <para>For Solaris, HP-UX and others you may want to look at
302         <ulink url="smbsh.1.html"><command>smbsh(1)</command></ulink> or at other
303         solutions, such as sharity or perhaps replacing the SMB server with
304         a NFS server.</para>
305
306 </refsect1>
307
308
309 <refsect1>
310         <title>AUTHOR</title>
311         
312         <para>Volker Lendecke, Andrew Tridgell, Michael H. Warfield 
313         and others.</para>
314         
315         <para>The current maintainer of smbfs and the userspace
316         tools <command>smbmount</command>, <command>smbumount</command>,
317         and <command>smbmnt</command> is <ulink 
318         url="mailto:urban@teststation.com">Urban Widmark</ulink>.
319         The <ulink url="mailto:samba@samba.org">SAMBA Mailing list</ulink>
320         is the preferred place to ask questions regarding these programs.
321         </para>
322         
323         <para>The conversion of this manpage for Samba 2.2 was performed 
324         by Gerald Carter</para>
325 </refsect1>
326
327 </refentry>