Skip to main content

Mounting cifs: "Operation not supported" [Resolved]

Unlike the similar question, I cannot even connect with smbclient.

The samba share works fine in windows and automagically works, but in Linux I can't mount it at all and the error message is cryptic at best. Here is my samba.conf:

[global]
    dos charset = CP437
    netbios name = REDACTED
    server string = Lab
    server role = standalone server
    map to guest = Bad User
    obey pam restrictions = Yes
    smb passwd file = /var/etc/private/smbpasswd
    private dir = /var/etc/private
    max log size = 51200
    server min protocol = SMB2
    time server = Yes
    deadtime = 15
    max open files = 11070
    hostname lookups = Yes
    load printers = No
    printcap name = /dev/null
    disable spoolss = Yes
    dns proxy = No
    pid directory = /var/run/samba
    panic action = /usr/local/libexec/samba/samba-backtrace
    idmap config * : backend = tdb
    acl allow execute always = Yes
    create mask = 0666
    directory mask = 0777
    directory name cache size = 0
    kernel change notify = No
    map archive = No
    map readonly = no
    store dos attributes = Yes
    strict locking = No

[common]
    comment = Lab Common share
    path = /mnt/pool/common
    read only = No
    inherit acls = Yes
    hosts allow = XXX.XXX.XX.X/24, XXX.XX.XX.X/24 <-- redacted
    hide dot files = No
    veto files = /.snap/.windows/.zfs/
    vfs objects = zfsacl, streams_xattr, aio_pthread
    zfsacl:acesort = dontcare
    nfs4:chown = yes
    nfs4:acedup = merge
    nfs4:mode = special
    recycle:subdir_mode = 0700
    recycle:directory_mode = 0777
    recycle:touch = yes
    recycle:versions = yes
    recycle:keeptree = yes
    recycle:repository = .recycle/%U

The error message is:

[as@localhost ~]$ sudo mount -t cifs -o username=removed,password=removed  //server.ip.address/common /media/windowsshare/
mount error(95): Operation not supported

A perfectly useless message.

The debug-enabled dmesg:

[237179.795551] fs/cifs/cifsfs.c: Devname: //132.239.27.172/common flags: 0
[237179.795563] fs/cifs/connect.c: Username: lauria
[237179.795565] fs/cifs/connect.c: file mode: 0x1ed  dir mode: 0x1ed
[237179.795600] fs/cifs/connect.c: CIFS VFS: in cifs_mount as Xid: 44 with uid: 0
[237179.795600] fs/cifs/connect.c: UNC: \\132.239.27.172\common
[237179.795605] fs/cifs/connect.c: Socket created
[237179.795606] fs/cifs/connect.c: sndbuf 16384 rcvbuf 87380 rcvtimeo 0x1b58
[237179.795897] fs/cifs/fscache.c: cifs_fscache_get_client_cookie: (0xffff8803e0aa4800/0xffff880035d25580)
[237179.795898] fs/cifs/connect.c: Demultiplex PID: 25817
[237179.795902] fs/cifs/connect.c: CIFS VFS: in cifs_get_smb_ses as Xid: 45 with uid: 0
[237179.795903] fs/cifs/connect.c: Existing smb sess not found
[237179.795907] fs/cifs/cifssmb.c: Requesting extended security.
[237179.795910] fs/cifs/transport.c: For smb_command 114
[237179.795912] fs/cifs/transport.c: Sending smb: smb_len=78
[237179.801062] fs/cifs/connect.c: RFC1002 header 0x25
[237179.801067] fs/cifs/misc.c: checkSMB Length: 0x29, smb_buf_length: 0x25
[237179.801090] fs/cifs/transport.c: cifs_sync_mid_result: cmd=114 mid=1 state=4
[237179.801093] fs/cifs/cifssmb.c: Dialect: 65535
[237179.801094] fs/cifs/cifssmb.c: negprot rc -95
[237179.801097] fs/cifs/connect.c: CIFS VFS: leaving cifs_get_smb_ses (xid = 45) rc = -95
[237179.801100] fs/cifs/fscache.c: cifs_fscache_release_client_cookie: (0xffff8803e0aa4800/0xffff880035d25580)
[237179.801262] fs/cifs/connect.c: CIFS VFS: leaving cifs_mount (xid = 44) rc = -95
[237179.801263] CIFS VFS: cifs_mount failed w/return code = -95

I have tried many different -sec options---they all fail, everything has the same error message. smbclient is not helpful either:

smbclient //132.239.27.172/common -U username%password
protocol negotiation failed: NT_STATUS_INVALID_NETWORK_RESPONSE

How does this work on windows but not at all on linux? What am I doing wrong? Any ideas would be appreciated!


Question Credit: paul
Question Reference
Asked May 13, 2019
Tags: linux, samba, cifs
Posted Under: Unix Linux
8 views
5 Answers

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.


credit: paul
Answered May 13, 2019

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.


credit: Ken Finch
Answered May 13, 2019

FreeNas allows you to set up more secure shares. If you allow the lowest windows security protocols (windows NT 4.0) it will work with samba. If you have it set to, say Windows XP protocols and above you reuqire the vers=3.0 as I discovered after struggling for 40 minutes to get the FreeNas connecte wiv CentOS 7. The problem is the clients (and GUI) should be checking the highest version down. Instead it goes from the lowest version available. It may have made sense once but much has changed. I think it's especially annoying that in Gnome you can't add options, either for using CIFS or for specifying security protocol versions. I guess they figure for these people it's command-line or nothing, but that keeps Linux from being used more widely by desktop uses. which is a shame really.


credit: Jonah Libster
Answered May 13, 2019

on nas4free click service -> CIFS/SMB at the bottom of the screen in the Additional Parameters box type

ntlm auth = yes


credit: user352466
Answered May 13, 2019
Your Answer
D:\Adnan\Candoerz\CandoProject\vQA