8100ce04a8d61e543a2ad89726532e7a82f61ea7
[samba.git] / docs / manpages / mount.cifs.8.xml
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" [
3                                   
4 <!ENTITY % globalentities SYSTEM '../entities/global.entities'> %globalentities;
5 ]>
6 <refentry id="mount.cifs.8">
7
8 <refmeta>
9         <refentrytitle>mount.cifs</refentrytitle>
10         <manvolnum>8</manvolnum>
11 </refmeta>
12
13
14 <refnamediv>
15         <refname>mount.cifs</refname>
16         <refpurpose>mount using the Common Internet File System (CIFS)</refpurpose>
17 </refnamediv>
18
19 <refsynopsisdiv>
20         <cmdsynopsis>
21
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>      
26         </cmdsynopsis>
27 </refsynopsisdiv>
28
29 <refsect1>
30         <title>DESCRIPTION</title>
31
32         <para>This tool is part of the <citerefentry><refentrytitle>samba</refentrytitle>
33         <manvolnum>7</manvolnum></citerefentry> suite.</para>
34
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.
43         </para>
44
45         <para>
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.
50         </para>
51
52         <para>
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
57 kernel log.
58
59         </para>
60
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).
63         </para>
64
65 </refsect1>
66
67 <refsect1>
68         <title>OPTIONS</title>
69         <variablelist>
70                 <varlistentry><term>user=<replaceable>arg</replaceable></term>
71
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.
77                 </para>
78
79 <note>
80         <para>
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>.
82         </para>
83 </note>
84
85                 </listitem>
86         </varlistentry>
87
88         <varlistentry><term>password=<replaceable>arg</replaceable></term>
89
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.
95 </para>
96
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.
102 </para>
103         </listitem></varlistentry>
104
105         <varlistentry><term>credentials=<replaceable>filename</replaceable></term>
106
107                 <listitem><para>
108                                 specifies a file that contains a username
109                                 and/or password. The format of the file is:
110                         </para>
111
112 <programlisting>
113                 username=<replaceable>value</replaceable>
114                 password=<replaceable>value</replaceable>
115 </programlisting>
116                 
117                 <para>
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.
121                 </para>
122         </listitem></varlistentry>
123
124         <varlistentry>
125                 <term>uid=<replaceable>arg</replaceable></term>
126
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>
132         </varlistentry>
133
134         <varlistentry>
135                 <term>gid=<replaceable>arg</replaceable></term>
136
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.
142                 </para></listitem>
143         </varlistentry>
144
145         <varlistentry>
146                 <term>port=<replaceable>arg</replaceable></term>
147
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.
152                 </para></listitem>
153         </varlistentry>
154
155         <varlistentry>
156                 <term>file_mode=<replaceable>arg</replaceable></term>
157
158                 <listitem><para>If the server does not support the CIFS Unix extensions this
159                                 overrides the default file mode.</para></listitem>
160         </varlistentry>
161
162         <varlistentry>
163                 <term>dir_mode=<replaceable>arg</replaceable></term>
164
165                 <listitem><para>If the server does not support the CIFS Unix extensions this
166                                 overrides the default mode for directories. </para></listitem>
167         </varlistentry>
168
169         <varlistentry>
170                 <term>ip=<replaceable>arg</replaceable></term>
171
172                 <listitem><para>sets the destination host or IP address.</para></listitem>
173         </varlistentry>
174
175         <varlistentry>
176                 <term>domain=<replaceable>arg</replaceable></term>
177
178                 <listitem><para>sets the domain (workgroup) of the user </para></listitem>
179         </varlistentry>
180
181         <varlistentry>
182                 <term>guest</term>
183
184                 <listitem><para>don't prompt for a password </para></listitem>
185
186         </varlistentry>
187
188         <varlistentry>
189                 <term>iocharset</term>
190
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>
198
199         </varlistentry>
200
201         <varlistentry>
202                 <term>ro</term>
203
204                 <listitem><para>mount read-only</para></listitem>
205
206         </varlistentry>
207
208         <varlistentry>
209                 <term>rw</term>
210                 <listitem><para>mount read-write</para></listitem>
211         </varlistentry>
212
213         <varlistentry>
214                 <term>rsize</term>
215                 <listitem><para>default network read size</para></listitem>
216         </varlistentry>
217
218         <varlistentry>
219                 <term>wsize</term>
220
221                 <listitem><para>default network write size</para></listitem>
222         </varlistentry>
223
224         </variablelist>
225 </refsect1>
226
227 <refsect1>
228         <title>ENVIRONMENT VARIABLES</title>
229
230         <para>
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.
235         </para>
236         
237         <para>
238                 The variable <emphasis>PASSWD</emphasis> may contain the password of the
239 person using the client.
240         </para>
241
242         <para>
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.
246         </para>
247
248 </refsect1>
249
250 <refsect1>
251         <title>NOTES</title>
252         
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>
254 </refsect1>
255
256 <refsect1>
257         <title>CONFIGURATION</title>
258                 <para>
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>.
264 </para>
265 </refsect1>
266
267 <refsect1>
268         <title>BUGS</title>
269
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>
273
274         <para>The credentials file does not handle usernames or passwords with
275                 leading space.</para>
276
277         <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.
283 </para>
284 </refsect1>
285
286
287
288 <refsect1>
289         <title>VERSION</title>
290
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>
293 </refsect1>
294
295 <refsect1>
296         <title>SEE ALSO</title>
297         <para>
298         Documentation/filesystems/cifs.txt and fs/cifs/README in the linux kernel
299         source tree may contain additional options and information.
300 </para>
301 </refsect1>
302
303 <refsect1>
304         <title>AUTHOR</title>
305         
306         <para>Steve French</para>
307
308         <para>The syntax and manpage were loosely based on that of smbmount. It 
309                 was converted to Docbook/XML by Jelmer Vernooij.</para>
310
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. 
315         </para>
316
317 </refsect1>
318
319 </refentry>