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 '../entities/global.entities'> %globalentities;
6 <refentry id="mount.cifs.8">
9 <refentrytitle>mount.cifs</refentrytitle>
10 <manvolnum>8</manvolnum>
15 <refname>mount.cifs</refname>
16 <refpurpose>mount using the Common Internet File System (CIFS)</refpurpose>
22 <command>mount.cifs</command>
23 <arg choice="req">service</arg>
24 <arg choice="req">mount-point</arg>
25 <arg choice="opt">-o options</arg>
30 <title>DESCRIPTION</title>
32 <para>This tool is part of the <citerefentry><refentrytitle>samba</refentrytitle>
33 <manvolnum>7</manvolnum></citerefentry> suite.</para>
35 <para>mount.cifs mounts a Linux CIFS filesystem. It
36 is usually invoked indirectly by
37 the <citerefentry><refentrytitle>mount</refentrytitle><manvolnum>8</manvolnum></citerefentry> command when using the
38 "-t cifs" option. This command only works in Linux, and the kernel must
39 support the cifs filesystem. The CIFS protocol is the successor to the
40 SMB protocol and is supported by most Windows servers and many other
41 commercial servers and Network Attached Storage appliances as well as
42 by the popular Open Source server Samba.
46 The mount.cifs utility attaches the UNC name (exported network resource) to
47 the local directory <emphasis>mount-point</emphasis>. It is possible to set the mode for mount.cifs to
48 setuid root to allow non-root users to mount shares to directories for which they
49 have write permission.
53 Options to <emphasis>mount.cifs</emphasis> are specified as a comma-separated
54 list of key=value pairs. It is possible to send options other
55 than those listed here, assuming that cifs filesystem supports them.
56 Unrecognized cifs mount options passed to the cifs vfs kernel code will be logged to the
61 <para><emphasis>mount.cifs</emphasis> causes the cifs vfs to launch a thread named cifsd. After mounting it keeps running until
62 the mounted resource is unmounted (usually via the umount utility).
68 <title>OPTIONS</title>
70 <varlistentry><term>user=<replaceable>arg</replaceable></term>
72 <listitem><para>specifies the username to connect as. If
73 this is not given, then the environment variable <emphasis>USER</emphasis> is used. This option can also take the
74 form "user%password" or "user/workgroup" or
75 "user/workgroup%password" to allow the password and workgroup
76 to be specified as part of the username.
81 The cifs vfs accepts the parameter <parameter>user=</parameter>, or for users familiar with smbfs it accepts the longer form of the parameter <parameter>username=</parameter>. Similarly the longer smbfs style parameter names may be accepted as synonyms for the shorter cifs parameters <parameter>pass=</parameter>,<parameter>dom=</parameter> and <parameter>cred=</parameter>.
88 <varlistentry><term>password=<replaceable>arg</replaceable></term>
90 <listitem><para>specifies the CIFS password. If this
91 option is not given then the environment variable
92 <emphasis>PASSWD</emphasis> is used. If the password is not specified
93 directly or indirectly via an argument to mount <emphasis>mount.cifs</emphasis> will prompt
94 for a password, unless the guest option is specified.
97 <para>Note that a password which contains the delimiter
98 character (i.e. a comma ',') will fail to be parsed correctly
99 on the command line. However, the same password defined
100 in the PASSWD environment variable or via a credentials file (see
101 below) will be read correctly.
103 </listitem></varlistentry>
105 <varlistentry><term>credentials=<replaceable>filename</replaceable></term>
108 specifies a file that contains a username
109 and/or password. The format of the file is:
113 username=<replaceable>value</replaceable>
114 password=<replaceable>value</replaceable>
118 This is preferred over having passwords in plaintext in a
119 shared file, such as <filename>/etc/fstab</filename>. Be sure to protect any
120 credentials file properly.
122 </listitem></varlistentry>
125 <term>uid=<replaceable>arg</replaceable></term>
127 <listitem><para>sets the uid that will own all files on
128 the mounted filesystem.
129 It may be specified as either a username or a numeric uid.
130 This parameter is ignored when the target server supports
131 the CIFS Unix extensions.</para></listitem>
135 <term>gid=<replaceable>arg</replaceable></term>
137 <listitem><para>sets the gid that will own all files on
138 the mounted filesystem.
139 It may be specified as either a groupname or a numeric
140 gid. This parameter is ignored when the target server supports
141 the CIFS Unix extensions.
146 <term>port=<replaceable>arg</replaceable></term>
148 <listitem><para>sets the port number on the server to attempt to contact to negotiate
149 CIFS support. If the CIFS server is not listening on this port or
150 if it is not specified, the default ports will be tried i.e.
151 port 445 is tried and if no response then port 139 is tried.
156 <term>file_mode=<replaceable>arg</replaceable></term>
158 <listitem><para>If the server does not support the CIFS Unix extensions this
159 overrides the default file mode.</para></listitem>
163 <term>dir_mode=<replaceable>arg</replaceable></term>
165 <listitem><para>If the server does not support the CIFS Unix extensions this
166 overrides the default mode for directories. </para></listitem>
170 <term>ip=<replaceable>arg</replaceable></term>
172 <listitem><para>sets the destination host or IP address.</para></listitem>
176 <term>domain=<replaceable>arg</replaceable></term>
178 <listitem><para>sets the domain (workgroup) of the user </para></listitem>
184 <listitem><para>don't prompt for a password </para></listitem>
189 <term>iocharset</term>
191 <listitem><para>Charset used to convert local path names to and from
192 Unicode. Unicode is used by default for network path
193 names if the server supports it. If iocharset is
194 not specified then the nls_default specified
195 during the local client kernel build will be used.
196 If server does not support Unicode, this parameter is
197 unused. </para></listitem>
204 <listitem><para>mount read-only</para></listitem>
210 <listitem><para>mount read-write</para></listitem>
215 <listitem><para>default network read size</para></listitem>
221 <listitem><para>default network write size</para></listitem>
228 <title>ENVIRONMENT VARIABLES</title>
231 The variable <emphasis>USER</emphasis> may contain the username of the
232 person to be used to authenticate to the server.
233 The variable can be used to set both username and
234 password by using the format username%password.
238 The variable <emphasis>PASSWD</emphasis> may contain the password of the
239 person using the client.
243 The variable <emphasis>PASSWD_FILE</emphasis> may contain the pathname
244 of a file to read the password from. A single line of input is
245 read and used as the password.
253 <para>This command may be used only by root, unless installed setuid, in which case the noeexec and nosuid mount flags are enabled.</para>
257 <title>CONFIGURATION</title>
259 The primary mechanism for making configuration changes and for reading
260 debug information for the cifs vfs is via the Linux /proc filesystem.
261 In the directory <filename>/proc/fs/cifs</filename> are various
262 configuration files and pseudo files which can display debug information.
263 For more information see the kernel file <filename>fs/cifs/README</filename>.
270 <para>Passwords and other options containing , can not be handled.
271 For passwords an alternative way of passing them is in a credentials
272 file or in the PASSWD environment.</para>
274 <para>The credentials file does not handle usernames or passwords with
275 leading space.</para>
278 Note that the typical response to a bug report is a suggestion
279 to try the latest version first. So please try doing that first,
280 and always include which versions you use of relevant software
281 when reporting bugs (minimum: mount.cifs (try mount.cifs -V), kernel (see /proc/version) and
282 server type you are trying to contact.
289 <title>VERSION</title>
291 <para>This man page is correct for version 1.0.6 of
292 the cifs vfs filesystem (roughly Linux kernel 2.6.6).</para>
296 <title>SEE ALSO</title>
298 Documentation/filesystems/cifs.txt and fs/cifs/README in the linux kernel
299 source tree may contain additional options and information.
304 <title>AUTHOR</title>
306 <para>Steve French</para>
308 <para>The syntax and manpage were loosely based on that of smbmount. It
309 was converted to Docbook/XML by Jelmer Vernooij.</para>
311 <para>The maintainer of the Linux cifs vfs and the userspace
312 tool <emphasis>mount.cifs</emphasis> is <ulink url="mailto:sfrench@samba.org">Steve French</ulink>.
313 The <ulink url="mailto:linux-cifs-client@lists.samba.org">Linux CIFS Mailing list</ulink>
314 is the preferred place to ask questions regarding these programs.