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