1 <?xml version="1.0" encoding="iso-8859-1"?>
2 <!DOCTYPE refentry PUBLIC "-//Samba-Team//DTD DocBook V4.2-Based Variant V1.0//EN" "http://www.samba.org/samba/DTD/samba-doc">
3 <refentry id="smbmount.8">
6 <refentrytitle>smbmount</refentrytitle>
7 <manvolnum>8</manvolnum>
12 <refname>smbmount</refname>
13 <refpurpose>mount an smbfs filesystem</refpurpose>
18 <command>smbmount</command>
19 <arg choice="req">service</arg>
20 <arg choice="req">mount-point</arg>
21 <arg choice="opt">-o options</arg>
26 <title>DESCRIPTION</title>
28 <para><command>smbmount</command> mounts a Linux SMB filesystem. It
29 is usually invoked as <command>mount.smbfs</command> by
30 the <citerefentry><refentrytitle>mount</refentrytitle>
31 <manvolnum>8</manvolnum></citerefentry> command when using the
32 "-t smbfs" option. This command only works in Linux, and the kernel must
33 support the smbfs filesystem. </para>
35 <para>Options to <command>smbmount</command> are specified as a comma-separated
36 list of key=value pairs. It is possible to send options other
37 than those listed here, assuming that smbfs supports them. If
38 you get mount failures, check your kernel log for errors on
39 unknown options.</para>
41 <para><command>smbmount</command> is a daemon. After mounting it keeps running until
42 the mounted smbfs is umounted. It will log things that happen
43 when in daemon mode using the "machine name" smbmount, so
44 typically this output will end up in <filename>log.smbmount</filename>. The <command>
45 smbmount</command> process may also be called mount.smbfs.</para>
47 <note><para> <command>smbmount</command>
48 calls <citerefentry><refentrytitle>smbmnt</refentrytitle>
49 <manvolnum>8</manvolnum></citerefentry> to do the actual mount. You
50 must make sure that <command>smbmnt</command> is in the path so
51 that it can be found. </para></note>
56 <title>OPTIONS</title>
60 <term>username=<arg></term>
61 <listitem><para>specifies the username to connect as. If
62 this is not given, then the environment variable <envar>
63 USER</envar> is used. This option can also take the
64 form "user%password" or "user/workgroup" or
65 "user/workgroup%password" to allow the password and workgroup
66 to be specified as part of the username.</para></listitem>
70 <term>password=<arg></term>
71 <listitem><para>specifies the SMB password. If this
72 option is not given then the environment variable
73 <literal>PASSWD</literal> is used. If it can find
74 no password <command>smbmount</command> will prompt
75 for a passeword, unless the guest option is
79 Note that passwords which contain the argument delimiter
80 character (i.e. a comma ',') will failed to be parsed correctly
81 on the command line. However, the same password defined
82 in the PASSWD environment variable or a credentials file (see
83 below) will be read correctly.
89 <term>credentials=<filename></term>
90 <listitem><para>specifies a file that contains a username and/or password.
91 The format of the file is:
93 username = <value>
94 password = <value>
95 </programlisting></para>
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.
105 <listitem><para>Use kerberos (Active Directory). </para></listitem>
109 <term>netbiosname=<arg></term>
110 <listitem><para>sets the source NetBIOS name. It defaults
111 to the local hostname. </para></listitem>
115 <term>uid=<arg></term>
116 <listitem><para>sets the uid that will own all files on
117 the mounted filesystem.
118 It may be specified as either a username or a numeric uid.
124 <term>gid=<arg></term>
125 <listitem><para>sets the gid that will own all files on
126 the mounted filesystem.
127 It may be specified as either a groupname or a numeric
128 gid. </para></listitem>
133 <term>port=<arg></term>
134 <listitem><para>sets the remote SMB port number. The default
135 is 445, fallback is 139. </para></listitem>
140 <term>fmask=<arg></term>
141 <listitem><para>sets the file mask. This determines the
142 permissions that remote files have in the local filesystem.
143 This is not a umask, but the actual permissions for the files.
144 The default is based on the current umask. </para></listitem>
149 <term>dmask=<arg></term>
150 <listitem><para>Sets the directory mask. This determines the
151 permissions that remote directories have in the local filesystem.
152 This is not a umask, but the actual permissions for the directories.
153 The default is based on the current umask. </para></listitem>
158 <term>debug=<arg></term>
159 <listitem><para>Sets the debug level. This is useful for
160 tracking down SMB connection problems. A suggested value to
161 start with is 4. If set too high there will be a lot of
162 output, possibly hiding the useful output.</para></listitem>
167 <term>ip=<arg></term>
168 <listitem><para>Sets the destination host or IP address.
175 <term>workgroup=<arg></term>
176 <listitem><para>Sets the workgroup on the destination </para>
182 <term>sockopt=<arg></term>
183 <listitem><para>Sets the TCP socket options. See the <ulink
184 url="smb.conf.5.html#SOCKETOPTIONS"><citerefentry><refentrytitle>smb.conf</refentrytitle>
185 <manvolnum>5</manvolnum></citerefentry></ulink> <parameter>socket options</parameter> option.
191 <term>scope=<arg></term>
192 <listitem><para>Sets the NetBIOS scope </para></listitem>
197 <listitem><para>Don't prompt for a password </para></listitem>
202 <listitem><para>mount read-only </para></listitem>
206 <term>rw</term><listitem><para>mount read-write </para></listitem>
210 <term>iocharset=<arg></term>
212 sets the charset used by the Linux side for codepage
213 to charset translations (NLS). Argument should be the
214 name of a charset, like iso8859-1. (Note: only kernel
220 <term>codepage=<arg></term>
222 sets the codepage the server uses. See the iocharset
223 option. Example value cp850. (Note: only kernel 2.4.0
229 <term>ttl=<arg></term>
231 sets how long a directory listing is cached in milliseconds
232 (also affects visibility of file size and date
233 changes). A higher value means that changes on the
234 server take longer to be noticed but it can give
235 better performance on large directories, especially
236 over long distances. Default is 1000ms but something
237 like 10000ms (10 seconds) is probably more reasonable
239 (Note: only kernel 2.4.2 or later)
249 <title>ENVIRONMENT VARIABLES</title>
251 <para>The variable <envar>USER</envar> may contain the username 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. The variable can be used to set both username and
255 password by using the format username%password.</para>
257 <para>The variable <envar>PASSWD</envar> may contain the password of the
258 person using the client. This information is used only if the
259 protocol level is high enough to support session-level
262 <para>The variable <envar>PASSWD_FILE</envar> may contain the pathname
263 of a file to read the password from. A single line of input is
264 read and used as the password.</para>
271 <para>Passwords and other options containing , can not be handled.
272 For passwords an alternative way of passing them is in a credentials
273 file or in the PASSWD environment.</para>
275 <para>The credentials file does not handle usernames or passwords with
276 leading space.</para>
278 <para>One smbfs bug is important enough to mention here, even if it
279 is a bit misplaced:</para>
283 <listitem><para>Mounts sometimes stop working. This is usually
284 caused by smbmount terminating. Since smbfs needs smbmount to
285 reconnect when the server disconnects, the mount will eventually go
286 dead. An umount/mount normally fixes this. At least 2 ways to
287 trigger this bug are known.</para></listitem>
291 <para>Note that the typical response to a bug report is suggestion
292 to try the latest version first. So please try doing that first,
293 and always include which versions you use of relevant software
294 when reporting bugs (minimum: samba, kernel, distribution)</para>
300 <title>SEE ALSO</title>
302 <para>Documentation/filesystems/smbfs.txt in the linux kernel
303 source tree may contain additional options and information.</para>
305 <para>FreeBSD also has a smbfs, but it is not related to smbmount</para>
307 <para>For Solaris, HP-UX and others you may want to look at <citerefentry><refentrytitle>smbsh</refentrytitle>
308 <manvolnum>1</manvolnum></citerefentry> or at other solutions, such as
309 Sharity or perhaps replacing the SMB server with a NFS server.</para>
315 <title>AUTHOR</title>
317 <para>Volker Lendecke, Andrew Tridgell, Michael H. Warfield
320 <para>The current maintainer of smbfs and the userspace
321 tools <command>smbmount</command>, <command>smbumount</command>,
322 and <command>smbmnt</command> is <ulink
323 url="mailto:urban@teststation.com">Urban Widmark</ulink>.
324 The <ulink url="mailto:samba@samba.org">SAMBA Mailing list</ulink>
325 is the preferred place to ask questions regarding these programs.
328 <para>The conversion of this manpage for Samba 2.2 was performed
329 by Gerald Carter. The conversion to DocBook XML 4.2 for Samba 3.0
330 was done by Alexander Bokovoy.</para>