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
vers=3.0
to the options line on the system that doesn't work?dmesg
give you anything useful?