[Samba] How to mount a share without using -o vers=1.0 ?

Steve Litt slitt at troubleshooters.com
Mon May 13 16:05:20 UTC 2019


Hi all,

Behavior described in this email is identical whether I try to mount at
192.168.100.2, my desktop and location of my Samba server, or
192.168.100.239, my laptop that is remote from my desktop with Samba
server...

I want to mount a share defined on my Linux desktop, on my Linux
laptop, as a better alternative than sshfs or NFS. I want this mount to
happen as version 2.x or 3.x, not as version 1.x. I was successful
using version 1.x with the following mount command:

mount -t cifs -o
username=slitt,vers=1.0 //192.168.100.2/mdesk /mnt/mdesk

However, when I remove the vers=1.0, it fails with the following
message:

====================================================================
mount error: Server abruptly closed the connection.
This can happen if the server does not support the SMB version you are
trying to use. The default SMB version recently changed from SMB1 to
SMB2.1 and above. Try mounting with vers=1.0. mount error(112): Host is
down Refer to the mount.cifs(8) manual page (e.g. man mount.cifs) and
kernel log messages (dmesg)
====================================================================

So I'm still left with the question, how do I do this without vers=1.0.

dmesg pretty much just repeats the error message, as follows:

====================================================================
FS-Cache: Netfs 'cifs' registered for caching
[859714.535143] Key type cifs.spnego registered
[859714.535152] Key type cifs.idmap registered
[909312.597299] No dialect specified on mount. Default has changed to a
more secure dialect, SMB2.1 or later (e.g. SMB3), from CIFS (SMB1). To
use the less secure SMB1 dialect to access old servers which do not
support SMB3 (or SMB2.1) specify vers=1.0 on mount.
====================================================================

The mount.cifs man page seemed mute on the subject except for -o
sec=whatever, and all combinations I tried of sec=whatever and smb.conf
security=whatever didn't change the symptom.

I'm running Void Linux (x86_64) with smbd version 3.6.25 and nmbd
version 3.6.25. My mount.cifs is version 6.9. My iptables firewall
allows both tcp and udp traffic in and out at ports 137, 138, 139, 53,
and 445.

The global part of my smb.conf follows:

====================================================================
global]
   workgroup = MYGROUP
   server string = mdesk_share
   security = user
   hosts allow = 192.168.100.239 192.168.100.2
   load printers = yes
   log file = /var/log/samba/%m.log
   max log size = 50
   passdb backend = tdbsam
   dns proxy = no
====================================================================

The smb.conf section for the share I'm trying to mount follows:

====================================================================
[mdesk]
  comment = Mydesk Mount point
  path = /scratch/mdesk
  valid users = slitt
  public = yes
  writeable = yes
  printable = no
====================================================================

I couldn't find an answer on Samba.Org, and web searches produced
mostly guesses and speculation, many of which I followed up on but led
nowhere.

Any advice on how to perform this mount without -o vers=1.0 would be
greatly appreciated.

Thanks,

SteveT



More information about the samba mailing list