The CIFS VFS support for Linux supports many advanced network filesystem features such as heirarchical dfs like namespace, hardlinks, locking and more. It was designed to comply with the SNIA CIFS Technical Reference (which supersedes the 1992 X/Open SMB Standard) as well as to perform best practice practical interoperability with Windows 2000, Windows XP, Samba and equivalent servers. For questions or bug reports please contact sfrench@samba.org (sfrench@us.ibm.com) Build instructions: ================== For Linux 2.4: 1a) Get the linux kernel source with cifs vfs already in it from bitkeeper via bk://cifs.bkbits.net/linux-2.4 or 1b) Get the kernel source (e.g.from http://www.kernel.org) and download the cifs vfs source (see the project page at http://us1.samba.org/samba/Linux_CIFS_client.html) and change directory into the top of the kernel directory then patch the kernel (e.g. "patch -p1 < cifs_24.patch") to add the cifs vfs to your kernel configure options if it has not already been added (e.g. current SuSE and UL users do not need to do not need that patch since the cifs vfs is already in the kernel configure menu) and then mkdir linux/fs/cifs and then copy the current cifs vfs files from the cifs download to your kernel build directory e.g. cp /fs/cifs/* to /fs/cifs 2) make menuconfig (or make xconfig) 3) select cifs from within the network filesystem choices 4) save and exit 5) make dep 6) make modules (or "make" if CIFS VFS not to be built as a module) For Linux 2.5: 1) Download the kernel (e.g. from http://www.kernel.org or from bitkeeper at bk://linux.bkbits.net/linux-2.5) and change directory into the top of the kernel directory tree (e.g. /usr/src/linux-2.5.73) 2) make menuconfig (or make xconfig) 3) select cifs from within the network filesystem choices 4) save and exit 5) make Installation instructions: ========================= If you have built the CIFS vfs as module (successfully) simply type "make modules_install" (or if you prefer, manually copy the file to the modules directory e.g. /lib/modules/2.4.10-4GB/kernel/fs/cifs/cifs.o). If you have built the CIFS vfs into the kernel itself, follow the instructions for your distribution on how to install a new kernel (usually you would simply type "make install"). If you do not have the utility mount.cifs (in the Samba 3.0 source tree and on the CIFS VFS web site) copy it to the same directory in which mount.smbfs and similar files reside (usually /sbin). Although the helper software is required, mount.cifs is recommended. Eventually the Samba 3.0 utility program "net" may also be helpful since it may someday provide easier mount syntax for users used to Windows e.g. net use Note that running Winbind on all of your Linux clients is useful in in mapping Uids and Gids consistently to the proper network user. Samba Considerations ==================== To get the maximum benefit from the CIFS VFS, we recommend using a server that supports the SNIA CIFS Unix Extensions standard (e.g. Samba 2.2.5 or later or Samba 3.0) but the CIFS vfs works fine with a wide variety of CIFS servers. Note that uid, gid and file permissions will display default values if you do not have a server that supports the Unix extensions for CIFS (such as Samba 2.2.3 or later). To enable the Unix CIFS Extensions in the Samba server, add the line: unix extensions = yes to your smb.conf file on the server. Note that the following smb.conf settings are also useful (on the Samba server) when the majority of clients are Unix or Linux: case sensitive = yes delete readonly = yes Some administrators also change the "map archive" and the "create mask" parameters from their defaults. For more information on these see the manual pages ("man smb.conf") on the Samba server system. Note that the cifs vfs, unlike the smbfs vfs, does not read the smb.conf on the client system (the few optional settings are passed in on mount via -o parameters instead). Note that Samba 2.2.7 or later includes a fix that allows the CIFS VFS to delete open files (required for strict POSIX compliance). Windows Servers already supported this feature. Use instructions: ================ Once the CIFS VFS support is built into the kernel or installed as a module (cifs.o), you can use mount syntax like the following to access Samba or Windows servers: mount -t cifs //9.53.216.11/e$ /mnt -o user=myname,pass=mypassword after -o the following cifs vfs specific options are supported: user= pass= domain= TCP names (in addition to ip addresses) will be available when the mount helper (mount.cifs) is complete Restrictions ============ Servers must support the NTLM SMB dialect (which is the most recent, supported by Samba and Windows NT, 2000 and XP and many other SMB/CIFS servers) and servers must support either "pure-TCP" (port 445 TCP/IP CIFS connections) or RFC 1001/1002 support for "Netbios-Over-TCP/IP." Neither of these is likely to be a problem as most servers support this. IPv6 support is planned for the future. CIFS VFS Mount Options ====================== A partial list of the supported mount options follows: user The user name to use when trying to establish the CIFS session. password The user password. If the mount helper is installed, the user will be prompted for password if it is not supplied. ip The ip address of the target server unc The target server Universal Network Name (export) to mount. domain Set the SMB/CIFS workgroup name prepended to the username during CIFS session establishment uid If CIFS Unix extensions are not supported by the server this overrides the default uid for inodes. gid If CIFS Unix extensions are not supported by the server this overrides the default gid for inodes. file_mode If CIFS Unix extensions are not supported by the server this overrides the default mode for file inodes. dir_mode If CIFS Unix extensions are not supported by the server this overrides the default mode for directory inodes. port attempt to contact the server on this tcp port, before trying the usual ports (port 445, then 139). rsize default read size wsize default write size rw mount the network share read-write (note that the server may still consider the share read-only) ro mount network share read-only version used to distinguish different versions of the mount helper utility (not typically needed) Misc /proc/fs/cifs Flags and Debug Info ======================================= Informational pseudo-files: DebugData Displays information about active CIFS sessions SimultaneousOps Counter which holds maximum number of simultaneous outstanding SMB/CIFS requests. Stats Lists summary resource usage information Configuration pseudo-files: MultiuserMount If set to one, more than one CIFS session to the same server ip address can be established if more than one uid accesses the same mount point and if the uids user/password mapping information is available. (default is 0) PacketSigningEnabled If set to one, cifs packet signing is enabled (default 0) cifsFYI If set to one, additional debug information is logged to the system error log. (default 0) ExtendedSecurity If set to one, SPNEGO session establishment is allowed which enables more advanced secure CIFS session establishment (default 0) NTLMV2Enabled If set to one, more secure password hashes are used when the server supports them and when kerberos is not negotiated (default 0) traceSMB If set to one, debug information is logged to the system error log with the start of smb requests and responses (default 0) LookupCacheEnable If set to one, inode information is kept cached for one second improving performance of lookups (default 1) OplockEnabled If set to one, safe distributed caching enabled. These experimental features and tracing can be enabled by changing flags in /proc/fs/cifs (after the cifs module has been installed or built into the kernel, e.g. insmod cifs). To enable a feature set it to 1 e.g. to enable tracing to the kernel message log type: echo 1 > /proc/fs/cifs/cifsFYI and for more extensive tracing including the start of smb requests and responses echo 1 > /proc/fs/cifs/traceSMB Also note that "cat /proc/fs/cifs/DebugData" will display some information about the active sessions and the shares that are mounted. NTLMv2 enablement and packet signing will not work since they the implementation is not quite complete. Do not enable these flags unless you are doing specific testing. Enabling extended security works to Windows 2000 Workstations and XP but not to Windows 2000 server or Samba since it does not usually send "raw NTLMSSP" (instead it sends NTLMSSP encapsulated in SPNEGO/GSSAPI, which support is not complete in the CIFS VFS yet).