1

I have two computers on the same network, and until recently both could mount a network drive. Something has changed, and now only one machine can connect.

mount p-drive used to work as expected on both machines. Now my Debian laptop responds with:

mount --verbose p-drive

Password for USER@//ADDRESS/Users_S$/USER/:  ****
mount.cifs kernel mount options:   ip=XXX.XXX.XXX.XXX,unc=\\ADDRESS,noauto,uid=1000,gid=1000,user=USER,prefixpath=USER/,pass=****
mount error(95): Operation not supported
Refer to the mount.cifs(8) manual page (e.g. man mount.cifs)

For comparison, this is what it reports on my Ubuntu 14 machine, which successfully mounts the drive:

mount --verbose p-drive

Password for USER@//ADDRESS/Users_S$/USER/: **** 
mount.cifs kernel mount options: ip=XXX.XXX.XXX.XXX,unc=\\ADDRESS,noauto,uid=223159,gid=10513,user=USER,prefixpath=USER/,pass=****

There are quite a lot of questions here and elsewhere about this particular error, many of which refer to the sticky bit of mount.cifs. I think this is set for both the working and non-working machine, as shown below.

Also, I've tried mounting as my normal user as well as as root, and in both cases the result is the same. I've also tried adding the option "vers=3.0" and "sec=ntlm", as suggested in some other threads, with no change.

Given that I'm using the same config on both machines, and until recently (weeks) it worked on both machines, I'm assuming that problem is due to something changing between mount.cifs versions 6.0 and 6.7, or kernel 4.4 and 4.13.

I have read many other questions about this, but I don't understand the details provided, or how it applies to my situation. Any suggestions would be most welcome!

UPDATE and solution

The output of dmesg provided the clue I needed - adding the vers=1.0 option on the newer machine, which I guess tells the more recent version of mount.cifs to use an older protocol. Presumably the older Ubuntu machine only uses the older protocol, so doesn't need the option to be set.

Specs of working machine:

fstab

//ADDRESS/Users_S$/USER/     /HOME/p-drive      cifs    noauto,users,user=USER,uid=USER,rw     0       0

(Note that my user name on the local machine and the remote machine are the same here, USER)

uname -a

Linux XXXX 4.4.0-97-generic #120~14.04.1-Ubuntu SMP Wed Sep 20 15:53:13 UTC 2017 x86_64 x86_64 x86_64 GNU/Linux

mount.cifs -V:

6.0

ls -lh /sbin/mount.cifs

-rwsr-xr-x 1 root root 35K Jun 27  2013 /sbin/mount.cifs

dmesg output

[1718195.879486] CIFS VFS: Autodisabling the use of server inode numbers on \ADDRESS$. This server doesn't seem to support them properly. Hardlinks will not be recognized on this mount. Consider mounting with the "noserverino" option to silence this message.

Specs of non-working machine:

fstab:

//ADDRESS/Users_S$/USER/           /HOME/p-drive       cifs    noauto,users,user=USER,uid=LOCAL_USER,rw      0       0

(for this machine, my local username (LOCAL_USER) is not the same as my username on the remote machine (USER))

uname -a

Linux 4.13.0-1-amd64 #1 SMP Debian 4.13.4-2 (2017-10-15) x86_64 GNU/Linux

mount.cifs -V:

6.7

ls -lh /sbin/mount.cifs

-rwsr-xr-x 1 root root 35K Mar  8  2017 /sbin/mount.cifs

dmesg output

[15873.139891] CIFS VFS: Dialect not supported by server. Consider specifying vers=1.0 or vers=2.1 on mount for accessing older servers
[15873.139902] CIFS VFS: cifs_mount failed w/return code = -95

  • What if you add vers=3.0 to the options line on the system that doesn't work? – roaima Nov 7 '17 at 18:09
  • @roaima I get the same error – Tyler Nov 7 '17 at 18:18
  • @roaima I updated my question, I've tried the 'vers' and 'sec' options as already, but maybe other settings are important (i.e., not 3.0 or ntlm?) – Tyler Nov 7 '17 at 18:26
  • Does the output from the end of dmesg give you anything useful? – roaima Nov 7 '17 at 18:27
  • @roaima indeed it does, see above! You've solved my problem - if you post your comment as an answer I'll accept it. – Tyler Nov 7 '17 at 18:54
2

You may find that dmesg provides some additional information. (The dmesg command accesses the most recent series of messages from the kernel. Often these are more readily accessible in a log file such as /var/log/kern.log or /var/log/syslog.)

In your case I see that these are the relevant messages

[15873.139891] CIFS VFS: Dialect not supported by server. Consider specifying vers=1.0 or vers=2.1 on mount for accessing older servers
[15873.139902] CIFS VFS: cifs_mount failed w/return code = -95

The solution here is exactly as recommended within the message: append vers=1.0 or vers=2.1 to the mount options. (This controls the SMB/CIFS protocol version.) See the man page for Debian/Stretch.

2

As the error message says do man mount.cifs:

OPTIONS
    username=arg
       specifies the username to connect as. If this is not given, then
       the environment variable USER is used.

       Earlier versions of mount.cifs also allowed one to specify the
       username in a "user%password" or "workgroup/user" or
       "workgroup/user%password" to allow the password and workgroup to be
       specified as part of the username. Support for those alternate
       username formats is now deprecated and should no longer be used.
       Users should use the discrete "password=" and "domain=" to specify
       those values. While some versions of the cifs kernel module accept
       "user=" as an abbreviation for this option, its use can confuse the
       standard mount program into thinking that this is a non-superuser
       mount. It is therefore recommended to use the full "username="
       option name.

So, you have to use username= instead of user=, and password= instead of pass=.

  • Thanks! Turns out that wasn't the problem, but good to know regardless. – Tyler Nov 7 '17 at 18:53

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.