Skip site navigation (1)Skip section navigation (2)
Date:      Thu, 28 Sep 2017 18:41:01 -0300
From:      Mario Lobo <lobo@bsd.com.br>
To:        Ronald Klop <ronald-lists@klop.ws>
Cc:        Erwan Legrand <freebsd@erwanlegrand.com>, freebsd-fs@freebsd.org, FreeBSD questions <freebsd-questions@freebsd.org>
Subject:   Re: mount_smbfs question (re-post)
Message-ID:  <20170928184101.55c8a0ec@Papi.lobos>
In-Reply-To: <CA%2ByoEx9p97m0yLsc0emdcA6u-P5YqHEc4ckHpN9RT-qe8E2bpg@mail.gmail.com>
References:  <20170927100635.7b56f8fd@Papi.lobos> <CA%2B4G5KZP5TsGk53Wvf3SYCHwbTDry21qxa=0Sq%2BH5-voZWeumQ@mail.gmail.com> <CA%2ByoEx8kVpoHrZOv5fCSa6=YaaCQ3YWJUQtYiPVhqR6ZnjufCg@mail.gmail.com> <CA%2B4G5KZwp=3nQfs7pj5fkB-sLErJ6i-jiF4cTyUkBecDZjTdig@mail.gmail.com> <op.y7algwv7kndu52@joepie> <CA%2ByoEx9p97m0yLsc0emdcA6u-P5YqHEc4ckHpN9RT-qe8E2bpg@mail.gmail.com>

next in thread | previous in thread | raw e-mail | index | archive | help
On Thu, 28 Sep 2017 17:48:23 -0300
Mario Lobo <lobo@bsd.com.br> wrote:

> 2017-09-28 17:20 GMT-03:00 Ronald Klop <ronald-lists@klop.ws>:
> 
> > On Thu, 28 Sep 2017 19:08:04 +0200, Erwan Legrand <  
> > freebsd@erwanlegrand.com> wrote:  
> >
> > On Thu, Sep 28, 2017 at 4:16 PM, Mario Lobo <lobo@bsd.com.br>
> > wrote:  
> >>  
> >>> 2017-09-27 11:20 GMT-03:00 Erwan Legrand
> >>> <freebsd@erwanlegrand.com>: 
> >>>> On Wed, Sep 27, 2017 at 3:06 PM, Mario Lobo
> >>>> <mlobo@digiart.art.br> wrote:  
> >>>> > Since my environment is tottaly surrounded with shares that no
> >>>> > longer accept SMBv1 (Windows, Linux AND FreeBSD servers), so
> >>>> > basically in the end, what I'm really looking for is a
> >>>> > confirmation that I'll just have to dump all Freebsd samba
> >>>> > clients because the OS can't deal with SMBv2 or above.  
> >>>>
> >>>> Perhaps have a look at implementations of SMB on top of FUSE?
> >>>>
> >>>> http://portsmon.freebsd.org/portoverview.py?category=sysutil
> >>>> s&portname=fusefs-smbnetfs
> >>>>  
> >>>
> >>> I did. Same problem.
> >>> smbnetfs only works with SMBv1
> >>>
> >>>  
> >> It is based on libsmbclient, thus it should support SMB2 if
> >> smb.conf allows it. According to the following thread, the client
> >> protocol is resticted to SMB1 by default:
> >>
> >> https://lists.samba.org/archive/samba-technical/2016-Novembe
> >> r/thread.html#116999
> >>
> >> This might be fixed by setting "client max protocol = SMB2" in
> >> smb.conf. ($HOME/.smb/smb.conf in this case?)
> >>  
> >
> > I'd suggest setting "client min protocol".
> >                             ^^^
> >
> > Regards,
> > Ronald.
> >
> >
> > _______________________________________________  
> >> freebsd-fs@freebsd.org mailing list
> >> https://lists.freebsd.org/mailman/listinfo/freebsd-fs
> >> To unsubscribe, send any mail to
> >> "freebsd-fs-unsubscribe@freebsd.org" 
> >  
> I just tested it!
> 
> 2 shares. 1 with SMBv1 and 1 with client min protocol=SMBv2
> They are both SAMBA with FREEBSD.
> 
> The first I can read/write anywhere in it
> The second I can't even see whats in it.
> 
> These are the msgs from running smbnetfs -d /shares
> 
> when accessing the SMBv1 share (OK):
> 
> unique: 1178, opcode: READLINK (5), nodeid: 11, insize: 40, pid: 36429
> readlink /SEAWAY/NEWSITE 1025
>    unique: 1178, success, outsize: 26
> unique: 1179, opcode: GETATTR (3), nodeid: 1, insize: 40, pid: 36429
> getattr /
>    unique: 1179, success, outsize: 112
> unique: 1180, opcode: LOOKUP (1), nodeid: 12, insize: 51, pid: 36429
> LOOKUP /NEWSITE/.directory
> getattr /NEWSITE/.directory
>    unique: 1180, error: -2 (No such file or directory), outsize: 16
> unique: 1181, opcode: READLINK (5), nodeid: 11, insize: 40, pid: 36429
> readlink /SEAWAY/NEWSITE 1025
>    unique: 1181, success, outsize: 26
> unique: 1182, opcode: GETATTR (3), nodeid: 1, insize: 40, pid: 36429
> getattr /
>    unique: 1182, success, outsize: 112
> unique: 1183, opcode: READLINK (5), nodeid: 11, insize: 40, pid: 36429
> readlink /SEAWAY/NEWSITE 1025
>    unique: 1183, success, outsize: 26
> unique: 1184, opcode: GETATTR (3), nodeid: 1, insize: 40, pid: 36429
> getattr /
>    unique: 1184, success, outsize: 112
> unique: 1185, opcode: LOOKUP (1), nodeid: 12, insize: 51, pid: 36429
> LOOKUP /NEWSITE/.directory
> getattr /NEWSITE/.directory
>    unique: 1185, error: -2 (No such file or directory), outsize: 16
> unique: 1186, opcode: GETATTR (3), nodeid: 1, insize: 40, pid: 36429
> getattr /
>    unique: 1186, success, outsize: 112
> unique: 1187, opcode: GETATTR (3), nodeid: 3, insize: 40, pid: 36429
> getattr /SEAWAY
>    unique: 1187, success, outsize: 112
> unique: 1188, opcode: GETATTR (3), nodeid: 11, insize: 40, pid: 36429
> getattr /SEAWAY/NEWSITE
>    unique: 1188, success, outsize: 112
> unique: 1189, opcode: READLINK (5), nodeid: 11, insize: 40, pid: 36429
> readlink /SEAWAY/NEWSITE 1025
>    unique: 1189, success, outsize: 26
> unique: 1190, opcode: READLINK (5), nodeid: 11, insize: 40, pid: 36429
> readlink /SEAWAY/NEWSITE 1025
>    unique: 1190, success, outsize: 26
> unique: 1191, opcode: GETATTR (3), nodeid: 1, insize: 40, pid: 36429
> getattr /
>    unique: 1191, success, outsize: 112
> unique: 1192, opcode: GETATTR (3), nodeid: 12, insize: 40, pid: 36429
> getattr /NEWSITE
>    unique: 1192, success, outsize: 112
> unique: 1193, opcode: GETATTR (3), nodeid: 3, insize: 40, pid: 36429
> getattr /SEAWAY
>    unique: 1193, success, outsize: 112
> unique: 1194, opcode: GETATTR (3), nodeid: 12, insize: 40, pid: 36429
> getattr /NEWSITE
>    unique: 1194, success, outsize: 112
> unique: 1195, opcode: GETATTR (3), nodeid: 11, insize: 40, pid: 36429
> getattr /SEAWAY/NEWSITE
>    unique: 1195, success, outsize: 112
> unique: 1196, opcode: READLINK (5), nodeid: 11, insize: 40, pid: 36429
> readlink /SEAWAY/NEWSITE 1025
> 
> 
> 
> when accessing the SMBv2 share (BAD):
> 
> readlink /SEAWAY/SITE-DESIGN 1025
>    unique: 1157, success, outsize: 30
> unique: 1158, opcode: GETATTR (3), nodeid: 1, insize: 40, pid: 36446
> getattr /
>    unique: 1158, success, outsize: 112
> unique: 1159, opcode: OPENDIR (27), nodeid: 18, insize: 48, pid: 36446
> opendir flags: 0x0 /SITE-DESIGN
>    unique: 1159, error: -5 (Input/output error), outsize: 16
> 2017-09-28 17:40:21.948 srv(39637)->smb_conn_srv_opendir: errno=22,
> Invalid argument
> unique: 1160, opcode: GETATTR (3), nodeid: 17, insize: 40, pid: 36429
> getattr /SEAWAY/SITE-DESIGN
>    unique: 1160, success, outsize: 112
> unique: 1161, opcode: READLINK (5), nodeid: 17, insize: 40, pid: 36429
> readlink /SEAWAY/SITE-DESIGN 1025
>    unique: 1161, success, outsize: 30
> unique: 1162, opcode: GETATTR (3), nodeid: 1, insize: 40, pid: 36429
> getattr /
>    unique: 1162, success, outsize: 112
> unique: 1163, opcode: GETATTR (3), nodeid: 18, insize: 40, pid: 36429
> getattr /SITE-DESIGN
>    unique: 1163, success, outsize: 112
> unique: 1164, opcode: READLINK (5), nodeid: 17, insize: 40, pid: 36429
> readlink /SEAWAY/SITE-DESIGN 1025
>    unique: 1164, success, outsize: 30
> unique: 1165, opcode: GETATTR (3), nodeid: 1, insize: 40, pid: 36429
> getattr /
>    unique: 1165, success, outsize: 112
> unique: 1166, opcode: GETATTR (3), nodeid: 17, insize: 40, pid: 36429
> getattr /SEAWAY/SITE-DESIGN
>    unique: 1166, success, outsize: 112
> 
> 
> Unless I'm missing some tuning option in smbnetfs for SMBv2 and above,
> 
> It doesen't work!
> 
> Thanks,
> 

One more thing.

If I gear down the second server to SMBv1, I can access it just fine.

-- 
Mario Lobo
http://www.mallavoodoo.com.br
FreeBSD since 2.2.8 [not Pro-Audio.... YET!!]
 
"UNIX was not designed to stop you from doing stupid things, 
because that would also stop you from doing clever things."



Want to link to this message? Use this URL: <https://mail-archive.FreeBSD.org/cgi/mid.cgi?20170928184101.55c8a0ec>