Fix idmap_ad sgml
[Samba.git] / docs / manpages-3 / mount.cifs.8.xml
blob576c28c44388b56fb360a780fd0c1d17506511d6
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). If the CIFS Unix Extensions
225                 are not negotiated, for newly created files and directories
226                 instead of using the default uid and gid specified on the
227                 the mount, cache the new file's uid and gid locally which means
228                 that the uid for the file can change when the inode is
229                 reloaded (or the user remounts the share).</para></listitem>
230         </varlistentry>
232         <varlistentry>
233                 <term>nosetuids</term>
234                 <listitem><para>The client will not attempt to set the uid and gid on
235                 on newly created files, directories, and devices (create,
236                 mkdir, mknod) which will result in the server setting the
237                 uid and gid to the default (usually the server uid of the
238                 user who mounted the share).  Letting the server (rather than
239                 the client) set the uid and gid is the default.If the CIFS
240                 Unix Extensions are not negotiated then the uid and gid for
241                 new files will appear to be the uid (gid) of the mounter or the
242                 uid (gid) parameter specified on the mount.</para></listitem>
243         </varlistentry>
245         <varlistentry>
246                 <term>perm</term>
247                 <listitem><para>Client does permission checks (vfs_permission check of uid
248                 and gid of the file against the mode and desired operation),
249                 Note that this is in addition to the normal ACL check on the
250                 target machine done by the server software.
251                 Client permission checking is enabled by default.</para></listitem>
252         </varlistentry>
254         <varlistentry>
255                 <term>noperm</term>
256                 <listitem><para>Client does not do permission checks.  This can expose
257                 files on this mount to access by other users on the local
258                 client system. It is typically only needed when the server
259                 supports the CIFS Unix Extensions but the UIDs/GIDs on the
260                 client and server system do not match closely enough to allow
261                 access by the user doing the mount.
262                 Note that this does not affect the normal ACL check on the
263                 target machine done by the server software (of the server
264                 ACL against the user name provided at mount time).</para></listitem>
265         </varlistentry>
267         <varlistentry>
268                 <term>directio</term>
269                 <listitem><para>Do not do inode data caching on files opened on this mount.
270                 This precludes mmaping files on this mount. In some cases
271                 with fast networks and little or no caching benefits on the
272                 client (e.g. when the application is doing large sequential
273                 reads bigger than page size without rereading the same data)
274                 this can provide better performance than the default
275                 behavior which caches reads (readahead) and writes
276                 (writebehind) through the local Linux client pagecache
277                 if oplock (caching token) is granted and held. Note that
278                 direct allows write operations larger than page size
279                 to be sent to the server. On some kernels this requires the cifs.ko module
280                 to be built with the CIFS_EXPERIMENTAL configure option.</para></listitem>
281         </varlistentry>
283         <varlistentry>
284                 <term>mapchars</term>
285                 <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)
286                 to the remap range (above 0xF000), which also
287                 allows the CIFS client to recognize files created with
288                 such characters by Windows's POSIX emulation. This can
289                 also be useful when mounting to most versions of Samba
290                 (which also forbids creating and opening files
291                 whose names contain any of these seven characters).
292                 This has no effect if the server does not support
293                 Unicode on the wire.</para></listitem>
294         </varlistentry>
296         <varlistentry>
297                 <term>nomapchars</term>
298                 <listitem><para>Do not translate any of these seven characters (default)</para></listitem>
299         </varlistentry>
301         <varlistentry>
302                 <term>intr</term>
303                 <listitem><para>currently unimplemented</para></listitem>
304         </varlistentry>
306         <varlistentry>
307                 <term>nointr</term>
308                 <listitem><para>(default) currently unimplemented </para></listitem>
309         </varlistentry>
311         <varlistentry>
312                 <term>hard</term>
313                 <listitem><para>The  program  accessing  a file on the cifs mounted file system will hang when the
314               server crashes.</para></listitem>
315         </varlistentry>
317         <varlistentry>
318                 <term>soft</term>
319                 <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>
320         </varlistentry>
322         <varlistentry>
323                 <term>noacl</term>
324                 <listitem><para>Do not allow POSIX ACL operations even if server would support them.</para><para>
325                 The CIFS client can get and set POSIX ACLs (getfacl, setfacl) to Samba servers
326                 version 3.10 and later.  Setting POSIX ACLs requires enabling both XATTR and
327                 then POSIX support in the CIFS configuration options when building the cifs
328                 module.  POSIX ACL support can be disabled on a per mount basic by specifying
329                 "noacl" on mount.</para>
330                 </listitem>
331         </varlistentry>
333         <varlistentry>
334                 <term>nocase</term>
335                 <listitem>
336                 <para>Request case insensitive path name matching (case
337                 sensitive is the default if the server suports it).
338                 </para>
339                 </listitem>
340         </varlistentry>
342         <varlistentry>
343                 <term>sec=</term>
344                 <listitem>
345                 <para>Security mode.  Allowed values are:</para>
346                         <itemizedlist>
347                         <listitem><para>none    attempt to connection as a null user (no name) </para></listitem>
348                         <listitem><para>krb5    Use Kerberos version 5 authentication</para></listitem>
349                         <listitem><para>krb5i   Use Kerberos authentication and packet signing</para></listitem>
350                         <listitem><para>ntlm    Use NTLM password hashing (default)</para></listitem>
351                         <listitem><para>ntlmi   Use NTLM password hashing with signing (if
352                                 /proc/fs/cifs/PacketSigningEnabled on or if
353                                 server requires signing also can be the default)</para></listitem>
354                         <listitem><para>ntlmv2  Use NTLMv2 password hashing</para></listitem>
355                         <listitem><para>ntlmv2i Use NTLMv2 password hashing with packet signing</para></listitem>
356                         </itemizedlist>
358                         <para>[NB This [sec parameter] is under development and expected to be available in cifs kernel module 1.40 and later]
359                 </para>
360                 </listitem>
361         </varlistentry>
363         <varlistentry>
364                 <term>nobrl</term>
365                 <listitem>
366                 <para>Do not send byte range lock requests to the server.
367                 This is necessary for certain applications that break
368                 with cifs style mandatory byte range locks (and most
369                 cifs servers do not yet support requesting advisory
370                 byte range locks).
371                 </para>
372                 </listitem>
373         </varlistentry>
375         <varlistentry>
376                 <term>sfu</term>
377                 <listitem>
378                 <para>
379                 When the CIFS Unix Extensions are not negotiated, attempt to
380                 create device files and fifos in a format compatible with
381                 Services for Unix (SFU).  In addition retrieve bits 10-12
382                 of the mode via the SETFILEBITS extended attribute (as
383                 SFU does).  In the future the bottom 9 bits of the mode
384                 mode also will be emulated using queries of the security
385                 descriptor (ACL). [NB: requires version 1.39 or later
386                 of the CIFS VFS.  To recognize symlinks and be able
387                 to create symlinks in an SFU interoperable form
388                 requires version 1.40 or later of the CIFS VFS kernel module.
389                 </para>
390                 </listitem>
391         </varlistentry>
393         <varlistentry>
394                 <term>serverino</term>
395                 <listitem><para>Use inode numbers (unique persistent file identifiers)
396                 returned by the server instead of automatically generating
397                 temporary inode numbers on the client.  Although server inode numbers
398                 make it easier to spot hardlinked files (as they will have
399                 the same inode numbers) and inode numbers may be persistent (which is
400                 userful for some sofware),
401                 the server does not guarantee that the inode numbers
402                 are unique if multiple server side mounts are exported under a
403                 single share (since inode numbers on the servers might not
404                 be unique if multiple filesystems are mounted under the same
405                 shared higher level directory).  Note that not all 
406                 servers support returning server inode numbers, although
407                 those that support the CIFS Unix Extensions, and Windows 2000 and
408                 later servers typically do support this (although not necessarily
409                 on every local server filesystem). Parameter has no effect if
410                 the server lacks support for returning inode numbers or equivalent.
411                 </para></listitem>
412         </varlistentry>
414         <varlistentry>
415                 <term>noserverino</term>
416                 <listitem><para>client generates inode numbers (rather than using the actual one
417                 from the server) by default.
418                 </para></listitem>
419         </varlistentry>
421         <varlistentry>
422                 <term>nouser_xattr</term>
423                 <listitem><para>(default) Do not allow getfattr/setfattr to get/set xattrs, even if server would support it otherwise. </para></listitem>
424         </varlistentry>
426         <varlistentry>
427                 <term>rsize=<replaceable>arg</replaceable></term>
428                 <listitem><para>default network read size</para></listitem>
429         </varlistentry>
431         <varlistentry>
432                 <term>wsize=<replaceable>arg</replaceable></term>
434                 <listitem><para>default network write size</para></listitem>
435         </varlistentry>
436          <varlistentry>
437                 <term>--verbose</term>
438                 <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>
439         </varlistentry>
442         </variablelist>
443 </refsect1>
445 <refsect1>
446         <title>ENVIRONMENT VARIABLES</title>
448         <para>
449                 The variable <emphasis>USER</emphasis> may contain the username of the
450 person to be used to authenticate to the server.
451 The variable can be used to set both username and
452 password by using the format username%password.
453         </para>
454         
455         <para>
456                 The variable <emphasis>PASSWD</emphasis> may contain the password of the
457 person using the client.
458         </para>
460         <para>
461                 The variable <emphasis>PASSWD_FILE</emphasis> may contain the pathname
462 of a file to read the password from. A single line of input is
463 read and used as the password.
464         </para>
466 </refsect1>
468 <refsect1>
469         <title>NOTES</title>
470         
471         <para>This command may be used only by root, unless installed setuid, in which case the noeexec and nosuid mount flags are enabled.</para>
472 </refsect1>
474 <refsect1>
475         <title>CONFIGURATION</title>
476                 <para>
477 The primary mechanism for making configuration changes and for reading 
478 debug information for the cifs vfs is via the Linux /proc filesystem.
479 In the directory <filename>/proc/fs/cifs</filename> are various 
480 configuration files and pseudo files which can display debug information.  
481 There are additional startup options such as maximum buffer size and number
482 of buffers which only may be set when the kernel cifs vfs (cifs.ko module) is 
483 loaded.  These can be seen by running the modinfo utility against the file
484 cifs.ko which will list the options that may be passed to cifs during module
485 installation (device driver load).
486 For more information see the kernel file <filename>fs/cifs/README</filename>.
487 </para>
488 </refsect1>
490 <refsect1>
491         <title>BUGS</title>
493         <para>Mounting using the CIFS URL specification is currently not supported.
494         </para>
496         <para>The credentials file does not handle usernames or passwords with
497                 leading space.</para>
499         <para>
500 Note that the typical response to a bug report is a suggestion
501 to try the latest version first. So please try doing that first,
502 and always include which versions you use of relevant software
503 when reporting bugs (minimum: mount.cifs (try mount.cifs -V), kernel (see /proc/version) and
504 server type you are trying to contact.
505 </para>
506 </refsect1>
510 <refsect1>
511         <title>VERSION</title>
513         <para>This man page is correct for version 1.39 of 
514         the cifs vfs filesystem (roughly Linux kernel 2.6.15).</para>
515 </refsect1>
517 <refsect1>
518         <title>SEE ALSO</title>
519         <para>
520         Documentation/filesystems/cifs.txt and fs/cifs/README in the linux kernel
521         source tree may contain additional options and information.
522 </para>
523         <para><citerefentry><refentrytitle>umount.cifs</refentrytitle>
524         <manvolnum>8</manvolnum></citerefentry></para>
526 </refsect1>
528 <refsect1>
529         <title>AUTHOR</title>
530         
531         <para>Steve French</para>
533         <para>The syntax and manpage were loosely based on that of smbmount. It 
534                 was converted to Docbook/XML by Jelmer Vernooij.</para>
536         <para>The maintainer of the Linux cifs vfs and the userspace
537                 tool <emphasis>mount.cifs</emphasis> is <ulink url="mailto:sfrench@samba.org">Steve French</ulink>.
538                 The <ulink url="mailto:linux-cifs-client@lists.samba.org">Linux CIFS Mailing list</ulink> 
539                 is the preferred place to ask questions regarding these programs. 
540         </para>
542 </refsect1>
544 </refentry>