Skip site navigation (1)Skip section navigation (2)
Date:      Thu, 18 Feb 2021 23:23:06 -0800
From:      David Christensen <dpchrist@holgerdanske.com>
To:        freebsd-questions@freebsd.org
Subject:   mount_smbfs: unable to open connection: syserr = RPC struct is bad
Message-ID:  <d92097ae-5c53-f5ea-0f5b-f366827d5687@holgerdanske.com>

next in thread | raw e-mail | index | archive | help
freebsd-questions:

I have a FreeBSD 12.2-RELEASE server with a jail running Samba on my 
SOHO network.  I use packages, not ports:

2021-02-18 22:53:28 toor@f3 ~
# freebsd-version ; uname -a ; pkg -j samba info 'samba*'
12.2-RELEASE-p3
FreeBSD f3.tracy.holgerdanske.com 12.2-RELEASE-p3 FreeBSD 
12.2-RELEASE-p3 GENERIC  amd64
samba411-4.11.15

2021-02-18 22:54:43 toor@f3 ~
# head -n 15 /jail/samba/usr/local/etc/smb4.conf
[global]
	local master = Yes
	netbios name = SAMBA
	ntlm auth = ntlmv1-permitted
	passdb backend = tdbsam
	preferred master = Yes
	security = USER
	server string = Samba Server Version %v
	wins support = Yes
	workgroup = WORKGROUP

[dpchrist]
	path = /var/local/samba/dpchrist
	read only = No
	valid users = dpchrist


I can connect to the share from Debian 9, Windows 7, and macOS 11, but I 
am unable to connect from another FreeBSD 12.2-RELEASE machine:

2021-02-18 23:05:29 toor@vf1 ~
# freebsd-version ; uname -a
12.2-RELEASE-p3
FreeBSD vf1.tracy.holgerdanske.com 12.2-RELEASE-p3 FreeBSD 
12.2-RELEASE-p3 GENERIC  amd64

2021-02-18 23:05:42 toor@vf1 ~
# ls -ld /usr/home/dpchrist/samba/dpchrist
drwxr-xr-x  2 dpchrist  dpchrist  2 Sep 19 18:15 
/usr/home/dpchrist/samba/dpchrist

2021-02-18 23:05:55 toor@vf1 ~
# mount_smbfs //dpchrist@samba/dpchrist /usr/home/dpchrist/samba
Password:
mount_smbfs: unable to open connection: syserr = RPC struct is bad


Ownership of the node does not affect the outcome.


I do not know how to enable debugging, verbose, etc., for mount_smbfs(8).


I do see some clues in /var/log/messages:

2021-02-18 23:18:59 toor@vf1 ~
# tail -n 20 /var/log/messages | grep smb
Feb 18 21:50:47 vf1 kernel: smb_smb_negotiate: Don't know how to talk 
with server xxx (65535)
Feb 18 22:36:48 vf1 kernel: smb_smb_negotiate: Don't know how to talk 
with server xxx (65535)
Feb 18 22:56:55 vf1 kernel: smb_smb_negotiate: Don't know how to talk 
with server xxx (65535)
Feb 18 23:06:07 vf1 kernel: smb_smb_negotiate: Don't know how to talk 
with server xxx (65535)


STFW and RTFM mount_smbfs(8), I believe mount_smbfs(8) only supports SMB 
protocol version 1.  When the server was 12.1-RELEASE, the configuration 
setting 'ntlm auth = ntlmv1-permitted' included in smb4.conf, above, 
solved that problem and FreeBSD 12.1-RELEASE clients could connect. 
Apparently, no longer.


Suggestions?


David



Want to link to this message? Use this URL: <https://mail-archive.FreeBSD.org/cgi/mid.cgi?d92097ae-5c53-f5ea-0f5b-f366827d5687>