Mounting cifs: "Operation not supported"
To fill out the answers from @Ken and @Paul: The SMB version needs to be specified when higher than v1:
mount -t cifs \
-o username=USERNAME,vers=3.0 \
//server/share \
/mnt/point
The Linux cifs kernel client has been included in the kernel since 2.5.42. The cifs protocol (and related earlier SMB dialects) is the default ("vers=1.0") but support for newer dialects (SMB2.02, SMB2.1 and SMB3 and SMB3.02) can be selected by specifying "vers=2.0" or "vers=2.1" or "vers=3.0" or "vers=3.02" on mount. -- https://wiki.samba.org/index.php/LinuxCIFSKernel
For smbclient the incantation is -m, --max-protocol=LEVEL
:
smblcient -L server -U username -m SMB2
I didn't find a list of the allowed levels for smbclient. According to Marc Muehlfeld in this thread the versions used by Windows are:
- SMB 2.0 was introduced by Vista/2008
- SMB 2.1 by Win7/2008R2
- SMB 2.2 aka 3.0 by Win8/2012
- SMB 3.02 by 8.1/2012R2
There are several different mount
error messages which can be traced back to mismatched protocol level. A non-exhaustive list (feel free to edit answer and add more):
mount error(13): Permission denied
mount error(95): Operation not supported
mount error(121): Remote I/O error
Finally, I've seen some comments that indicate the often quoted advice to use the option sec=ntlmv2
and similar shouldn't be followed anymore. So probably a good idea to at least not mix and match sec
and vers
.
OK "I" figured it out-- for some reason, adding "vers=3.0" makes it work. I don't know why it was having issues without this, or why it works. but for future reference if others are having this issue with their freenas setups.
I have been fighting this for over a month now. With client being Xenserver 6.2 and 6.5, cannot mount ISO directory over CIFS.
The vers=3.0 finally worked.
Where did you find this option??!
My domain is Windows 2012 R2. I did not lower the authentication requirements in the registry - they are all default still (I was just about to open it up wide when I found this).
I did not have to specify a sec= setting at all.
I DID have to specify a domain. I specified domain in caps - may not be needed though.
My command follows.
mount -t cifs "//192.168.92.25/shared" -o username=administrator,password=<your_password>,domain=<YOUR DOMAIN IN CAPS>,vers=3\.0 /root/tmp
Now to figure out how to add options to the authentication.
Thanks Paul, whoever you are.