1MOUNT.CIFS(8) MOUNT.CIFS(8)
2
3
4
6 mount.cifs - mount using the Common Internet File System (CIFS)
7
9 mount.cifs {service} {mount-point} [-o options]
10
12 This tool is part of the samba(7) suite.
13
14 mount.cifs mounts a Linux CIFS filesystem. It is usually invoked indi‐
15 rectly by the mount(8) command when using the "-t cifs" option. This
16 command only works in Linux, and the kernel must support the cifs
17 filesystem. The CIFS protocol is the successor to the SMB protocol and
18 is supported by most Windows servers and many other commercial servers
19 and Network Attached Storage appliances as well as by the popular Open
20 Source server Samba.
21
22 The mount.cifs utility attaches the UNC name (exported network
23 resource) to the local directory mount-point. It is possible to set the
24 mode for mount.cifs to setuid root to allow non-root users to mount
25 shares to directories for which they have write permission.
26
27 Options to mount.cifs are specified as a comma-separated list of
28 key=value pairs. It is possible to send options other than those listed
29 here, assuming that the cifs filesystem kernel module (cifs.ko) sup‐
30 ports them. Unrecognized cifs mount options passed to the cifs vfs ker‐
31 nel code will be logged to the kernel log.
32
33 mount.cifs causes the cifs vfs to launch a thread named cifsd. After
34 mounting it keeps running until the mounted resource is unmounted (usu‐
35 ally via the umount utility).
36
38 user=arg
39 specifies the username to connect as. If this is not given, then the
40 environment variable USER is used. This option can also take the
41 form "user%password" or "workgroup/user" or "workgroup/user%pass‐
42 word" to allow the password and workgroup to be specified as part of
43 the username.
44
45 Note
46 The cifs vfs accepts the parameter user=, or for users familiar with
47 smbfs it accepts the longer form of the parameter username=. Simi‐
48 larly the longer smbfs style parameter names may be accepted as syn‐
49 onyms for the shorter cifs parameters pass=,dom= and cred=.
50
51 password=arg
52 specifies the CIFS password. If this option is not given then the
53 environment variable PASSWD is used. If the password is not speci‐
54 fied directly or indirectly via an argument to mount mount.cifs will
55 prompt for a password, unless the guest option is specified.
56
57 Note that a password which contains the delimiter character (i.e. a
58 comma ',') will fail to be parsed correctly on the command line.
59 However, the same password defined in the PASSWD environment vari‐
60 able or via a credentials file (see below) or entered at the pass‐
61 word prompt will be read correctly.
62
63 credentials=filename
64 specifies a file that contains a username and/or password. The for‐
65 mat of the file is:
66
67
68 username=value
69 password=value
70
71 This is preferred over having passwords in plaintext in a shared
72 file, such as /etc/fstab. Be sure to protect any credentials file
73 properly.
74
75 uid=arg
76 sets the uid that will own all files on the mounted filesystem. It
77 may be specified as either a username or a numeric uid. This parame‐
78 ter is ignored when the target server supports the CIFS Unix exten‐
79 sions.
80
81 gid=arg
82 sets the gid that will own all files on the mounted filesystem. It
83 may be specified as either a groupname or a numeric gid. This param‐
84 eter is ignored when the target server supports the CIFS Unix exten‐
85 sions.
86
87 port=arg
88 sets the port number on the server to attempt to contact to negoti‐
89 ate CIFS support. If the CIFS server is not listening on this port
90 or if it is not specified, the default ports will be tried i.e. port
91 445 is tried and if no response then port 139 is tried.
92
93 netbiosname=arg
94 When mounting to servers via port 139, specifies the RFC1001 source
95 name to use to represent the client netbios machine name when doing
96 the RFC1001 netbios session initialize.
97
98 file_mode=arg
99 If the server does not support the CIFS Unix extensions this over‐
100 rides the default file mode.
101
102 dir_mode=arg
103 If the server does not support the CIFS Unix extensions this over‐
104 rides the default mode for directories.
105
106 ip=arg
107 sets the destination host or IP address.
108
109 domain=arg
110 sets the domain (workgroup) of the user
111
112 guest
113 don't prompt for a password
114
115 iocharset
116 Charset used to convert local path names to and from Unicode. Uni‐
117 code is used by default for network path names if the server sup‐
118 ports it. If iocharset is not specified then the nls_default speci‐
119 fied during the local client kernel build will be used. If server
120 does not support Unicode, this parameter is unused.
121
122 ro
123 mount read-only
124
125 rw
126 mount read-write
127
128 setuids
129 If the CIFS Unix extensions are negotiated with the server the
130 client will attempt to set the effective uid and gid of the local
131 process on newly created files, directories, and devices (create,
132 mkdir, mknod). If the CIFS Unix Extensions are not negotiated, for
133 newly created files and directories instead of using the default uid
134 and gid specified on the the mount, cache the new file's uid and gid
135 locally which means that the uid for the file can change when the
136 inode is reloaded (or the user remounts the share).
137
138 nosetuids
139 The client will not attempt to set the uid and gid on on newly cre‐
140 ated files, directories, and devices (create, mkdir, mknod) which
141 will result in the server setting the uid and gid to the default
142 (usually the server uid of the user who mounted the share). Letting
143 the server (rather than the client) set the uid and gid is the
144 default.If the CIFS Unix Extensions are not negotiated then the uid
145 and gid for new files will appear to be the uid (gid) of the mounter
146 or the uid (gid) parameter specified on the mount.
147
148 perm
149 Client does permission checks (vfs_permission check of uid and gid
150 of the file against the mode and desired operation), Note that this
151 is in addition to the normal ACL check on the target machine done by
152 the server software. Client permission checking is enabled by
153 default.
154
155 noperm
156 Client does not do permission checks. This can expose files on this
157 mount to access by other users on the local client system. It is
158 typically only needed when the server supports the CIFS Unix Exten‐
159 sions but the UIDs/GIDs on the client and server system do not match
160 closely enough to allow access by the user doing the mount. Note
161 that this does not affect the normal ACL check on the target machine
162 done by the server software (of the server ACL against the user name
163 provided at mount time).
164
165 directio
166 Do not do inode data caching on files opened on this mount. This
167 precludes mmaping files on this mount. In some cases with fast net‐
168 works and little or no caching benefits on the client (e.g. when the
169 application is doing large sequential reads bigger than page size
170 without rereading the same data) this can provide better performance
171 than the default behavior which caches reads (readahead) and writes
172 (writebehind) through the local Linux client pagecache if oplock
173 (caching token) is granted and held. Note that direct allows write
174 operations larger than page size to be sent to the server. On some
175 kernels this requires the cifs.ko module to be built with the
176 CIFS_EXPERIMENTAL configure option.
177
178 mapchars
179 Translate six of the seven reserved characters (not backslash, but
180 including the colon, question mark, pipe, asterik, greater than and
181 less than characters) to the remap range (above 0xF000), which also
182 allows the CIFS client to recognize files created with such charac‐
183 ters by Windows's POSIX emulation. This can also be useful when
184 mounting to most versions of Samba (which also forbids creating and
185 opening files whose names contain any of these seven characters).
186 This has no effect if the server does not support Unicode on the
187 wire.
188
189 nomapchars
190 Do not translate any of these seven characters (default)
191
192 intr
193 currently unimplemented
194
195 nointr
196 (default) currently unimplemented
197
198 hard
199 The program accessing a file on the cifs mounted file system will
200 hang when the server crashes.
201
202 soft
203 (default) The program accessing a file on the cifs mounted file sys‐
204 tem will not hang when the server crashes and will return errors to
205 the user application.
206
207 noacl
208 Do not allow POSIX ACL operations even if server would support them.
209
210 The CIFS client can get and set POSIX ACLs (getfacl, setfacl) to
211 Samba servers version 3.10 and later. Setting POSIX ACLs requires
212 enabling both XATTR and then POSIX support in the CIFS configuration
213 options when building the cifs module. POSIX ACL support can be dis‐
214 abled on a per mount basic by specifying "noacl" on mount.
215
216 nocase
217 Request case insensitive path name matching (case sensitive is the
218 default if the server suports it).
219
220 sec=
221 Security mode. Allowed values are:
222
223 · none attempt to connection as a null user (no name)
224
225 · krb5 Use Kerberos version 5 authentication
226
227 · krb5i Use Kerberos authentication and packet signing
228
229 · ntlm Use NTLM password hashing (default)
230
231 · ntlmi Use NTLM password hashing with signing (if
232 /proc/fs/cifs/PacketSigningEnabled on or if server requires
233 signing also can be the default)
234
235 · ntlmv2 Use NTLMv2 password hashing
236
237 · ntlmv2i Use NTLMv2 password hashing with packet signing
238
239 [NB This [sec parameter] is under development and expected to be
240 available in cifs kernel module 1.40 and later]
241
242 nobrl
243 Do not send byte range lock requests to the server. This is neces‐
244 sary for certain applications that break with cifs style mandatory
245 byte range locks (and most cifs servers do not yet support request‐
246 ing advisory byte range locks).
247
248 sfu
249 When the CIFS Unix Extensions are not negotiated, attempt to create
250 device files and fifos in a format compatible with Services for Unix
251 (SFU). In addition retrieve bits 10-12 of the mode via the SET‐
252 FILEBITS extended attribute (as SFU does). In the future the bottom
253 9 bits of the mode mode also will be emulated using queries of the
254 security descriptor (ACL). [NB: requires version 1.39 or later of
255 the CIFS VFS. To recognize symlinks and be able to create symlinks
256 in an SFU interoperable form requires version 1.40 or later of the
257 CIFS VFS kernel module.
258
259 serverino
260 Use inode numbers (unique persistent file identifiers) returned by
261 the server instead of automatically generating temporary inode num‐
262 bers on the client. Although server inode numbers make it easier to
263 spot hardlinked files (as they will have the same inode numbers) and
264 inode numbers may be persistent (which is userful for some sofware),
265 the server does not guarantee that the inode numbers are unique if
266 multiple server side mounts are exported under a single share (since
267 inode numbers on the servers might not be unique if multiple
268 filesystems are mounted under the same shared higher level direc‐
269 tory). Note that not all servers support returning server inode num‐
270 bers, although those that support the CIFS Unix Extensions, and Win‐
271 dows 2000 and later servers typically do support this (although not
272 necessarily on every local server filesystem). Parameter has no
273 effect if the server lacks support for returning inode numbers or
274 equivalent.
275
276 noserverino
277 client generates inode numbers (rather than using the actual one
278 from the server) by default.
279
280 nouser_xattr
281 (default) Do not allow getfattr/setfattr to get/set xattrs, even if
282 server would support it otherwise.
283
284 rsize=arg
285 default network read size
286
287 wsize=arg
288 default network write size
289
290 --verbose
291 Print additional debugging information for the mount. Note that this
292 parameter must be specified before the -o. For example:
293
294 mount -t cifs //server/share /mnt --verbose -o user=username
295
297 The variable USER may contain the username of the person to be used to
298 authenticate to the server. The variable can be used to set both user‐
299 name and password by using the format username%password.
300
301 The variable PASSWD may contain the password of the person using the
302 client.
303
304 The variable PASSWD_FILE may contain the pathname of a file to read the
305 password from. A single line of input is read and used as the password.
306
308 This command may be used only by root, unless installed setuid, in
309 which case the noeexec and nosuid mount flags are enabled.
310
312 The primary mechanism for making configuration changes and for reading
313 debug information for the cifs vfs is via the Linux /proc filesystem.
314 In the directory /proc/fs/cifs are various configuration files and
315 pseudo files which can display debug information. There are additional
316 startup options such as maximum buffer size and number of buffers which
317 only may be set when the kernel cifs vfs (cifs.ko module) is loaded.
318 These can be seen by running the modinfo utility against the file
319 cifs.ko which will list the options that may be passed to cifs during
320 module installation (device driver load). For more information see the
321 kernel file fs/cifs/README.
322
324 Mounting using the CIFS URL specification is currently not supported.
325
326 The credentials file does not handle usernames or passwords with lead‐
327 ing space.
328
329 Note that the typical response to a bug report is a suggestion to try
330 the latest version first. So please try doing that first, and always
331 include which versions you use of relevant software when reporting bugs
332 (minimum: mount.cifs (try mount.cifs -V), kernel (see /proc/version)
333 and server type you are trying to contact.
334
336 This man page is correct for version 1.39 of the cifs vfs filesystem
337 (roughly Linux kernel 2.6.15).
338
340 Documentation/filesystems/cifs.txt and fs/cifs/README in the linux ker‐
341 nel source tree may contain additional options and information.
342
343 umount.cifs(8)
344
346 Steve French
347
348 The syntax and manpage were loosely based on that of smbmount. It was
349 converted to Docbook/XML by Jelmer Vernooij.
350
351 The maintainer of the Linux cifs vfs and the userspace tool mount.cifs
352 is Steve French. The Linux CIFS Mailing list is the preferred place to
353 ask questions regarding these programs.
354
355
356
357
358 MOUNT.CIFS(8)