Tag: SMB

If your mount.cifs has stopped working, try adding -o vers=3.0

If you have been using “mount.cifs …” or “sudo mount.cifs …” to mount a share located on a Windows machine in Linux, and it stops working after any kind of update or change to your network, try adding -o vers=3.0, or if you are already using some -o options, add vers=3.0 to the list (separated from any existing -o options by a comma). You could also try 2.0 rather than 3.0, but by default it tries to use 1.0 as the SMB protocol version, and Microsoft has removed support for that in some versions of Windows. So if you get a Windows upgrade that removes the 1.0 protocol, your existing mount-cifs invocation line may stop working, but it appears that sometimes other changes in the network can trigger this as well. The vers= option is explained on the mount.cifs man page as follows:

SMB protocol version. Allowed values are:

  • 1.0 – The classic CIFS/SMBv1 protocol. This is the default.
  • 2.0 – The SMBv2.002 protocol. This was initially introduced in Windows Vista Service Pack 1, and Windows Server 2008. Note that the initial release version of Windows Vista spoke a slightly different dialect
    (2.000) that is not supported.
  • 2.1 – The SMBv2.1 protocol that was introduced in Microsoft Windows 7 and Windows Server 2008R2.
  • 3.0 – The SMBv3.0 protocol that was introduced in Microsoft Windows 8 and Windows Server 2012.

Note too that while this option governs the protocol version used, not all features of each version are available.

So, a typical invocation to mount a Windows share accessible by all users of the machine might now look something like this:

sudo mount.cifs //WindowsIPaddress/WindowsShareName /path/to/mountpoint/ -o user=WindowsUserName,password=WindowsUserPassword,vers=3.0,uid=1000,gid=1000

(The bolded part above is all one line.)

Link: How to Set up Samba Server for Windows, Linux and OS X File Sharing on Raspberry Pi

Samba is re-implementation of the SMB/CIFS networking protocol, samba provides cross-platform file and print services sharing for various Microsoft Windows, OS X and Linux file sharing.

Full article here:
How to Set up Samba Server for Windows, Linux and OS X File Sharing on Raspberry Pi (Tech Rapid)

Featured Article:

Recent Posts

Recent Comments




GiottoPress by Enrique Chavez

%d bloggers like this: