11

I am attempting to mount a Windows hosted SMB share (CIFS) using Ubuntu 12.04 (using kernel 3.13.0-117-generic). Mounting with SMB1 works, but that is not acceptable, we must instead mount with SMB2.1 or higher.

Below is the output from my attempts to do this by passing the ver= argument

root@----:/# mount -t cifs //SERVER/smbtest /mnt/smbtest --verbose -o ver=2.1,user=administrator
Password:
mount.cifs kernel mount options: 
ip=10.16.0.40,unc=\\server.domain.net\smbtest,ver=2.1,ver=1,user=administrator,pass=********
mount error(22): Invalid argument
Refer to the mount.cifs(8) manual page (e.g. man mount.cifs)

As you can see, there are two ver arguments in the mount.cifs kernel mount options, the one that I specified, and the default (1). This happens if I specify anything other than 1 or 1.0 for ver.

cifs-utils version 5.1 is installed, and cifs.ko is on version 2.02. From the SMB3 kernel status page on the Samba wiki, https://wiki.samba.org/index.php/SMB3_kernel_status,

"The minimum version for use of the Linux kernel SMB3 support is kernel version 3.12 (or backport of cifs.ko module version 2.02 or later) but kernel version 3.18 or later (or equivalent, ie cifs module version 2.04 or later) is recommended for best SMB3 support."

Can anyone help get me on the right track here? I must be missing something. What other methods are available to force SMB2+ connections? This is my first post here, and I tried to keep it brief, if I missed anything let me know and I'll add the info to my post.

As far as I can tell this should work, though I wouldn't be surprised if I have misunderstood something and SMB2+ isn't supported.

Thanks

EDIT: I understand 12.04 is EOL. I will update this post tomorrow with the relevant info for 14.04, which has the same issue. If anyone can answer re: 12.04, that would still be appreciated.

  • 1
    This is particularly relevant in lieu of wannacry ransom ware exploit targets SMB1 – Jeff Puckett May 20 '17 at 23:10
  • If you have the device's name (e.g. foo) but not its ipaddr : nmblookup foo – phreed Oct 30 '18 at 16:01
6

If I use ver, it realy types "Invalid argument" but man mount.cifs says that the option name is "vers", not "ver".

       vers=
       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....

it works for me in Mint 18.1:

mount -t cifs //192.168.1.1/public /home/user/Desktop/share --verbose -o vers=2.1,user=winuser
0

I found the available options in my local man page. Check this on your own machine to see what it supports. Once in the man page, type /vers= to find that argument quickly.

man mount.cifs

I then mounted my share as follows:

sudo mount -t cifs //nas/homes/mike /media/mike/nashome -o vers=3.11,credentials=/home/mike/.ssh/.smb_nas

This required a credentials file with the following contents at /home/mike/.ssh/.smb_nas so I don't need to enter my password in the command (causing it to be stored in your command history in plain-text) or at the prompt (a nuisance).

username=mike
password=[REAL PASSWORD]
domain=WORKGROUP

I am mounting from a Synology NAS that supports SMB version 3.11. You would have to check your Windows (or whatever's hosting files via CIFS/SMB) version to see what it supports on the server-side.

0

Oddly enough, if the share computer is not on that IP address, you might get this same error. A change to the DHCP "moved" our NAS and that was the root of my problem. Once the share was back on the proper IP, errors stopped.

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service, privacy policy and cookie policy

Not the answer you're looking for? Browse other questions tagged or ask your own question.