1 <?xml version="1.0" encoding="iso-8859-1"?>
2 <!DOCTYPE refentry PUBLIC "-//OASIS//DTD DocBook XML V4.2//EN" "http://www.oasis-open.org/docbook/xml/4.2/docbookx.dtd" [
4 <!ENTITY % globalentities SYSTEM '../global.ent'> %globalentities;
6 <refentry id="smbmount.8">
9 <refentrytitle>smbmount</refentrytitle>
10 <manvolnum>8</manvolnum>
15 <refname>smbmount</refname>
16 <refpurpose>mount an smbfs filesystem</refpurpose>
21 <command>smbmount</command>
22 <arg choice="req">service</arg>
23 <arg choice="req">mount-point</arg>
24 <arg choice="opt">-o options</arg>
29 <title>DESCRIPTION</title>
31 <para><command>smbmount</command> mounts a Linux SMB filesystem. It
32 is usually invoked as <command>mount.smbfs</command> by
33 the <citerefentry><refentrytitle>mount</refentrytitle>
34 <manvolnum>8</manvolnum></citerefentry> command when using the
35 "-t smbfs" option. This command only works in Linux, and the kernel must
36 support the smbfs filesystem. </para>
38 <para>Options to <command>smbmount</command> are specified as a comma-separated
39 list of key=value pairs. It is possible to send options other
40 than those listed here, assuming that smbfs supports them. If
41 you get mount failures, check your kernel log for errors on
42 unknown options.</para>
44 <para><command>smbmount</command> is a daemon. After mounting it keeps running until
45 the mounted smbfs is umounted. It will log things that happen
46 when in daemon mode using the "machine name" smbmount, so
47 typically this output will end up in <filename>log.smbmount</filename>. The <command>
48 smbmount</command> process may also be called mount.smbfs.</para>
50 <note><para> <command>smbmount</command>
51 calls <citerefentry><refentrytitle>smbmnt</refentrytitle>
52 <manvolnum>8</manvolnum></citerefentry> to do the actual mount. You
53 must make sure that <command>smbmnt</command> is in the path so
54 that it can be found. </para></note>
59 <title>OPTIONS</title>
63 <term>username=<arg></term>
64 <listitem><para>specifies the username to connect as. If
65 this is not given, then the environment variable <envar>
66 USER</envar> is used. This option can also take the
67 form "user%password" or "user/workgroup" or
68 "user/workgroup%password" to allow the password and workgroup
69 to be specified as part of the username.</para></listitem>
73 <term>password=<arg></term>
74 <listitem><para>specifies the SMB password. If this
75 option is not given then the environment variable
76 <envar>PASSWD</envar> is used. If it can find
77 no password <command>smbmount</command> will prompt
78 for a passeword, unless the guest option is
82 Note that passwords which contain the argument delimiter
83 character (i.e. a comma ',') will failed to be parsed correctly
84 on the command line. However, the same password defined
85 in the PASSWD environment variable or a credentials file (see
86 below) will be read correctly.
92 <term>credentials=<filename></term>
93 <listitem><para>specifies a file that contains a username and/or password.
94 The format of the file is:
96 username = <value>
97 password = <value>
98 </programlisting></para>
100 <para>This is preferred over having passwords in plaintext in a
101 shared file, such as <filename>/etc/fstab</filename>. Be sure to protect any
102 credentials file properly.
108 <listitem><para>Use kerberos (Active Directory). </para></listitem>
112 <term>netbiosname=<arg></term>
113 <listitem><para>sets the source NetBIOS name. It defaults
114 to the local hostname. </para></listitem>
118 <term>uid=<arg></term>
119 <listitem><para>sets the uid that will own all files on
120 the mounted filesystem.
121 It may be specified as either a username or a numeric uid.
127 <term>gid=<arg></term>
128 <listitem><para>sets the gid that will own all files on
129 the mounted filesystem.
130 It may be specified as either a groupname or a numeric
131 gid. </para></listitem>
136 <term>port=<arg></term>
137 <listitem><para>sets the remote SMB port number. The default
138 is 139. </para></listitem>
143 <term>fmask=<arg></term>
144 <listitem><para>sets the file mask. This determines the
145 permissions that remote files have in the local filesystem.
146 This is not a umask, but the actual permissions for the files.
147 The default is based on the current umask. </para></listitem>
152 <term>dmask=<arg></term>
153 <listitem><para>Sets the directory mask. This determines the
154 permissions that remote directories have in the local filesystem.
155 This is not a umask, but the actual permissions for the directories.
156 The default is based on the current umask. </para></listitem>
161 <term>debug=<arg></term>
162 <listitem><para>Sets the debug level. This is useful for
163 tracking down SMB connection problems. A suggested value to
164 start with is 4. If set too high there will be a lot of
165 output, possibly hiding the useful output.</para></listitem>
170 <term>ip=<arg></term>
171 <listitem><para>Sets the destination host or IP address.
178 <term>workgroup=<arg></term>
179 <listitem><para>Sets the workgroup on the destination </para>
185 <term>sockopt=<arg></term>
186 <listitem><para>Sets the TCP socket options. See the <ulink
187 url="smb.conf.5.html#SOCKETOPTIONS"><citerefentry><refentrytitle>smb.conf</refentrytitle>
188 <manvolnum>5</manvolnum></citerefentry></ulink> <parameter>socket options</parameter> option.
194 <term>scope=<arg></term>
195 <listitem><para>Sets the NetBIOS scope </para></listitem>
200 <listitem><para>Don't prompt for a password </para></listitem>
205 <listitem><para>mount read-only </para></listitem>
209 <term>rw</term><listitem><para>mount read-write </para></listitem>
213 <term>iocharset=<arg></term>
215 sets the charset used by the Linux side for codepage
216 to charset translations (NLS). Argument should be the
217 name of a charset, like iso8859-1. (Note: only kernel
223 <term>codepage=<arg></term>
225 sets the codepage the server uses. See the iocharset
226 option. Example value cp850. (Note: only kernel 2.4.0
232 <term>ttl=<arg></term>
234 sets how long a directory listing is cached in milliseconds
235 (also affects visibility of file size and date
236 changes). A higher value means that changes on the
237 server take longer to be noticed but it can give
238 better performance on large directories, especially
239 over long distances. Default is 1000ms but something
240 like 10000ms (10 seconds) is probably more reasonable
242 (Note: only kernel 2.4.2 or later)
252 <title>ENVIRONMENT VARIABLES</title>
254 <para>The variable <envar>USER</envar> may contain the username 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. The variable can be used to set both username and
258 password by using the format username%password.</para>
260 <para>The variable <envar>PASSWD</envar> may contain the password of the
261 person using the client. This information is used only if the
262 protocol level is high enough to support session-level
265 <para>The variable <envar>PASSWD_FILE</envar> may contain the pathname
266 of a file to read the password from. A single line of input is
267 read and used as the password.</para>
274 <para>Passwords and other options containing , can not be handled.
275 For passwords an alternative way of passing them is in a credentials
276 file or in the PASSWD environment.</para>
278 <para>The credentials file does not handle usernames or passwords with
279 leading space.</para>
281 <para>One smbfs bug is important enough to mention here, even if it
282 is a bit misplaced:</para>
286 <listitem><para>Mounts sometimes stop working. This is usually
287 caused by smbmount terminating. Since smbfs needs smbmount to
288 reconnect when the server disconnects, the mount will eventually go
289 dead. An umount/mount normally fixes this. At least 2 ways to
290 trigger this bug are known.</para></listitem>
294 <para>Note that the typical response to a bug report is suggestion
295 to try the latest version first. So please try doing that first,
296 and always include which versions you use of relevant software
297 when reporting bugs (minimum: samba, kernel, distribution)</para>
303 <title>SEE ALSO</title>
305 <para>Documentation/filesystems/smbfs.txt in the linux kernel
306 source tree may contain additional options and information.</para>
308 <para>FreeBSD also has a smbfs, but it is not related to smbmount</para>
310 <para>For Solaris, HP-UX and others you may want to look at <citerefentry><refentrytitle>smbsh</refentrytitle>
311 <manvolnum>1</manvolnum></citerefentry> or at other solutions, such as
312 Sharity or perhaps replacing the SMB server with a NFS server.</para>
318 <title>AUTHOR</title>
320 <para>Volker Lendecke, Andrew Tridgell, Michael H. Warfield
323 <para>The current maintainer of smbfs and the userspace
324 tools <command>smbmount</command>, <command>smbumount</command>,
325 and <command>smbmnt</command> is <ulink
326 url="mailto:urban@teststation.com">Urban Widmark</ulink>.
327 The <ulink url="mailto:samba@samba.org">SAMBA Mailing list</ulink>
328 is the preferred place to ask questions regarding these programs.
331 <para>The conversion of this manpage for Samba 2.2 was performed
332 by Gerald Carter. The conversion to DocBook XML 4.2 for Samba 3.0
333 was done by Alexander Bokovoy.</para>