source: branches/samba-3.3.x/docs/manpages/mount.cifs.8@ 309

Last change on this file since 309 was 309, checked in by Herwig Bauernfeind, 16 years ago

Update 3.3 to 3.3.7

File size: 23.4 KB
Line 
1.\" Title: mount.cifs
2.\" Author: [see the "AUTHOR" section]
3.\" Generator: DocBook XSL Stylesheets v1.74.0 <http://docbook.sf.net/>
4.\" Date: 07/28/2009
5.\" Manual: System Administration tools
6.\" Source: Samba 3.3
7.\" Language: English
8.\"
9.TH "MOUNT\&.CIFS" "8" "07/28/2009" "Samba 3\&.3" "System Administration tools"
10.\" -----------------------------------------------------------------
11.\" * (re)Define some macros
12.\" -----------------------------------------------------------------
13.\" ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
14.\" toupper - uppercase a string (locale-aware)
15.\" ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
16.de toupper
17.tr aAbBcCdDeEfFgGhHiIjJkKlLmMnNoOpPqQrRsStTuUvVwWxXyYzZ
18\\$*
19.tr aabbccddeeffgghhiijjkkllmmnnooppqqrrssttuuvvwwxxyyzz
20..
21.\" ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
22.\" SH-xref - format a cross-reference to an SH section
23.\" ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
24.de SH-xref
25.ie n \{\
26.\}
27.toupper \\$*
28.el \{\
29\\$*
30.\}
31..
32.\" ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
33.\" SH - level-one heading that works better for non-TTY output
34.\" ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
35.de1 SH
36.\" put an extra blank line of space above the head in non-TTY output
37.if t \{\
38.sp 1
39.\}
40.sp \\n[PD]u
41.nr an-level 1
42.set-an-margin
43.nr an-prevailing-indent \\n[IN]
44.fi
45.in \\n[an-margin]u
46.ti 0
47.HTML-TAG ".NH \\n[an-level]"
48.it 1 an-trap
49.nr an-no-space-flag 1
50.nr an-break-flag 1
51\." make the size of the head bigger
52.ps +3
53.ft B
54.ne (2v + 1u)
55.ie n \{\
56.\" if n (TTY output), use uppercase
57.toupper \\$*
58.\}
59.el \{\
60.nr an-break-flag 0
61.\" if not n (not TTY), use normal case (not uppercase)
62\\$1
63.in \\n[an-margin]u
64.ti 0
65.\" if not n (not TTY), put a border/line under subheading
66.sp -.6
67\l'\n(.lu'
68.\}
69..
70.\" ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
71.\" SS - level-two heading that works better for non-TTY output
72.\" ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
73.de1 SS
74.sp \\n[PD]u
75.nr an-level 1
76.set-an-margin
77.nr an-prevailing-indent \\n[IN]
78.fi
79.in \\n[IN]u
80.ti \\n[SN]u
81.it 1 an-trap
82.nr an-no-space-flag 1
83.nr an-break-flag 1
84.ps \\n[PS-SS]u
85\." make the size of the head bigger
86.ps +2
87.ft B
88.ne (2v + 1u)
89.if \\n[.$] \&\\$*
90..
91.\" ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
92.\" BB/BE - put background/screen (filled box) around block of text
93.\" ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
94.de BB
95.if t \{\
96.sp -.5
97.br
98.in +2n
99.ll -2n
100.gcolor red
101.di BX
102.\}
103..
104.de EB
105.if t \{\
106.if "\\$2"adjust-for-leading-newline" \{\
107.sp -1
108.\}
109.br
110.di
111.in
112.ll
113.gcolor
114.nr BW \\n(.lu-\\n(.i
115.nr BH \\n(dn+.5v
116.ne \\n(BHu+.5v
117.ie "\\$2"adjust-for-leading-newline" \{\
118\M[\\$1]\h'1n'\v'+.5v'\D'P \\n(BWu 0 0 \\n(BHu -\\n(BWu 0 0 -\\n(BHu'\M[]
119.\}
120.el \{\
121\M[\\$1]\h'1n'\v'-.5v'\D'P \\n(BWu 0 0 \\n(BHu -\\n(BWu 0 0 -\\n(BHu'\M[]
122.\}
123.in 0
124.sp -.5v
125.nf
126.BX
127.in
128.sp .5v
129.fi
130.\}
131..
132.\" ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
133.\" BM/EM - put colored marker in margin next to block of text
134.\" ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
135.de BM
136.if t \{\
137.br
138.ll -2n
139.gcolor red
140.di BX
141.\}
142..
143.de EM
144.if t \{\
145.br
146.di
147.ll
148.gcolor
149.nr BH \\n(dn
150.ne \\n(BHu
151\M[\\$1]\D'P -.75n 0 0 \\n(BHu -(\\n[.i]u - \\n(INu - .75n) 0 0 -\\n(BHu'\M[]
152.in 0
153.nf
154.BX
155.in
156.fi
157.\}
158..
159.\" -----------------------------------------------------------------
160.\" * set default formatting
161.\" -----------------------------------------------------------------
162.\" disable hyphenation
163.nh
164.\" disable justification (adjust text to left margin only)
165.ad l
166.\" -----------------------------------------------------------------
167.\" * MAIN CONTENT STARTS HERE *
168.\" -----------------------------------------------------------------
169.SH "Name"
170mount.cifs \- mount using the Common Internet File System (CIFS)
171.SH "Synopsis"
172.fam C
173.HP \w'\ 'u
174\FCmount\&.cifs\F[] {service} {mount\-point} [\-o\ options]
175.fam
176.SH "DESCRIPTION"
177.PP
178This tool is part of the
179\fBsamba\fR(7)
180suite\&.
181.PP
182mount\&.cifs mounts a Linux CIFS filesystem\&. It is usually invoked indirectly by the
183\fBmount\fR(8)
184command when using the "\-t cifs" option\&. This command only works in Linux, and the kernel must support the cifs filesystem\&. The CIFS protocol is the successor to the SMB protocol and is supported by most Windows servers and many other commercial servers and Network Attached Storage appliances as well as by the popular Open Source server Samba\&.
185.PP
186The mount\&.cifs utility attaches the UNC name (exported network resource) specified as
187\fIservice\fR
188(using //server/share syntax, where "server" is the server name or IP address and "share" is the name of the share) to the local directory
189\fImount\-point\fR\&. It is possible to set the mode for mount\&.cifs to setuid root to allow non\-root users to mount shares to directories for which they have write permission\&.
190.PP
191Options to
192\fImount\&.cifs\fR
193are specified as a comma\-separated list of key=value pairs\&. It is possible to send options other than those listed here, assuming that the cifs filesystem kernel module (cifs\&.ko) supports them\&. Unrecognized cifs mount options passed to the cifs vfs kernel code will be logged to the kernel log\&.
194.PP
195\fImount\&.cifs\fR
196causes the cifs vfs to launch a thread named cifsd\&. After mounting it keeps running until the mounted resource is unmounted (usually via the umount utility)\&.
197.SH "OPTIONS"
198.PP
199user=\fIarg\fR
200.RS 4
201specifies the username to connect as\&. If this is not given, then the environment variable
202\fIUSER\fR
203is used\&. This option can also take the form "user%password" or "workgroup/user" or "workgroup/user%password" to allow the password and workgroup to be specified as part of the username\&.
204.if n \{\
205.sp
206.\}
207.RS 4
208.BM yellow
209.it 1 an-trap
210.nr an-no-space-flag 1
211.nr an-break-flag 1
212.br
213.ps +1
214\fBNote\fR
215.ps -1
216.br
217The cifs vfs accepts the parameter
218\fIuser=\fR, or for users familiar with smbfs it accepts the longer form of the parameter
219\fIusername=\fR\&. Similarly the longer smbfs style parameter names may be accepted as synonyms for the shorter cifs parameters
220\fIpass=\fR,\fIdom=\fR
221and
222\fIcred=\fR\&.
223.sp .5v
224.EM yellow
225.RE
226.RE
227.PP
228password=\fIarg\fR
229.RS 4
230specifies the CIFS password\&. If this option is not given then the environment variable
231\fIPASSWD\fR
232is used\&. If the password is not specified directly or indirectly via an argument to mount,
233\fImount\&.cifs\fR
234will prompt for a password, unless the guest option is specified\&.
235.sp
236Note that a password which contains the delimiter character (i\&.e\&. a comma \',\') will fail to be parsed correctly on the command line\&. However, the same password defined in the PASSWD environment variable or via a credentials file (see below) or entered at the password prompt will be read correctly\&.
237.RE
238.PP
239credentials=\fIfilename\fR
240.RS 4
241specifies a file that contains a username and/or password and optionally the name of the workgroup\&. The format of the file is:
242.sp
243.if n \{\
244.RS 4
245.\}
246.fam C
247.ps -1
248.nf
249.if t \{\
250.sp -1
251.\}
252.BB lightgray adjust-for-leading-newline
253.sp -1
254
255 username=\fIvalue\fR
256 password=\fIvalue\fR
257 workgroup=\fIvalue\fR
258.EB lightgray adjust-for-leading-newline
259.if t \{\
260.sp 1
261.\}
262.fi
263.fam
264.ps +1
265.if n \{\
266.RE
267.\}
268.sp
269This is preferred over having passwords in plaintext in a shared file, such as
270\FC/etc/fstab\F[]\&. Be sure to protect any credentials file properly\&.
271.RE
272.PP
273uid=\fIarg\fR
274.RS 4
275sets the uid that will own all files on the mounted filesystem\&. It may be specified as either a username or a numeric uid\&. For mounts to servers which do support the CIFS Unix extensions, such as a properly configured Samba server, the server provides the uid, gid and mode so this parameter should not be specified unless the server and client uid and gid numbering differ\&. If the server and client are in the same domain (e\&.g\&. running winbind or nss_ldap) and the server supports the Unix Extensions then the uid and gid can be retrieved from the server (and uid and gid would not have to be specified on the mount\&. For servers which do not support the CIFS Unix extensions, the default uid (and gid) returned on lookup of existing files will be the uid (gid) of the person who executed the mount (root, except when mount\&.cifs is configured setuid for user mounts) unless the "uid=" (gid) mount option is specified\&. For the uid (gid) of newly created files and directories, ie files created since the last mount of the server share, the expected uid (gid) is cached as long as the inode remains in memory on the client\&. Also note that permission checks (authorization checks) on accesses to a file occur at the server, but there are cases in which an administrator may want to restrict at the client as well\&. For those servers which do not report a uid/gid owner (such as Windows), permissions can also be checked at the client, and a crude form of client side permission checking can be enabled by specifying file_mode and dir_mode on the client\&. Note that the mount\&.cifs helper must be at version 1\&.10 or higher to support specifying the uid (or gid) in non\-numeric form\&.
276.RE
277.PP
278gid=\fIarg\fR
279.RS 4
280sets the gid that will own all files on the mounted filesystem\&. It may be specified as either a groupname or a numeric gid\&. For other considerations see the description of uid above\&.
281.RE
282.PP
283port=\fIarg\fR
284.RS 4
285sets the port number on the server to attempt to contact to negotiate CIFS support\&. If the CIFS server is not listening on this port or if it is not specified, the default ports will be tried i\&.e\&. port 445 is tried and if no response then port 139 is tried\&.
286.RE
287.PP
288servern=\fIarg\fR
289.RS 4
290Specify the server netbios name (RFC1001 name) to use when attempting to setup a session to the server\&. Although rarely needed for mounting to newer servers, this option is needed for mounting to some older servers (such as OS/2 or Windows 98 and Windows ME) since when connecting over port 139 they, unlike most newer servers, do not support a default server name\&. A server name can be up to 15 characters long and is usually uppercased\&.
291.RE
292.PP
293netbiosname=\fIarg\fR
294.RS 4
295When mounting to servers via port 139, specifies the RFC1001 source name to use to represent the client netbios machine name when doing the RFC1001 netbios session initialize\&.
296.RE
297.PP
298file_mode=\fIarg\fR
299.RS 4
300If the server does not support the CIFS Unix extensions this overrides the default file mode\&.
301.RE
302.PP
303dir_mode=\fIarg\fR
304.RS 4
305If the server does not support the CIFS Unix extensions this overrides the default mode for directories\&.
306.RE
307.PP
308ip=\fIarg\fR
309.RS 4
310sets the destination IP address\&. This option is set automatically if the server name portion of the requested UNC name can be resolved so rarely needs to be specified by the user\&.
311.RE
312.PP
313domain=\fIarg\fR
314.RS 4
315sets the domain (workgroup) of the user
316.RE
317.PP
318guest
319.RS 4
320don\'t prompt for a password
321.RE
322.PP
323iocharset
324.RS 4
325Charset used to convert local path names to and from Unicode\&. Unicode is used by default for network path names if the server supports it\&. If iocharset is not specified then the nls_default specified during the local client kernel build will be used\&. If server does not support Unicode, this parameter is unused\&.
326.RE
327.PP
328ro
329.RS 4
330mount read\-only
331.RE
332.PP
333rw
334.RS 4
335mount read\-write
336.RE
337.PP
338setuids
339.RS 4
340If the CIFS Unix extensions are negotiated with the server the client will attempt to set the effective uid and gid of the local process on newly created files, directories, and devices (create, mkdir, mknod)\&. If the CIFS Unix Extensions are not negotiated, for newly created files and directories instead of using the default uid and gid specified on the the mount, cache the new file\'s uid and gid locally which means that the uid for the file can change when the inode is reloaded (or the user remounts the share)\&.
341.RE
342.PP
343nosetuids
344.RS 4
345The client will not attempt to set the uid and gid on on newly created files, directories, and devices (create, mkdir, mknod) which will result in the server setting the uid and gid to the default (usually the server uid of the user who mounted the share)\&. Letting the server (rather than the client) set the uid and gid is the default\&.If the CIFS Unix Extensions are not negotiated then the uid and gid for new files will appear to be the uid (gid) of the mounter or the uid (gid) parameter specified on the mount\&.
346.RE
347.PP
348perm
349.RS 4
350Client does permission checks (vfs_permission check of uid and gid of the file against the mode and desired operation), Note that this is in addition to the normal ACL check on the target machine done by the server software\&. Client permission checking is enabled by default\&.
351.RE
352.PP
353noperm
354.RS 4
355Client does not do permission checks\&. This can expose files on this mount to access by other users on the local client system\&. It is typically only needed when the server supports the CIFS Unix Extensions but the UIDs/GIDs on the client and server system do not match closely enough to allow access by the user doing the mount\&. Note that this does not affect the normal ACL check on the target machine done by the server software (of the server ACL against the user name provided at mount time)\&.
356.RE
357.PP
358directio
359.RS 4
360Do not do inode data caching on files opened on this mount\&. This precludes mmaping files on this mount\&. In some cases with fast networks and little or no caching benefits on the client (e\&.g\&. when the application is doing large sequential reads bigger than page size without rereading the same data) this can provide better performance than the default behavior which caches reads (readahead) and writes (writebehind) through the local Linux client pagecache if oplock (caching token) is granted and held\&. Note that direct allows write operations larger than page size to be sent to the server\&. On some kernels this requires the cifs\&.ko module to be built with the CIFS_EXPERIMENTAL configure option\&.
361.RE
362.PP
363mapchars
364.RS 4
365Translate six of the seven reserved characters (not backslash, but including the colon, question mark, pipe, asterik, greater than and less than characters) to the remap range (above 0xF000), which also allows the CIFS client to recognize files created with such characters by Windows\'s POSIX emulation\&. This can also be useful when mounting to most versions of Samba (which also forbids creating and opening files whose names contain any of these seven characters)\&. This has no effect if the server does not support Unicode on the wire\&.
366.RE
367.PP
368nomapchars
369.RS 4
370Do not translate any of these seven characters (default)
371.RE
372.PP
373intr
374.RS 4
375currently unimplemented
376.RE
377.PP
378nointr
379.RS 4
380(default) currently unimplemented
381.RE
382.PP
383hard
384.RS 4
385The program accessing a file on the cifs mounted file system will hang when the server crashes\&.
386.RE
387.PP
388soft
389.RS 4
390(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\&.
391.RE
392.PP
393noacl
394.RS 4
395Do not allow POSIX ACL operations even if server would support them\&.
396.sp
397The CIFS client can get and set POSIX ACLs (getfacl, setfacl) to Samba servers version 3\&.0\&.10 and later\&. Setting POSIX ACLs requires enabling both XATTR and then POSIX support in the CIFS configuration options when building the cifs module\&. POSIX ACL support can be disabled on a per mount basis by specifying "noacl" on mount\&.
398.RE
399.PP
400nocase
401.RS 4
402Request case insensitive path name matching (case sensitive is the default if the server suports it)\&.
403.RE
404.PP
405sec=
406.RS 4
407Security mode\&. Allowed values are:
408.sp
409.RS 4
410.ie n \{\
411\h'-04'\(bu\h'+03'\c
412.\}
413.el \{\
414.sp -1
415.IP \(bu 2.3
416.\}
417none attempt to connection as a null user (no name)
418.RE
419.sp
420.RS 4
421.ie n \{\
422\h'-04'\(bu\h'+03'\c
423.\}
424.el \{\
425.sp -1
426.IP \(bu 2.3
427.\}
428krb5 Use Kerberos version 5 authentication
429.RE
430.sp
431.RS 4
432.ie n \{\
433\h'-04'\(bu\h'+03'\c
434.\}
435.el \{\
436.sp -1
437.IP \(bu 2.3
438.\}
439krb5i Use Kerberos authentication and packet signing