1
- The CIFS VFS support for Linux supports many advanced network filesystem
2
- features such as hierarchical dfs like namespace, hardlinks, locking and more.
1
+ This module supports the SMB3 family of advanced network protocols (as well
2
+ as older dialects, originally called "CIFS" or SMB1).
3
+
4
+ The CIFS VFS module for Linux supports many advanced network filesystem
5
+ features such as hierarchical DFS like namespace, hardlinks, locking and more.
3
6
It was designed to comply with the SNIA CIFS Technical Reference (which
4
7
supersedes the 1992 X/Open SMB Standard) as well as to perform best practice
5
8
practical interoperability with Windows 2000, Windows XP, Samba and equivalent
6
9
servers. This code was developed in participation with the Protocol Freedom
7
- Information Foundation.
10
+ Information Foundation. CIFS and now SMB3 has now become a defacto
11
+ standard for interoperating between Macs and Windows and major NAS appliances.
8
12
9
13
Please see
10
14
http://protocolfreedom.org/ and
@@ -15,30 +19,11 @@ for more details.
15
19
For questions or bug reports please contact:
16
20
17
21
22
+ See the project page at: https://wiki.samba.org/index.php/LinuxCIFS_utils
23
+
18
24
Build instructions:
19
25
==================
20
- For Linux 2.4:
21
- 1) Get the kernel source (e.g.from http://www.kernel.org)
22
- and download the cifs vfs source (see the project page
23
- at http://us1.samba.org/samba/Linux_CIFS_client.html)
24
- and change directory into the top of the kernel directory
25
- then patch the kernel (e.g. "patch -p1 < cifs_24.patch")
26
- to add the cifs vfs to your kernel configure options if
27
- it has not already been added (e.g. current SuSE and UL
28
- users do not need to apply the cifs_24.patch since the cifs vfs is
29
- already in the kernel configure menu) and then
30
- mkdir linux/fs/cifs and then copy the current cifs vfs files from
31
- the cifs download to your kernel build directory e.g.
32
-
33
- cp <cifs_download_dir>/fs/cifs/* to <kernel_download_dir>/fs/cifs
34
-
35
- 2) make menuconfig (or make xconfig)
36
- 3) select cifs from within the network filesystem choices
37
- 4) save and exit
38
- 5) make dep
39
- 6) make modules (or "make" if CIFS VFS not to be built as a module)
40
-
41
- For Linux 2.6:
26
+ For Linux:
42
27
1) Download the kernel (e.g. from http://www.kernel.org)
43
28
and change directory into the top of the kernel directory tree
44
29
(e.g. /usr/src/linux-2.5.73)
@@ -61,16 +46,13 @@ would simply type "make install").
61
46
If you do not have the utility mount.cifs (in the Samba 3.0 source tree and on
62
47
the CIFS VFS web site) copy it to the same directory in which mount.smbfs and
63
48
similar files reside (usually /sbin). Although the helper software is not
64
- required, mount.cifs is recommended. Eventually the Samba 3.0 utility program
65
- "net" may also be helpful since it may someday provide easier mount syntax for
66
- users who are used to Windows e.g.
67
- net use <mount point> <UNC name or cifs URL>
49
+ required, mount.cifs is recommended. Most distros include a "cifs-utils"
50
+ package that includes this utility so it is recommended to install this.
51
+
68
52
Note that running the Winbind pam/nss module (logon service) on all of your
69
53
Linux clients is useful in mapping Uids and Gids consistently across the
70
54
domain to the proper network user. The mount.cifs mount helper can be
71
- trivially built from Samba 3.0 or later source e.g. by executing:
72
-
73
- gcc samba/source/client/mount.cifs.c -o mount.cifs
55
+ found at cifs-utils.git on git.samba.org
74
56
75
57
If cifs is built as a module, then the size and number of network buffers
76
58
and maximum number of simultaneous requests to one server can be configured.
@@ -79,6 +61,18 @@ Changing these from their defaults is not recommended. By executing modinfo
79
61
on kernel/fs/cifs/cifs.ko the list of configuration changes that can be made
80
62
at module initialization time (by running insmod cifs.ko) can be seen.
81
63
64
+ Recommendations
65
+ ===============
66
+ To improve security the SMB2.1 dialect or later (usually will get SMB3) is now
67
+ the new default. To use old dialects (e.g. to mount Windows XP) use "vers=1.0"
68
+ on mount (or vers=2.0 for Windows Vista). Note that the CIFS (vers=1.0) is
69
+ much older and less secure than the default dialect SMB3 which includes
70
+ many advanced security features such as downgrade attack detection
71
+ and encrypted shares and stronger signing and authentication algorithms.
72
+ There are additional mount options that may be helpful for SMB3 to get
73
+ improved POSIX behavior (NB: can use vers=3.0 to force only SMB3, never 2.1):
74
+ "mfsymlinks" and "cifsacl" and "idsfromsid"
75
+
82
76
Allowing User Mounts
83
77
====================
84
78
To permit users to mount and unmount over directories they own is possible
@@ -98,9 +92,7 @@ and execution of suid programs on the remote target would be enabled
98
92
by default. This can be changed, as with nfs and other filesystems,
99
93
by simply specifying "nosuid" among the mount options. For user mounts
100
94
though to be able to pass the suid flag to mount requires rebuilding
101
- mount.cifs with the following flag:
102
-
103
- gcc samba/source/client/mount.cifs.c -DCIFS_ALLOW_USR_SUID -o mount.cifs
95
+ mount.cifs with the following flag: CIFS_ALLOW_USR_SUID
104
96
105
97
There is a corresponding manual page for cifs mounting in the Samba 3.0 and
106
98
later source tree in docs/manpages/mount.cifs.8
@@ -189,18 +181,18 @@ applications running on the same server as Samba.
189
181
Use instructions:
190
182
================
191
183
Once the CIFS VFS support is built into the kernel or installed as a module
192
- (cifs.o ), you can use mount syntax like the following to access Samba or Windows
193
- servers:
184
+ (cifs.ko ), you can use mount syntax like the following to access Samba or
185
+ Mac or Windows servers:
194
186
195
- mount -t cifs //9.53.216.11/e$ /mnt -o user =myname,pass =mypassword
187
+ mount -t cifs //9.53.216.11/e$ /mnt -o username =myname,password =mypassword
196
188
197
189
Before -o the option -v may be specified to make the mount.cifs
198
190
mount helper display the mount steps more verbosely.
199
191
After -o the following commonly used cifs vfs specific options
200
192
are supported:
201
193
202
- user =<username>
203
- pass =<password>
194
+ username =<username>
195
+ password =<password>
204
196
domain=<domain name>
205
197
206
198
Other cifs mount options are described below. Use of TCP names (in addition to
@@ -246,13 +238,16 @@ the Server's registry. Samba starting with version 3.10 will allow such
246
238
filenames (ie those which contain valid Linux characters, which normally
247
239
would be forbidden for Windows/CIFS semantics) as long as the server is
248
240
configured for Unix Extensions (and the client has not disabled
249
- /proc/fs/cifs/LinuxExtensionsEnabled).
250
-
241
+ /proc/fs/cifs/LinuxExtensionsEnabled). In addition the mount option
242
+ "mapposix" can be used on CIFS (vers=1.0) to force the mapping of
243
+ illegal Windows/NTFS/SMB characters to a remap range (this mount parm
244
+ is the default for SMB3). This remap ("mapposix") range is also
245
+ compatible with Mac (and "Services for Mac" on some older Windows).
251
246
252
247
CIFS VFS Mount Options
253
248
======================
254
249
A partial list of the supported mount options follows:
255
- user The user name to use when trying to establish
250
+ username The user name to use when trying to establish
256
251
the CIFS session.
257
252
password The user password. If the mount helper is
258
253
installed, the user will be prompted for password
0 commit comments