1 <!DOCTYPE refentry PUBLIC "-//OASIS//DTD DocBook V4.1//EN">
2 <refentry id="smbmount">
5 <refentrytitle>smbmount</refentrytitle>
6 <manvolnum>8</manvolnum>
11 <refname>smbmount</refname>
12 <refpurpose>mount an smbfs filesystem</refpurpose>
17 <command>smbumount</command>
18 <arg choice="req">service</arg>
19 <arg choice="req">mount-point</arg>
20 <arg choice="opt">-o options</arg>
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 <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>
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>
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>
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>
53 <title>OPTIONS</title>
57 <term>username=<arg></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>
67 <term>password=<arg></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
76 Note that password which contain the arguement 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.
86 <term>credentials=<filename></term>
87 <listitem><para>specifies a file that contains a username
88 and/or password. The format of the file is:</para>
92 username = <value>
93 password = <value>
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.
104 <term>netbiosname=<arg></term>
105 <listitem><para>sets the source NetBIOS name. It defaults
106 to the local hostname. </para></listitem>
110 <term>uid=<arg></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.
119 <term>gid=<arg></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>
128 <term>port=<arg></term>
129 <listitem><para>sets the remote SMB port number. The default
130 is 139. </para></listitem>
135 <term>fmask=<arg></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>
143 <term>dmask=<arg></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>
151 <term>debug=<arg></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>
160 <term>ip=<arg></term>
161 <listitem><para>sets the destination host or IP address.
168 <term>workgroup=<arg></term>
169 <listitem><para>sets the workgroup on the destination </para>
175 <term>sockopt=<arg></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.
184 <term>scope=<arg></term>
185 <listitem><para>sets the NetBIOS scope </para></listitem>
190 <listitem><para>don't prompt for a password </para></listitem>
196 <listitem><para>mount read-only </para></listitem>
200 <term>rw</term><listitem><para>mount read-write </para></listitem>
204 <term>iocharset=<arg></term>
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
214 <term>codepage=<arg></term>
216 sets the codepage the server uses. See the iocharset
217 option. Example value cp850. (Note: only kernel 2.4.0
223 <term>ttl=<arg></term>
225 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
233 (Note: only kernel 2.4.2 or later)
243 <title>ENVIRONMENT VARIABLES</title>
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>
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
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>
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>
269 <para>The credentials file does not handle usernames or passwords with
270 leading space.</para>
272 <para>One smbfs bug is important enough to mention here, even if it
273 is a bit misplaced:</para>
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>
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>
294 <title>SEE ALSO</title>
296 <para>Documentation/filesystems/smbfs.txt in the linux kernel
297 source tree may contain additional options and information.</para>
299 <para>FreeBSD also has a smbfs, but it is not related to smbmount</para>
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
310 <title>AUTHOR</title>
312 <para>Volker Lendecke, Andrew Tridgell, Michael H. Warfield
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.
323 <para>The conversion of this manpage for Samba 2.2 was performed
324 by Gerald Carter</para>