Remove obsolete elements.
[Samba.git] / docs / manpages-3 / mount.cifs.8.xml
blobbdccc1399e826e867a06d4799cfaec7bd4ae1d03
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="mount.cifs.8">
5 <refmeta>
6         <refentrytitle>mount.cifs</refentrytitle>
7         <manvolnum>8</manvolnum>
8 </refmeta>
11 <refnamediv>
12         <refname>mount.cifs</refname>
13         <refpurpose>mount using the Common Internet File System (CIFS)</refpurpose>
14 </refnamediv>
16 <refsynopsisdiv>
17         <cmdsynopsis>
19                 <command>mount.cifs</command>
20                 <arg choice="req">service</arg> 
21                 <arg choice="req">mount-point</arg>     
22                 <arg choice="opt">-o options</arg>      
23         </cmdsynopsis>
24 </refsynopsisdiv>
26 <refsect1>
27         <title>DESCRIPTION</title>
29         <para>This tool is part of the <citerefentry><refentrytitle>samba</refentrytitle>
30         <manvolnum>7</manvolnum></citerefentry> suite.</para>
32         <para>mount.cifs mounts a Linux CIFS filesystem. It
33 is usually invoked indirectly by
34 the <citerefentry><refentrytitle>mount</refentrytitle><manvolnum>8</manvolnum></citerefentry> command when using the 
35 "-t cifs" option. This command only works in Linux, and the kernel must
36 support the cifs filesystem. The CIFS protocol is the successor to the 
37 SMB protocol and is supported by most Windows servers and many other
38 commercial servers and Network Attached Storage appliances as well as 
39 by the popular Open Source server Samba.
40         </para>
42         <para>
43         The mount.cifs utility attaches the UNC name (exported network resource) to
44         the local directory <emphasis>mount-point</emphasis>. It is possible to set the mode for mount.cifs to 
45 setuid root to allow non-root users to mount shares to directories for which they
46 have write permission.
47         </para>
49         <para>
50                 Options to <emphasis>mount.cifs</emphasis> are specified as a comma-separated
51 list of key=value pairs. It is possible to send options other
52 than those listed here, assuming that the cifs filesystem kernel module (cifs.ko) supports them.   
53 Unrecognized cifs mount options passed to the cifs vfs kernel code will be logged to the
54 kernel log.
56         </para>
58         <para><emphasis>mount.cifs</emphasis> causes the cifs vfs to launch a thread named cifsd. After mounting it keeps running until
59                 the mounted resource is unmounted (usually via the umount utility).
60         </para>
62 </refsect1>
64 <refsect1>
65         <title>OPTIONS</title>
66         <variablelist>
67                 <varlistentry><term>user=<replaceable>arg</replaceable></term>
69                 <listitem><para>specifies the username to connect as. If
70                                 this is not given, then the environment variable <emphasis>USER</emphasis> is used. This option can also take the
71 form "user%password" or "workgroup/user" or
72 "workgroup/user%password" to allow the password and workgroup
73 to be specified as part of the username.
74                 </para>
76 <note>
77         <para>
78         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>.
79         </para>
80 </note>
82                 </listitem>
83         </varlistentry>
85         <varlistentry><term>password=<replaceable>arg</replaceable></term>
87                 <listitem><para>specifies the CIFS password. If this
88 option is not given then the environment variable
89 <emphasis>PASSWD</emphasis> is used. If the password is not specified 
90 directly or indirectly via an argument to mount <emphasis>mount.cifs</emphasis> will prompt
91 for a password, unless the guest option is specified.
92 </para>
94 <para>Note that a password which contains the delimiter
95 character (i.e. a comma ',') will fail to be parsed correctly
96 on the command line.  However, the same password defined
97 in the PASSWD environment variable or via a credentials file (see
98 below) or entered at the password prompt will be read correctly.
99 </para>
100         </listitem></varlistentry>
102         <varlistentry><term>credentials=<replaceable>filename</replaceable></term>
104                 <listitem><para>
105                                 specifies a file that contains a username
106                                 and/or password. The format of the file is:
107                         </para>
109 <programlisting>
110                 username=<replaceable>value</replaceable>
111                 password=<replaceable>value</replaceable>
112 </programlisting>
113                 
114                 <para>
115 This is preferred over having passwords in plaintext in a
116 shared file, such as <filename>/etc/fstab</filename>. Be sure to protect any
117 credentials file properly.
118                 </para>
119         </listitem></varlistentry>
121         <varlistentry>
122                 <term>uid=<replaceable>arg</replaceable></term>
124                 <listitem><para>sets the uid that will own all files on
125         the mounted filesystem.
126         It may be specified as either a username or a numeric uid.
127         This parameter is ignored when the target server supports
128         the CIFS Unix extensions.</para></listitem>
129         </varlistentry>
131         <varlistentry>
132                 <term>gid=<replaceable>arg</replaceable></term>
134                 <listitem><para>sets the gid that will own all files on
135 the mounted filesystem.
136 It may be specified as either a groupname or a numeric 
137 gid. This parameter is ignored when the target server supports
138 the CIFS Unix extensions.
139                 </para></listitem>
140         </varlistentry>
142         <varlistentry>
143                 <term>port=<replaceable>arg</replaceable></term>
145                 <listitem><para>sets the port number on the server to attempt to contact to negotiate
146 CIFS support.  If the CIFS server is not listening on this port or
147 if it is not specified, the default ports will be tried i.e. 
148 port 445 is tried and if no response then port 139 is tried.
149                 </para></listitem>
150         </varlistentry>
152         <varlistentry>
153                 <term>netbiosname=<replaceable>arg</replaceable></term>
155                 <listitem><para>When mounting to servers via port 139, specifies the RFC1001
156                 source name to use to represent the client netbios machine
157                 name when doing the RFC1001 netbios session initialize.
158                 </para></listitem>
159         </varlistentry>
161         <varlistentry>
162                 <term>file_mode=<replaceable>arg</replaceable></term>
164                 <listitem><para>If the server does not support the CIFS Unix extensions this
165                                 overrides the default file mode.</para></listitem>
166         </varlistentry>
168         <varlistentry>
169                 <term>dir_mode=<replaceable>arg</replaceable></term>
171                 <listitem><para>If the server does not support the CIFS Unix extensions this
172                                 overrides the default mode for directories. </para></listitem>
173         </varlistentry>
175         <varlistentry>
176                 <term>ip=<replaceable>arg</replaceable></term>
178                 <listitem><para>sets the destination host or IP address.</para></listitem>
179         </varlistentry>
181         <varlistentry>
182                 <term>domain=<replaceable>arg</replaceable></term>
184                 <listitem><para>sets the domain (workgroup) of the user </para></listitem>
185         </varlistentry>
187         <varlistentry>
188                 <term>guest</term>
190                 <listitem><para>don't prompt for a password </para></listitem>
192         </varlistentry>
194         <varlistentry>
195                 <term>iocharset</term>
197                 <listitem><para>Charset used to convert local path names to and from
198                 Unicode. Unicode is used by default for network path
199                 names if the server supports it. If iocharset is
200                 not specified then the nls_default specified
201                 during the local client kernel build will be used.
202                 If server does not support Unicode, this parameter is
203                 unused. </para></listitem>
205         </varlistentry>
207         <varlistentry>
208                 <term>ro</term>
210                 <listitem><para>mount read-only</para></listitem>
212         </varlistentry>
214         <varlistentry>
215                 <term>rw</term>
216                 <listitem><para>mount read-write</para></listitem>
217         </varlistentry>
219         <varlistentry>
220                 <term>setuids</term>
221                 <listitem><para>If the CIFS Unix extensions are negotiated with the server
222                 the client will attempt to set the effective uid and gid of
223                 the local process on newly created files, directories, and
224                 devices (create, mkdir, mknod).</para></listitem>
225         </varlistentry>
227         <varlistentry>
228                 <term>nosetuids</term>
229                 <listitem><para>The client will not attempt to set the uid and gid on
230                 on newly created files, directories, and devices (create,
231                 mkdir, mknod) which will result in the server setting the
232                 uid and gid to the default (usually the server uid of the
233                 user who mounted the share).  Letting the server (rather than
234                 the client) set the uid and gid is the default. This
235                 parameter has no effect if the CIFS Unix Extensions are not
236                 negotiated.</para></listitem>
237         </varlistentry>
239         <varlistentry>
240                 <term>perm</term>
241                 <listitem><para>Client does permission checks (vfs_permission check of uid
242                 and gid of the file against the mode and desired operation),
243                 Note that this is in addition to the normal ACL check on the
244                 target machine done by the server software.
245                 Client permission checking is enabled by default.</para></listitem>
246         </varlistentry>
248         <varlistentry>
249                 <term>noperm</term>
250                 <listitem><para>Client does not do permission checks.  This can expose
251                 files on this mount to access by other users on the local
252                 client system. It is typically only needed when the server
253                 supports the CIFS Unix Extensions but the UIDs/GIDs on the
254                 client and server system do not match closely enough to allow
255                 access by the user doing the mount.
256                 Note that this does not affect the normal ACL check on the
257                 target machine done by the server software (of the server
258                 ACL against the user name provided at mount time).</para></listitem>
259         </varlistentry>
261         <varlistentry>
262                 <term>directio</term>
263                 <listitem><para>Do not do inode data caching on files opened on this mount.
264                 This precludes mmaping files on this mount. In some cases
265                 with fast networks and little or no caching benefits on the
266                 client (e.g. when the application is doing large sequential
267                 reads bigger than page size without rereading the same data)
268                 this can provide better performance than the default
269                 behavior which caches reads (readahead) and writes
270                 (writebehind) through the local Linux client pagecache
271                 if oplock (caching token) is granted and held. Note that
272                 direct allows write operations larger than page size
273                 to be sent to the server. On some kernels this requires the cifs.ko module
274                 to be built with the CIFS_EXPERIMENTAL configure option.</para></listitem>
275         </varlistentry>
277         <varlistentry>
278                 <term>mapchars</term>
279                 <listitem><para>Translate six of the seven reserved characters (not backslash, but including the colon, question mark, pipe, asterik, greater than and less than characters)
280                 to the remap range (above 0xF000), which also
281                 allows the CIFS client to recognize files created with
282                 such characters by Windows's POSIX emulation. This can
283                 also be useful when mounting to most versions of Samba
284                 (which also forbids creating and opening files
285                 whose names contain any of these seven characters).
286                 This has no effect if the server does not support
287                 Unicode on the wire.</para></listitem>
288         </varlistentry>
290         <varlistentry>
291                 <term>nomapchars</term>
292                 <listitem><para>Do not translate any of these seven characters (default)</para></listitem>
293         </varlistentry>
295         <varlistentry>
296                 <term>intr</term>
297                 <listitem><para>currently unimplemented</para></listitem>
298         </varlistentry>
300         <varlistentry>
301                 <term>nointr</term>
302                 <listitem><para>(default) currently unimplemented </para></listitem>
303         </varlistentry>
305         <varlistentry>
306                 <term>hard</term>
307                 <listitem><para>The  program  accessing  a file on the cifs mounted file system will hang when the
308               server crashes.</para></listitem>
309         </varlistentry>
311         <varlistentry>
312                 <term>soft</term>
313                 <listitem><para>(default) The  program  accessing  a file on the cifs mounted file system will not hang when the server crashes and will return errors to the user application.</para></listitem>
314         </varlistentry>
316         <varlistentry>
317                 <term>--verbose</term>
318                 <listitem><para>Print additional debugging information for the mount. Note that this parameter must be specified before the -o. For example:</para><para>mount -t cifs //server/share /mnt --verbose -o user=username</para></listitem>
319         </varlistentry>
321         <varlistentry>
322                 <term>noacl</term>
323                 <listitem><para>Do not allow POSIX ACL operations even if server would support them.</para><para>
324                 The CIFS client can get and set POSIX ACLs (getfacl, setfacl) to Samba servers
325                 version 3.10 and later.  Setting POSIX ACLs requires enabling both XATTR and
326                 then POSIX support in the CIFS configuration options when building the cifs
327                 module.  POSIX ACL support can be disabled on a per mount basic by specifying
328                 "noacl" on mount.</para>
329         </listitem>
330         </varlistentry>
332         <varlistentry>
333                 <term>serverino</term>
334                 <listitem><para>Use inode numbers (unique persistent file identifiers)
335                 returned by the server instead of automatically generating
336                 temporary inode numbers on the client.  Although server inode numbers
337                 make it easier to spot hardlinked files (as they will have
338                 the same inode numbers) and inode numbers may be persistent (which is
339                 userful for some sofware),
340                 the server does not guarantee that the inode numbers
341                 are unique if multiple server side mounts are exported under a
342                 single share (since inode numbers on the servers might not
343                 be unique if multiple filesystems are mounted under the same
344                 shared higher level directory).  Note that not all 
345                 servers support returning server inode numbers, although
346                 those that support the CIFS Unix Extensions, and Windows 2000 and
347                 later servers typically do support this (although not necessarily
348                 on every local server filesystem). Parameter has no effect if
349                 the server lacks support for returning inode numbers or equivalent.
350                 </para></listitem>
351         </varlistentry>
353         <varlistentry>
354                 <term>noserverino</term>
355                 <listitem><para>client generates inode numbers (rather than using the actual one
356                 from the server) by default.
357                 </para></listitem>
358         </varlistentry>
360         <varlistentry>
361                 <term>nouser_xattr</term>
362                 <listitem><para>(default) Do not allow getfattr/setfattr to get/set xattrs, even if server would support it otherwise. </para></listitem>
363         </varlistentry>
365         <varlistentry>
366                 <term>rsize=<replaceable>arg</replaceable></term>
367                 <listitem><para>default network read size</para></listitem>
368         </varlistentry>
370         <varlistentry>
371                 <term>wsize=<replaceable>arg</replaceable></term>
373                 <listitem><para>default network write size</para></listitem>
374         </varlistentry>
376         </variablelist>
377 </refsect1>
379 <refsect1>
380         <title>ENVIRONMENT VARIABLES</title>
382         <para>
383                 The variable <emphasis>USER</emphasis> may contain the username of the
384 person to be used to authenticate to the server.
385 The variable can be used to set both username and
386 password by using the format username%password.
387         </para>
388         
389         <para>
390                 The variable <emphasis>PASSWD</emphasis> may contain the password of the
391 person using the client.
392         </para>
394         <para>
395                 The variable <emphasis>PASSWD_FILE</emphasis> may contain the pathname
396 of a file to read the password from. A single line of input is
397 read and used as the password.
398         </para>
400 </refsect1>
402 <refsect1>
403         <title>NOTES</title>
404         
405         <para>This command may be used only by root, unless installed setuid, in which case the noeexec and nosuid mount flags are enabled.</para>
406 </refsect1>
408 <refsect1>
409         <title>CONFIGURATION</title>
410                 <para>
411 The primary mechanism for making configuration changes and for reading 
412 debug information for the cifs vfs is via the Linux /proc filesystem.
413 In the directory <filename>/proc/fs/cifs</filename> are various 
414 configuration files and pseudo files which can display debug information.  
415 For more information see the kernel file <filename>fs/cifs/README</filename>.
416 </para>
417 </refsect1>
419 <refsect1>
420         <title>BUGS</title>
422         <para>Mounting using the CIFS URL specification is currently not supported.
423         </para>
425         <para>The credentials file does not handle usernames or passwords with
426                 leading space.</para>
428         <para>
429 Note that the typical response to a bug report is a suggestion
430 to try the latest version first. So please try doing that first,
431 and always include which versions you use of relevant software
432 when reporting bugs (minimum: mount.cifs (try mount.cifs -V), kernel (see /proc/version) and
433 server type you are trying to contact.
434 </para>
435 </refsect1>
439 <refsect1>
440         <title>VERSION</title>
442         <para>This man page is correct for version 1.34 of 
443         the cifs vfs filesystem (roughly Linux kernel 2.6.12).</para>
444 </refsect1>
446 <refsect1>
447         <title>SEE ALSO</title>
448         <para>
449         Documentation/filesystems/cifs.txt and fs/cifs/README in the linux kernel
450         source tree may contain additional options and information.
451 </para>
452         <para><citerefentry><refentrytitle>umount.cifs</refentrytitle>
453         <manvolnum>8</manvolnum></citerefentry></para>
455 </refsect1>
457 <refsect1>
458         <title>AUTHOR</title>
459         
460         <para>Steve French</para>
462         <para>The syntax and manpage were loosely based on that of smbmount. It 
463                 was converted to Docbook/XML by Jelmer Vernooij.</para>
465         <para>The maintainer of the Linux cifs vfs and the userspace
466                 tool <emphasis>mount.cifs</emphasis> is <ulink url="mailto:sfrench@samba.org">Steve French</ulink>.
467                 The <ulink url="mailto:linux-cifs-client@lists.samba.org">Linux CIFS Mailing list</ulink> 
468                 is the preferred place to ask questions regarding these programs. 
469         </para>
471 </refsect1>
473 </refentry>