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.
36It was designed to comply with the SNIA CIFS Technical Reference (which
47supersedes the 1992 X/Open SMB Standard) as well as to perform best practice
58practical interoperability with Windows 2000, Windows XP, Samba and equivalent
69servers. 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.
812
913Please see
1014 http://protocolfreedom.org/ and
@@ -15,30 +19,11 @@ for more details.
1519For questions or bug reports please contact:
16201721
22+ See the project page at: https://wiki.samba.org/index.php/LinuxCIFS_utils
23+
1824Build instructions:
1925==================
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:
42271) Download the kernel (e.g. from http://www.kernel.org)
4328and change directory into the top of the kernel directory tree
4429(e.g. /usr/src/linux-2.5.73)
@@ -61,16 +46,13 @@ would simply type "make install").
6146If you do not have the utility mount.cifs (in the Samba 3.0 source tree and on
6247the CIFS VFS web site) copy it to the same directory in which mount.smbfs and
6348similar 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+
6852Note that running the Winbind pam/nss module (logon service) on all of your
6953Linux clients is useful in mapping Uids and Gids consistently across the
7054domain 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
7456
7557If cifs is built as a module, then the size and number of network buffers
7658and 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
7961on kernel/fs/cifs/cifs.ko the list of configuration changes that can be made
8062at module initialization time (by running insmod cifs.ko) can be seen.
8163
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+
8276Allowing User Mounts
8377====================
8478To 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
9892by default. This can be changed, as with nfs and other filesystems,
9993by simply specifying "nosuid" among the mount options. For user mounts
10094though 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
10496
10597There is a corresponding manual page for cifs mounting in the Samba 3.0 and
10698later source tree in docs/manpages/mount.cifs.8
@@ -189,18 +181,18 @@ applications running on the same server as Samba.
189181Use instructions:
190182================
191183Once 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:
194186
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
196188
197189Before -o the option -v may be specified to make the mount.cifs
198190mount helper display the mount steps more verbosely.
199191After -o the following commonly used cifs vfs specific options
200192are supported:
201193
202- user =<username>
203- pass =<password>
194+ username =<username>
195+ password =<password>
204196 domain=<domain name>
205197
206198Other 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
246238filenames (ie those which contain valid Linux characters, which normally
247239would be forbidden for Windows/CIFS semantics) as long as the server is
248240configured 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).
251246
252247CIFS VFS Mount Options
253248======================
254249A 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
256251 the CIFS session.
257252 password The user password. If the mount helper is
258253 installed, the user will be prompted for password
0 commit comments